\hypertarget{cam__xpt_8c_source}{}\doxysection{cam\+\_\+xpt.\+c}
\label{cam__xpt_8c_source}\index{cam/cam\_xpt.c@{cam/cam\_xpt.c}}
\mbox{\hyperlink{cam__xpt_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00002}00002 \textcolor{comment}{ * Implementation of the Common Access Method Transport (XPT) layer.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00004}00004 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00006}00006 \textcolor{comment}{ * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00007}00007 \textcolor{comment}{ * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00008}00008 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00010}00010 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00011}00011 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00012}00012 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00013}00013 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions, and the following disclaimer,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00015}00015 \textcolor{comment}{ *    without modification, immediately at the beginning of the file.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00016}00016 \textcolor{comment}{ * 2. The name of the author may not be used to endorse or promote products}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00017}00017 \textcolor{comment}{ *    derived from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00018}00018 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00019}00019 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00020}00020 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00021}00021 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00022}00022 \textcolor{comment}{ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00023}00023 \textcolor{comment}{ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00024}00024 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00025}00025 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00026}00026 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00027}00027 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00028}00028 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00029}00029 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00030}00030 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00032}00032 \textcolor{preprocessor}{\#include "{}opt\_printf.h"{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00035}\mbox{\hyperlink{cam__xpt_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00035}} \mbox{\hyperlink{cam__xpt_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00036}00036 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/time.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/fcntl.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/smp.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/kthread.h>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam_8h}{cam/cam.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__ccb_8h}{cam/cam\_ccb.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__iosched_8h}{cam/cam\_iosched.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__periph_8h}{cam/cam\_periph.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__queue_8h}{cam/cam\_queue.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__sim_8h}{cam/cam\_sim.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__xpt_8h}{cam/cam\_xpt.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__xpt__sim_8h}{cam/cam\_xpt\_sim.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__xpt__periph_8h}{cam/cam\_xpt\_periph.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__xpt__internal_8h}{cam/cam\_xpt\_internal.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__debug_8h}{cam/cam\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__compat_8h}{cam/cam\_compat.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{scsi__all_8h}{cam/scsi/scsi\_all.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{scsi__message_8h}{cam/scsi/scsi\_message.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{scsi__pass_8h}{cam/scsi/scsi\_pass.h}}>}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00074}00074 \textcolor{preprocessor}{\#include <machine/stdarg.h>}     \textcolor{comment}{/* for xpt\_print below */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00076}00076 \textcolor{preprocessor}{\#include "{}opt\_cam.h"{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00077}00077 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00078}00078 \textcolor{comment}{/* Wild guess based on not wanting to grow the stack too much */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00079}\mbox{\hyperlink{cam__xpt_8c_a0014d1eecc346c97f306262f10c8142a}{00079}} \textcolor{preprocessor}{\#define XPT\_PRINT\_MAXLEN        512}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00080}00080 \textcolor{preprocessor}{\#ifdef PRINTF\_BUFR\_SIZE}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00081}00081 \textcolor{preprocessor}{\#define XPT\_PRINT\_LEN   PRINTF\_BUFR\_SIZE}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00082}00082 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00083}\mbox{\hyperlink{cam__xpt_8c_a39eb5b34690f92a6c03fed430163abbf}{00083}} \textcolor{preprocessor}{\#define XPT\_PRINT\_LEN   128}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00084}00084 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00085}\mbox{\hyperlink{cam__xpt_8c_ae4e1be6c36ff8ed1b490ffe01b4f8dac}{00085}} \mbox{\hyperlink{cam__xpt_8c_ae4e1be6c36ff8ed1b490ffe01b4f8dac}{\_Static\_assert}}(\mbox{\hyperlink{cam__xpt_8c_a39eb5b34690f92a6c03fed430163abbf}{XPT\_PRINT\_LEN}} <= \mbox{\hyperlink{cam__xpt_8c_a0014d1eecc346c97f306262f10c8142a}{XPT\_PRINT\_MAXLEN}}, \textcolor{stringliteral}{"{}XPT\_PRINT\_LEN is too large"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00087}00087 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00088}00088 \textcolor{comment}{ * This is the maximum number of high powered commands (e.g. start unit)}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00089}00089 \textcolor{comment}{ * that can be outstanding at a particular time.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00090}00090 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00091}00091 \textcolor{preprocessor}{\#ifndef CAM\_MAX\_HIGHPOWER}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00092}\mbox{\hyperlink{cam__xpt_8c_a7e080aacba8af1bc523ceca1b7e2b0d9}{00092}} \textcolor{preprocessor}{\#define CAM\_MAX\_HIGHPOWER  4}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00093}00093 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00095}00095 \textcolor{comment}{/* Datastructures internal to the xpt layer */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00096}\mbox{\hyperlink{cam__xpt_8c_abe3fa15138317dcaf3db97ef9ae90a7b}{00096}} \mbox{\hyperlink{cam__xpt_8c_abe3fa15138317dcaf3db97ef9ae90a7b}{MALLOC\_DEFINE}}(M\_CAMXPT, \textcolor{stringliteral}{"{}CAM XPT"{}}, \textcolor{stringliteral}{"{}CAM XPT buffers"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00097}\mbox{\hyperlink{cam__xpt_8c_a979e9941f01b351fe18f4a3a7354dd33}{00097}} \mbox{\hyperlink{cam__xpt_8c_abe3fa15138317dcaf3db97ef9ae90a7b}{MALLOC\_DEFINE}}(M\_CAMDEV, \textcolor{stringliteral}{"{}CAM DEV"{}}, \textcolor{stringliteral}{"{}CAM devices"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00098}\mbox{\hyperlink{cam__xpt_8c_aedf89df2cc2b883b0e098c6226479b20}{00098}} \mbox{\hyperlink{cam__xpt_8c_abe3fa15138317dcaf3db97ef9ae90a7b}{MALLOC\_DEFINE}}(M\_CAMCCB, \textcolor{stringliteral}{"{}CAM CCB"{}}, \textcolor{stringliteral}{"{}CAM CCBs"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00099}\mbox{\hyperlink{cam__xpt_8c_a360b9e43edbc0d9cc45d4eca2111459e}{00099}} \mbox{\hyperlink{cam__xpt_8c_abe3fa15138317dcaf3db97ef9ae90a7b}{MALLOC\_DEFINE}}(M\_CAMPATH, \textcolor{stringliteral}{"{}CAM path"{}}, \textcolor{stringliteral}{"{}CAM paths"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00101}\mbox{\hyperlink{structxpt__softc}{00101}} \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__softc}{xpt\_softc}} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00102}\mbox{\hyperlink{structxpt__softc_aa1705e3549e9cf8217c299d74180f4e6}{00102}}         uint32\_t                \mbox{\hyperlink{structxpt__softc_aa1705e3549e9cf8217c299d74180f4e6}{xpt\_generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00104}00104         \textcolor{comment}{/* number of high powered commands that can go through right now */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00105}\mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{00105}}         \textcolor{keyword}{struct }mtx              \mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{xpt\_highpower\_lock}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00106}00106         \mbox{\hyperlink{scsi__ctl_8c_a7742b802bd73b22a2fbbea5b4e16ebaf}{STAILQ\_HEAD}}(highpowerlist, \mbox{\hyperlink{structcam__ed}{cam\_ed}})     highpowerq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00107}00107         \textcolor{keywordtype}{int}                     num\_highpower;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00108}00108 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00109}00109         \textcolor{comment}{/* queue for handling async rescan requests. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00110}00110         \mbox{\hyperlink{cam__queue_8h_a2c1b7587c89969d66bccfd5502f6c7c0}{TAILQ\_HEAD}}(, \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}}) ccb\_scanq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00111}00111         \textcolor{keywordtype}{int} buses\_to\_config;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00112}00112         \textcolor{keywordtype}{int} buses\_config\_done;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00113}00113         \textcolor{keywordtype}{int} announce\_nosbuf;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00115}00115         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00116}00116 \textcolor{comment}{         * Registered buses}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00117}00117 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00118}00118 \textcolor{comment}{         * N.B., "{}busses"{} is an archaic spelling of "{}buses"{}.  In new code}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00119}00119 \textcolor{comment}{         * "{}buses"{} is preferred.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00120}00120 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00121}00121         \mbox{\hyperlink{cam__queue_8h_a2c1b7587c89969d66bccfd5502f6c7c0}{TAILQ\_HEAD}}(,\mbox{\hyperlink{structcam__eb}{cam\_eb}})     xpt\_busses;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00122}00122         u\_int                   bus\_generation;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00124}00124         \textcolor{keywordtype}{int}                     boot\_delay;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00125}00125         \textcolor{keyword}{struct }callout          boot\_callout;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00126}00126         \textcolor{keyword}{struct }task             boot\_task;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00127}00127         \textcolor{keyword}{struct }root\_hold\_token  xpt\_rootmount;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00129}00129         \textcolor{keyword}{struct }mtx              xpt\_topo\_lock;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00130}00130         \textcolor{keyword}{struct }taskqueue        *xpt\_taskq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00131}00131 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00133}\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{00133}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00134}\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{00134}}         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}}          = 0x01,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00135}\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea1a73e6b67755d2c41c85dbdd6f948007}{00135}}         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea1a73e6b67755d2c41c85dbdd6f948007}{DM\_RET\_FLAG\_MASK}}        = 0x0f,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00136}\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaf877731a60134f510f31d0b0e09244c6}{00136}}         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaf877731a60134f510f31d0b0e09244c6}{DM\_RET\_NONE}}          = 0x00,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00137}\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea94d2871d8c1e22ef02264730158702e8}{00137}}         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea94d2871d8c1e22ef02264730158702e8}{DM\_RET\_STOP}}          = 0x10,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00138}\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{00138}}         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}}            = 0x20,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00139}\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{00139}}         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}}                = 0x30,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00140}00140         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}    = 0xf0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00141}\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{00141}} \} \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00143}\mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204}{00143}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00144}\mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a4acb1763be1d0420cd4fe5e530a60c34}{00144}}         \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a4acb1763be1d0420cd4fe5e530a60c34}{XPT\_DEPTH\_BUS}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00145}\mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a726966fef1cad981779e997dd8356086}{00145}}         \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a726966fef1cad981779e997dd8356086}{XPT\_DEPTH\_TARGET}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00146}\mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a04559fbece20b7523aec59dcffeff945}{00146}}         \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a04559fbece20b7523aec59dcffeff945}{XPT\_DEPTH\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00147}00147         \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a30df43c88b40546bcdd1ff2eab95ec21}{XPT\_DEPTH\_PERIPH}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00148}\mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a30df43c88b40546bcdd1ff2eab95ec21}{00148}} \} \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204}{xpt\_traverse\_depth}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00150}\mbox{\hyperlink{structxpt__traverse__config}{00150}} \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00151}\mbox{\hyperlink{structxpt__traverse__config_aa24e1ec54658138a093ea2bc01cf88c8}{00151}}         \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204}{xpt\_traverse\_depth}}    \mbox{\hyperlink{structxpt__traverse__config_aa24e1ec54658138a093ea2bc01cf88c8}{depth}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00152}\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{00152}}         \textcolor{keywordtype}{void}                    *\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00153}\mbox{\hyperlink{structxpt__traverse__config_a8b5a49c7bda2fb16a87d579a198fee41}{00153}}         \textcolor{keywordtype}{void}                    *\mbox{\hyperlink{structxpt__traverse__config_a8b5a49c7bda2fb16a87d579a198fee41}{tr\_arg}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00154}00154 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00156}\mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{00156}} \textcolor{keyword}{typedef} \textcolor{keywordtype}{int}     \mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}} (\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00157}\mbox{\hyperlink{cam__xpt_8c_a1143f9a80a4766b1301868d4e06dacdf}{00157}} \textcolor{keyword}{typedef} \textcolor{keywordtype}{int}     \mbox{\hyperlink{cam__xpt_8c_a1143f9a80a4766b1301868d4e06dacdf}{xpt\_targetfunc\_t}} (\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00158}\mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{00158}} \textcolor{keyword}{typedef} \textcolor{keywordtype}{int}     \mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} (\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00159}\mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{00159}} \textcolor{keyword}{typedef} \textcolor{keywordtype}{int}     \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} (\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00160}\mbox{\hyperlink{cam__xpt_8c_a92b6641d91dd3a6695ea7dd4660eaa74}{00160}} \textcolor{keyword}{typedef} \textcolor{keywordtype}{int}     \mbox{\hyperlink{cam__xpt_8c_a92b6641d91dd3a6695ea7dd4660eaa74}{xpt\_pdrvfunc\_t}} (\textcolor{keyword}{struct} \mbox{\hyperlink{structperiph__driver}{periph\_driver}} **pdrv, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00161}00161 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00162}00162 \textcolor{comment}{/* Transport layer configuration information */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00163}\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{00163}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__softc}{xpt\_softc}} \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00165}\mbox{\hyperlink{cam__xpt_8c_a5f9822b48e26ab1742cb680d0437f943}{00165}} \mbox{\hyperlink{cam__xpt_8c_a5f9822b48e26ab1742cb680d0437f943}{MTX\_SYSINIT}}(xpt\_topo\_init, \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_topo\_lock, \textcolor{stringliteral}{"{}XPT topology lock"{}}, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00166}00166 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00167}\mbox{\hyperlink{cam__xpt_8c_a679d406c1409f908d5d7fc7ee9a1ccdd}{00167}} \mbox{\hyperlink{cam__xpt_8c_a679d406c1409f908d5d7fc7ee9a1ccdd}{SYSCTL\_INT}}(\_kern\_cam, OID\_AUTO, boot\_delay, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00168}00168            \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.boot\_delay, 0, \textcolor{stringliteral}{"{}Bus registration wait time"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00169}\mbox{\hyperlink{cam__xpt_8c_aa40eebe4bb139c62c88944f9650a8857}{00169}} \mbox{\hyperlink{cam__xpt_8c_aa40eebe4bb139c62c88944f9650a8857}{SYSCTL\_UINT}}(\_kern\_cam, OID\_AUTO, \mbox{\hyperlink{structxpt__softc_aa1705e3549e9cf8217c299d74180f4e6}{xpt\_generation}}, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00170}00170             \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_aa1705e3549e9cf8217c299d74180f4e6}{xpt\_generation}}, 0, \textcolor{stringliteral}{"{}CAM peripheral generation count"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00171}\mbox{\hyperlink{cam__xpt_8c_abceb9791bf6f1d373bf6808e6a618d1d}{00171}} \mbox{\hyperlink{cam__xpt_8c_a679d406c1409f908d5d7fc7ee9a1ccdd}{SYSCTL\_INT}}(\_kern\_cam, OID\_AUTO, announce\_nosbuf, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00172}00172             \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.announce\_nosbuf, 0, \textcolor{stringliteral}{"{}Don't use sbuf for announcements"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00173}00173 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00174}\mbox{\hyperlink{structcam__doneq}{00174}} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__doneq}{cam\_doneq}} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00175}\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{00175}}         \textcolor{keyword}{struct }mtx\_padalign     \mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00176}00176         \mbox{\hyperlink{scsi__ctl_8c_a7742b802bd73b22a2fbbea5b4e16ebaf}{STAILQ\_HEAD}}(, \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}})        \mbox{\hyperlink{structcam__doneq}{cam\_doneq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00177}00177         \textcolor{keywordtype}{int}                     cam\_doneq\_sleep;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00178}00178 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00180}\mbox{\hyperlink{cam__xpt_8c_ab0f84f295d3b76549908f2a897718483}{00180}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__doneq}{cam\_doneq}} \mbox{\hyperlink{cam__xpt_8c_ab0f84f295d3b76549908f2a897718483}{cam\_doneqs}}[MAXCPU];}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00181}\mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{00181}} \textcolor{keyword}{static} u\_int \_\_read\_mostly \mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00182}\mbox{\hyperlink{cam__xpt_8c_a018571c1d0ded4716fe7113c268f7d2d}{00182}} \textcolor{keyword}{static} \textcolor{keyword}{struct }proc *\mbox{\hyperlink{cam__xpt_8c_a018571c1d0ded4716fe7113c268f7d2d}{cam\_proc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00183}\mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{00183}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__doneq}{cam\_doneq}} \mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{cam\_async}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00185}\mbox{\hyperlink{cam__xpt_8c_a2d24f4e3659ae070b35f64ee1cb595ab}{00185}} \mbox{\hyperlink{cam__xpt_8c_a679d406c1409f908d5d7fc7ee9a1ccdd}{SYSCTL\_INT}}(\_kern\_cam, OID\_AUTO, num\_doneqs, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00186}00186            \&\mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}}, 0, \textcolor{stringliteral}{"{}Number of completion queues/threads"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00188}\mbox{\hyperlink{cam__periph_8h_a88a107b9711f7cf295bb241e5bff985b}{00188}} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{cam__xpt_8c_a88a107b9711f7cf295bb241e5bff985b}{xpt\_periph}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00190}\mbox{\hyperlink{cam__xpt_8c_a1059289591caa27d6dd1a5463c6d0d63}{00190}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__periph_8h_ae8635482322b2513ab2f662535250ac0}{periph\_init\_t}} \mbox{\hyperlink{cam__xpt_8c_a1059289591caa27d6dd1a5463c6d0d63}{xpt\_periph\_init}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00191}00191 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00192}\mbox{\hyperlink{cam__xpt_8c_a37681ff65fbdc07037cf05a13790e1ec}{00192}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structperiph__driver}{periph\_driver}} \mbox{\hyperlink{cam__xpt_8c_a37681ff65fbdc07037cf05a13790e1ec}{xpt\_driver}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00193}00193 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00194}00194         \mbox{\hyperlink{cam__xpt_8c_a1059289591caa27d6dd1a5463c6d0d63}{xpt\_periph\_init}}, \textcolor{stringliteral}{"{}xpt"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00195}00195         TAILQ\_HEAD\_INITIALIZER(\mbox{\hyperlink{cam__xpt_8c_a37681ff65fbdc07037cf05a13790e1ec}{xpt\_driver}}.units), \textcolor{comment}{/* generation */} 0,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00196}00196         \mbox{\hyperlink{cam__periph_8h_a33b94a2f646c305ba7ca727acb938254}{CAM\_PERIPH\_DRV\_EARLY}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00197}00197 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00198}00198 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00199}\mbox{\hyperlink{cam__xpt_8c_a64cc51f991b75a12ba8be55a776e555e}{00199}} \mbox{\hyperlink{cam__xpt_8c_a64cc51f991b75a12ba8be55a776e555e}{PERIPHDRIVER\_DECLARE}}(xpt, \mbox{\hyperlink{cam__xpt_8c_a37681ff65fbdc07037cf05a13790e1ec}{xpt\_driver}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00201}\mbox{\hyperlink{cam__xpt_8c_a9333adef7c7811876b63cf86743fb358}{00201}} \textcolor{keyword}{static} d\_open\_t \mbox{\hyperlink{cam__xpt_8c_a9333adef7c7811876b63cf86743fb358}{xptopen}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00202}\mbox{\hyperlink{cam__xpt_8c_affa6f21bec464942989696c387a06dec}{00202}} \textcolor{keyword}{static} d\_close\_t \mbox{\hyperlink{cam__xpt_8c_affa6f21bec464942989696c387a06dec}{xptclose}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00203}\mbox{\hyperlink{cam__xpt_8c_ac8210df81c34685b5fa3f2c1ac5c2dcf}{00203}} \textcolor{keyword}{static} d\_ioctl\_t \mbox{\hyperlink{cam__xpt_8c_ac8210df81c34685b5fa3f2c1ac5c2dcf}{xptioctl}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00204}\mbox{\hyperlink{cam__xpt_8c_a78af8c7d0a9430b3b4d7d2f730518ad7}{00204}} \textcolor{keyword}{static} d\_ioctl\_t \mbox{\hyperlink{cam__xpt_8c_a78af8c7d0a9430b3b4d7d2f730518ad7}{xptdoioctl}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00206}\mbox{\hyperlink{cam__xpt_8c_a3effa3e955ddff526f367c0d94f1ac83}{00206}} \textcolor{keyword}{static} \textcolor{keyword}{struct }cdevsw \mbox{\hyperlink{cam__xpt_8c_a3effa3e955ddff526f367c0d94f1ac83}{xpt\_cdevsw}} = \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00207}00207         .d\_version =    D\_VERSION,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00208}00208         .d\_flags =      0,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00209}00209         .d\_open =       \mbox{\hyperlink{cam__xpt_8c_a9333adef7c7811876b63cf86743fb358}{xptopen}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00210}00210         .d\_close =      \mbox{\hyperlink{cam__xpt_8c_affa6f21bec464942989696c387a06dec}{xptclose}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00211}00211         .d\_ioctl =      \mbox{\hyperlink{cam__xpt_8c_ac8210df81c34685b5fa3f2c1ac5c2dcf}{xptioctl}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00212}00212         .d\_name =       \textcolor{stringliteral}{"{}xpt"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00213}00213 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00215}00215 \textcolor{comment}{/* Storage for debugging datastructures */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00216}\mbox{\hyperlink{cam__debug_8h_aa56e84cf3a282c85a99d9c51a56dc9b0}{00216}} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *\mbox{\hyperlink{cam__xpt_8c_aa56e84cf3a282c85a99d9c51a56dc9b0}{cam\_dpath}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00217}\mbox{\hyperlink{cam__debug_8h_a6160da06f4f7066af8466a0680cc645a}{00217}} u\_int32\_t \_\_read\_mostly \mbox{\hyperlink{cam__xpt_8c_a730788b21146c843927c6b94532a3369}{cam\_dflags}} = \mbox{\hyperlink{cam__debug_8h_ae6388ea0fc3b39c70f1e2d252e2fab51}{CAM\_DEBUG\_FLAGS}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00218}\mbox{\hyperlink{cam__xpt_8c_a5359da0e808702e0cf8097c0005f398c}{00218}} \mbox{\hyperlink{cam__xpt_8c_aa40eebe4bb139c62c88944f9650a8857}{SYSCTL\_UINT}}(\_kern\_cam, OID\_AUTO, dflags, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00219}00219         \&\mbox{\hyperlink{cam__xpt_8c_a730788b21146c843927c6b94532a3369}{cam\_dflags}}, 0, \textcolor{stringliteral}{"{}Enabled debug flags"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00220}\mbox{\hyperlink{cam__debug_8h_a9ddc7bfdababa0634991d9f7b6aa6845}{00220}} u\_int32\_t \mbox{\hyperlink{cam__xpt_8c_a9ddc7bfdababa0634991d9f7b6aa6845}{cam\_debug\_delay}} = \mbox{\hyperlink{cam__debug_8h_a0aeada950f4c2b3945d68cda59e70200}{CAM\_DEBUG\_DELAY}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00221}\mbox{\hyperlink{cam__xpt_8c_a68fa0be8c61bee9ce2eb201947f37ece}{00221}} \mbox{\hyperlink{cam__xpt_8c_aa40eebe4bb139c62c88944f9650a8857}{SYSCTL\_UINT}}(\_kern\_cam, OID\_AUTO, debug\_delay, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00222}00222         \&\mbox{\hyperlink{cam__xpt_8c_a9ddc7bfdababa0634991d9f7b6aa6845}{cam\_debug\_delay}}, 0, \textcolor{stringliteral}{"{}Delay in us after each debug message"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00224}00224 \textcolor{comment}{/* Our boot-\/time initialization hook */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00225}00225 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{cam__xpt_8c_ac8859bec2bebc4cba6bac82cea567eb9}{cam\_module\_event\_handler}}(module\_t, \textcolor{keywordtype}{int} \textcolor{comment}{/*modeventtype\_t*/}, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00227}\mbox{\hyperlink{cam__xpt_8c_ab0c08e9b090b0d2d4133478623c00ea7}{00227}} \textcolor{keyword}{static} moduledata\_t \mbox{\hyperlink{cam__xpt_8c_ab0c08e9b090b0d2d4133478623c00ea7}{cam\_moduledata}} = \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00228}00228         \textcolor{stringliteral}{"{}cam"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00229}00229         \mbox{\hyperlink{cam__xpt_8c_ac8859bec2bebc4cba6bac82cea567eb9}{cam\_module\_event\_handler}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00230}00230         NULL}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00231}00231 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00233}00233 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{cam__xpt_8c_a5a1ddef725f4346c5cff3c04f70a88c0}{xpt\_init}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00235}\mbox{\hyperlink{cam__xpt_8c_a046fbebb901083d2925058330d8ca824}{00235}} \mbox{\hyperlink{cam__xpt_8c_a046fbebb901083d2925058330d8ca824}{DECLARE\_MODULE}}(cam, \mbox{\hyperlink{cam__xpt_8c_ab0c08e9b090b0d2d4133478623c00ea7}{cam\_moduledata}}, SI\_SUB\_CONFIGURE, SI\_ORDER\_SECOND);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00236}\mbox{\hyperlink{cam__xpt_8c_a54df77ab1dc9714567accfb5f6b98f72}{00236}} \mbox{\hyperlink{cam__xpt_8c_a54df77ab1dc9714567accfb5f6b98f72}{MODULE\_VERSION}}(cam, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00238}00238 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{cam__xpt_8c_a63c969368f5854bc6168837c2b728a62}{xpt\_async\_bcast}}(\textcolor{keyword}{struct} async\_list *async\_head,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00239}00239                                         u\_int32\_t async\_code,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00240}00240                                         \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00241}00241                                         \textcolor{keywordtype}{void} *async\_arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00242}00242 \textcolor{keyword}{static} \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} \mbox{\hyperlink{cam__xpt_8c_afbb7b6ec78e59598ffbe23e6a406c757}{xptnextfreepathid}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00243}00243 \textcolor{keyword}{static} \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} \mbox{\hyperlink{cam__xpt_8c_a821f8ceab894fba06883b1704d731516}{xptpathid}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *sim\_name, \textcolor{keywordtype}{int} sim\_unit, \textcolor{keywordtype}{int} sim\_bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00244}00244 \textcolor{keyword}{static} \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{cam__xpt_8c_a87352808310f71c4abe047d15f51705a}{xpt\_get\_ccb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00245}00245 \textcolor{keyword}{static} \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{cam__xpt_8c_a908eabd359e578d0146206824c00aa88}{xpt\_get\_ccb\_nowait}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00246}00246 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a62dd0eb558b49674efbc5c50982ee25d}{xpt\_run\_allocq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int} sleep);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00247}00247 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_aec3a47b3c27335f54ff319748b7e8b24}{xpt\_run\_allocq\_task}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00248}00248 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_ab05d0a25c05fe9822eb4f60f903bf8bd}{xpt\_run\_devq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00249}\mbox{\hyperlink{cam__xpt_8c_ab14bd2e082a51661171d8dd5a942433d}{00249}} \textcolor{keyword}{static} callout\_func\_t \mbox{\hyperlink{cam__xpt_8c_ab14bd2e082a51661171d8dd5a942433d}{xpt\_release\_devq\_timeout}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00250}00250 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a8730eabc5880108cc4d4327b7bc31c32}{xpt\_acquire\_bus}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00251}00251 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00252}00252 \textcolor{keyword}{static} uint32\_t  \mbox{\hyperlink{cam__xpt_8c_afaa5f8e162dc0a7ef6d0be2d892ec9e1}{xpt\_freeze\_devq\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev, u\_int count);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00253}00253 \textcolor{keyword}{static} \textcolor{keywordtype}{int}       \mbox{\hyperlink{cam__xpt_8c_aa44f87ce4f64dfa1117d405e2d81daf6}{xpt\_release\_devq\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev, u\_int count,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00254}00254                     \textcolor{keywordtype}{int} run\_queue);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00255}00255 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}}*}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00256}00256                  \mbox{\hyperlink{cam__xpt_8c_abe6202b8b7567c20f5e546c12e400935}{xpt\_alloc\_target}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}, \mbox{\hyperlink{cam_8h_af420b02e4c824e79ca80f8910b8e3a8f}{target\_id\_t}} \mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00257}00257 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a3bc0f3fb9501e89310c749ade53142e5}{xpt\_acquire\_target}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00258}00258 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_aeb7a0a03a36fb04f959a5e4127bd539d}{xpt\_release\_target}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00259}00259 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}}*}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00260}00260                  \mbox{\hyperlink{cam__xpt_8c_aadfcd79ce730e041b28a179f5296a75c}{xpt\_find\_bus}}(\mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} \mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00261}00261 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}}*}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00262}00262                  \mbox{\hyperlink{cam__xpt_8c_afbab80f711435b3e0333daca06c674b4}{xpt\_find\_target}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}, \mbox{\hyperlink{cam_8h_af420b02e4c824e79ca80f8910b8e3a8f}{target\_id\_t}} \mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00263}00263 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}}*}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00264}00264                  \mbox{\hyperlink{cam__xpt_8c_a2cec196d96ce138d2f17712be8e8df94}{xpt\_find\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}, \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}} \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00265}00265 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a43cdc0766fd1a67f91f3f86190af6842}{xpt\_config}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00266}00266 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_ad01dbb9bc02336206aa099362fbeabe9}{xpt\_hold\_boot\_locked}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00267}00267 \textcolor{keyword}{static} \textcolor{keywordtype}{int}       \mbox{\hyperlink{cam__xpt_8c_a5ed672de38e444d6b435cd427c102f91}{xpt\_schedule\_dev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcamq}{camq}} *queue, \mbox{\hyperlink{structcam__pinfo}{cam\_pinfo}} *dev\_pinfo,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00268}00268                                  u\_int32\_t new\_priority);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00269}\mbox{\hyperlink{cam__xpt_8c_a8280cf68dc955496a729d510d673ec96}{00269}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} \mbox{\hyperlink{cam__xpt_8c_a8280cf68dc955496a729d510d673ec96}{xptpassannouncefunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00270}00270 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a69ff8dd020000ddf4567d70c30c58d5f}{xptaction}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__sim}{cam\_sim}} *\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *work\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00271}00271 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_ab73c282e25bb07b4979fd6d181436346}{xptpoll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__sim}{cam\_sim}} *\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00272}00272 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a6a8f62bcf7ca451fd833304771418cc9}{camisr\_runqueue}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00273}00273 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a1503a02005a52c0726423254272541bd}{xpt\_done\_process}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *ccb\_h);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00274}00274 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_aee0553bab4e39fc924dc0d1453c7d61e}{xpt\_done\_td}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00275}00275 \textcolor{keyword}{static} \textcolor{keywordtype}{void}      \mbox{\hyperlink{cam__xpt_8c_a6da9f4e7e5e9f07f758eee137baffc41}{xpt\_async\_td}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00276}00276 \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}}       \mbox{\hyperlink{cam__xpt_8c_a06063d65e0568a9526a63f1719fbb9ac}{xptbusmatch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__pattern}{dev\_match\_pattern}} *patterns,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00277}00277                                     u\_int num\_patterns, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00278}00278 \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}}       \mbox{\hyperlink{cam__xpt_8c_ae6bbcfd13e463a723cf334a7a8427e94}{xptdevicematch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__pattern}{dev\_match\_pattern}} *patterns,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00279}00279                                        u\_int num\_patterns,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00280}00280                                        \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00281}00281 \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}}       \mbox{\hyperlink{cam__xpt_8c_a50c1190df530a0ddbafea257484a5a6e}{xptperiphmatch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__pattern}{dev\_match\_pattern}} *patterns,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00282}00282                                        u\_int num\_patterns,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00283}00283                                        \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00284}\mbox{\hyperlink{cam__xpt_8c_a4620a7055ccb58610cc3d0c2a5c0123e}{00284}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}}       \mbox{\hyperlink{cam__xpt_8c_a4620a7055ccb58610cc3d0c2a5c0123e}{xptedtbusfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00285}\mbox{\hyperlink{cam__xpt_8c_a7803cee84b28c09cac2a0f27b67e8dee}{00285}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a1143f9a80a4766b1301868d4e06dacdf}{xpt\_targetfunc\_t}} \mbox{\hyperlink{cam__xpt_8c_a7803cee84b28c09cac2a0f27b67e8dee}{xptedttargetfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00286}\mbox{\hyperlink{cam__xpt_8c_aff18fe26702446b1bb16b97764abdc22}{00286}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} \mbox{\hyperlink{cam__xpt_8c_aff18fe26702446b1bb16b97764abdc22}{xptedtdevicefunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00287}\mbox{\hyperlink{cam__xpt_8c_ae124437211c28de731a3563d1d0ef79e}{00287}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} \mbox{\hyperlink{cam__xpt_8c_ae124437211c28de731a3563d1d0ef79e}{xptedtperiphfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00288}\mbox{\hyperlink{cam__xpt_8c_a86d462e7aee5195c9ac517476cf28f6c}{00288}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a92b6641d91dd3a6695ea7dd4660eaa74}{xpt\_pdrvfunc\_t}}     \mbox{\hyperlink{cam__xpt_8c_a86d462e7aee5195c9ac517476cf28f6c}{xptplistpdrvfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00289}\mbox{\hyperlink{cam__xpt_8c_a15fcd5745a3ef446d8d39b80767dfa2d}{00289}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} \mbox{\hyperlink{cam__xpt_8c_a15fcd5745a3ef446d8d39b80767dfa2d}{xptplistperiphfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00290}00290 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{cam__xpt_8c_a12adc843f48c1e53442b274c0fed5b31}{xptedtmatch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00291}00291 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{cam__xpt_8c_ac35d40a501a9f80265a281b70d6ed561}{xptperiphlistmatch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00292}00292 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{cam__xpt_8c_ae298e2c0f7b2ee29c6f1fbdab35b2555}{xptbustraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *start\_bus,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00293}00293                                        \mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00294}00294 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{cam__xpt_8c_af0013235e3adc7dd3ee9fcb12b03a3cd}{xpttargettraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00295}00295                                           \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *start\_target,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00296}00296                                           \mbox{\hyperlink{cam__xpt_8c_a1143f9a80a4766b1301868d4e06dacdf}{xpt\_targetfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00297}00297 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{cam__xpt_8c_a431efc1763a41e6feb096f82a58e9af7}{xptdevicetraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00298}00298                                           \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *start\_device,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00299}00299                                           \mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00300}00300 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{cam__xpt_8c_a3e1f0c6a429e6512beac8c6da01006d7}{xptperiphtraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00301}00301                                           \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *start\_periph,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00302}00302                                           \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00303}00303 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{cam__xpt_8c_ab0f56d63fde3a0318584dce6ba814889}{xptpdrvtraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structperiph__driver}{periph\_driver}} **start\_pdrv,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00304}00304                                         \mbox{\hyperlink{cam__xpt_8c_a92b6641d91dd3a6695ea7dd4660eaa74}{xpt\_pdrvfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00305}00305 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{cam__xpt_8c_a7e0b70c676a1e492e7e551a8feffd687}{xptpdperiphtraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structperiph__driver}{periph\_driver}} **pdrv,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00306}00306                                             \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *start\_periph,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00307}00307                                             \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} *tr\_func,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00308}00308                                             \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00309}\mbox{\hyperlink{cam__xpt_8c_a609709149cdf756ceb8038753e1a3c2b}{00309}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}}       \mbox{\hyperlink{cam__xpt_8c_a609709149cdf756ceb8038753e1a3c2b}{xptdefbusfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00310}\mbox{\hyperlink{cam__xpt_8c_a9d2a8f1a7391ccbd53bc449a5fd8fe54}{00310}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a1143f9a80a4766b1301868d4e06dacdf}{xpt\_targetfunc\_t}} \mbox{\hyperlink{cam__xpt_8c_a9d2a8f1a7391ccbd53bc449a5fd8fe54}{xptdeftargetfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00311}\mbox{\hyperlink{cam__xpt_8c_a8c27741e32cd4dc6486732cf218f9594}{00311}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} \mbox{\hyperlink{cam__xpt_8c_a8c27741e32cd4dc6486732cf218f9594}{xptdefdevicefunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00312}\mbox{\hyperlink{cam__xpt_8c_a8af1830851a96cb4bd764610a4fd05d2}{00312}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} \mbox{\hyperlink{cam__xpt_8c_a8af1830851a96cb4bd764610a4fd05d2}{xptdefperiphfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00313}00313 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{cam__xpt_8c_a8f8fa8daf701a20b8297a61dbfa3bd48}{xpt\_finishconfig\_task}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00314}00314 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{cam__xpt_8c_a144baa89ca8e7625910e3850643d426a}{xpt\_dev\_async\_default}}(u\_int32\_t async\_code,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00315}00315                                               \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00316}00316                                               \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00317}00317                                               \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00318}00318                                               \textcolor{keywordtype}{void} *async\_arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00319}00319 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *    \mbox{\hyperlink{cam__xpt_8c_a3b6a29f143e4da0d07173d14ac816071}{xpt\_alloc\_device\_default}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00320}00320                                                  \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00321}00321                                                  \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}} \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00322}\mbox{\hyperlink{cam__xpt_8c_a8724a857fbfa39e441e8bfcc30270481}{00322}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} \mbox{\hyperlink{cam__xpt_8c_a8724a857fbfa39e441e8bfcc30270481}{xptsetasyncfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00323}\mbox{\hyperlink{cam__xpt_8c_ab9e5ad80e9182de58620f6eea2ed342d}{00323}} \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}}       \mbox{\hyperlink{cam__xpt_8c_ab9e5ad80e9182de58620f6eea2ed342d}{xptsetasyncbusfunc}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00324}00324 \textcolor{keyword}{static} \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}}     \mbox{\hyperlink{cam__xpt_8c_aaede520d73f8b08a56dd0a506cd7de0e}{xptregister}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00325}00325                                     \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00326}00326 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00327}00327 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00328}\mbox{\hyperlink{cam__xpt_8c_a7148ea52669591ad852374d50345f34c}{00328}} \mbox{\hyperlink{cam__xpt_8c_a7148ea52669591ad852374d50345f34c}{xpt\_schedule\_devq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00329}00329 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00330}00330         \textcolor{keywordtype}{int}     retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00331}00331 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00332}00332         mtx\_assert(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00333}00333         \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_aa6838891d6293a8697c3e15381835335}{entries}} > 0) \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00334}00334             (dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_aef5404cb1fa8ad1c4ec40ad883c2b47c}{dev\_openings}} > 0) \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00335}00335             (dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} == 0)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00336}00336                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00337}00337 \textcolor{comment}{                 * The priority of a device waiting for controller}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00338}00338 \textcolor{comment}{                 * resources is that of the highest priority CCB}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00339}00339 \textcolor{comment}{                 * enqueued.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00340}00340 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00341}00341                 retval =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00342}00342                     \mbox{\hyperlink{cam__xpt_8c_a5ed672de38e444d6b435cd427c102f91}{xpt\_schedule\_dev}}(\&devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00343}00343                                      \&dev-\/>\mbox{\hyperlink{structcam__ed_a464fc40a10046ceada30d79d23fe50fa}{devq\_entry}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00344}00344                                      \mbox{\hyperlink{cam__queue_8h_a02e1ec00a166a694b769ccea8fea5b81}{CAMQ\_GET\_PRIO}}(\&dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00345}00345         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00346}00346                 retval = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00347}00347         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00348}00348         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00349}00349 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00351}00351 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00352}\mbox{\hyperlink{cam__xpt_8c_ab7a9bbee8ca06cb1ce40cc1b830a6ca0}{00352}} \mbox{\hyperlink{cam__xpt_8c_ab7a9bbee8ca06cb1ce40cc1b830a6ca0}{device\_is\_queued}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00353}00353 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00354}00354         \textcolor{keywordflow}{return} (device-\/>\mbox{\hyperlink{structcam__ed_a464fc40a10046ceada30d79d23fe50fa}{devq\_entry}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} != \mbox{\hyperlink{cam_8h_a7af58dadfb8e09c223ffed09239f787b}{CAM\_UNQUEUED\_INDEX}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00355}00355 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00356}00356 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00357}00357 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00358}00358 \mbox{\hyperlink{cam__xpt_8c_a1059289591caa27d6dd1a5463c6d0d63}{xpt\_periph\_init}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00359}00359 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00360}00360         make\_dev(\&\mbox{\hyperlink{cam__xpt_8c_a3effa3e955ddff526f367c0d94f1ac83}{xpt\_cdevsw}}, 0, UID\_ROOT, GID\_OPERATOR, 0600, \textcolor{stringliteral}{"{}xpt0"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00361}00361 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00362}00362 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00363}00363 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00364}\mbox{\hyperlink{cam__xpt_8c_abc5ae5a71f1eea91e7d4f52fcdfd9946}{00364}} \mbox{\hyperlink{cam__xpt_8c_a9333adef7c7811876b63cf86743fb358}{xptopen}}(\textcolor{keyword}{struct} cdev *dev, \textcolor{keywordtype}{int} \mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}}, \textcolor{keywordtype}{int} fmt, \textcolor{keyword}{struct} thread *td)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00365}00365 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00366}00366 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00367}00367         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00368}00368 \textcolor{comment}{         * Only allow read-\/write access.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00369}00369 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00370}00370         \textcolor{keywordflow}{if} (((\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& FWRITE) == 0) || ((\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& FREAD) == 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00371}00371                 \textcolor{keywordflow}{return}(EPERM);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00372}00372 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00373}00373         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00374}00374 \textcolor{comment}{         * We don't allow nonblocking access.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00375}00375 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00376}00376         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& O\_NONBLOCK) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00377}00377                 printf(\textcolor{stringliteral}{"{}\%s: can't do nonblocking access\(\backslash\)n"{}}, devtoname(dev));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00378}00378                 \textcolor{keywordflow}{return}(ENODEV);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00379}00379         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00380}00380 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00381}00381         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00382}00382 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00384}00384 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00385}\mbox{\hyperlink{cam__xpt_8c_a63d655620ea8e54e03d96149e4f09d7c}{00385}} \mbox{\hyperlink{cam__xpt_8c_affa6f21bec464942989696c387a06dec}{xptclose}}(\textcolor{keyword}{struct} cdev *dev, \textcolor{keywordtype}{int} flag, \textcolor{keywordtype}{int} fmt, \textcolor{keyword}{struct} thread *td)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00386}00386 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00387}00387 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00388}00388         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00389}00389 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00390}00390 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00391}00391 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00392}00392 \textcolor{comment}{ * Don't automatically grab the xpt softc lock here even though this is going}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00393}00393 \textcolor{comment}{ * through the xpt device.  The xpt device is really just a back door for}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00394}00394 \textcolor{comment}{ * accessing other devices and SIMs, so the right thing to do is to grab}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00395}00395 \textcolor{comment}{ * the appropriate SIM lock once the bus/SIM is located.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00396}00396 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00397}00397 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00398}\mbox{\hyperlink{cam__xpt_8c_a58c7ccb6d1d5d8571fb462e4f51d89f9}{00398}} \mbox{\hyperlink{cam__xpt_8c_ac8210df81c34685b5fa3f2c1ac5c2dcf}{xptioctl}}(\textcolor{keyword}{struct} cdev *dev, u\_long cmd, caddr\_t addr, \textcolor{keywordtype}{int} flag, \textcolor{keyword}{struct} thread *td)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00399}00399 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00400}00400         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00401}00401 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00402}00402         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{cam__xpt_8c_a78af8c7d0a9430b3b4d7d2f730518ad7}{xptdoioctl}}(dev, cmd, addr, flag, td)) == ENOTTY) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00403}00403                 error = \mbox{\hyperlink{cam__compat_8c_a5717f4441c239be8c1e5ea058349d29a}{cam\_compat\_ioctl}}(dev, cmd, addr, flag, td, \mbox{\hyperlink{cam__xpt_8c_a78af8c7d0a9430b3b4d7d2f730518ad7}{xptdoioctl}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00404}00404         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00405}00405         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00406}00406 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00408}00408 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00409}\mbox{\hyperlink{cam__xpt_8c_a02a8f1be50f2cf00af671b5c42629e4d}{00409}} \mbox{\hyperlink{cam__xpt_8c_a78af8c7d0a9430b3b4d7d2f730518ad7}{xptdoioctl}}(\textcolor{keyword}{struct} cdev *dev, u\_long cmd, caddr\_t addr, \textcolor{keywordtype}{int} flag, \textcolor{keyword}{struct} thread *td)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00410}00410 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00411}00411         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00413}00413         error = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00414}00414 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00415}00415         \textcolor{keywordflow}{switch}(cmd) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00416}00416         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00417}00417 \textcolor{comment}{         * For the transport layer CAMIOCOMMAND ioctl, we really only want}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00418}00418 \textcolor{comment}{         * to accept CCB types that don't quite make sense to send through a}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00419}00419 \textcolor{comment}{         * passthrough driver. XPT\_PATH\_INQ is an exception to this, as stated}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00420}00420 \textcolor{comment}{         * in the CAM spec.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00421}00421 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00422}00422         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__pass_8h_adb53504b10f95016e170dcde76865284}{CAMIOCOMMAND}}: \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00423}00423                 \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00424}00424                 \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *inccb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00425}00425                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00427}00427                 inccb = (\textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *)addr;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00428}00428 \textcolor{preprocessor}{\#if defined(BUF\_TRACKING) || defined(FULL\_BUF\_TRACKING)}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00429}00429                 \textcolor{keywordflow}{if} (inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} == \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca426a17499239f5751c747d094b4998dc}{XPT\_SCSI\_IO}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00430}00430                         inccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.bio = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00431}00431 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00432}00432 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00433}00433                 \textcolor{keywordflow}{if} (inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676aafb505767df8f8476b7cc67a621db845}{CAM\_UNLOCKED}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00434}00434                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00435}00435 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00436}00436                 bus = \mbox{\hyperlink{cam__xpt_8c_aadfcd79ce730e041b28a179f5296a75c}{xpt\_find\_bus}}(inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2c528067aca740cf305d0036f5949daf}{path\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00437}00437                 \textcolor{keywordflow}{if} (bus == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00438}00438                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00440}00440                 \textcolor{keywordflow}{switch} (inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00441}00441                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca606ac2c0939d2858df5aef0e73c617c6}{XPT\_SCAN\_BUS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00442}00442                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca377430b25b365e512334ca40798eafea}{XPT\_RESET\_BUS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00443}00443                         \textcolor{keywordflow}{if} (inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}} != \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}} ||}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00444}00444                             inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}} != \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00445}00445                                 \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00446}00446                                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00447}00447                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00448}00448                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00449}00449                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca45eb936f3f3c24b0e02ff4baa1b58a36}{XPT\_SCAN\_TGT}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00450}00450                         \textcolor{keywordflow}{if} (inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}} == \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}} ||}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00451}00451                             inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}} != \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00452}00452                                 \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00453}00453                                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00454}00454                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00455}00455                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00456}00456                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00457}00457                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00458}00458                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00459}00459 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00460}00460                 \textcolor{keywordflow}{switch}(inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00461}00461                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca606ac2c0939d2858df5aef0e73c617c6}{XPT\_SCAN\_BUS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00462}00462                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca377430b25b365e512334ca40798eafea}{XPT\_RESET\_BUS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00463}00463                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cad34c7b5cb68e0ed050bc95a55cd87f7c}{XPT\_PATH\_INQ}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00464}00464                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca4aeef46a854a08557b1a1f2290f98762}{XPT\_ENG\_INQ}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00465}00465                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa2828a4a48f97489aed4478e936020de}{XPT\_SCAN\_LUN}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00466}00466                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca45eb936f3f3c24b0e02ff4baa1b58a36}{XPT\_SCAN\_TGT}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00467}00467 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00468}00468                         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__xpt_8c_a17fe920aa9698f9b81b06f08d0140fb2}{xpt\_alloc\_ccb}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00469}00469 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00470}00470                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00471}00471 \textcolor{comment}{                         * Create a path using the bus, target, and lun the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00472}00472 \textcolor{comment}{                         * user passed in.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00473}00473 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00474}00474                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00475}00475                                             inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2c528067aca740cf305d0036f5949daf}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00476}00476                                             inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00477}00477                                             inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}}) !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00478}00478                                             \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}})\{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00479}00479                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00480}00480                                 \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00481}00481                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00482}00482                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00483}00483                         \textcolor{comment}{/* Ensure all of our fields are correct */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00484}00484                         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}, \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00485}00485                                       inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a006313c394eb385f8f4aa130f6a9d213}{priority}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00486}00486                         \mbox{\hyperlink{cam__xpt_8c_a2772fa9dc3a53c92f75d3e9ba876f4bd}{xpt\_merge\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}}, inccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00487}00487                         \mbox{\hyperlink{cam__xpt_8h_a81ce2d44dcd261d0d54d1c24b0e1f11e}{xpt\_path\_lock}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00488}00488                         \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, NULL, 0, 0, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00489}00489                         \mbox{\hyperlink{cam__xpt_8h_a14b8db5099e848843133059a192429af}{xpt\_path\_unlock}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00490}00490                         bcopy(\mbox{\hyperlink{unionccb}{ccb}}, inccb, \textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00491}00491                         \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00492}00492                         \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00493}00493                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00494}00494 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00495}00495                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca1da717b73387a659bc2e5cb7edb243d0}{XPT\_DEBUG}}: \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00496}00496                         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} \mbox{\hyperlink{unionccb}{ccb}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00498}00498                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00499}00499 \textcolor{comment}{                         * This is an immediate CCB, so it's okay to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00500}00500 \textcolor{comment}{                         * allocate it on the stack.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00501}00501 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00502}00502                         memset(\&\mbox{\hyperlink{unionccb}{ccb}}, 0, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{unionccb}{ccb}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00503}00503 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00504}00504                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00505}00505 \textcolor{comment}{                         * Create a path using the bus, target, and lun the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00506}00506 \textcolor{comment}{                         * user passed in.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00507}00507 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00508}00508                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(\&\mbox{\hyperlink{unionccb}{ccb}}.\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00509}00509                                             inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2c528067aca740cf305d0036f5949daf}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00510}00510                                             inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00511}00511                                             inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}}) !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00512}00512                                             \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}})\{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00513}00513                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00514}00514                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00515}00515                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00516}00516                         \textcolor{comment}{/* Ensure all of our fields are correct */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00517}00517                         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&\mbox{\hyperlink{unionccb}{ccb}}.\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}, \mbox{\hyperlink{unionccb}{ccb}}.\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00518}00518                                       inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a006313c394eb385f8f4aa130f6a9d213}{priority}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00519}00519                         \mbox{\hyperlink{cam__xpt_8c_a2772fa9dc3a53c92f75d3e9ba876f4bd}{xpt\_merge\_ccb}}(\&\mbox{\hyperlink{unionccb}{ccb}}, inccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00520}00520                         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}(\&\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00521}00521                         bcopy(\&\mbox{\hyperlink{unionccb}{ccb}}, inccb, \textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00522}00522                         \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(\mbox{\hyperlink{unionccb}{ccb}}.\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00523}00523                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00524}00524                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00525}00525                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae3ef804cecfed4e6b10def2784de9ebc}{XPT\_DEV\_MATCH}}: \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00526}00526                         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph__map__info}{cam\_periph\_map\_info}} mapinfo;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00527}00527                         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *old\_path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00529}00529                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00530}00530 \textcolor{comment}{                         * We can't deal with physical addresses for this}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00531}00531 \textcolor{comment}{                         * type of transaction.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00532}00532 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00533}00533                         \textcolor{keywordflow}{if} ((inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676ac058a86c200f37e91d053eca68c09d67}{CAM\_DATA\_MASK}}) !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00534}00534                             \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676aaa58527ce2c212b617237872fec85f4b}{CAM\_DATA\_VADDR}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00535}00535                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00536}00536                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00537}00537                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00538}00538 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00539}00539                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00540}00540 \textcolor{comment}{                         * Save this in case the caller had it set to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00541}00541 \textcolor{comment}{                         * something in particular.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00542}00542 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00543}00543                         old\_path = inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00544}00544 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00545}00545                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00546}00546 \textcolor{comment}{                         * We really don't need a path for the matching}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00547}00547 \textcolor{comment}{                         * code.  The path is needed because of the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00548}00548 \textcolor{comment}{                         * debugging statements in xpt\_action().  They}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00549}00549 \textcolor{comment}{                         * assume that the CCB has a valid path.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00550}00550 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00551}00551                         inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}} = \mbox{\hyperlink{cam__xpt_8c_a88a107b9711f7cf295bb241e5bff985b}{xpt\_periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00552}00552 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00553}00553                         bzero(\&mapinfo, \textcolor{keyword}{sizeof}(mapinfo));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00554}00554 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00555}00555                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00556}00556 \textcolor{comment}{                         * Map the pattern and match buffers into kernel}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00557}00557 \textcolor{comment}{                         * virtual address space.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00558}00558 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00559}00559                         error = \mbox{\hyperlink{cam__periph_8c_ac2f4c1959a7ea858a031736a09693bbe}{cam\_periph\_mapmem}}(inccb, \&mapinfo, maxphys);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00561}00561                         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00562}00562                                 inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}} = old\_path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00563}00563                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00564}00564                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00565}00565 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00566}00566                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00567}00567 \textcolor{comment}{                         * This is an immediate CCB, we can send it on directly.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00568}00568 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00569}00569                         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}(inccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00570}00570 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00571}00571                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00572}00572 \textcolor{comment}{                         * Map the buffers back into user space.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00573}00573 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00574}00574                         \mbox{\hyperlink{cam__periph_8c_a54a00fbe30ea8eab256bf8d05c0a28b0}{cam\_periph\_unmapmem}}(inccb, \&mapinfo);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00575}00575 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00576}00576                         inccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}} = old\_path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00578}00578                         error = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00579}00579                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00580}00580                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00581}00581                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00582}00582                         error = ENOTSUP;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00583}00583                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00584}00584                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00585}00585                 \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00586}00586                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00587}00587         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00588}00588         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00589}00589 \textcolor{comment}{         * This is the getpassthru ioctl. It takes a XPT\_GDEVLIST ccb as input,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00590}00590 \textcolor{comment}{         * with the periphal driver name and unit name filled in.  The other}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00591}00591 \textcolor{comment}{         * fields don't really matter as input.  The passthrough driver name}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00592}00592 \textcolor{comment}{         * ("{}pass"{}), and unit number are passed back in the ccb.  The current}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00593}00593 \textcolor{comment}{         * device generation number, and the index into the device peripheral}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00594}00594 \textcolor{comment}{         * driver list, and the status are also passed back.  Note that}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00595}00595 \textcolor{comment}{         * since we do everything in one pass, unlike the XPT\_GDEVLIST ccb,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00596}00596 \textcolor{comment}{         * we never return a status of CAM\_GDEVLIST\_LIST\_CHANGED.  It is}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00597}00597 \textcolor{comment}{         * (or rather should be) impossible for the device peripheral driver}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00598}00598 \textcolor{comment}{         * list to change since we look at the whole thing in one pass, and}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00599}00599 \textcolor{comment}{         * we do it with lock protection.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00600}00600 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00601}00601 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00602}00602         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__pass_8h_a48595b8b358c28f8a7a2eb590ea406ea}{CAMGETPASSTHRU}}: \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00603}00603                 \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00604}00604                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00605}00605                 \textcolor{keyword}{struct }\mbox{\hyperlink{structperiph__driver}{periph\_driver}} **p\_drv;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00606}00606                 \textcolor{keywordtype}{char}   *name;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00607}00607                 u\_int unit;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00608}00608                 \textcolor{keywordtype}{int} base\_periph\_found;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00610}00610                 \mbox{\hyperlink{unionccb}{ccb}} = (\textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *)addr;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00611}00611                 unit = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_af950c9c1e6459973bdc5a7807a228ee3}{unit\_number}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00612}00612                 name = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_a744de6954321e3009c301d2fdef45130}{periph\_name}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00613}00613                 base\_periph\_found = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00614}00614 \textcolor{preprocessor}{\#if defined(BUF\_TRACKING) || defined(FULL\_BUF\_TRACKING)}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00615}00615                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} == \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca426a17499239f5751c747d094b4998dc}{XPT\_SCSI\_IO}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00616}00616                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.bio = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00617}00617 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00618}00618 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00619}00619                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00620}00620 \textcolor{comment}{                 * Sanity check -\/-\/ make sure we don't get a null peripheral}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00621}00621 \textcolor{comment}{                 * driver name.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00622}00622 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00623}00623                 \textcolor{keywordflow}{if} (*\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_a744de6954321e3009c301d2fdef45130}{periph\_name}} == \textcolor{charliteral}{'\(\backslash\)0'}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00624}00624                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00625}00625                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00626}00626                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00627}00627 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00628}00628                 \textcolor{comment}{/* Keep the list from changing while we traverse it */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00629}00629                 \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00631}00631                 \textcolor{comment}{/* first find our driver in the list of drivers */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00632}00632                 \textcolor{keywordflow}{for} (p\_drv = \mbox{\hyperlink{cam__periph_8c_ac080b20aad20a373275084903704bccd}{periph\_drivers}}; *p\_drv != NULL; p\_drv++)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00633}00633                         \textcolor{keywordflow}{if} (strcmp((*p\_drv)-\/>driver\_name, name) == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00634}00634                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00635}00635 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00636}00636                 \textcolor{keywordflow}{if} (*p\_drv == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00637}00637                         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00638}00638                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00639}00639                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_aa099d883a4127a7916bfed87d8053bcf}{status}} = \mbox{\hyperlink{cam__ccb_8h_a00f1b10c7206a163ea137cef6e4e0a84a1be2befc4024cf6a12ae1d0543b637d1}{CAM\_GDEVLIST\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00640}00640                         *\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_a744de6954321e3009c301d2fdef45130}{periph\_name}} = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00641}00641                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_af950c9c1e6459973bdc5a7807a228ee3}{unit\_number}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00642}00642                         error = ENOENT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00643}00643                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00644}00644                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00646}00646                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00647}00647 \textcolor{comment}{                 * Run through every peripheral instance of this driver}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00648}00648 \textcolor{comment}{                 * and check to see whether it matches the unit passed}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00649}00649 \textcolor{comment}{                 * in by the user.  If it does, get out of the loops and}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00650}00650 \textcolor{comment}{                 * find the passthrough driver associated with that}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00651}00651 \textcolor{comment}{                 * peripheral driver.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00652}00652 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00653}00653                 \textcolor{keywordflow}{for} (periph = TAILQ\_FIRST(\&(*p\_drv)-\/>units); periph != NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00654}00654                      periph = TAILQ\_NEXT(periph, unit\_links)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00655}00655                         \textcolor{keywordflow}{if} (periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}} == unit)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00656}00656                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00657}00657                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00658}00658                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00659}00659 \textcolor{comment}{                 * If we found the peripheral driver that the user passed}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00660}00660 \textcolor{comment}{                 * in, go through all of the peripheral drivers for that}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00661}00661 \textcolor{comment}{                 * particular device and look for a passthrough driver.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00662}00662 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00663}00663                 \textcolor{keywordflow}{if} (periph != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00664}00664                         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00665}00665                         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00666}00666 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00667}00667                         base\_periph\_found = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00668}00668                         device = periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00669}00669                         \textcolor{keywordflow}{for} (i = 0, periph = SLIST\_FIRST(\&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00670}00670                              periph != NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00671}00671                              periph = SLIST\_NEXT(periph, periph\_links), i++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00672}00672                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00673}00673 \textcolor{comment}{                                 * Check to see whether we have a}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00674}00674 \textcolor{comment}{                                 * passthrough device or not.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00675}00675 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00676}00676                                 \textcolor{keywordflow}{if} (strcmp(periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, \textcolor{stringliteral}{"{}pass"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00677}00677                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00678}00678 \textcolor{comment}{                                         * Fill in the getdevlist fields.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00679}00679 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00680}00680                                         strlcpy(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_a744de6954321e3009c301d2fdef45130}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00681}00681                                                periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00682}00682                                                \textcolor{keyword}{sizeof}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_a744de6954321e3009c301d2fdef45130}{periph\_name}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00683}00683                                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_af950c9c1e6459973bdc5a7807a228ee3}{unit\_number}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00684}00684                                                 periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00685}00685                                         \textcolor{keywordflow}{if} (SLIST\_NEXT(periph, periph\_links))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00686}00686                                                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_aa099d883a4127a7916bfed87d8053bcf}{status}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00687}00687                                                         \mbox{\hyperlink{cam__ccb_8h_a00f1b10c7206a163ea137cef6e4e0a84a161e42ae1f0b3c203143753d14b4ed4f}{CAM\_GDEVLIST\_MORE\_DEVS}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00688}00688                                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00689}00689                                                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_aa099d883a4127a7916bfed87d8053bcf}{status}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00690}00690                                                        \mbox{\hyperlink{cam__ccb_8h_a00f1b10c7206a163ea137cef6e4e0a84ac0b13b5f0b74e203c1a6be0de6e9d25d}{CAM\_GDEVLIST\_LAST\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00691}00691                                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_abbb83a5db4acb59c5caee9d5ac8b8b6b}{generation}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00692}00692                                                 device-\/>\mbox{\hyperlink{structcam__ed_a38440f387b4d1effb8611a32d4635671}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00693}00693                                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_afb38bc42f3328dcf8792409b3a395006}{index}} = i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00694}00694                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00695}00695 \textcolor{comment}{                                         * Fill in some CCB header fields}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00696}00696 \textcolor{comment}{                                         * that the user may want.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00697}00697 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00698}00698                                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2c528067aca740cf305d0036f5949daf}{path\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00699}00699                                                 periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00700}00700                                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00701}00701                                                 periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00702}00702                                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00703}00703                                                 periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00704}00704                                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00705}00705                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00706}00706                                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00707}00707                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00708}00708                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00709}00709 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00710}00710                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00711}00711 \textcolor{comment}{                 * If the periph is null here, one of two things has}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00712}00712 \textcolor{comment}{                 * happened.  The first possibility is that we couldn't}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00713}00713 \textcolor{comment}{                 * find the unit number of the particular peripheral driver}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00714}00714 \textcolor{comment}{                 * that the user is asking about.  e.g. the user asks for}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00715}00715 \textcolor{comment}{                 * the passthrough driver for "{}da11"{}.  We find the list of}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00716}00716 \textcolor{comment}{                 * "{}da"{} peripherals all right, but there is no unit 11.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00717}00717 \textcolor{comment}{                 * The other possibility is that we went through the list}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00718}00718 \textcolor{comment}{                 * of peripheral drivers attached to the device structure,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00719}00719 \textcolor{comment}{                 * but didn't find one with the name "{}pass"{}.  Either way,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00720}00720 \textcolor{comment}{                 * we return ENOENT, since we couldn't find something.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00721}00721 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00722}00722                 \textcolor{keywordflow}{if} (periph == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00723}00723                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00724}00724                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_aa099d883a4127a7916bfed87d8053bcf}{status}} = \mbox{\hyperlink{cam__ccb_8h_a00f1b10c7206a163ea137cef6e4e0a84a1be2befc4024cf6a12ae1d0543b637d1}{CAM\_GDEVLIST\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00725}00725                         *\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_a744de6954321e3009c301d2fdef45130}{periph\_name}} = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00726}00726                         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}}.\mbox{\hyperlink{structccb__getdevlist_af950c9c1e6459973bdc5a7807a228ee3}{unit\_number}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00727}00727                         error = ENOENT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00728}00728                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00729}00729 \textcolor{comment}{                         * It is unfortunate that this is even necessary,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00730}00730 \textcolor{comment}{                         * but there are many, many clueless users out there.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00731}00731 \textcolor{comment}{                         * If this is true, the user is looking for the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00732}00732 \textcolor{comment}{                         * passthrough driver, but doesn't have one in his}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00733}00733 \textcolor{comment}{                         * kernel.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00734}00734 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00735}00735                         \textcolor{keywordflow}{if} (base\_periph\_found == 1) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00736}00736                                 printf(\textcolor{stringliteral}{"{}xptioctl: pass driver is not in the "{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00737}00737                                        \textcolor{stringliteral}{"{}kernel\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00738}00738                                 printf(\textcolor{stringliteral}{"{}xptioctl: put \(\backslash\)"{}device pass\(\backslash\)"{} in "{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00739}00739                                        \textcolor{stringliteral}{"{}your kernel config file\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00740}00740                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00741}00741                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00742}00742                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00743}00743                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00744}00744                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00745}00745         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00746}00746                 error = ENOTTY;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00747}00747                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00748}00748         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00749}00749 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00750}00750         \textcolor{keywordflow}{return}(error);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00751}00751 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00752}00752 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00753}00753 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00754}\mbox{\hyperlink{cam__xpt_8c_ac8859bec2bebc4cba6bac82cea567eb9}{00754}} \mbox{\hyperlink{cam__xpt_8c_ac8859bec2bebc4cba6bac82cea567eb9}{cam\_module\_event\_handler}}(module\_t mod, \textcolor{keywordtype}{int} what, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00755}00755 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00756}00756         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00757}00757 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00758}00758         \textcolor{keywordflow}{switch} (what) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00759}00759         \textcolor{keywordflow}{case} MOD\_LOAD:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00760}00760                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{cam__xpt_8c_a5a1ddef725f4346c5cff3c04f70a88c0}{xpt\_init}}(NULL)) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00761}00761                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00762}00762                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00763}00763         \textcolor{keywordflow}{case} MOD\_UNLOAD:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00764}00764                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00765}00765         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00766}00766                 \textcolor{keywordflow}{return} EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00767}00767         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00768}00768 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00769}00769         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00770}00770 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00771}00771 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00772}00772 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__proto}{xpt\_proto}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00773}\mbox{\hyperlink{cam__xpt_8c_a35cb4d3a19c528cea29e080862738060}{00773}} \mbox{\hyperlink{cam__xpt_8c_a35cb4d3a19c528cea29e080862738060}{xpt\_proto\_find}}(\mbox{\hyperlink{cam__ccb_8h_a283e001579038402a95e23bef57107e8}{cam\_proto}} \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00774}00774 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00775}00775         \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__proto}{xpt\_proto}} **pp;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00776}00776 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00777}00777         SET\_FOREACH(pp, cam\_xpt\_proto\_set) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00778}00778                 \textcolor{keywordflow}{if} ((*pp)-\/>proto == \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00779}00779                         \textcolor{keywordflow}{return} *pp;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00780}00780         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00781}00781 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00782}00782         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00783}00783 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00784}00784 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00785}00785 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00786}\mbox{\hyperlink{cam__xpt_8c_ab5e41e26bc307f3104a10d1435c0fc63}{00786}} \mbox{\hyperlink{cam__xpt_8c_ab5e41e26bc307f3104a10d1435c0fc63}{xpt\_rescan\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *done\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00787}00787 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00788}00788 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00789}00789         \textcolor{keywordflow}{if} (done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.ppriv\_ptr1 == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00790}00790                 \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00791}00791                 \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(done\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00792}00792         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00793}00793                 done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afe206cd92d25dfd137df5196cdfcfdae}{cbfcnp}} = done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.ppriv\_ptr1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00794}00794                 (*done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afe206cd92d25dfd137df5196cdfcfdae}{cbfcnp}})(periph, done\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00795}00795         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00796}00796         \mbox{\hyperlink{cam__xpt_8c_aad3a8063d503635e6b907c8825fbbded}{xpt\_release\_boot}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00797}00797 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00798}00798 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00799}00799 \textcolor{comment}{/* thread to handle bus rescans */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00800}00800 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00801}\mbox{\hyperlink{cam__xpt_8c_a9f540c30ee9a6bed2f45aa3adb14a208}{00801}} \mbox{\hyperlink{cam__xpt_8c_a9f540c30ee9a6bed2f45aa3adb14a208}{xpt\_scanner\_thread}}(\textcolor{keywordtype}{void} *dummy)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00802}00802 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00803}00803         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}}    *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00804}00804         \textcolor{keyword}{struct }mtx      *mtx;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00805}00805         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}}     *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00806}00806 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00807}00807         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00808}00808         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00809}00809                 \textcolor{keywordflow}{if} (TAILQ\_EMPTY(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00810}00810                         msleep(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq, \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_topo\_lock, PRIBIO,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00811}00811                                \textcolor{stringliteral}{"{}-\/"{}}, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00812}00812                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{unionccb}{ccb}} = (\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)TAILQ\_FIRST(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00813}00813                         TAILQ\_REMOVE(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq, \&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}, sim\_links.tqe);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00814}00814                         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00815}00815 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00816}00816                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00817}00817 \textcolor{comment}{                         * We need to lock the device's mutex which we use as}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00818}00818 \textcolor{comment}{                         * the path mutex. We can't do it directly because the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00819}00819 \textcolor{comment}{                         * cam\_path in the ccb may wind up going away because}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00820}00820 \textcolor{comment}{                         * the path lock may be dropped and the path retired in}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00821}00821 \textcolor{comment}{                         * the completion callback. We do this directly to keep}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00822}00822 \textcolor{comment}{                         * the reference counts in cam\_path sane. We also have}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00823}00823 \textcolor{comment}{                         * to copy the device pointer because ccb\_h.path may}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00824}00824 \textcolor{comment}{                         * be freed in the callback.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00825}00825 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00826}00826                         mtx = \mbox{\hyperlink{cam__xpt_8c_a1fc98e6b0f369df2a0f686e9f66ddfe5}{xpt\_path\_mtx}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00827}00827                         device = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00828}00828                         \mbox{\hyperlink{cam__xpt_8c_a01bdf0561d2c7b64751461a89673df2e}{xpt\_acquire\_device}}(device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00829}00829                         mtx\_lock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00830}00830                         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00831}00831                         mtx\_unlock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00832}00832                         \mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{xpt\_release\_device}}(device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00833}00833 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00834}00834                         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00835}00835                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00836}00836         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00837}00837 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00838}00838 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00839}00839 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00840}\mbox{\hyperlink{cam__xpt_8c_a44ae64d5b5cc896268ac6b55f016b290}{00840}} \mbox{\hyperlink{cam__xpt_8c_a44ae64d5b5cc896268ac6b55f016b290}{xpt\_rescan}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00841}00841 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00842}00842         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *hdr;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00843}00843 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00844}00844         \textcolor{comment}{/* Prepare request */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00845}00845         \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} == \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00846}00846             \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00847}00847                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca606ac2c0939d2858df5aef0e73c617c6}{XPT\_SCAN\_BUS}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00848}00848         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} != \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00849}00849             \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00850}00850                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca45eb936f3f3c24b0e02ff4baa1b58a36}{XPT\_SCAN\_TGT}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00851}00851         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} != \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00852}00852             \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} != \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00853}00853                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa2828a4a48f97489aed4478e936020de}{XPT\_SCAN\_LUN}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00854}00854         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00855}00855                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \textcolor{stringliteral}{"{}illegal scan path\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00856}00856                 \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00857}00857                 \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00858}00858                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00859}00859         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00860}00860         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00861}00861             (\textcolor{stringliteral}{"{}xpt\_rescan: func \%\#x \%s\(\backslash\)n"{}}, \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00862}00862                 \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}})));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00863}00863 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00864}00864         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.ppriv\_ptr1 = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afe206cd92d25dfd137df5196cdfcfdae}{cbfcnp}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00865}00865         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afe206cd92d25dfd137df5196cdfcfdae}{cbfcnp}} = \mbox{\hyperlink{cam__xpt_8c_ab5e41e26bc307f3104a10d1435c0fc63}{xpt\_rescan\_done}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00866}00866         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}, \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam_8h_a987088dd2ae7bcf2ccb0fd12eabcc08f}{CAM\_PRIORITY\_XPT}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00867}00867         \textcolor{comment}{/* Don't make duplicate entries for the same paths. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00868}00868         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00869}00869         \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.ppriv\_ptr1 == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00870}00870                 TAILQ\_FOREACH(hdr, \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq, \mbox{\hyperlink{structccb__hdr_a44b3ff1ed4c144fb7e4a9794aaa18420}{sim\_links}}.tqe) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00871}00871                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_a55d1a450c018a473cee8dfb0370688b4}{xpt\_path\_comp}}(hdr-\/>\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00872}00872                                 wakeup(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00873}00873                                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00874}00874                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \textcolor{stringliteral}{"{}rescan already queued\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00875}00875                                 \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00876}00876                                 \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00877}00877                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00878}00878                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00879}00879                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00880}00880         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00881}00881         TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq, \&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}, \mbox{\hyperlink{structccb__hdr_a44b3ff1ed4c144fb7e4a9794aaa18420}{sim\_links}}.tqe);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00882}00882         \mbox{\hyperlink{cam__xpt_8c_ad01dbb9bc02336206aa099362fbeabe9}{xpt\_hold\_boot\_locked}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00883}00883         wakeup(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00884}00884         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00885}00885 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00886}00886 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00887}00887 \textcolor{comment}{/* Functions accessed by the peripheral drivers */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00888}00888 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00889}\mbox{\hyperlink{cam__xpt_8c_a5a1ddef725f4346c5cff3c04f70a88c0}{00889}} \mbox{\hyperlink{cam__xpt_8c_a5a1ddef725f4346c5cff3c04f70a88c0}{xpt\_init}}(\textcolor{keywordtype}{void} *dummy)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00890}00890 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00891}00891         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *xpt\_sim;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00892}00892         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00893}00893         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00894}00894         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00895}00895         \textcolor{keywordtype}{int} error, i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00896}00896 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00897}00897         TAILQ\_INIT(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_busses);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00898}00898         TAILQ\_INIT(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.ccb\_scanq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00899}00899         STAILQ\_INIT(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.highpowerq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00900}00900         \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.num\_highpower = \mbox{\hyperlink{cam__xpt_8c_a7e080aacba8af1bc523ceca1b7e2b0d9}{CAM\_MAX\_HIGHPOWER}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00901}00901 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00902}00902         mtx\_init(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{xpt\_highpower\_lock}}, \textcolor{stringliteral}{"{}XPT highpower lock"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00903}00903         \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_taskq = taskqueue\_create(\textcolor{stringliteral}{"{}CAM XPT task"{}}, M\_WAITOK,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00904}00904             taskqueue\_thread\_enqueue, \textcolor{comment}{/*context*/}\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_taskq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00905}00905 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00906}00906 \textcolor{preprocessor}{\#ifdef CAM\_BOOT\_DELAY}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00907}00907         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00908}00908 \textcolor{comment}{         * Override this value at compile time to assist our users}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00909}00909 \textcolor{comment}{         * who don't use loader to boot a kernel.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00910}00910 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00911}00911         \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.boot\_delay = CAM\_BOOT\_DELAY;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00912}00912 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00913}00913 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00914}00914         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00915}00915 \textcolor{comment}{         * The xpt layer is, itself, the equivalent of a SIM.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00916}00916 \textcolor{comment}{         * Allow 16 ccbs in the ccb pool for it.  This should}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00917}00917 \textcolor{comment}{         * give decent parallelism when we probe buses and}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00918}00918 \textcolor{comment}{         * perform other XPT functions.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00919}00919 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00920}00920         devq = \mbox{\hyperlink{cam__sim_8c_a2b97368c34f664fdb78cc0771abd24f6}{cam\_simq\_alloc}}(16);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00921}00921         xpt\_sim = \mbox{\hyperlink{cam__sim_8c_a085d2cfcfabfa49abe329e1ab0393ac7}{cam\_sim\_alloc}}(\mbox{\hyperlink{cam__xpt_8c_a69ff8dd020000ddf4567d70c30c58d5f}{xptaction}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00922}00922                                 \mbox{\hyperlink{cam__xpt_8c_ab73c282e25bb07b4979fd6d181436346}{xptpoll}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00923}00923                                 \textcolor{stringliteral}{"{}xpt"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00924}00924                                 \textcolor{comment}{/*softc*/}NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00925}00925                                 \textcolor{comment}{/*unit*/}0,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00926}00926                                 \textcolor{comment}{/*mtx*/}NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00927}00927                                 \textcolor{comment}{/*max\_dev\_transactions*/}0,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00928}00928                                 \textcolor{comment}{/*max\_tagged\_dev\_transactions*/}0,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00929}00929                                 devq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00930}00930         \textcolor{keywordflow}{if} (xpt\_sim == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00931}00931                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00932}00932 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00933}00933         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{cam__xpt_8c_ab01de6f5ed666604469e45c8c2998752}{xpt\_bus\_register}}(xpt\_sim, NULL, 0)) != \mbox{\hyperlink{cam__ccb_8h_ab43e093b1ef15ad52763cde93572b5c4}{CAM\_SUCCESS}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00934}00934                 printf(\textcolor{stringliteral}{"{}xpt\_init: xpt\_bus\_register failed with errno \%d,"{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00935}00935                        \textcolor{stringliteral}{"{} failing attach\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00936}00936                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00937}00937         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00938}00938 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00939}00939         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00940}00940 \textcolor{comment}{         * Looking at the XPT from the SIM layer, the XPT is}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00941}00941 \textcolor{comment}{         * the equivalent of a peripheral driver.  Allocate}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00942}00942 \textcolor{comment}{         * a peripheral driver entry for us.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00943}00943 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00944}00944         \textcolor{keywordflow}{if} ((status = \mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(\&path, NULL, \mbox{\hyperlink{cam_8h_a1c5915081b16a0ed18a2a287e4992c13}{CAM\_XPT\_PATH\_ID}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00945}00945                                       \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00946}00946                                       \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})) != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00947}00947                 printf(\textcolor{stringliteral}{"{}xpt\_init: xpt\_create\_path failed with status \%\#x,"{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00948}00948                        \textcolor{stringliteral}{"{} failing attach\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00949}00949                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00950}00950         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00951}00951         \mbox{\hyperlink{cam__xpt_8h_a81ce2d44dcd261d0d54d1c24b0e1f11e}{xpt\_path\_lock}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00952}00952         \mbox{\hyperlink{cam__periph_8c_ad5e57f86a941e5a4021b0b026851e445}{cam\_periph\_alloc}}(\mbox{\hyperlink{cam__xpt_8c_aaede520d73f8b08a56dd0a506cd7de0e}{xptregister}}, NULL, NULL, NULL, \textcolor{stringliteral}{"{}xpt"{}}, \mbox{\hyperlink{cam__periph_8h_ae648b142a75d7546562342a7b7961e6cada5282ff3d485d68259bc309db51476b}{CAM\_PERIPH\_BIO}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00953}00953                          path, NULL, 0, xpt\_sim);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00954}00954         \mbox{\hyperlink{cam__xpt_8h_a14b8db5099e848843133059a192429af}{xpt\_path\_unlock}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00955}00955         \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00956}00956 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00957}00957         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}} < 1)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00958}00958                 \mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}} = 1 + mp\_ncpus / 6;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00959}00959         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}} > MAXCPU)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00960}00960                 \mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}} = MAXCPU;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00961}00961         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00962}00962                 mtx\_init(\&\mbox{\hyperlink{cam__xpt_8c_ab0f84f295d3b76549908f2a897718483}{cam\_doneqs}}[i].cam\_doneq\_mtx, \textcolor{stringliteral}{"{}CAM doneq"{}}, NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00963}00963                     MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00964}00964                 STAILQ\_INIT(\&\mbox{\hyperlink{cam__xpt_8c_ab0f84f295d3b76549908f2a897718483}{cam\_doneqs}}[i].\mbox{\hyperlink{structcam__doneq}{cam\_doneq}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00965}00965                 error = kproc\_kthread\_add(\mbox{\hyperlink{cam__xpt_8c_aee0553bab4e39fc924dc0d1453c7d61e}{xpt\_done\_td}}, \&\mbox{\hyperlink{cam__xpt_8c_ab0f84f295d3b76549908f2a897718483}{cam\_doneqs}}[i],}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00966}00966                     \&\mbox{\hyperlink{cam__xpt_8c_a018571c1d0ded4716fe7113c268f7d2d}{cam\_proc}}, NULL, 0, 0, \textcolor{stringliteral}{"{}cam"{}}, \textcolor{stringliteral}{"{}doneq\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00967}00967                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00968}00968                         \mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}} = i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00969}00969                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00970}00970                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00971}00971         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00972}00972         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}} < 1) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00973}00973                 printf(\textcolor{stringliteral}{"{}xpt\_init: Cannot init completion queues "{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00974}00974                        \textcolor{stringliteral}{"{}-\/ failing attach\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00975}00975                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00976}00976         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00977}00977 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00978}00978         mtx\_init(\&\mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{cam\_async}}.\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}}, \textcolor{stringliteral}{"{}CAM async"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00979}00979         STAILQ\_INIT(\&\mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{cam\_async}}.cam\_doneq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00980}00980         \textcolor{keywordflow}{if} (kproc\_kthread\_add(\mbox{\hyperlink{cam__xpt_8c_a6da9f4e7e5e9f07f758eee137baffc41}{xpt\_async\_td}}, \&\mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{cam\_async}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00981}00981                 \&\mbox{\hyperlink{cam__xpt_8c_a018571c1d0ded4716fe7113c268f7d2d}{cam\_proc}}, NULL, 0, 0, \textcolor{stringliteral}{"{}cam"{}}, \textcolor{stringliteral}{"{}async"{}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00982}00982                 printf(\textcolor{stringliteral}{"{}xpt\_init: Cannot init async thread "{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00983}00983                        \textcolor{stringliteral}{"{}-\/ failing attach\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00984}00984                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00985}00985         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00986}00986 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00987}00987         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00988}00988 \textcolor{comment}{         * Register a callback for when interrupts are enabled.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00989}00989 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00990}00990         config\_intrhook\_oneshot(\mbox{\hyperlink{cam__xpt_8c_a43cdc0766fd1a67f91f3f86190af6842}{xpt\_config}}, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00991}00991 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00992}00992         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00993}00993 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00994}00994 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00995}00995 \textcolor{keyword}{static} \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00996}\mbox{\hyperlink{cam__xpt_8c_aaede520d73f8b08a56dd0a506cd7de0e}{00996}} \mbox{\hyperlink{cam__xpt_8c_aaede520d73f8b08a56dd0a506cd7de0e}{xptregister}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00997}00997 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00998}00998         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *xpt\_sim;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l00999}00999 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01000}01000         \textcolor{keywordflow}{if} (periph == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01001}01001                 printf(\textcolor{stringliteral}{"{}xptregister: periph was NULL!!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01002}01002                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01003}01003         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01004}01004 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01005}01005         xpt\_sim = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01006}01006         xpt\_sim-\/>\mbox{\hyperlink{structcam__sim_a274ee0c85216787cfced8f4a275fca41}{softc}} = periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01007}01007         \mbox{\hyperlink{cam__xpt_8c_a88a107b9711f7cf295bb241e5bff985b}{xpt\_periph}} = periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01008}01008         periph-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01009}01009 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01010}01010         \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01011}01011 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01012}01012 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01013}01013 int32\_t}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01014}\mbox{\hyperlink{cam__xpt_8c_a300082b502599d86c2e57970b169933b}{01014}} \mbox{\hyperlink{cam__xpt_8c_a300082b502599d86c2e57970b169933b}{xpt\_add\_periph}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01015}01015 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01016}01016         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01017}01017         int32\_t  status;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01018}01018 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01019}01019         TASK\_INIT(\&periph-\/>\mbox{\hyperlink{structcam__periph_ab88b432b38f4cf28952c389e48171e01}{periph\_run\_task}}, 0, \mbox{\hyperlink{cam__xpt_8c_aec3a47b3c27335f54ff319748b7e8b24}{xpt\_run\_allocq\_task}}, periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01020}01020         device = periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01021}01021         status = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01022}01022         \textcolor{keywordflow}{if} (device != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01023}01023                 mtx\_lock(\&device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01024}01024                 device-\/>\mbox{\hyperlink{structcam__ed_a38440f387b4d1effb8611a32d4635671}{generation}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01025}01025                 SLIST\_INSERT\_HEAD(\&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}}, periph, periph\_links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01026}01026                 mtx\_unlock(\&device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01027}01027                 atomic\_add\_32(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_aa1705e3549e9cf8217c299d74180f4e6}{xpt\_generation}}, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01028}01028         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01029}01029 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01030}01030         \textcolor{keywordflow}{return} (status);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01031}01031 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01032}01032 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01033}01033 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01034}\mbox{\hyperlink{cam__xpt_8c_af8c639fc9939a5bdfe62a49425a38142}{01034}} \mbox{\hyperlink{cam__xpt_8c_af8c639fc9939a5bdfe62a49425a38142}{xpt\_remove\_periph}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01035}01035 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01036}01036         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01037}01037 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01038}01038         device = periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01039}01039         \textcolor{keywordflow}{if} (device != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01040}01040                 mtx\_lock(\&device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01041}01041                 device-\/>\mbox{\hyperlink{structcam__ed_a38440f387b4d1effb8611a32d4635671}{generation}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01042}01042                 SLIST\_REMOVE(\&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}}, periph, \mbox{\hyperlink{structcam__periph}{cam\_periph}}, periph\_links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01043}01043                 mtx\_unlock(\&device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01044}01044                 atomic\_add\_32(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_aa1705e3549e9cf8217c299d74180f4e6}{xpt\_generation}}, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01045}01045         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01046}01046 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01047}01047 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01048}01048 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01049}\mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{01049}} \mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{xpt\_announce\_periph}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{char} *announce\_string)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01050}01050 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01051}01051         \textcolor{keyword}{struct  }\mbox{\hyperlink{structcam__path}{cam\_path}} *path = \mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01052}01052         \textcolor{keyword}{struct  }\mbox{\hyperlink{structxpt__proto}{xpt\_proto}} *\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01054}01054         \mbox{\hyperlink{cam__periph_8h_a14a9062a3b53e1d1a2570a39695c2cd3}{cam\_periph\_assert}}(periph, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01055}01055         periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} |= \mbox{\hyperlink{cam__periph_8h_ab4fc12681b18ce5183363944d47f1d19}{CAM\_PERIPH\_ANNOUNCED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01056}01056 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01057}01057         printf(\textcolor{stringliteral}{"{}\%s\%d at \%s\%d bus \%d scbus\%d target \%d lun \%jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01058}01058                periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01059}01059                path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01060}01060                path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01061}01061                path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01062}01062                path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01063}01063                path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01064}01064                (uintmax\_t)path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01065}01065         printf(\textcolor{stringliteral}{"{}\%s\%d: "{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01066}01066         \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}} = \mbox{\hyperlink{cam__xpt_8c_a35cb4d3a19c528cea29e080862738060}{xpt\_proto\_find}}(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01067}01067         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01068}01068                 \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}}-\/>ops-\/>announce(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01069}01069         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01070}01070                 printf(\textcolor{stringliteral}{"{}\%s\%d: Unknown protocol device \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01071}01071                     periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01072}01072                     path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01073}01073         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a5ac00c1566eaed5d30763c9cbbda3201}{serial\_num\_len}} > 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01074}01074                 \textcolor{comment}{/* Don't wrap the screen  -\/ print only the first 60 chars */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01075}01075                 printf(\textcolor{stringliteral}{"{}\%s\%d: Serial Number \%.60s\(\backslash\)n"{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01076}01076                        periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}, path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a42307f2d582c88574f75c7e5393bdba0}{serial\_num}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01077}01077         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01078}01078         \textcolor{comment}{/* Announce transport details. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01079}01079         path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}}-\/>\mbox{\hyperlink{structxpt__xport_ac9deaad7cb0ff7eb57943fdc975e4c09}{ops}}-\/>\mbox{\hyperlink{structxpt__xport__ops_a8fa8676ad3862b212e55e6cd56f0519b}{announce}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01080}01080         \textcolor{comment}{/* Announce command queueing. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01081}01081         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a72233078c6c53a614e242b55ae7a4f25}{inq\_flags}} \& \mbox{\hyperlink{scsi__all_8h_a2654353ac4dfee5fb1a94d06703a6921}{SID\_CmdQue}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01082}01082          || path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a9a3734688d136304232eafe4a96b6e7a}{CAM\_DEV\_TAG\_AFTER\_COUNT}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01083}01083                 printf(\textcolor{stringliteral}{"{}\%s\%d: Command Queueing enabled\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01084}01084                        periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01085}01085         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01086}01086         \textcolor{comment}{/* Announce caller's details if they've passed in. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01087}01087         \textcolor{keywordflow}{if} (announce\_string != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01088}01088                 printf(\textcolor{stringliteral}{"{}\%s\%d: \%s\(\backslash\)n"{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01089}01089                        periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}, announce\_string);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01090}01090 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01091}01091 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01092}01092 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01093}\mbox{\hyperlink{cam__xpt_8c_af23247154fe346897cdb126665654a79}{01093}} \mbox{\hyperlink{cam__xpt_8c_af23247154fe346897cdb126665654a79}{xpt\_announce\_periph\_sbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{struct} sbuf *sb,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01094}01094     \textcolor{keywordtype}{char} *announce\_string)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01095}01095 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01096}01096         \textcolor{keyword}{struct  }\mbox{\hyperlink{structcam__path}{cam\_path}} *path = \mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01097}01097         \textcolor{keyword}{struct  }\mbox{\hyperlink{structxpt__proto}{xpt\_proto}} *\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01098}01098 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01099}01099         \mbox{\hyperlink{cam__periph_8h_a14a9062a3b53e1d1a2570a39695c2cd3}{cam\_periph\_assert}}(periph, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01100}01100         periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} |= \mbox{\hyperlink{cam__periph_8h_ab4fc12681b18ce5183363944d47f1d19}{CAM\_PERIPH\_ANNOUNCED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01101}01101 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01102}01102         \textcolor{comment}{/* Fall back to the non-\/sbuf method if necessary */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01103}01103         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.announce\_nosbuf != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01104}01104                 \mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{xpt\_announce\_periph}}(periph, announce\_string);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01105}01105                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01106}01106         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01107}01107         \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}} = \mbox{\hyperlink{cam__xpt_8c_a35cb4d3a19c528cea29e080862738060}{xpt\_proto\_find}}(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01108}01108         \textcolor{keywordflow}{if} (((\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}} != NULL) \&\& (\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}}-\/>ops-\/>announce\_sbuf == NULL)) ||}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01109}01109             (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}}-\/>\mbox{\hyperlink{structxpt__xport_ac9deaad7cb0ff7eb57943fdc975e4c09}{ops}}-\/>\mbox{\hyperlink{structxpt__xport__ops_a4e333a71d563c10c6e76eab45410c701}{announce\_sbuf}} == NULL)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01110}01110                 \mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{xpt\_announce\_periph}}(periph, announce\_string);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01111}01111                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01112}01112         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01113}01113 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01114}01114         sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d at \%s\%d bus \%d scbus\%d target \%d lun \%jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01115}01115             periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01116}01116             path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01117}01117             path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01118}01118             path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01119}01119             path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01120}01120             path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01121}01121             (uintmax\_t)path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01122}01122         sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d: "{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01123}01123 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01124}01124         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01125}01125                 \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}}-\/>ops-\/>announce\_sbuf(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}, sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01126}01126         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01127}01127                 sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d: Unknown protocol device \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01128}01128                     periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01129}01129                     path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01130}01130         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a5ac00c1566eaed5d30763c9cbbda3201}{serial\_num\_len}} > 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01131}01131                 \textcolor{comment}{/* Don't wrap the screen  -\/ print only the first 60 chars */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01132}01132                 sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d: Serial Number \%.60s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01133}01133                     periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01134}01134                     path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a42307f2d582c88574f75c7e5393bdba0}{serial\_num}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01135}01135         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01136}01136         \textcolor{comment}{/* Announce transport details. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01137}01137         path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}}-\/>\mbox{\hyperlink{structxpt__xport_ac9deaad7cb0ff7eb57943fdc975e4c09}{ops}}-\/>\mbox{\hyperlink{structxpt__xport__ops_a4e333a71d563c10c6e76eab45410c701}{announce\_sbuf}}(periph, sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01138}01138         \textcolor{comment}{/* Announce command queueing. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01139}01139         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a72233078c6c53a614e242b55ae7a4f25}{inq\_flags}} \& \mbox{\hyperlink{scsi__all_8h_a2654353ac4dfee5fb1a94d06703a6921}{SID\_CmdQue}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01140}01140          || path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a9a3734688d136304232eafe4a96b6e7a}{CAM\_DEV\_TAG\_AFTER\_COUNT}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01141}01141                 sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d: Command Queueing enabled\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01142}01142                     periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01143}01143         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01144}01144         \textcolor{comment}{/* Announce caller's details if they've passed in. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01145}01145         \textcolor{keywordflow}{if} (announce\_string != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01146}01146                 sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d: \%s\(\backslash\)n"{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01147}01147                     periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}, announce\_string);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01148}01148 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01149}01149 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01150}01150 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01151}\mbox{\hyperlink{cam__xpt_8c_ae4c51443613933a7cdffc5abbb6c3568}{01151}} \mbox{\hyperlink{cam__xpt_8c_ae4c51443613933a7cdffc5abbb6c3568}{xpt\_announce\_quirks}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int} quirks, \textcolor{keywordtype}{char} *bit\_string)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01152}01152 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01153}01153         \textcolor{keywordflow}{if} (quirks != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01154}01154                 printf(\textcolor{stringliteral}{"{}\%s\%d: quirks=0x\%b\(\backslash\)n"{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01155}01155                     periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}, quirks, bit\_string);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01156}01156         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01157}01157 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01158}01158 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01159}01159 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01160}\mbox{\hyperlink{cam__xpt_8c_a70ea13363ac7ca436708b1dec788e0b0}{01160}} \mbox{\hyperlink{cam__xpt_8c_a70ea13363ac7ca436708b1dec788e0b0}{xpt\_announce\_quirks\_sbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{struct} sbuf *sb,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01161}01161                          \textcolor{keywordtype}{int} quirks, \textcolor{keywordtype}{char} *bit\_string)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01162}01162 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01163}01163         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.announce\_nosbuf != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01164}01164                 \mbox{\hyperlink{cam__xpt_8c_ae4c51443613933a7cdffc5abbb6c3568}{xpt\_announce\_quirks}}(periph, quirks, bit\_string);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01165}01165                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01166}01166         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01167}01167 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01168}01168         \textcolor{keywordflow}{if} (quirks != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01169}01169                 sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d: quirks=0x\%b\(\backslash\)n"{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01170}01170                     periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}, quirks, bit\_string);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01171}01171         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01172}01172 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01173}01173 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01174}01174 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01175}\mbox{\hyperlink{cam__xpt_8c_a8ef4a6fec31f3031e99e36e814a516b2}{01175}} \mbox{\hyperlink{cam__xpt_8c_a8ef4a6fec31f3031e99e36e814a516b2}{xpt\_denounce\_periph}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01176}01176 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01177}01177         \textcolor{keyword}{struct  }\mbox{\hyperlink{structcam__path}{cam\_path}} *path = \mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01178}01178         \textcolor{keyword}{struct  }\mbox{\hyperlink{structxpt__proto}{xpt\_proto}} *\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01179}01179 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01180}01180         \mbox{\hyperlink{cam__periph_8h_a14a9062a3b53e1d1a2570a39695c2cd3}{cam\_periph\_assert}}(periph, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01181}01181         printf(\textcolor{stringliteral}{"{}\%s\%d at \%s\%d bus \%d scbus\%d target \%d lun \%jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01182}01182                periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01183}01183                path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01184}01184                path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01185}01185                path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01186}01186                path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01187}01187                path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01188}01188                (uintmax\_t)path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01189}01189         printf(\textcolor{stringliteral}{"{}\%s\%d: "{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01190}01190         \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}} = \mbox{\hyperlink{cam__xpt_8c_a35cb4d3a19c528cea29e080862738060}{xpt\_proto\_find}}(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01191}01191         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01192}01192                 \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}}-\/>ops-\/>denounce(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01193}01193         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01194}01194                 printf(\textcolor{stringliteral}{"{}\%s\%d: Unknown protocol device \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01195}01195                     periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01196}01196                     path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01197}01197         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a5ac00c1566eaed5d30763c9cbbda3201}{serial\_num\_len}} > 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01198}01198                 printf(\textcolor{stringliteral}{"{} s/n \%.60s"{}}, path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a42307f2d582c88574f75c7e5393bdba0}{serial\_num}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01199}01199         printf(\textcolor{stringliteral}{"{} detached\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01200}01200 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01201}01201 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01202}01202 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01203}\mbox{\hyperlink{cam__xpt_8c_a18d49adde6c65e6bf6db89e07a005425}{01203}} \mbox{\hyperlink{cam__xpt_8c_a18d49adde6c65e6bf6db89e07a005425}{xpt\_denounce\_periph\_sbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{struct} sbuf *sb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01204}01204 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01205}01205         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *path = \mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01206}01206         \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__proto}{xpt\_proto}} *\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01207}01207 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01208}01208         \mbox{\hyperlink{cam__periph_8h_a14a9062a3b53e1d1a2570a39695c2cd3}{cam\_periph\_assert}}(periph, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01209}01209 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01210}01210         \textcolor{comment}{/* Fall back to the non-\/sbuf method if necessary */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01211}01211         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.announce\_nosbuf != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01212}01212                 \mbox{\hyperlink{cam__xpt_8c_a8ef4a6fec31f3031e99e36e814a516b2}{xpt\_denounce\_periph}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01213}01213                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01214}01214         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01215}01215         \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}} = \mbox{\hyperlink{cam__xpt_8c_a35cb4d3a19c528cea29e080862738060}{xpt\_proto\_find}}(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01216}01216         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}} != NULL) \&\& (\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}}-\/>ops-\/>denounce\_sbuf == NULL)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01217}01217                 \mbox{\hyperlink{cam__xpt_8c_a8ef4a6fec31f3031e99e36e814a516b2}{xpt\_denounce\_periph}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01218}01218                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01219}01219         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01220}01220 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01221}01221         sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d at \%s\%d bus \%d scbus\%d target \%d lun \%jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01222}01222             periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01223}01223             path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01224}01224             path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01225}01225             path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01226}01226             path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01227}01227             path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01228}01228             (uintmax\_t)path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01229}01229         sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d: "{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01230}01230 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01231}01231         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01232}01232                 \mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}}-\/>ops-\/>denounce\_sbuf(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}, sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01233}01233         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01234}01234                 sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d: Unknown protocol device \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01235}01235                     periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01236}01236                     path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01237}01237         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a5ac00c1566eaed5d30763c9cbbda3201}{serial\_num\_len}} > 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01238}01238                 sbuf\_printf(sb, \textcolor{stringliteral}{"{} s/n \%.60s"{}}, path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a42307f2d582c88574f75c7e5393bdba0}{serial\_num}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01239}01239         sbuf\_printf(sb, \textcolor{stringliteral}{"{} detached\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01240}01240 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01241}01241 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01242}01242 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01243}\mbox{\hyperlink{cam__xpt_8c_a2b24f6c02556c877219f3e3b631d48f1}{01243}} \mbox{\hyperlink{cam__xpt_8c_a2b24f6c02556c877219f3e3b631d48f1}{xpt\_getattr}}(\textcolor{keywordtype}{char} *buf, \textcolor{keywordtype}{size\_t} len, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *attr, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01244}01244 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01245}01245         \textcolor{keywordtype}{int} ret = -\/1, l, o;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01246}01246         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__advinfo}{ccb\_dev\_advinfo}} cdai;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01247}01247         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__vpd__device__id}{scsi\_vpd\_device\_id}} *did;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01248}01248         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__vpd__id__descriptor}{scsi\_vpd\_id\_descriptor}} *idd;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01249}01249 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01250}01250         \mbox{\hyperlink{cam__xpt_8h_aa54087e85f491e70bff540b8b7d3cc1d}{xpt\_path\_assert}}(path, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01251}01251 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01252}01252         memset(\&cdai, 0, \textcolor{keyword}{sizeof}(cdai));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01253}01253         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}, path, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01254}01254         cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca2c75d86cab0c5759920462cc2176ba5c}{XPT\_DEV\_ADVINFO}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01255}01255         cdai.\mbox{\hyperlink{structccb__dev__advinfo_affc168900cb9c5285561c61f0943c3e3}{flags}} = \mbox{\hyperlink{cam__ccb_8h_ab209104904dd7dc463ca8adf35ccaf89}{CDAI\_FLAG\_NONE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01256}01256         cdai.\mbox{\hyperlink{structccb__dev__advinfo_afa050eda9092cdf454257eedb612ba3c}{bufsiz}} = len;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01257}01257         cdai.\mbox{\hyperlink{structccb__dev__advinfo_a7b8fe8dead2731461b79ca1a5806956f}{buf}} = buf;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01258}01258 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01259}01259         \textcolor{keywordflow}{if} (!strcmp(attr, \textcolor{stringliteral}{"{}GEOM::ident"{}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01260}01260                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_a349f9c118cd0310b80635196fe1995f5}{buftype}} = \mbox{\hyperlink{cam__ccb_8h_ab63a59990798ec2f63fe45aa76dcb973}{CDAI\_TYPE\_SERIAL\_NUM}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01261}01261         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(attr, \textcolor{stringliteral}{"{}GEOM::physpath"{}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01262}01262                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_a349f9c118cd0310b80635196fe1995f5}{buftype}} = \mbox{\hyperlink{cam__ccb_8h_ac101e60833e21699afff0ae410e4f31e}{CDAI\_TYPE\_PHYS\_PATH}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01263}01263         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(attr, \textcolor{stringliteral}{"{}GEOM::lunid"{}}) == 0 ||}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01264}01264                  strcmp(attr, \textcolor{stringliteral}{"{}GEOM::lunname"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01265}01265                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_a349f9c118cd0310b80635196fe1995f5}{buftype}} = \mbox{\hyperlink{cam__ccb_8h_afae025ff27326a323b7d84ee22cec979}{CDAI\_TYPE\_SCSI\_DEVID}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01266}01266                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_afa050eda9092cdf454257eedb612ba3c}{bufsiz}} = \mbox{\hyperlink{cam__ccb_8h_a50b905976663e87b0e277d419dfee5ee}{CAM\_SCSI\_DEVID\_MAXLEN}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01267}01267                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_a7b8fe8dead2731461b79ca1a5806956f}{buf}} = malloc(cdai.\mbox{\hyperlink{structccb__dev__advinfo_afa050eda9092cdf454257eedb612ba3c}{bufsiz}}, M\_CAMXPT, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01268}01268                 \textcolor{keywordflow}{if} (cdai.\mbox{\hyperlink{structccb__dev__advinfo_a7b8fe8dead2731461b79ca1a5806956f}{buf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01269}01269                         ret = ENOMEM;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01270}01270                         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01271}01271                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01272}01272         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01273}01273                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01274}01274 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01275}01275         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}((\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)\&cdai); \textcolor{comment}{/* can only be synchronous */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01276}01276         \textcolor{keywordflow}{if} ((cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3afe5c2fa0edb1c8fea0119515430d223e}{CAM\_DEV\_QFRZN}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01277}01277                 \mbox{\hyperlink{cam__periph_8c_a31248ce4d1951e8325b42cf2c309481d}{cam\_release\_devq}}(cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, 0, 0, 0, FALSE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01278}01278         \textcolor{keywordflow}{if} (cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}} == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01279}01279                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01280}01280         \textcolor{keywordflow}{switch}(cdai.\mbox{\hyperlink{structccb__dev__advinfo_a349f9c118cd0310b80635196fe1995f5}{buftype}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01281}01281         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_afae025ff27326a323b7d84ee22cec979}{CDAI\_TYPE\_SCSI\_DEVID}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01282}01282                 did = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__vpd__device__id}{scsi\_vpd\_device\_id}} *)cdai.\mbox{\hyperlink{structccb__dev__advinfo_a7b8fe8dead2731461b79ca1a5806956f}{buf}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01283}01283                 if (strcmp(attr, \textcolor{stringliteral}{"{}GEOM::lunid"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01284}01284                         idd = \mbox{\hyperlink{scsi__all_8c_a5eb393afddee4381e878f2b15753e270}{scsi\_get\_devid}}(did, cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01285}01285                             \mbox{\hyperlink{scsi__all_8c_a4107b7b6984883275efb6aa5dd83707e}{scsi\_devid\_is\_lun\_naa}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01286}01286                         \textcolor{keywordflow}{if} (idd == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01287}01287                                 idd = \mbox{\hyperlink{scsi__all_8c_a5eb393afddee4381e878f2b15753e270}{scsi\_get\_devid}}(did, cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01288}01288                                     \mbox{\hyperlink{scsi__all_8c_a0d78a346a4ab75996633d1e4e42bec85}{scsi\_devid\_is\_lun\_eui64}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01289}01289                         \textcolor{keywordflow}{if} (idd == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01290}01290                                 idd = \mbox{\hyperlink{scsi__all_8c_a5eb393afddee4381e878f2b15753e270}{scsi\_get\_devid}}(did, cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01291}01291                                     \mbox{\hyperlink{scsi__all_8c_ae8a02a0c9f543273af8b9930d77b7c4f}{scsi\_devid\_is\_lun\_uuid}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01292}01292                         \textcolor{keywordflow}{if} (idd == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01293}01293                                 idd = \mbox{\hyperlink{scsi__all_8c_a5eb393afddee4381e878f2b15753e270}{scsi\_get\_devid}}(did, cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01294}01294                                     \mbox{\hyperlink{scsi__all_8c_af2e9edfdd63ff181f1e267ba80d57b38}{scsi\_devid\_is\_lun\_md5}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01295}01295                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01296}01296                         idd = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01297}01297 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01298}01298                 \textcolor{keywordflow}{if} (idd == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01299}01299                         idd = \mbox{\hyperlink{scsi__all_8c_a5eb393afddee4381e878f2b15753e270}{scsi\_get\_devid}}(did, cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01300}01300                             \mbox{\hyperlink{scsi__all_8c_ad231cfe3062284f590abe64590552f58}{scsi\_devid\_is\_lun\_t10}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01301}01301                 \textcolor{keywordflow}{if} (idd == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01302}01302                         idd = \mbox{\hyperlink{scsi__all_8c_a5eb393afddee4381e878f2b15753e270}{scsi\_get\_devid}}(did, cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01303}01303                             \mbox{\hyperlink{scsi__all_8c_a17ba57f262e711eeef90e408fce76234}{scsi\_devid\_is\_lun\_name}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01304}01304                 \textcolor{keywordflow}{if} (idd == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01305}01305                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01306}01306 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01307}01307                 ret = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01308}01308                 \textcolor{keywordflow}{if} ((idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_ab5148e9f9caec50c84162ed4abb40076}{proto\_codeset}} \& \mbox{\hyperlink{scsi__all_8h_a9bb57f745944d7e8f4bd2776795cfd70}{SVPD\_ID\_CODESET\_MASK}}) ==}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01309}01309                     \mbox{\hyperlink{scsi__all_8h_accbe268372b855f0971ad5ddfc32e868}{SVPD\_ID\_CODESET\_ASCII}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01310}01310                         \textcolor{keywordflow}{if} (idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a4c37fb0b3c2a33d82d7bc024b514fccd}{length}} < len) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01311}01311                                 \textcolor{keywordflow}{for} (l = 0; l < idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a4c37fb0b3c2a33d82d7bc024b514fccd}{length}}; l++)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01312}01312                                         buf[l] = idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a85cbd83af0ec0cfeb33fced8e7d0d6e3}{identifier}}[l] ?}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01313}01313                                             idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a85cbd83af0ec0cfeb33fced8e7d0d6e3}{identifier}}[l] : \textcolor{charliteral}{' '};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01314}01314                                 buf[l] = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01315}01315                         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01316}01316                                 ret = EFAULT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01317}01317                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01318}01318                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01319}01319                 \textcolor{keywordflow}{if} ((idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_ab5148e9f9caec50c84162ed4abb40076}{proto\_codeset}} \& \mbox{\hyperlink{scsi__all_8h_a9bb57f745944d7e8f4bd2776795cfd70}{SVPD\_ID\_CODESET\_MASK}}) ==}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01320}01320                     \mbox{\hyperlink{scsi__all_8h_a44ce63540db2dd80d80a638fc2b3c1e1}{SVPD\_ID\_CODESET\_UTF8}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01321}01321                         l = strnlen(idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a85cbd83af0ec0cfeb33fced8e7d0d6e3}{identifier}}, idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a4c37fb0b3c2a33d82d7bc024b514fccd}{length}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01322}01322                         \textcolor{keywordflow}{if} (l < len) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01323}01323                                 bcopy(idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a85cbd83af0ec0cfeb33fced8e7d0d6e3}{identifier}}, buf, l);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01324}01324                                 buf[l] = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01325}01325                         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01326}01326                                 ret = EFAULT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01327}01327                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01328}01328                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01329}01329                 \textcolor{keywordflow}{if} ((idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a27e4c229dc30504bb4a362974072e9b3}{id\_type}} \& \mbox{\hyperlink{scsi__all_8h_a455314971eef09053d3973aa619f835c}{SVPD\_ID\_TYPE\_MASK}}) ==}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01330}01330                     \mbox{\hyperlink{scsi__all_8h_a54c9ca8fa0219a53621d88ca799e4e50}{SVPD\_ID\_TYPE\_UUID}} \&\& idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a85cbd83af0ec0cfeb33fced8e7d0d6e3}{identifier}}[0] == 0x10) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01331}01331                         \textcolor{keywordflow}{if} ((idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a4c37fb0b3c2a33d82d7bc024b514fccd}{length}} -\/ 2) * 2 + 4 >= len) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01332}01332                                 ret = EFAULT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01333}01333                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01334}01334                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01335}01335                         \textcolor{keywordflow}{for} (l = 2, o = 0; l < idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a4c37fb0b3c2a33d82d7bc024b514fccd}{length}}; l++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01336}01336                                 \textcolor{keywordflow}{if} (l == 6 || l == 8 || l == 10 || l == 12)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01337}01337                                     o += sprintf(buf + o, \textcolor{stringliteral}{"{}-\/"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01338}01338                                 o += sprintf(buf + o, \textcolor{stringliteral}{"{}\%02x"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01339}01339                                     idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a85cbd83af0ec0cfeb33fced8e7d0d6e3}{identifier}}[l]);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01340}01340                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01341}01341                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01342}01342                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01343}01343                 \textcolor{keywordflow}{if} (idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a4c37fb0b3c2a33d82d7bc024b514fccd}{length}} * 2 < len) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01344}01344                         \textcolor{keywordflow}{for} (l = 0; l < idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a4c37fb0b3c2a33d82d7bc024b514fccd}{length}}; l++)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01345}01345                                 sprintf(buf + l * 2, \textcolor{stringliteral}{"{}\%02x"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01346}01346                                     idd-\/>\mbox{\hyperlink{structscsi__vpd__id__descriptor_a85cbd83af0ec0cfeb33fced8e7d0d6e3}{identifier}}[l]);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01347}01347                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01348}01348                                 ret = EFAULT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01349}01349                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01350}01350         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01351}01351                 \textcolor{keywordflow}{if} (cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}} < len) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01352}01352                         cdai.\mbox{\hyperlink{structccb__dev__advinfo_a7b8fe8dead2731461b79ca1a5806956f}{buf}}[cdai.\mbox{\hyperlink{structccb__dev__advinfo_a88936aaf5ac9d906ab5c5e59d806fff7}{provsiz}}] = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01353}01353                         ret = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01354}01354                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01355}01355                         ret = EFAULT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01356}01356                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01357}01357         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01358}01358 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01359}01359 out:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01360}01360         \textcolor{keywordflow}{if} ((\textcolor{keywordtype}{char} *)cdai.\mbox{\hyperlink{structccb__dev__advinfo_a7b8fe8dead2731461b79ca1a5806956f}{buf}} != buf)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01361}01361                 free(cdai.\mbox{\hyperlink{structccb__dev__advinfo_a7b8fe8dead2731461b79ca1a5806956f}{buf}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01362}01362         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01363}01363 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01364}01364 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01365}01365 \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01366}\mbox{\hyperlink{cam__xpt_8c_a06063d65e0568a9526a63f1719fbb9ac}{01366}} \mbox{\hyperlink{cam__xpt_8c_a06063d65e0568a9526a63f1719fbb9ac}{xptbusmatch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__pattern}{dev\_match\_pattern}} *patterns, u\_int num\_patterns,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01367}01367             \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01368}01368 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01369}01369         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01370}01370         u\_int i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01371}01371 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01372}01372         retval = \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaf877731a60134f510f31d0b0e09244c6}{DM\_RET\_NONE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01373}01373 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01374}01374         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01375}01375 \textcolor{comment}{         * If we aren't given something to match against, that's an error.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01376}01376 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01377}01377         \textcolor{keywordflow}{if} (bus == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01378}01378                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01379}01379 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01380}01380         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01381}01381 \textcolor{comment}{         * If there are no match entries, then this bus matches no}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01382}01382 \textcolor{comment}{         * matter what.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01383}01383 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01384}01384         \textcolor{keywordflow}{if} ((patterns == NULL) || (num\_patterns == 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01385}01385                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}} | \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01386}01386 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01387}01387         \textcolor{keywordflow}{for} (i = 0; i < num\_patterns; i++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01388}01388                 \textcolor{keyword}{struct }\mbox{\hyperlink{structbus__match__pattern}{bus\_match\_pattern}} *cur\_pattern;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01389}01389                 \textcolor{keyword}{struct }\mbox{\hyperlink{structdevice__match__pattern}{device\_match\_pattern}} *dp = \&patterns[i].\mbox{\hyperlink{structdev__match__pattern_a79b39dddd88ad1b0a0b5d08e41e12076}{pattern}}.\mbox{\hyperlink{unionmatch__pattern_ab85a08f895e60251eab17d86c41e7647}{device\_pattern}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01390}01390                 \textcolor{keyword}{struct }\mbox{\hyperlink{structperiph__match__pattern}{periph\_match\_pattern}} *pp = \&patterns[i].\mbox{\hyperlink{structdev__match__pattern_a79b39dddd88ad1b0a0b5d08e41e12076}{pattern}}.\mbox{\hyperlink{unionmatch__pattern_abd9a004a1f56a1f08773c2a377760967}{periph\_pattern}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01391}01391 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01392}01392                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01393}01393 \textcolor{comment}{                 * If the pattern in question isn't for a bus node, we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01394}01394 \textcolor{comment}{                 * aren't interested.  However, we do indicate to the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01395}01395 \textcolor{comment}{                 * calling routine that we should continue descending the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01396}01396 \textcolor{comment}{                 * tree, since the user wants to match against lower-\/level}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01397}01397 \textcolor{comment}{                 * EDT elements.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01398}01398 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01399}01399                 \textcolor{keywordflow}{if} (patterns[i].type == \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfa580439a450044124c0131f54d56e2643}{DEV\_MATCH\_DEVICE}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01400}01400                     (dp-\/>\mbox{\hyperlink{structdevice__match__pattern_a56a32670e43ba31e70bf4a7f1d9a9d28}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aae71568e8300d2e53b67ce82f4cfee91f}{DEV\_MATCH\_PATH}}) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01401}01401                     dp-\/>\mbox{\hyperlink{structdevice__match__pattern_a4e3075c539d50c1ac4c2283c9419d409}{path\_id}} != bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01402}01402                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01403}01403                 \textcolor{keywordflow}{if} (patterns[i].type == \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfaa707911b103273a87a7408deacb05414}{DEV\_MATCH\_PERIPH}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01404}01404                     (pp-\/>\mbox{\hyperlink{structperiph__match__pattern_a28c32929ef378132c93a6049fdae634a}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a41c4af1afa636a8e9483e655171762bfaccf8debb2aa2fc4610e84231615addd0}{PERIPH\_MATCH\_PATH}}) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01405}01405                     pp-\/>\mbox{\hyperlink{structperiph__match__pattern_ad5dfd7fb936a2e5541ff6348e13d8958}{path\_id}} != bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01406}01406                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01407}01407                 \textcolor{keywordflow}{if} (patterns[i].type != \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfa5e210e131b37614424c5d89c5c1d0ba6}{DEV\_MATCH\_BUS}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01408}01408                         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaf877731a60134f510f31d0b0e09244c6}{DM\_RET\_NONE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01409}01409                                 retval |= \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01410}01410                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01411}01411                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01412}01412 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01413}01413                 cur\_pattern = \&patterns[i].\mbox{\hyperlink{structdev__match__pattern_a79b39dddd88ad1b0a0b5d08e41e12076}{pattern}}.\mbox{\hyperlink{unionmatch__pattern_ab708120b449e6a18793bd8070b443dd7}{bus\_pattern}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01414}01414 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01415}01415                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structbus__match__pattern_aa29845b2bf3e4d9339a52469824beafe}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a61f558ac89384c4f9a41f3a5b4c540d7a39ab76a65c1cfdccb28222d823621146}{BUS\_MATCH\_PATH}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01416}01416                  \&\& (cur\_pattern-\/>\mbox{\hyperlink{structbus__match__pattern_aeca4428b2cfba6eecf98b0b9c7c9c7d8}{path\_id}} != bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01417}01417                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01418}01418 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01419}01419                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structbus__match__pattern_aa29845b2bf3e4d9339a52469824beafe}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a61f558ac89384c4f9a41f3a5b4c540d7a79bb47e8be3df29f17dc2bb893f97d62}{BUS\_MATCH\_BUS\_ID}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01420}01420                  \&\& (cur\_pattern-\/>\mbox{\hyperlink{structbus__match__pattern_a322bbb2ebe7572905bdce01e6d00d9a3}{bus\_id}} != bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01421}01421                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01422}01422 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01423}01423                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structbus__match__pattern_aa29845b2bf3e4d9339a52469824beafe}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a61f558ac89384c4f9a41f3a5b4c540d7a022550dfc610b1d9d366801dc3388e71}{BUS\_MATCH\_UNIT}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01424}01424                  \&\& (cur\_pattern-\/>\mbox{\hyperlink{structbus__match__pattern_a97cf814528bcb3a0513e70ec6ad2cfe4}{unit\_number}} != bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01425}01425                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01426}01426 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01427}01427                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structbus__match__pattern_aa29845b2bf3e4d9339a52469824beafe}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a61f558ac89384c4f9a41f3a5b4c540d7ae2b0e6f1e08ec47c27bae0ee94d0ae76}{BUS\_MATCH\_NAME}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01428}01428                  \&\& (strncmp(cur\_pattern-\/>\mbox{\hyperlink{structbus__match__pattern_a0ee311ccad8bf0b6beb3fcb6c3d1fa30}{dev\_name}}, bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01429}01429                              \mbox{\hyperlink{cam__ccb_8h_aea661c8c832c80ccc92e62f1a37b3cec}{DEV\_IDLEN}}) != 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01430}01430                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01431}01431 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01432}01432                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01433}01433 \textcolor{comment}{                 * If we get to this point, the user definitely wants}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01434}01434 \textcolor{comment}{                 * information on this bus.  So tell the caller to copy the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01435}01435 \textcolor{comment}{                 * data out.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01436}01436 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01437}01437                 retval |= \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01438}01438 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01439}01439                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01440}01440 \textcolor{comment}{                 * If the return action has been set to descend, then we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01441}01441 \textcolor{comment}{                 * know that we've already seen a non-\/bus matching}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01442}01442 \textcolor{comment}{                 * expression, therefore we need to further descend the tree.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01443}01443 \textcolor{comment}{                 * This won't change by continuing around the loop, so we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01444}01444 \textcolor{comment}{                 * go ahead and return.  If we haven't seen a non-\/bus}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01445}01445 \textcolor{comment}{                 * matching expression, we keep going around the loop until}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01446}01446 \textcolor{comment}{                 * we exhaust the matching expressions.  We'll set the stop}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01447}01447 \textcolor{comment}{                 * flag once we fall out of the loop.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01448}01448 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01449}01449                 \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01450}01450                         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01451}01451         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01452}01452 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01453}01453         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01454}01454 \textcolor{comment}{         * If the return action hasn't been set to descend yet, that means}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01455}01455 \textcolor{comment}{         * we haven't seen anything other than bus matching patterns.  So}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01456}01456 \textcolor{comment}{         * tell the caller to stop descending the tree -\/-\/ the user doesn't}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01457}01457 \textcolor{comment}{         * want to match against lower level tree elements.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01458}01458 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01459}01459         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaf877731a60134f510f31d0b0e09244c6}{DM\_RET\_NONE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01460}01460                 retval |= \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea94d2871d8c1e22ef02264730158702e8}{DM\_RET\_STOP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01461}01461 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01462}01462         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01463}01463 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01464}01464 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01465}01465 \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01466}\mbox{\hyperlink{cam__xpt_8c_ae6bbcfd13e463a723cf334a7a8427e94}{01466}} \mbox{\hyperlink{cam__xpt_8c_ae6bbcfd13e463a723cf334a7a8427e94}{xptdevicematch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__pattern}{dev\_match\_pattern}} *patterns, u\_int num\_patterns,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01467}01467                \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01468}01468 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01469}01469         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01470}01470         u\_int i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01471}01471 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01472}01472         retval = \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaf877731a60134f510f31d0b0e09244c6}{DM\_RET\_NONE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01473}01473 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01474}01474         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01475}01475 \textcolor{comment}{         * If we aren't given something to match against, that's an error.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01476}01476 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01477}01477         \textcolor{keywordflow}{if} (device == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01478}01478                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01479}01479 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01480}01480         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01481}01481 \textcolor{comment}{         * If there are no match entries, then this device matches no}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01482}01482 \textcolor{comment}{         * matter what.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01483}01483 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01484}01484         \textcolor{keywordflow}{if} ((patterns == NULL) || (num\_patterns == 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01485}01485                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}} | \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01486}01486 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01487}01487         \textcolor{keywordflow}{for} (i = 0; i < num\_patterns; i++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01488}01488                 \textcolor{keyword}{struct }\mbox{\hyperlink{structdevice__match__pattern}{device\_match\_pattern}} *cur\_pattern;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01489}01489                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__vpd__device__id}{scsi\_vpd\_device\_id}} *device\_id\_page;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01490}01490                 \textcolor{keyword}{struct }\mbox{\hyperlink{structperiph__match__pattern}{periph\_match\_pattern}} *pp = \&patterns[i].\mbox{\hyperlink{structdev__match__pattern_a79b39dddd88ad1b0a0b5d08e41e12076}{pattern}}.\mbox{\hyperlink{unionmatch__pattern_abd9a004a1f56a1f08773c2a377760967}{periph\_pattern}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01491}01491 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01492}01492                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01493}01493 \textcolor{comment}{                 * If the pattern in question isn't for a device node, we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01494}01494 \textcolor{comment}{                 * aren't interested.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01495}01495 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01496}01496                 \textcolor{keywordflow}{if} (patterns[i].type == \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfaa707911b103273a87a7408deacb05414}{DEV\_MATCH\_PERIPH}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01497}01497                     (pp-\/>\mbox{\hyperlink{structperiph__match__pattern_a28c32929ef378132c93a6049fdae634a}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a41c4af1afa636a8e9483e655171762bfaf6a920aa1168bd5a92aea3d8dd50dcb2}{PERIPH\_MATCH\_TARGET}}) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01498}01498                     pp-\/>\mbox{\hyperlink{structperiph__match__pattern_a5cee2e185ba1c6e81d2bb0daee6d9a4b}{target\_id}} != device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01499}01499                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01500}01500                 \textcolor{keywordflow}{if} (patterns[i].type == \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfaa707911b103273a87a7408deacb05414}{DEV\_MATCH\_PERIPH}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01501}01501                     (pp-\/>\mbox{\hyperlink{structperiph__match__pattern_a28c32929ef378132c93a6049fdae634a}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a41c4af1afa636a8e9483e655171762bfa10cf6e6fa2ee62008673947d9535952e}{PERIPH\_MATCH\_LUN}}) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01502}01502                     pp-\/>\mbox{\hyperlink{structperiph__match__pattern_a5dff9803e2ff9ac23aafaf2333bd178b}{target\_lun}} != device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01503}01503                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01504}01504                 \textcolor{keywordflow}{if} (patterns[i].type != \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfa580439a450044124c0131f54d56e2643}{DEV\_MATCH\_DEVICE}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01505}01505                         \textcolor{keywordflow}{if} ((patterns[i].type == \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfaa707911b103273a87a7408deacb05414}{DEV\_MATCH\_PERIPH}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01506}01506                          \&\& ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaf877731a60134f510f31d0b0e09244c6}{DM\_RET\_NONE}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01507}01507                                 retval |= \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01508}01508                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01509}01509                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01510}01510 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01511}01511                 cur\_pattern = \&patterns[i].\mbox{\hyperlink{structdev__match__pattern_a79b39dddd88ad1b0a0b5d08e41e12076}{pattern}}.\mbox{\hyperlink{unionmatch__pattern_ab85a08f895e60251eab17d86c41e7647}{device\_pattern}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01512}01512 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01513}01513                 \textcolor{comment}{/* Error out if mutually exclusive options are specified. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01514}01514                 \textcolor{keywordflow}{if} ((cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a56a32670e43ba31e70bf4a7f1d9a9d28}{flags}} \& (\mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aa59f5bd300d20914c4dbf36ee59a8ffb9}{DEV\_MATCH\_INQUIRY}}|\mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aa2522b8d318abb6b0bc6fef8e3444edf7}{DEV\_MATCH\_DEVID}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01515}01515                  == (\mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aa59f5bd300d20914c4dbf36ee59a8ffb9}{DEV\_MATCH\_INQUIRY}}|\mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aa2522b8d318abb6b0bc6fef8e3444edf7}{DEV\_MATCH\_DEVID}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01516}01516                         \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01517}01517 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01518}01518                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a56a32670e43ba31e70bf4a7f1d9a9d28}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aae71568e8300d2e53b67ce82f4cfee91f}{DEV\_MATCH\_PATH}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01519}01519                  \&\& (cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a4e3075c539d50c1ac4c2283c9419d409}{path\_id}} != device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01520}01520                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01521}01521 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01522}01522                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a56a32670e43ba31e70bf4a7f1d9a9d28}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aad3793b46a7b267a0bd5ee3c44ecad52f}{DEV\_MATCH\_TARGET}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01523}01523                  \&\& (cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_ab60b677ce296fd36e1f897c670c28821}{target\_id}} != device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01524}01524                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01525}01525 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01526}01526                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a56a32670e43ba31e70bf4a7f1d9a9d28}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aae23ebc8d4fe98861f5f923a36869bd4d}{DEV\_MATCH\_LUN}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01527}01527                  \&\& (cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a8ab5a0a51df14f0d6b49182fdf94eae5}{target\_lun}} != device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01528}01528                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01529}01529 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01530}01530                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a56a32670e43ba31e70bf4a7f1d9a9d28}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aa59f5bd300d20914c4dbf36ee59a8ffb9}{DEV\_MATCH\_INQUIRY}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01531}01531                  \&\& (\mbox{\hyperlink{cam_8c_a6ac169c6f650b65a4cd657068ce2b5f4}{cam\_quirkmatch}}((caddr\_t)\&device-\/>\mbox{\hyperlink{structcam__ed_af6726317eeed0cae9946ca90053653b8}{inq\_data}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01532}01532                                     (caddr\_t)\&cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a09e1ae555d3ead1bfee7ca1d2c2d21c1}{data}}.\mbox{\hyperlink{structdevice__match__pattern_a76fdce26e3ea1ab347e46b5c9c55a844}{inq\_pat}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01533}01533                                     1, \textcolor{keyword}{sizeof}(cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a09e1ae555d3ead1bfee7ca1d2c2d21c1}{data}}.\mbox{\hyperlink{structdevice__match__pattern_a76fdce26e3ea1ab347e46b5c9c55a844}{inq\_pat}}),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01534}01534                                     \mbox{\hyperlink{scsi__all_8c_af5d53e9e4aad9ddface55a96e88078b4}{scsi\_static\_inquiry\_match}}) == NULL))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01535}01535                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01536}01536 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01537}01537                 device\_id\_page = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__vpd__device__id}{scsi\_vpd\_device\_id}} *)\mbox{\hyperlink{structscsi__vpd__device__id_a921f8821bdcf55cef931f60c1d875c69}{device}}-\/>device\_id;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01538}01538                 if (((cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a56a32670e43ba31e70bf4a7f1d9a9d28}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a89ee34704467b59f12b65b351dc4638aa2522b8d318abb6b0bc6fef8e3444edf7}{DEV\_MATCH\_DEVID}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01539}01539                  \&\& (\mbox{\hyperlink{structscsi__vpd__device__id_a921f8821bdcf55cef931f60c1d875c69}{device}}-\/>device\_id\_len < \mbox{\hyperlink{scsi__all_8h_aefabaf598017d6c3c7b237ebfddc5db3}{SVPD\_DEVICE\_ID\_HDR\_LEN}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01540}01540                   || \mbox{\hyperlink{scsi__all_8c_ab93831e264fb25fe614782c2b6a39349}{scsi\_devid\_match}}((uint8\_t *)device\_id\_page-\/>\mbox{\hyperlink{structscsi__vpd__device__id_aa26844285784439312040cac3d9e5e5b}{desc\_list}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01541}01541                                       \mbox{\hyperlink{structscsi__vpd__device__id_a921f8821bdcf55cef931f60c1d875c69}{device}}-\/>device\_id\_len}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01542}01542                                     -\/ \mbox{\hyperlink{scsi__all_8h_aefabaf598017d6c3c7b237ebfddc5db3}{SVPD\_DEVICE\_ID\_HDR\_LEN}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01543}01543                                       cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a09e1ae555d3ead1bfee7ca1d2c2d21c1}{data}}.\mbox{\hyperlink{structdevice__match__pattern_a6aeb74e59194aecf58eb358f68620206}{devid\_pat}}.\mbox{\hyperlink{structdevice__id__match__pattern_a2f1ae6de25382ba5c84f94c5525a9a42}{id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01544}01544                                       cur\_pattern-\/>\mbox{\hyperlink{structdevice__match__pattern_a09e1ae555d3ead1bfee7ca1d2c2d21c1}{data}}.\mbox{\hyperlink{structdevice__match__pattern_a6aeb74e59194aecf58eb358f68620206}{devid\_pat}}.\mbox{\hyperlink{structdevice__id__match__pattern_abf4ee832c784f3055d3c87cbc731642f}{id\_len}}) != 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01545}01545                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01546}01546 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01547}01547                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01548}01548 \textcolor{comment}{                 * If we get to this point, the user definitely wants}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01549}01549 \textcolor{comment}{                 * information on this device.  So tell the caller to copy}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01550}01550 \textcolor{comment}{                 * the data out.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01551}01551 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01552}01552                 retval |= \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01553}01553 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01554}01554                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01555}01555 \textcolor{comment}{                 * If the return action has been set to descend, then we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01556}01556 \textcolor{comment}{                 * know that we've already seen a peripheral matching}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01557}01557 \textcolor{comment}{                 * expression, therefore we need to further descend the tree.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01558}01558 \textcolor{comment}{                 * This won't change by continuing around the loop, so we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01559}01559 \textcolor{comment}{                 * go ahead and return.  If we haven't seen a peripheral}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01560}01560 \textcolor{comment}{                 * matching expression, we keep going around the loop until}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01561}01561 \textcolor{comment}{                 * we exhaust the matching expressions.  We'll set the stop}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01562}01562 \textcolor{comment}{                 * flag once we fall out of the loop.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01563}01563 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01564}01564                 \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01565}01565                         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01566}01566         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01567}01567 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01568}01568         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01569}01569 \textcolor{comment}{         * If the return action hasn't been set to descend yet, that means}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01570}01570 \textcolor{comment}{         * we haven't seen any peripheral matching patterns.  So tell the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01571}01571 \textcolor{comment}{         * caller to stop descending the tree -\/-\/ the user doesn't want to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01572}01572 \textcolor{comment}{         * match against lower level tree elements.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01573}01573 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01574}01574         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaf877731a60134f510f31d0b0e09244c6}{DM\_RET\_NONE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01575}01575                 retval |= \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea94d2871d8c1e22ef02264730158702e8}{DM\_RET\_STOP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01576}01576 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01577}01577         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01578}01578 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01579}01579 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01580}01580 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01581}01581 \textcolor{comment}{ * Match a single peripheral against any number of match patterns.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01582}01582 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01583}01583 \textcolor{keyword}{static} \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01584}\mbox{\hyperlink{cam__xpt_8c_a50c1190df530a0ddbafea257484a5a6e}{01584}} \mbox{\hyperlink{cam__xpt_8c_a50c1190df530a0ddbafea257484a5a6e}{xptperiphmatch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__pattern}{dev\_match\_pattern}} *patterns, u\_int num\_patterns,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01585}01585                \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01586}01586 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01587}01587         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01588}01588         u\_int i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01589}01589 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01590}01590         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01591}01591 \textcolor{comment}{         * If we aren't given something to match against, that's an error.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01592}01592 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01593}01593         \textcolor{keywordflow}{if} (periph == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01594}01594                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01595}01595 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01596}01596         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01597}01597 \textcolor{comment}{         * If there are no match entries, then this peripheral matches no}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01598}01598 \textcolor{comment}{         * matter what.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01599}01599 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01600}01600         \textcolor{keywordflow}{if} ((patterns == NULL) || (num\_patterns == 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01601}01601                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea94d2871d8c1e22ef02264730158702e8}{DM\_RET\_STOP}} | \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01602}01602 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01603}01603         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01604}01604 \textcolor{comment}{         * There aren't any nodes below a peripheral node, so there's no}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01605}01605 \textcolor{comment}{         * reason to descend the tree any further.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01606}01606 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01607}01607         retval = \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea94d2871d8c1e22ef02264730158702e8}{DM\_RET\_STOP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01608}01608 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01609}01609         \textcolor{keywordflow}{for} (i = 0; i < num\_patterns; i++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01610}01610                 \textcolor{keyword}{struct }\mbox{\hyperlink{structperiph__match__pattern}{periph\_match\_pattern}} *cur\_pattern;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01611}01611 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01612}01612                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01613}01613 \textcolor{comment}{                 * If the pattern in question isn't for a peripheral, we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01614}01614 \textcolor{comment}{                 * aren't interested.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01615}01615 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01616}01616                 \textcolor{keywordflow}{if} (patterns[i].type != \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfaa707911b103273a87a7408deacb05414}{DEV\_MATCH\_PERIPH}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01617}01617                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01618}01618 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01619}01619                 cur\_pattern = \&patterns[i].\mbox{\hyperlink{structdev__match__pattern_a79b39dddd88ad1b0a0b5d08e41e12076}{pattern}}.\mbox{\hyperlink{unionmatch__pattern_abd9a004a1f56a1f08773c2a377760967}{periph\_pattern}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01620}01620 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01621}01621                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_a28c32929ef378132c93a6049fdae634a}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a41c4af1afa636a8e9483e655171762bfaccf8debb2aa2fc4610e84231615addd0}{PERIPH\_MATCH\_PATH}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01622}01622                  \&\& (cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_ad5dfd7fb936a2e5541ff6348e13d8958}{path\_id}} != periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01623}01623                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01624}01624 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01625}01625                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01626}01626 \textcolor{comment}{                 * For the target and lun id's, we have to make sure the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01627}01627 \textcolor{comment}{                 * target and lun pointers aren't NULL.  The xpt peripheral}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01628}01628 \textcolor{comment}{                 * has a wildcard target and device.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01629}01629 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01630}01630                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_a28c32929ef378132c93a6049fdae634a}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a41c4af1afa636a8e9483e655171762bfaf6a920aa1168bd5a92aea3d8dd50dcb2}{PERIPH\_MATCH\_TARGET}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01631}01631                  \&\& ((periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01632}01632                  ||(cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_a5cee2e185ba1c6e81d2bb0daee6d9a4b}{target\_id}} != periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}})))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01633}01633                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01634}01634 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01635}01635                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_a28c32929ef378132c93a6049fdae634a}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a41c4af1afa636a8e9483e655171762bfa10cf6e6fa2ee62008673947d9535952e}{PERIPH\_MATCH\_LUN}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01636}01636                  \&\& ((periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01637}01637                  || (cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_a5dff9803e2ff9ac23aafaf2333bd178b}{target\_lun}} != periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}})))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01638}01638                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01639}01639 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01640}01640                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_a28c32929ef378132c93a6049fdae634a}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a41c4af1afa636a8e9483e655171762bfaec5a13b49562df2d60ded74e533a9cd6}{PERIPH\_MATCH\_UNIT}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01641}01641                  \&\& (cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_aacbce1dd6476d6299f5edccce28d0f83}{unit\_number}} != periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01642}01642                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01643}01643 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01644}01644                 \textcolor{keywordflow}{if} (((cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_a28c32929ef378132c93a6049fdae634a}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a41c4af1afa636a8e9483e655171762bfad1d514e3d6aadfb2c882a88f619e1220}{PERIPH\_MATCH\_NAME}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01645}01645                  \&\& (strncmp(cur\_pattern-\/>\mbox{\hyperlink{structperiph__match__pattern_a1b762e2220e6939f011ce252627f419c}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01646}01646                              \mbox{\hyperlink{cam__ccb_8h_aea661c8c832c80ccc92e62f1a37b3cec}{DEV\_IDLEN}}) != 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01647}01647                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01648}01648 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01649}01649                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01650}01650 \textcolor{comment}{                 * If we get to this point, the user definitely wants}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01651}01651 \textcolor{comment}{                 * information on this peripheral.  So tell the caller to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01652}01652 \textcolor{comment}{                 * copy the data out.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01653}01653 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01654}01654                 retval |= \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01655}01655 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01656}01656                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01657}01657 \textcolor{comment}{                 * The return action has already been set to stop, since}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01658}01658 \textcolor{comment}{                 * peripherals don't have any nodes below them in the EDT.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01659}01659 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01660}01660                 \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01661}01661         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01662}01662 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01663}01663         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01664}01664 \textcolor{comment}{         * If we get to this point, the peripheral that was passed in}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01665}01665 \textcolor{comment}{         * doesn't match any of the patterns.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01666}01666 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01667}01667         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01668}01668 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01669}01669 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01670}01670 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01671}\mbox{\hyperlink{cam__xpt_8c_a3322b71e6d7ca5785c1c5109539d851b}{01671}} \mbox{\hyperlink{cam__xpt_8c_a4620a7055ccb58610cc3d0c2a5c0123e}{xptedtbusfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01672}01672 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01673}01673         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01674}01674         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *target;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01675}01675         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01676}01676 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01677}01677         cdm = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01678}01678 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01679}01679         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01680}01680 \textcolor{comment}{         * If our position is for something deeper in the tree, that means}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01681}01681 \textcolor{comment}{         * that we've already seen this node.  So, we keep going down.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01682}01682 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01683}01683         \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca8377c34339e60e96f3b398207f860371}{CAM\_DEV\_POS\_BUS}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01684}01684          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}} == bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01685}01685          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca0c10ee1e5b84bc97feb534760a3bcc8e}{CAM\_DEV\_POS\_TARGET}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01686}01686          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_ae32016dca18d8d31a91f61c1f48d8725}{target}} != NULL))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01687}01687                 retval = \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01688}01688         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01689}01689                 retval = \mbox{\hyperlink{cam__xpt_8c_a06063d65e0568a9526a63f1719fbb9ac}{xptbusmatch}}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_ae84fb9c004ae07e669096cb0bbe4a96f}{patterns}}, cdm-\/>\mbox{\hyperlink{structccb__dev__match_abcee1b49b97bbc13b242f8500fa311ac}{num\_patterns}}, bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01690}01690 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01691}01691         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01692}01692 \textcolor{comment}{         * If we got an error, bail out of the search.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01693}01693 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01694}01694         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01695}01695                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a60033d08d16523928ac56c6e155111e9}{CAM\_DEV\_MATCH\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01696}01696                 \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01697}01697         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01698}01698 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01699}01699         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01700}01700 \textcolor{comment}{         * If the copy flag is set, copy this bus out.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01701}01701 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01702}01702         \textcolor{keywordflow}{if} (retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01703}01703                 \textcolor{keywordtype}{int} spaceleft, j;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01704}01704 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01705}01705                 spaceleft = cdm-\/>\mbox{\hyperlink{structccb__dev__match_aad6ac07e174ec87ad11573bb99391d29}{match\_buf\_len}} -\/ (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01706}01706                         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structdev__match__result}{dev\_match\_result}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01707}01707 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01708}01708                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01709}01709 \textcolor{comment}{                 * If we don't have enough space to put in another}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01710}01710 \textcolor{comment}{                 * match result, save our position and tell the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01711}01711 \textcolor{comment}{                 * user there are more devices to check.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01712}01712 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01713}01713                 \textcolor{keywordflow}{if} (spaceleft < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__result}{dev\_match\_result}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01714}01714                         bzero(\&cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}, \textcolor{keyword}{sizeof}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01715}01715                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01716}01716                                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca6d0a284e02e74371382a3c02c9d523b2}{CAM\_DEV\_POS\_EDT}} | \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca8377c34339e60e96f3b398207f860371}{CAM\_DEV\_POS\_BUS}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01717}01717 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01718}01718                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}} = bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01719}01719                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a6dcc77d4357626ef62448e7c0d7f7332}{CAM\_BUS\_GENERATION}}]=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01720}01720                                 \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.bus\_generation;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01721}01721                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491ae6b332872e5c301437f1465c0bc92cdb}{CAM\_DEV\_MATCH\_MORE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01722}01722                         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01723}01723                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01724}01724                 j = cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01725}01725                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01726}01726                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_af8c014c1bc5dcc57e28534cbe4531a22}{type}} = \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfa5e210e131b37614424c5d89c5c1d0ba6}{DEV\_MATCH\_BUS}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01727}01727                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_ab0c328ccc946e0bc1e432cfcaf1923bf}{bus\_result}}.\mbox{\hyperlink{structbus__match__result_ae700372489b90a2d520e3941bedb6f73}{path\_id}} = bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01728}01728                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_ab0c328ccc946e0bc1e432cfcaf1923bf}{bus\_result}}.\mbox{\hyperlink{structbus__match__result_a7f8d38df61f2655282f6337cbf82cb9b}{bus\_id}} = bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01729}01729                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_ab0c328ccc946e0bc1e432cfcaf1923bf}{bus\_result}}.\mbox{\hyperlink{structbus__match__result_a57f70c4b711169559f65afd3ba7ed007}{unit\_number}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01730}01730                         bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01731}01731                 strlcpy(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_ab0c328ccc946e0bc1e432cfcaf1923bf}{bus\_result}}.\mbox{\hyperlink{structbus__match__result_a71eba1f71be3ae9058854858148e9ceb}{dev\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01732}01732                         bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01733}01733                         \textcolor{keyword}{sizeof}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_ab0c328ccc946e0bc1e432cfcaf1923bf}{bus\_result}}.\mbox{\hyperlink{structbus__match__result_a71eba1f71be3ae9058854858148e9ceb}{dev\_name}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01734}01734         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01735}01735 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01736}01736         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01737}01737 \textcolor{comment}{         * If the user is only interested in buses, there's no}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01738}01738 \textcolor{comment}{         * reason to descend to the next level in the tree.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01739}01739 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01740}01740         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea94d2871d8c1e22ef02264730158702e8}{DM\_RET\_STOP}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01741}01741                 \textcolor{keywordflow}{return}(1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01742}01742 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01743}01743         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01744}01744 \textcolor{comment}{         * If there is a target generation recorded, check it to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01745}01745 \textcolor{comment}{         * make sure the target list hasn't changed.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01746}01746 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01747}01747         mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01748}01748         \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca8377c34339e60e96f3b398207f860371}{CAM\_DEV\_POS\_BUS}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01749}01749          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}} == bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01750}01750          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca0c10ee1e5b84bc97feb534760a3bcc8e}{CAM\_DEV\_POS\_TARGET}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01751}01751          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_ae32016dca18d8d31a91f61c1f48d8725}{target}} != NULL)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01752}01752                 \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a223ba5fb1cbc8feb0cb6bd68b034dcae}{CAM\_TARGET\_GENERATION}}] !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01753}01753                     bus-\/>\mbox{\hyperlink{structcam__eb_a40650834f3f2b8fcd317b6730f708eff}{generation}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01754}01754                         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01755}01755                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491acda22481b78b3855abb5b8afa8ca1c84}{CAM\_DEV\_MATCH\_LIST\_CHANGED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01756}01756                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01757}01757                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01758}01758                 target = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *)cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_ae32016dca18d8d31a91f61c1f48d8725}{target}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01759}01759                 target-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01760}01760         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01761}01761                 target = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01762}01762         mtx\_unlock(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01763}01763 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01764}01764         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__xpt_8c_af0013235e3adc7dd3ee9fcb12b03a3cd}{xpttargettraverse}}(\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}, target, \mbox{\hyperlink{cam__xpt_8c_a7803cee84b28c09cac2a0f27b67e8dee}{xptedttargetfunc}}, arg));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01765}01765 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01766}01766 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01767}01767 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01768}\mbox{\hyperlink{cam__xpt_8c_a765e0cd4a591ea5d118c0bc45d79a8d2}{01768}} \mbox{\hyperlink{cam__xpt_8c_a7803cee84b28c09cac2a0f27b67e8dee}{xptedttargetfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01769}01769 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01770}01770         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01771}01771         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01772}01772         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01773}01773 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01774}01774         cdm = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01775}01775         bus = target-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01776}01776 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01777}01777         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01778}01778 \textcolor{comment}{         * If there is a device list generation recorded, check it to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01779}01779 \textcolor{comment}{         * make sure the device list hasn't changed.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01780}01780 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01781}01781         mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01782}01782         \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca8377c34339e60e96f3b398207f860371}{CAM\_DEV\_POS\_BUS}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01783}01783          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}} == bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01784}01784          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca0c10ee1e5b84bc97feb534760a3bcc8e}{CAM\_DEV\_POS\_TARGET}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01785}01785          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_ae32016dca18d8d31a91f61c1f48d8725}{target}} == target)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01786}01786          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420acafac393bde177c2231783c6e233f31665}{CAM\_DEV\_POS\_DEVICE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01787}01787          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a2f631f0b507d91c725661191df8524d4}{device}} != NULL)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01788}01788                 \textcolor{keywordflow}{if} (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a552ea2c42aa468b7b3eed345f895b68e}{CAM\_DEV\_GENERATION}}] !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01789}01789                     target-\/>\mbox{\hyperlink{structcam__et_a2d6177af4f2835ea52e6d680130f23ee}{generation}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01790}01790                         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01791}01791                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491acda22481b78b3855abb5b8afa8ca1c84}{CAM\_DEV\_MATCH\_LIST\_CHANGED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01792}01792                         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01793}01793                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01794}01794                 device = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *)cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a2f631f0b507d91c725661191df8524d4}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01795}01795                 device-\/>\mbox{\hyperlink{structcam__ed_afcbcee5cd61c742e161ff61bd7353a49}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01796}01796         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01797}01797                 device = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01798}01798         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01799}01799 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01800}01800         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__xpt_8c_a431efc1763a41e6feb096f82a58e9af7}{xptdevicetraverse}}(\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}, device, \mbox{\hyperlink{cam__xpt_8c_aff18fe26702446b1bb16b97764abdc22}{xptedtdevicefunc}}, arg));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01801}01801 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01802}01802 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01803}01803 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01804}\mbox{\hyperlink{cam__xpt_8c_a7566b42317f97523b08fcd2666700c96}{01804}} \mbox{\hyperlink{cam__xpt_8c_aff18fe26702446b1bb16b97764abdc22}{xptedtdevicefunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01805}01805 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01806}01806         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01807}01807         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01808}01808         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01809}01809         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01810}01810 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01811}01811         cdm = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01812}01812         bus = device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01813}01813 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01814}01814         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01815}01815 \textcolor{comment}{         * If our position is for something deeper in the tree, that means}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01816}01816 \textcolor{comment}{         * that we've already seen this node.  So, we keep going down.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01817}01817 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01818}01818         \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420acafac393bde177c2231783c6e233f31665}{CAM\_DEV\_POS\_DEVICE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01819}01819          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a2f631f0b507d91c725661191df8524d4}{device}} == device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01820}01820          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca848a706d7b33008c1c1fcf0cbff376ec}{CAM\_DEV\_POS\_PERIPH}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01821}01821          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a3e78df12bd2bae70c71dbd3d06d2c7eb}{periph}} != NULL))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01822}01822                 retval = \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea290a4799c2c88ff18f4b0a41aad5a239}{DM\_RET\_DESCEND}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01823}01823         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01824}01824                 retval = \mbox{\hyperlink{cam__xpt_8c_ae6bbcfd13e463a723cf334a7a8427e94}{xptdevicematch}}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_ae84fb9c004ae07e669096cb0bbe4a96f}{patterns}}, cdm-\/>\mbox{\hyperlink{structccb__dev__match_abcee1b49b97bbc13b242f8500fa311ac}{num\_patterns}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01825}01825                                         device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01826}01826 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01827}01827         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01828}01828                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a60033d08d16523928ac56c6e155111e9}{CAM\_DEV\_MATCH\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01829}01829                 \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01830}01830         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01831}01831 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01832}01832         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01833}01833 \textcolor{comment}{         * If the copy flag is set, copy this device out.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01834}01834 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01835}01835         \textcolor{keywordflow}{if} (retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01836}01836                 \textcolor{keywordtype}{int} spaceleft, j;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01837}01837 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01838}01838                 spaceleft = cdm-\/>\mbox{\hyperlink{structccb__dev__match_aad6ac07e174ec87ad11573bb99391d29}{match\_buf\_len}} -\/ (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01839}01839                         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structdev__match__result}{dev\_match\_result}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01840}01840 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01841}01841                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01842}01842 \textcolor{comment}{                 * If we don't have enough space to put in another}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01843}01843 \textcolor{comment}{                 * match result, save our position and tell the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01844}01844 \textcolor{comment}{                 * user there are more devices to check.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01845}01845 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01846}01846                 \textcolor{keywordflow}{if} (spaceleft < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__result}{dev\_match\_result}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01847}01847                         bzero(\&cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}, \textcolor{keyword}{sizeof}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01848}01848                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01849}01849                                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca6d0a284e02e74371382a3c02c9d523b2}{CAM\_DEV\_POS\_EDT}} | \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca8377c34339e60e96f3b398207f860371}{CAM\_DEV\_POS\_BUS}} |}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01850}01850                                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca0c10ee1e5b84bc97feb534760a3bcc8e}{CAM\_DEV\_POS\_TARGET}} | \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420acafac393bde177c2231783c6e233f31665}{CAM\_DEV\_POS\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01851}01851 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01852}01852                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}} = device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01853}01853                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a6dcc77d4357626ef62448e7c0d7f7332}{CAM\_BUS\_GENERATION}}]=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01854}01854                                 \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.bus\_generation;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01855}01855                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_ae32016dca18d8d31a91f61c1f48d8725}{target}} = device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01856}01856                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a223ba5fb1cbc8feb0cb6bd68b034dcae}{CAM\_TARGET\_GENERATION}}] =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01857}01857                                 device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a40650834f3f2b8fcd317b6730f708eff}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01858}01858                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a2f631f0b507d91c725661191df8524d4}{device}} = device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01859}01859                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a552ea2c42aa468b7b3eed345f895b68e}{CAM\_DEV\_GENERATION}}] =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01860}01860                                 device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a2d6177af4f2835ea52e6d680130f23ee}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01861}01861                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491ae6b332872e5c301437f1465c0bc92cdb}{CAM\_DEV\_MATCH\_MORE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01862}01862                         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01863}01863                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01864}01864                 j = cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01865}01865                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01866}01866                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_af8c014c1bc5dcc57e28534cbe4531a22}{type}} = \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfa580439a450044124c0131f54d56e2643}{DEV\_MATCH\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01867}01867                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_a5f7efbc590124f71fde3396576d83b75}{device\_result}}.\mbox{\hyperlink{structdevice__match__result_ac8befe24462d38cb200e74ce38a634d5}{path\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01868}01868                         device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01869}01869                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_a5f7efbc590124f71fde3396576d83b75}{device\_result}}.\mbox{\hyperlink{structdevice__match__result_ac073e7c3591d1fcb554beb5dfe6a64b0}{target\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01870}01870                         device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01871}01871                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_a5f7efbc590124f71fde3396576d83b75}{device\_result}}.\mbox{\hyperlink{structdevice__match__result_af2e63bd0aa3a4b481ed5e9024e2b4a40}{target\_lun}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01872}01872                         device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01873}01873                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_a5f7efbc590124f71fde3396576d83b75}{device\_result}}.\mbox{\hyperlink{structdevice__match__result_ac10a0b9f6272c1dc421e83de1a735bc1}{protocol}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01874}01874                         device-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01875}01875                 bcopy(\&device-\/>\mbox{\hyperlink{structcam__ed_af6726317eeed0cae9946ca90053653b8}{inq\_data}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01876}01876                       \&cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_a5f7efbc590124f71fde3396576d83b75}{device\_result}}.\mbox{\hyperlink{structdevice__match__result_aa46aa76b585641534df5bec5614e6e3e}{inq\_data}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01877}01877                       \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__inquiry__data}{scsi\_inquiry\_data}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01878}01878                 bcopy(\&device-\/>\mbox{\hyperlink{structcam__ed_a88754db4b8680958db3f42c1a9a0810c}{ident\_data}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01879}01879                       \&cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_a5f7efbc590124f71fde3396576d83b75}{device\_result}}.\mbox{\hyperlink{structdevice__match__result_ad3ae168a59a2c875961bc01f09a5024c}{ident\_data}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01880}01880                       \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} ata\_params));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01881}01881 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01882}01882                 \textcolor{comment}{/* Let the user know whether this device is unconfigured */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01883}01883                 \textcolor{keywordflow}{if} (device-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a378601270c3c4caaa8c30d76901299fe}{CAM\_DEV\_UNCONFIGURED}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01884}01884                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_a5f7efbc590124f71fde3396576d83b75}{device\_result}}.\mbox{\hyperlink{structdevice__match__result_ad5b7e138fad5b2fc01574fd933d25277}{flags}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01885}01885                                 \mbox{\hyperlink{cam__ccb_8h_a18b179eaefdcfdd396eed49253d79e34a6e8f21af6018f9d4945e2a8a7567e3ce}{DEV\_RESULT\_UNCONFIGURED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01886}01886                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01887}01887                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_a5f7efbc590124f71fde3396576d83b75}{device\_result}}.\mbox{\hyperlink{structdevice__match__result_ad5b7e138fad5b2fc01574fd933d25277}{flags}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01888}01888                                 \mbox{\hyperlink{cam__ccb_8h_a18b179eaefdcfdd396eed49253d79e34aefa3687788c6593c2f5e76d5ee6f6c4a}{DEV\_RESULT\_NOFLAG}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01889}01889         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01890}01890 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01891}01891         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01892}01892 \textcolor{comment}{         * If the user isn't interested in peripherals, don't descend}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01893}01893 \textcolor{comment}{         * the tree any further.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01894}01894 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01895}01895         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea94d2871d8c1e22ef02264730158702e8}{DM\_RET\_STOP}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01896}01896                 \textcolor{keywordflow}{return}(1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01897}01897 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01898}01898         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01899}01899 \textcolor{comment}{         * If there is a peripheral list generation recorded, make sure}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01900}01900 \textcolor{comment}{         * it hasn't changed.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01901}01901 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01902}01902         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01903}01903         mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01904}01904         \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca8377c34339e60e96f3b398207f860371}{CAM\_DEV\_POS\_BUS}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01905}01905          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}} == bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01906}01906          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca0c10ee1e5b84bc97feb534760a3bcc8e}{CAM\_DEV\_POS\_TARGET}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01907}01907          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_ae32016dca18d8d31a91f61c1f48d8725}{target}} == device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01908}01908          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420acafac393bde177c2231783c6e233f31665}{CAM\_DEV\_POS\_DEVICE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01909}01909          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a2f631f0b507d91c725661191df8524d4}{device}} == device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01910}01910          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca848a706d7b33008c1c1fcf0cbff376ec}{CAM\_DEV\_POS\_PERIPH}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01911}01911          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a3e78df12bd2bae70c71dbd3d06d2c7eb}{periph}} != NULL)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01912}01912                 \textcolor{keywordflow}{if} (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a5ed082a4809aef45279ec56c0cc16e52}{CAM\_PERIPH\_GENERATION}}] !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01913}01913                     device-\/>\mbox{\hyperlink{structcam__ed_a38440f387b4d1effb8611a32d4635671}{generation}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01914}01914                         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01915}01915                         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01916}01916                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491acda22481b78b3855abb5b8afa8ca1c84}{CAM\_DEV\_MATCH\_LIST\_CHANGED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01917}01917                         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01918}01918                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01919}01919                 periph = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a3e78df12bd2bae70c71dbd3d06d2c7eb}{periph}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01920}01920                 periph-\/>\mbox{\hyperlink{structcam__periph_a323850650392068aa6c35db83df2599e}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01921}01921         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01922}01922                 periph = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01923}01923         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01924}01924         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01925}01925 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01926}01926         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__xpt_8c_a3e1f0c6a429e6512beac8c6da01006d7}{xptperiphtraverse}}(device, periph, \mbox{\hyperlink{cam__xpt_8c_ae124437211c28de731a3563d1d0ef79e}{xptedtperiphfunc}}, arg));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01927}01927 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01928}01928 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01929}01929 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01930}\mbox{\hyperlink{cam__xpt_8c_a470d127b23fb96d68ed41b67bef39771}{01930}} \mbox{\hyperlink{cam__xpt_8c_ae124437211c28de731a3563d1d0ef79e}{xptedtperiphfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01931}01931 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01932}01932         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01933}01933         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01934}01934 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01935}01935         cdm = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01936}01936 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01937}01937         retval = \mbox{\hyperlink{cam__xpt_8c_a50c1190df530a0ddbafea257484a5a6e}{xptperiphmatch}}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_ae84fb9c004ae07e669096cb0bbe4a96f}{patterns}}, cdm-\/>\mbox{\hyperlink{structccb__dev__match_abcee1b49b97bbc13b242f8500fa311ac}{num\_patterns}}, periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01938}01938 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01939}01939         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01940}01940                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a60033d08d16523928ac56c6e155111e9}{CAM\_DEV\_MATCH\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01941}01941                 \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01942}01942         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01943}01943 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01944}01944         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01945}01945 \textcolor{comment}{         * If the copy flag is set, copy this peripheral out.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01946}01946 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01947}01947         \textcolor{keywordflow}{if} (retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01948}01948                 \textcolor{keywordtype}{int} spaceleft, j;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01949}01949                 \textcolor{keywordtype}{size\_t} l;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01950}01950 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01951}01951                 spaceleft = cdm-\/>\mbox{\hyperlink{structccb__dev__match_aad6ac07e174ec87ad11573bb99391d29}{match\_buf\_len}} -\/ (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01952}01952                         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structdev__match__result}{dev\_match\_result}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01953}01953 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01954}01954                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01955}01955 \textcolor{comment}{                 * If we don't have enough space to put in another}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01956}01956 \textcolor{comment}{                 * match result, save our position and tell the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01957}01957 \textcolor{comment}{                 * user there are more devices to check.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01958}01958 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01959}01959                 \textcolor{keywordflow}{if} (spaceleft < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__result}{dev\_match\_result}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01960}01960                         bzero(\&cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}, \textcolor{keyword}{sizeof}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01961}01961                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01962}01962                                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca6d0a284e02e74371382a3c02c9d523b2}{CAM\_DEV\_POS\_EDT}} | \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca8377c34339e60e96f3b398207f860371}{CAM\_DEV\_POS\_BUS}} |}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01963}01963                                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca0c10ee1e5b84bc97feb534760a3bcc8e}{CAM\_DEV\_POS\_TARGET}} | \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420acafac393bde177c2231783c6e233f31665}{CAM\_DEV\_POS\_DEVICE}} |}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01964}01964                                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca848a706d7b33008c1c1fcf0cbff376ec}{CAM\_DEV\_POS\_PERIPH}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01965}01965 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01966}01966                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}} = periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01967}01967                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a6dcc77d4357626ef62448e7c0d7f7332}{CAM\_BUS\_GENERATION}}]=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01968}01968                                 \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.bus\_generation;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01969}01969                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_ae32016dca18d8d31a91f61c1f48d8725}{target}} = periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01970}01970                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a223ba5fb1cbc8feb0cb6bd68b034dcae}{CAM\_TARGET\_GENERATION}}] =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01971}01971                                 periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a40650834f3f2b8fcd317b6730f708eff}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01972}01972                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a2f631f0b507d91c725661191df8524d4}{device}} = periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01973}01973                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a552ea2c42aa468b7b3eed345f895b68e}{CAM\_DEV\_GENERATION}}] =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01974}01974                                 periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a2d6177af4f2835ea52e6d680130f23ee}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01975}01975                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a3e78df12bd2bae70c71dbd3d06d2c7eb}{periph}} = periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01976}01976                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a5ed082a4809aef45279ec56c0cc16e52}{CAM\_PERIPH\_GENERATION}}] =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01977}01977                                 periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a38440f387b4d1effb8611a32d4635671}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01978}01978                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491ae6b332872e5c301437f1465c0bc92cdb}{CAM\_DEV\_MATCH\_MORE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01979}01979                         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01980}01980                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01981}01981 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01982}01982                 j = cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01983}01983                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01984}01984                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_af8c014c1bc5dcc57e28534cbe4531a22}{type}} = \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfaa707911b103273a87a7408deacb05414}{DEV\_MATCH\_PERIPH}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01985}01985                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_aaf1e524fed7ae12a2459963252f268ca}{path\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01986}01986                         periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01987}01987                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_ab7d1a00e5a7a488ee331de1370c71da2}{target\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01988}01988                         periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01989}01989                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_ab33b7a8296c296a3a8ecb46b47780d3c}{target\_lun}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01990}01990                         periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01991}01991                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_ada3b6e6ff7bd2c85b63d85266b5f98b2}{unit\_number}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01992}01992                         periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01993}01993                 l = \textcolor{keyword}{sizeof}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_a9a28b6ffd642e56b001b4caec802d875}{periph\_name}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01994}01994                 strlcpy(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_a9a28b6ffd642e56b001b4caec802d875}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01995}01995                         periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, l);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01996}01996         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01997}01997 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01998}01998         \textcolor{keywordflow}{return}(1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l01999}01999 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02000}02000 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02001}02001 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02002}\mbox{\hyperlink{cam__xpt_8c_a12adc843f48c1e53442b274c0fed5b31}{02002}} \mbox{\hyperlink{cam__xpt_8c_a12adc843f48c1e53442b274c0fed5b31}{xptedtmatch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02003}02003 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02004}02004         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02005}02005         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02006}02006 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02007}02007         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02008}02008 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02009}02009         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02010}02010 \textcolor{comment}{         * Check the bus list generation.  If it has changed, the user}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02011}02011 \textcolor{comment}{         * needs to reset everything and start over.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02012}02012 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02013}02013         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02014}02014         \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca8377c34339e60e96f3b398207f860371}{CAM\_DEV\_POS\_BUS}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02015}02015          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}} != NULL)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02016}02016                 \textcolor{keywordflow}{if} (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a6dcc77d4357626ef62448e7c0d7f7332}{CAM\_BUS\_GENERATION}}] !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02017}02017                     \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.bus\_generation) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02018}02018                         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02019}02019                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491acda22481b78b3855abb5b8afa8ca1c84}{CAM\_DEV\_MATCH\_LIST\_CHANGED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02020}02020                         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02021}02021                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02022}02022                 bus = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *)cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_aaa681ccc0b432c0c9d53adc5dd298da0}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02023}02023                 bus-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02024}02024         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02025}02025                 bus = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02026}02026         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02027}02027 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02028}02028         ret = \mbox{\hyperlink{cam__xpt_8c_ae298e2c0f7b2ee29c6f1fbdab35b2555}{xptbustraverse}}(bus, \mbox{\hyperlink{cam__xpt_8c_a4620a7055ccb58610cc3d0c2a5c0123e}{xptedtbusfunc}}, cdm);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02029}02029 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02030}02030         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02031}02031 \textcolor{comment}{         * If we get back 0, that means that we had to stop before fully}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02032}02032 \textcolor{comment}{         * traversing the EDT.  It also means that one of the subroutines}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02033}02033 \textcolor{comment}{         * has set the status field to the proper value.  If we get back 1,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02034}02034 \textcolor{comment}{         * we've fully traversed the EDT and copied out any matching entries.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02035}02035 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02036}02036         \textcolor{keywordflow}{if} (ret == 1)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02037}02037                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a76b6f21cc3e281ff8b93eddfb39a7c42}{CAM\_DEV\_MATCH\_LAST}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02038}02038 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02039}02039         \textcolor{keywordflow}{return}(ret);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02040}02040 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02041}02041 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02042}02042 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02043}\mbox{\hyperlink{cam__xpt_8c_a3d807b7c031835937f76666df1f50ca6}{02043}} \mbox{\hyperlink{cam__xpt_8c_a86d462e7aee5195c9ac517476cf28f6c}{xptplistpdrvfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structperiph__driver}{periph\_driver}} **pdrv, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02044}02044 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02045}02045         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02046}02046         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02047}02047 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02048}02048         cdm = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02049}02049 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02050}02050         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02051}02051         \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca7476da59315da35c0897dc4c8ae24e9e}{CAM\_DEV\_POS\_PDPTR}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02052}02052          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a9034deccac44167e5cc7071102f4d072}{pdrv}} == pdrv)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02053}02053          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca848a706d7b33008c1c1fcf0cbff376ec}{CAM\_DEV\_POS\_PERIPH}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02054}02054          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a3e78df12bd2bae70c71dbd3d06d2c7eb}{periph}} != NULL)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02055}02055                 \textcolor{keywordflow}{if} (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a5ed082a4809aef45279ec56c0cc16e52}{CAM\_PERIPH\_GENERATION}}] !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02056}02056                     (*pdrv)-\/>generation) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02057}02057                         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02058}02058                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491acda22481b78b3855abb5b8afa8ca1c84}{CAM\_DEV\_MATCH\_LIST\_CHANGED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02059}02059                         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02060}02060                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02061}02061                 periph = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a3e78df12bd2bae70c71dbd3d06d2c7eb}{periph}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02062}02062                 periph-\/>\mbox{\hyperlink{structcam__periph_a323850650392068aa6c35db83df2599e}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02063}02063         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02064}02064                 periph = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02065}02065         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02066}02066 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02067}02067         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__xpt_8c_a7e0b70c676a1e492e7e551a8feffd687}{xptpdperiphtraverse}}(pdrv, periph, \mbox{\hyperlink{cam__xpt_8c_a15fcd5745a3ef446d8d39b80767dfa2d}{xptplistperiphfunc}}, arg));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02068}02068 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02069}02069 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02070}02070 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02071}\mbox{\hyperlink{cam__xpt_8c_a47308a28297a9c66ce8664f54e7dfa8b}{02071}} \mbox{\hyperlink{cam__xpt_8c_a15fcd5745a3ef446d8d39b80767dfa2d}{xptplistperiphfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02072}02072 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02073}02073         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02074}02074         \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174e}{dev\_match\_ret}} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02075}02075 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02076}02076         cdm = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02077}02077 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02078}02078         retval = \mbox{\hyperlink{cam__xpt_8c_a50c1190df530a0ddbafea257484a5a6e}{xptperiphmatch}}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_ae84fb9c004ae07e669096cb0bbe4a96f}{patterns}}, cdm-\/>\mbox{\hyperlink{structccb__dev__match_abcee1b49b97bbc13b242f8500fa311ac}{num\_patterns}}, periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02079}02079 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02080}02080         \textcolor{keywordflow}{if} ((retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174ea91234ac86ede30ab584b812679eb2445}{DM\_RET\_ACTION\_MASK}}) == \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eaa409f604d3d67b7b2f1dc491bb234a43}{DM\_RET\_ERROR}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02081}02081                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a60033d08d16523928ac56c6e155111e9}{CAM\_DEV\_MATCH\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02082}02082                 \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02083}02083         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02084}02084 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02085}02085         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02086}02086 \textcolor{comment}{         * If the copy flag is set, copy this peripheral out.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02087}02087 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02088}02088         \textcolor{keywordflow}{if} (retval \& \mbox{\hyperlink{cam__xpt_8c_a46a901793d30799436cb8927f99a174eabff64fd15447f84330504b86b5ae02c0}{DM\_RET\_COPY}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02089}02089                 \textcolor{keywordtype}{int} spaceleft, j;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02090}02090                 \textcolor{keywordtype}{size\_t} l;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02091}02091 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02092}02092                 spaceleft = cdm-\/>\mbox{\hyperlink{structccb__dev__match_aad6ac07e174ec87ad11573bb99391d29}{match\_buf\_len}} -\/ (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02093}02093                         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structdev__match__result}{dev\_match\_result}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02094}02094 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02095}02095                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02096}02096 \textcolor{comment}{                 * If we don't have enough space to put in another}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02097}02097 \textcolor{comment}{                 * match result, save our position and tell the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02098}02098 \textcolor{comment}{                 * user there are more devices to check.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02099}02099 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02100}02100                 \textcolor{keywordflow}{if} (spaceleft < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdev__match__result}{dev\_match\_result}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02101}02101                         \textcolor{keyword}{struct }\mbox{\hyperlink{structperiph__driver}{periph\_driver}} **pdrv;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02102}02102 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02103}02103                         pdrv = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02104}02104                         bzero(\&cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}, \textcolor{keyword}{sizeof}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02105}02105                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02106}02106                                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca86c00457a08e41293104744830a3658b}{CAM\_DEV\_POS\_PDRV}} | \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca7476da59315da35c0897dc4c8ae24e9e}{CAM\_DEV\_POS\_PDPTR}} |}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02107}02107                                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca848a706d7b33008c1c1fcf0cbff376ec}{CAM\_DEV\_POS\_PERIPH}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02108}02108 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02109}02109                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02110}02110 \textcolor{comment}{                         * This may look a bit non-\/sensical, but it is}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02111}02111 \textcolor{comment}{                         * actually quite logical.  There are very few}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02112}02112 \textcolor{comment}{                         * peripheral drivers, and bloating every peripheral}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02113}02113 \textcolor{comment}{                         * structure with a pointer back to its parent}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02114}02114 \textcolor{comment}{                         * peripheral driver linker set entry would cost}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02115}02115 \textcolor{comment}{                         * more in the long run than doing this quick lookup.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02116}02116 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02117}02117                         \textcolor{keywordflow}{for} (pdrv = \mbox{\hyperlink{cam__periph_8c_ac080b20aad20a373275084903704bccd}{periph\_drivers}}; *pdrv != NULL; pdrv++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02118}02118                                 \textcolor{keywordflow}{if} (strcmp((*pdrv)-\/>driver\_name,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02119}02119                                     periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}) == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02120}02120                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02121}02121                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02122}02122 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02123}02123                         \textcolor{keywordflow}{if} (*pdrv == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02124}02124                                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a60033d08d16523928ac56c6e155111e9}{CAM\_DEV\_MATCH\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02125}02125                                 \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02126}02126                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02127}02127 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02128}02128                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a9034deccac44167e5cc7071102f4d072}{pdrv}} = pdrv;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02129}02129                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02130}02130 \textcolor{comment}{                         * The periph generation slot does double duty, as}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02131}02131 \textcolor{comment}{                         * does the periph pointer slot.  They are used for}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02132}02132 \textcolor{comment}{                         * both edt and pdrv lookups and positioning.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02133}02133 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02134}02134                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a3e78df12bd2bae70c71dbd3d06d2c7eb}{periph}} = periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02135}02135                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9dc0d9c0c1793a1f0d7608a54ffe07ee}{generations}}[\mbox{\hyperlink{cam__ccb_8h_a5ed082a4809aef45279ec56c0cc16e52}{CAM\_PERIPH\_GENERATION}}] =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02136}02136                                 (*pdrv)-\/>generation;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02137}02137                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491ae6b332872e5c301437f1465c0bc92cdb}{CAM\_DEV\_MATCH\_MORE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02138}02138                         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02139}02139                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02140}02140 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02141}02141                 j = cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02142}02142                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02143}02143                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_af8c014c1bc5dcc57e28534cbe4531a22}{type}} = \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfaa707911b103273a87a7408deacb05414}{DEV\_MATCH\_PERIPH}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02144}02144                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_aaf1e524fed7ae12a2459963252f268ca}{path\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02145}02145                         periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02146}02146 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02147}02147                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02148}02148 \textcolor{comment}{                 * The transport layer peripheral doesn't have a target or}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02149}02149 \textcolor{comment}{                 * lun.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02150}02150 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02151}02151                 \textcolor{keywordflow}{if} (periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02152}02152                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_ab7d1a00e5a7a488ee331de1370c71da2}{target\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02153}02153                                 periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02154}02154                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02155}02155                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_ab7d1a00e5a7a488ee331de1370c71da2}{target\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02156}02156                                 \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02157}02157 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02158}02158                 \textcolor{keywordflow}{if} (periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02159}02159                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_ab33b7a8296c296a3a8ecb46b47780d3c}{target\_lun}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02160}02160                                 periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02161}02161                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02162}02162                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_ab33b7a8296c296a3a8ecb46b47780d3c}{target\_lun}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02163}02163                                 \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02164}02164 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02165}02165                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_ada3b6e6ff7bd2c85b63d85266b5f98b2}{unit\_number}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02166}02166                         periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02167}02167                 l = \textcolor{keyword}{sizeof}(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_a9a28b6ffd642e56b001b4caec802d875}{periph\_name}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02168}02168                 strlcpy(cdm-\/>\mbox{\hyperlink{structccb__dev__match_a3ecef627918dd06f455d7a8603f146c8}{matches}}[j].\mbox{\hyperlink{structdev__match__result_a4ded541ddac67a7510edd65741f0f6ab}{result}}.\mbox{\hyperlink{unionmatch__result_af0d7c5c668d6b754388e725dd03a4dac}{periph\_result}}.\mbox{\hyperlink{structperiph__match__result_a9a28b6ffd642e56b001b4caec802d875}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02169}02169                         periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, l);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02170}02170         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02171}02171 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02172}02172         \textcolor{keywordflow}{return}(1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02173}02173 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02174}02174 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02175}02175 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02176}\mbox{\hyperlink{cam__xpt_8c_ac35d40a501a9f80265a281b70d6ed561}{02176}} \mbox{\hyperlink{cam__xpt_8c_ac35d40a501a9f80265a281b70d6ed561}{xptperiphlistmatch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02177}02177 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02178}02178         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02179}02179 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02180}02180         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a2f67cf094e9f598f435e414b31e80f36}{num\_matches}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02181}02181 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02182}02182         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02183}02183 \textcolor{comment}{         * At this point in the edt traversal function, we check the bus}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02184}02184 \textcolor{comment}{         * list generation to make sure that no buses have been added or}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02185}02185 \textcolor{comment}{         * removed since the user last sent a XPT\_DEV\_MATCH ccb through.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02186}02186 \textcolor{comment}{         * For the peripheral driver list traversal function, however, we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02187}02187 \textcolor{comment}{         * don't have to worry about new peripheral driver types coming or}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02188}02188 \textcolor{comment}{         * going; they're in a linker set, and therefore can't change}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02189}02189 \textcolor{comment}{         * without a recompile.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02190}02190 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02191}02191 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02192}02192         \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca7476da59315da35c0897dc4c8ae24e9e}{CAM\_DEV\_POS\_PDPTR}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02193}02193          \&\& (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a9034deccac44167e5cc7071102f4d072}{pdrv}} != NULL))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02194}02194                 ret = \mbox{\hyperlink{cam__xpt_8c_ab0f56d63fde3a0318584dce6ba814889}{xptpdrvtraverse}}(}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02195}02195                                 (\textcolor{keyword}{struct} \mbox{\hyperlink{structperiph__driver}{periph\_driver}} **)cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_a9ed8e68943c3645d5eb8baf0766991ac}{cookie}}.\mbox{\hyperlink{structccb__dm__cookie_a9034deccac44167e5cc7071102f4d072}{pdrv}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02196}02196                                 \mbox{\hyperlink{cam__xpt_8c_a86d462e7aee5195c9ac517476cf28f6c}{xptplistpdrvfunc}}, cdm);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02197}02197         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02198}02198                 ret = \mbox{\hyperlink{cam__xpt_8c_ab0f56d63fde3a0318584dce6ba814889}{xptpdrvtraverse}}(NULL, \mbox{\hyperlink{cam__xpt_8c_a86d462e7aee5195c9ac517476cf28f6c}{xptplistpdrvfunc}}, cdm);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02199}02199 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02200}02200         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02201}02201 \textcolor{comment}{         * If we get back 0, that means that we had to stop before fully}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02202}02202 \textcolor{comment}{         * traversing the peripheral driver tree.  It also means that one of}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02203}02203 \textcolor{comment}{         * the subroutines has set the status field to the proper value.  If}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02204}02204 \textcolor{comment}{         * we get back 1, we've fully traversed the EDT and copied out any}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02205}02205 \textcolor{comment}{         * matching entries.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02206}02206 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02207}02207         \textcolor{keywordflow}{if} (ret == 1)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02208}02208                 cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a76b6f21cc3e281ff8b93eddfb39a7c42}{CAM\_DEV\_MATCH\_LAST}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02209}02209 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02210}02210         \textcolor{keywordflow}{return}(ret);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02211}02211 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02212}02212 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02213}02213 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02214}\mbox{\hyperlink{cam__xpt_8c_ae298e2c0f7b2ee29c6f1fbdab35b2555}{02214}} \mbox{\hyperlink{cam__xpt_8c_ae298e2c0f7b2ee29c6f1fbdab35b2555}{xptbustraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *start\_bus, \mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02215}02215 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02216}02216         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus, *next\_bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02217}02217         \textcolor{keywordtype}{int} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02218}02218 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02219}02219         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02220}02220         \textcolor{keywordflow}{if} (start\_bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02221}02221                 bus = start\_bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02222}02222         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02223}02223                 \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02224}02224                 bus = TAILQ\_FIRST(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_busses);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02225}02225                 \textcolor{keywordflow}{if} (bus == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02226}02226                         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02227}02227                         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02228}02228                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02229}02229                 bus-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02230}02230                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02231}02231         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02232}02232         \textcolor{keywordflow}{for} (; bus != NULL; bus = next\_bus) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02233}02233                 retval = tr\_func(bus, arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02234}02234                 \textcolor{keywordflow}{if} (retval == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02235}02235                         \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02236}02236                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02237}02237                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02238}02238                 \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02239}02239                 next\_bus = TAILQ\_NEXT(bus, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02240}02240                 \textcolor{keywordflow}{if} (next\_bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02241}02241                         next\_bus-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02242}02242                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02243}02243                 \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02244}02244         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02245}02245         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02246}02246 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02247}02247 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02248}02248 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02249}\mbox{\hyperlink{cam__xpt_8c_af0013235e3adc7dd3ee9fcb12b03a3cd}{02249}} \mbox{\hyperlink{cam__xpt_8c_af0013235e3adc7dd3ee9fcb12b03a3cd}{xpttargettraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *start\_target,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02250}02250                   \mbox{\hyperlink{cam__xpt_8c_a1143f9a80a4766b1301868d4e06dacdf}{xpt\_targetfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02251}02251 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02252}02252         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *target, *next\_target;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02253}02253         \textcolor{keywordtype}{int} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02254}02254 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02255}02255         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02256}02256         \textcolor{keywordflow}{if} (start\_target)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02257}02257                 target = start\_target;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02258}02258         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02259}02259                 mtx\_lock(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02260}02260                 target = TAILQ\_FIRST(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>et\_entries);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02261}02261                 \textcolor{keywordflow}{if} (target == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02262}02262                         mtx\_unlock(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02263}02263                         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02264}02264                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02265}02265                 target-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02266}02266                 mtx\_unlock(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02267}02267         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02268}02268         \textcolor{keywordflow}{for} (; target != NULL; target = next\_target) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02269}02269                 retval = tr\_func(target, arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02270}02270                 \textcolor{keywordflow}{if} (retval == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02271}02271                         \mbox{\hyperlink{cam__xpt_8c_aeb7a0a03a36fb04f959a5e4127bd539d}{xpt\_release\_target}}(target);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02272}02272                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02273}02273                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02274}02274                 mtx\_lock(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02275}02275                 next\_target = TAILQ\_NEXT(target, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02276}02276                 \textcolor{keywordflow}{if} (next\_target)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02277}02277                         next\_target-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02278}02278                 mtx\_unlock(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02279}02279                 \mbox{\hyperlink{cam__xpt_8c_aeb7a0a03a36fb04f959a5e4127bd539d}{xpt\_release\_target}}(target);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02280}02280         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02281}02281         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02282}02282 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02283}02283 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02284}02284 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02285}\mbox{\hyperlink{cam__xpt_8c_a431efc1763a41e6feb096f82a58e9af7}{02285}} \mbox{\hyperlink{cam__xpt_8c_a431efc1763a41e6feb096f82a58e9af7}{xptdevicetraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *start\_device,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02286}02286                   \mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02287}02287 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02288}02288         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02289}02289         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device, *next\_device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02290}02290         \textcolor{keywordtype}{int} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02291}02291 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02292}02292         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02293}02293         bus = \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02294}02294         \textcolor{keywordflow}{if} (start\_device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02295}02295                 device = start\_device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02296}02296         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02297}02297                 mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02298}02298                 device = TAILQ\_FIRST(\&\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>ed\_entries);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02299}02299                 \textcolor{keywordflow}{if} (device == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02300}02300                         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02301}02301                         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02302}02302                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02303}02303                 device-\/>\mbox{\hyperlink{structcam__ed_afcbcee5cd61c742e161ff61bd7353a49}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02304}02304                 mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02305}02305         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02306}02306         \textcolor{keywordflow}{for} (; device != NULL; device = next\_device) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02307}02307                 mtx\_lock(\&device-\/>\mbox{\hyperlink{structcam__ed_a4586f693e9f95784f27c3c2e16ff31a1}{device\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02308}02308                 retval = tr\_func(device, arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02309}02309                 mtx\_unlock(\&device-\/>\mbox{\hyperlink{structcam__ed_a4586f693e9f95784f27c3c2e16ff31a1}{device\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02310}02310                 \textcolor{keywordflow}{if} (retval == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02311}02311                         \mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{xpt\_release\_device}}(device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02312}02312                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02313}02313                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02314}02314                 mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02315}02315                 next\_device = TAILQ\_NEXT(device, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02316}02316                 \textcolor{keywordflow}{if} (next\_device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02317}02317                         next\_device-\/>\mbox{\hyperlink{structcam__ed_afcbcee5cd61c742e161ff61bd7353a49}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02318}02318                 mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02319}02319                 \mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{xpt\_release\_device}}(device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02320}02320         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02321}02321         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02322}02322 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02323}02323 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02324}02324 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02325}\mbox{\hyperlink{cam__xpt_8c_a3e1f0c6a429e6512beac8c6da01006d7}{02325}} \mbox{\hyperlink{cam__xpt_8c_a3e1f0c6a429e6512beac8c6da01006d7}{xptperiphtraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *start\_periph,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02326}02326                   \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02327}02327 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02328}02328         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02329}02329         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, *next\_periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02330}02330         \textcolor{keywordtype}{int} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02331}02331 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02332}02332         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02333}02333 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02334}02334         bus = device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02335}02335         \textcolor{keywordflow}{if} (start\_periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02336}02336                 periph = start\_periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02337}02337         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02338}02338                 \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02339}02339                 mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02340}02340                 periph = SLIST\_FIRST(\&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02341}02341                 \textcolor{keywordflow}{while} (periph != NULL \&\& (periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} \& \mbox{\hyperlink{cam__periph_8h_ac2ed97964d587d6d98417aad48b33c34}{CAM\_PERIPH\_FREE}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02342}02342                         periph = SLIST\_NEXT(periph, periph\_links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02343}02343                 \textcolor{keywordflow}{if} (periph == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02344}02344                         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02345}02345                         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02346}02346                         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02347}02347                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02348}02348                 periph-\/>\mbox{\hyperlink{structcam__periph_a323850650392068aa6c35db83df2599e}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02349}02349                 mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02350}02350                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02351}02351         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02352}02352         \textcolor{keywordflow}{for} (; periph != NULL; periph = next\_periph) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02353}02353                 retval = tr\_func(periph, arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02354}02354                 \textcolor{keywordflow}{if} (retval == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02355}02355                         \mbox{\hyperlink{cam__periph_8c_a06741cfe8f484a9dad6f9607a233908c}{cam\_periph\_release\_locked}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02356}02356                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02357}02357                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02358}02358                 \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02359}02359                 mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02360}02360                 next\_periph = SLIST\_NEXT(periph, periph\_links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02361}02361                 \textcolor{keywordflow}{while} (next\_periph != NULL \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02362}02362                     (next\_periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} \& \mbox{\hyperlink{cam__periph_8h_ac2ed97964d587d6d98417aad48b33c34}{CAM\_PERIPH\_FREE}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02363}02363                         next\_periph = SLIST\_NEXT(next\_periph, periph\_links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02364}02364                 \textcolor{keywordflow}{if} (next\_periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02365}02365                         next\_periph-\/>\mbox{\hyperlink{structcam__periph_a323850650392068aa6c35db83df2599e}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02366}02366                 mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02367}02367                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02368}02368                 \mbox{\hyperlink{cam__periph_8c_a06741cfe8f484a9dad6f9607a233908c}{cam\_periph\_release\_locked}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02369}02369         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02370}02370         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02371}02371 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02372}02372 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02373}02373 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02374}\mbox{\hyperlink{cam__xpt_8c_ab0f56d63fde3a0318584dce6ba814889}{02374}} \mbox{\hyperlink{cam__xpt_8c_ab0f56d63fde3a0318584dce6ba814889}{xptpdrvtraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structperiph__driver}{periph\_driver}} **start\_pdrv,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02375}02375                 \mbox{\hyperlink{cam__xpt_8c_a92b6641d91dd3a6695ea7dd4660eaa74}{xpt\_pdrvfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02376}02376 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02377}02377         \textcolor{keyword}{struct }\mbox{\hyperlink{structperiph__driver}{periph\_driver}} **pdrv;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02378}02378         \textcolor{keywordtype}{int} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02379}02379 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02380}02380         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02381}02381 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02382}02382         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02383}02383 \textcolor{comment}{         * We don't traverse the peripheral driver list like we do the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02384}02384 \textcolor{comment}{         * other lists, because it is a linker set, and therefore cannot be}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02385}02385 \textcolor{comment}{         * changed during runtime.  If the peripheral driver list is ever}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02386}02386 \textcolor{comment}{         * re-\/done to be something other than a linker set (i.e. it can}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02387}02387 \textcolor{comment}{         * change while the system is running), the list traversal should}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02388}02388 \textcolor{comment}{         * be modified to work like the other traversal functions.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02389}02389 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02390}02390         \textcolor{keywordflow}{for} (pdrv = (start\_pdrv ? start\_pdrv : \mbox{\hyperlink{cam__periph_8c_ac080b20aad20a373275084903704bccd}{periph\_drivers}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02391}02391              *pdrv != NULL; pdrv++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02392}02392                 retval = tr\_func(pdrv, arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02393}02393 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02394}02394                 \textcolor{keywordflow}{if} (retval == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02395}02395                         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02396}02396         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02397}02397 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02398}02398         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02399}02399 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02400}02400 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02401}02401 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02402}\mbox{\hyperlink{cam__xpt_8c_a7e0b70c676a1e492e7e551a8feffd687}{02402}} \mbox{\hyperlink{cam__xpt_8c_a7e0b70c676a1e492e7e551a8feffd687}{xptpdperiphtraverse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structperiph__driver}{periph\_driver}} **pdrv,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02403}02403                     \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *start\_periph,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02404}02404                     \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} *tr\_func, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02405}02405 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02406}02406         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, *next\_periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02407}02407         \textcolor{keywordtype}{int} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02408}02408 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02409}02409         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02410}02410 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02411}02411         \textcolor{keywordflow}{if} (start\_periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02412}02412                 periph = start\_periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02413}02413         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02414}02414                 \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02415}02415                 periph = TAILQ\_FIRST(\&(*pdrv)-\/>units);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02416}02416                 \textcolor{keywordflow}{while} (periph != NULL \&\& (periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} \& \mbox{\hyperlink{cam__periph_8h_ac2ed97964d587d6d98417aad48b33c34}{CAM\_PERIPH\_FREE}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02417}02417                         periph = TAILQ\_NEXT(periph, unit\_links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02418}02418                 \textcolor{keywordflow}{if} (periph == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02419}02419                         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02420}02420                         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02421}02421                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02422}02422                 periph-\/>\mbox{\hyperlink{structcam__periph_a323850650392068aa6c35db83df2599e}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02423}02423                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02424}02424         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02425}02425         \textcolor{keywordflow}{for} (; periph != NULL; periph = next\_periph) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02426}02426                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02427}02427                 retval = tr\_func(periph, arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02428}02428                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02429}02429                 \textcolor{keywordflow}{if} (retval == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02430}02430                         \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02431}02431                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02432}02432                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02433}02433                 \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02434}02434                 next\_periph = TAILQ\_NEXT(periph, unit\_links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02435}02435                 \textcolor{keywordflow}{while} (next\_periph != NULL \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02436}02436                     (next\_periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} \& \mbox{\hyperlink{cam__periph_8h_ac2ed97964d587d6d98417aad48b33c34}{CAM\_PERIPH\_FREE}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02437}02437                         next\_periph = TAILQ\_NEXT(next\_periph, unit\_links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02438}02438                 \textcolor{keywordflow}{if} (next\_periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02439}02439                         next\_periph-\/>\mbox{\hyperlink{structcam__periph_a323850650392068aa6c35db83df2599e}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02440}02440                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02441}02441                 \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02442}02442         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02443}02443         \textcolor{keywordflow}{return}(retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02444}02444 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02445}02445 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02446}02446 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02447}\mbox{\hyperlink{cam__xpt_8c_aa25ee2797ec95d628dac5cb9ef9e07c8}{02447}} \mbox{\hyperlink{cam__xpt_8c_a609709149cdf756ceb8038753e1a3c2b}{xptdefbusfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02448}02448 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02449}02449         \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} *tr\_config;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02450}02450 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02451}02451         tr\_config = (\textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02452}02452 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02453}02453         \textcolor{keywordflow}{if} (tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_aa24e1ec54658138a093ea2bc01cf88c8}{depth}} == \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a4acb1763be1d0420cd4fe5e530a60c34}{XPT\_DEPTH\_BUS}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02454}02454                 \mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}} *\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02455}02455 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02456}02456                 \mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}} = (\mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}} *)tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02457}02457 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02458}02458                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}}(bus, tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_a8b5a49c7bda2fb16a87d579a198fee41}{tr\_arg}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02459}02459         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02460}02460                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_af0013235e3adc7dd3ee9fcb12b03a3cd}{xpttargettraverse}}(bus, NULL, \mbox{\hyperlink{cam__xpt_8c_a9d2a8f1a7391ccbd53bc449a5fd8fe54}{xptdeftargetfunc}}, arg));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02461}02461 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02462}02462 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02463}02463 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02464}\mbox{\hyperlink{cam__xpt_8c_ac9282be7512798f73a8f5d49c9021d38}{02464}} \mbox{\hyperlink{cam__xpt_8c_a9d2a8f1a7391ccbd53bc449a5fd8fe54}{xptdeftargetfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02465}02465 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02466}02466         \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} *tr\_config;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02467}02467 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02468}02468         tr\_config = (\textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02469}02469 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02470}02470         \textcolor{keywordflow}{if} (tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_aa24e1ec54658138a093ea2bc01cf88c8}{depth}} == \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a726966fef1cad981779e997dd8356086}{XPT\_DEPTH\_TARGET}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02471}02471                 \mbox{\hyperlink{cam__xpt_8c_a1143f9a80a4766b1301868d4e06dacdf}{xpt\_targetfunc\_t}} *\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02472}02472 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02473}02473                 \mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}} = (\mbox{\hyperlink{cam__xpt_8c_a1143f9a80a4766b1301868d4e06dacdf}{xpt\_targetfunc\_t}} *)tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02474}02474 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02475}02475                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}}(target, tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_a8b5a49c7bda2fb16a87d579a198fee41}{tr\_arg}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02476}02476         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02477}02477                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a431efc1763a41e6feb096f82a58e9af7}{xptdevicetraverse}}(target, NULL, \mbox{\hyperlink{cam__xpt_8c_a8c27741e32cd4dc6486732cf218f9594}{xptdefdevicefunc}}, arg));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02478}02478 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02479}02479 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02480}02480 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02481}\mbox{\hyperlink{cam__xpt_8c_a07dcca40495cd74bb5d2fcd6c8466c51}{02481}} \mbox{\hyperlink{cam__xpt_8c_a8c27741e32cd4dc6486732cf218f9594}{xptdefdevicefunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02482}02482 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02483}02483         \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} *tr\_config;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02484}02484 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02485}02485         tr\_config = (\textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02486}02486 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02487}02487         \textcolor{keywordflow}{if} (tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_aa24e1ec54658138a093ea2bc01cf88c8}{depth}} == \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a04559fbece20b7523aec59dcffeff945}{XPT\_DEPTH\_DEVICE}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02488}02488                 \mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} *\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02489}02489 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02490}02490                 \mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}} = (\mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} *)tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02491}02491 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02492}02492                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}}(device, tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_a8b5a49c7bda2fb16a87d579a198fee41}{tr\_arg}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02493}02493         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02494}02494                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_a3e1f0c6a429e6512beac8c6da01006d7}{xptperiphtraverse}}(device, NULL, \mbox{\hyperlink{cam__xpt_8c_a8af1830851a96cb4bd764610a4fd05d2}{xptdefperiphfunc}}, arg));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02495}02495 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02496}02496 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02497}02497 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02498}\mbox{\hyperlink{cam__xpt_8c_acf6d71698502d06943c928e302d4d04c}{02498}} \mbox{\hyperlink{cam__xpt_8c_a8af1830851a96cb4bd764610a4fd05d2}{xptdefperiphfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02499}02499 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02500}02500         \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} *tr\_config;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02501}02501         \mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} *\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02502}02502 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02503}02503         tr\_config = (\textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02504}02504 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02505}02505         \mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}} = (\mbox{\hyperlink{cam__xpt_8c_aa4c5cc302bf31a6d3e348fa83740f643}{xpt\_periphfunc\_t}} *)tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02506}02506 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02507}02507         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02508}02508 \textcolor{comment}{         * Unlike the other default functions, we don't check for depth}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02509}02509 \textcolor{comment}{         * here.  The peripheral driver level is the last level in the EDT,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02510}02510 \textcolor{comment}{         * so if we're here, we should execute the function in question.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02511}02511 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02512}02512         \textcolor{keywordflow}{return}(\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}}(periph, tr\_config-\/>\mbox{\hyperlink{structxpt__traverse__config_a8b5a49c7bda2fb16a87d579a198fee41}{tr\_arg}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02513}02513 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02514}02514 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02515}02515 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02516}02516 \textcolor{comment}{ * Execute the given function for every bus in the EDT.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02517}02517 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02518}02518 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02519}\mbox{\hyperlink{cam__xpt_8c_ab42e66d2a282daadeb18819fe9f7e690}{02519}} \mbox{\hyperlink{cam__xpt_8c_ab42e66d2a282daadeb18819fe9f7e690}{xpt\_for\_all\_busses}}(\mbox{\hyperlink{cam__xpt_8c_abcd086912eb7ccd69533aec30b6ab40d}{xpt\_busfunc\_t}} *\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}}, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02520}02520 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02521}02521         \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} tr\_config;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02522}02522 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02523}02523         tr\_config.\mbox{\hyperlink{structxpt__traverse__config_aa24e1ec54658138a093ea2bc01cf88c8}{depth}} = \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a4acb1763be1d0420cd4fe5e530a60c34}{XPT\_DEPTH\_BUS}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02524}02524         tr\_config.\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}} = \mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02525}02525         tr\_config.\mbox{\hyperlink{structxpt__traverse__config_a8b5a49c7bda2fb16a87d579a198fee41}{tr\_arg}} = arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02526}02526 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02527}02527         \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_ae298e2c0f7b2ee29c6f1fbdab35b2555}{xptbustraverse}}(NULL, \mbox{\hyperlink{cam__xpt_8c_a609709149cdf756ceb8038753e1a3c2b}{xptdefbusfunc}}, \&tr\_config));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02528}02528 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02529}02529 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02530}02530 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02531}02531 \textcolor{comment}{ * Execute the given function for every device in the EDT.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02532}02532 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02533}02533 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02534}\mbox{\hyperlink{cam__xpt_8c_aacaf969f9c27c1098dfdad8cc92089ec}{02534}} \mbox{\hyperlink{cam__xpt_8c_aacaf969f9c27c1098dfdad8cc92089ec}{xpt\_for\_all\_devices}}(\mbox{\hyperlink{cam__xpt_8c_ad215963e964c2c713ff4c737daad3f44}{xpt\_devicefunc\_t}} *\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}}, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02535}02535 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02536}02536         \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__traverse__config}{xpt\_traverse\_config}} tr\_config;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02537}02537 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02538}02538         tr\_config.\mbox{\hyperlink{structxpt__traverse__config_aa24e1ec54658138a093ea2bc01cf88c8}{depth}} = \mbox{\hyperlink{cam__xpt_8c_afee5cca410cb5ac4ce9091aa2b9a3204a04559fbece20b7523aec59dcffeff945}{XPT\_DEPTH\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02539}02539         tr\_config.\mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}} = \mbox{\hyperlink{structxpt__traverse__config_a98994215a6d1bcf02e8f97a4b57f8bfb}{tr\_func}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02540}02540         tr\_config.\mbox{\hyperlink{structxpt__traverse__config_a8b5a49c7bda2fb16a87d579a198fee41}{tr\_arg}} = arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02541}02541 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02542}02542         \textcolor{keywordflow}{return}(\mbox{\hyperlink{cam__xpt_8c_ae298e2c0f7b2ee29c6f1fbdab35b2555}{xptbustraverse}}(NULL, \mbox{\hyperlink{cam__xpt_8c_a609709149cdf756ceb8038753e1a3c2b}{xptdefbusfunc}}, \&tr\_config));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02543}02543 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02544}02544 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02545}02545 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02546}\mbox{\hyperlink{cam__xpt_8c_a0451854cc7b5bded996a7e7587c5a9dd}{02546}} \mbox{\hyperlink{cam__xpt_8c_a8724a857fbfa39e441e8bfcc30270481}{xptsetasyncfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02547}02547 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02548}02548         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02549}02549         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdev}{ccb\_getdev}} cgd;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02550}02550         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__setasync}{ccb\_setasync}} *csa = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__setasync}{ccb\_setasync}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02551}02551 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02552}02552         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02553}02553 \textcolor{comment}{         * Don't report unconfigured devices (Wildcard devs,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02554}02554 \textcolor{comment}{         * devices only for target mode, device instances}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02555}02555 \textcolor{comment}{         * that have been invalidated but are waiting for}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02556}02556 \textcolor{comment}{         * their last reference count to be released).}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02557}02557 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02558}02558         \textcolor{keywordflow}{if} ((device-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a378601270c3c4caaa8c30d76901299fe}{CAM\_DEV\_UNCONFIGURED}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02559}02559                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02560}02560 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02561}02561         memset(\&cgd, 0, \textcolor{keyword}{sizeof}(cgd));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02562}02562         \mbox{\hyperlink{cam__xpt_8c_ab88c6214d184761e24916fc4b5a87e6b}{xpt\_compile\_path}}(\&path,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02563}02563                          NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02564}02564                          device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02565}02565                          device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02566}02566                          device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02567}02567         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&cgd.\mbox{\hyperlink{structccb__getdev_a5d14cdc58f775661b78dccb59121e90e}{ccb\_h}}, \&path, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02568}02568         cgd.\mbox{\hyperlink{structccb__getdev_a5d14cdc58f775661b78dccb59121e90e}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae076749d68954cdfbd24a6060976168f}{XPT\_GDEV\_TYPE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02569}02569         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}((\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)\&cgd);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02570}02570         csa-\/>\mbox{\hyperlink{structccb__setasync_a8e7084ccce3c28f263877ec86cc31271}{callback}}(csa-\/>\mbox{\hyperlink{structccb__setasync_a0a46376eb707a048d847392a0917a1cb}{callback\_arg}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02571}02571                             \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a04183843e65dd16d378d105270a6debd}{AC\_FOUND\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02572}02572                             \&path, \&cgd);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02573}02573         \mbox{\hyperlink{cam__xpt_8c_a476dec2258dea421cff81f71541f347a}{xpt\_release\_path}}(\&path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02574}02574 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02575}02575         \textcolor{keywordflow}{return}(1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02576}02576 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02577}02577 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02578}02578 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02579}\mbox{\hyperlink{cam__xpt_8c_a352f633aa97550f84e9688055a3372b0}{02579}} \mbox{\hyperlink{cam__xpt_8c_ab9e5ad80e9182de58620f6eea2ed342d}{xptsetasyncbusfunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02580}02580 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02581}02581         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02582}02582         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__pathinq}{ccb\_pathinq}} cpi;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02583}02583         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__setasync}{ccb\_setasync}} *csa = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__setasync}{ccb\_setasync}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02584}02584 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02585}02585         \mbox{\hyperlink{cam__xpt_8c_ab88c6214d184761e24916fc4b5a87e6b}{xpt\_compile\_path}}(\&path, \textcolor{comment}{/*periph*/}NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02586}02586                          bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02587}02587                          \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02588}02588                          \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02589}02589         \mbox{\hyperlink{cam__xpt_8h_a81ce2d44dcd261d0d54d1c24b0e1f11e}{xpt\_path\_lock}}(\&path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02590}02590         \mbox{\hyperlink{cam__xpt_8h_ae111c3fbe95a53d1bdb2f112d86b929b}{xpt\_path\_inq}}(\&cpi, \&path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02591}02591         csa-\/>\mbox{\hyperlink{structccb__setasync_a8e7084ccce3c28f263877ec86cc31271}{callback}}(csa-\/>\mbox{\hyperlink{structccb__setasync_a0a46376eb707a048d847392a0917a1cb}{callback\_arg}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02592}02592                             \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a929293d03108ae612b5f980b87deccb4}{AC\_PATH\_REGISTERED}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02593}02593                             \&path, \&cpi);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02594}02594         \mbox{\hyperlink{cam__xpt_8h_a14b8db5099e848843133059a192429af}{xpt\_path\_unlock}}(\&path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02595}02595         \mbox{\hyperlink{cam__xpt_8c_a476dec2258dea421cff81f71541f347a}{xpt\_release\_path}}(\&path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02596}02596 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02597}02597         \textcolor{keywordflow}{return}(1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02598}02598 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02599}02599 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02600}02600 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02601}\mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{02601}} \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *start\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02602}02602 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02603}02603 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02604}02604         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02605}02605             (\textcolor{stringliteral}{"{}xpt\_action: func \%\#x \%s\(\backslash\)n"{}}, start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02606}02606                 \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}})));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02607}02607 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02608}02608         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a167c9bce81d6e65c16734d3e0d59fe24}{CAM\_REQ\_INPROG}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02609}02609         (*(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}}-\/>\mbox{\hyperlink{structxpt__xport_ac9deaad7cb0ff7eb57943fdc975e4c09}{ops}}-\/>\mbox{\hyperlink{structxpt__xport__ops_a0fa44c55b34e208c4cac4a2353db436a}{action}}))(start\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02610}02610 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02611}02611 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02612}02612 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02613}\mbox{\hyperlink{cam__xpt_8c_aa2dfec3d7dc6484408b51af5c19a9e13}{02613}} \mbox{\hyperlink{cam__xpt_8c_aa2dfec3d7dc6484408b51af5c19a9e13}{xpt\_action\_default}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *start\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02614}02614 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02615}02615         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02616}02616         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02617}02617         \textcolor{keyword}{struct }mtx *mtx;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02618}02618 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02619}02619         path = start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02620}02620         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02621}02621             (\textcolor{stringliteral}{"{}xpt\_action\_default: func \%\#x \%s\(\backslash\)n"{}}, start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02622}02622                 \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}})));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02623}02623 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02624}02624         \textcolor{keywordflow}{switch} (start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02625}02625         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca426a17499239f5751c747d094b4998dc}{XPT\_SCSI\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02626}02626         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02627}02627                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02628}02628 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02629}02629                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02630}02630 \textcolor{comment}{                 * For the sake of compatibility with SCSI-\/1}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02631}02631 \textcolor{comment}{                 * devices that may not understand the identify}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02632}02632 \textcolor{comment}{                 * message, we include lun information in the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02633}02633 \textcolor{comment}{                 * second byte of all commands.  SCSI-\/1 specifies}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02634}02634 \textcolor{comment}{                 * that luns are a 3 bit value and reserves only 3}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02635}02635 \textcolor{comment}{                 * bits for lun information in the CDB.  Later}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02636}02636 \textcolor{comment}{                 * revisions of the SCSI spec allow for more than 8}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02637}02637 \textcolor{comment}{                 * luns, but have deprecated lun information in the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02638}02638 \textcolor{comment}{                 * CDB.  So, if the lun won't fit, we must omit.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02639}02639 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02640}02640 \textcolor{comment}{                 * Also be aware that during initial probing for devices,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02641}02641 \textcolor{comment}{                 * the inquiry information is unknown but initialized to 0.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02642}02642 \textcolor{comment}{                 * This means that this code will be exercised while probing}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02643}02643 \textcolor{comment}{                 * devices with an ANSI revision greater than 2.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02644}02644 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02645}02645                 device = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02646}02646                 \textcolor{keywordflow}{if} (device-\/>\mbox{\hyperlink{structcam__ed_a0a7a270c26d3930d5c6bc6cf6e610c4d}{protocol\_version}} <= \mbox{\hyperlink{scsi__all_8h_a0998c5a889c1c838a9f5b90e9f87d722}{SCSI\_REV\_2}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02647}02647                  \&\& start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}} < 8}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02648}02648                  \&\& (start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a9722227a7338e2cc40e4796cf5385077}{CAM\_CDB\_POINTER}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02649}02649                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}[1] |=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02650}02650                             start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}} << 5;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02651}02651                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02652}02652                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a63de880a84354e8722599c3c218f4481}{scsi\_status}} = \mbox{\hyperlink{scsi__all_8h_a9c18f1b51edb5f6b039f8ccf6cacc1d2}{SCSI\_STATUS\_OK}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02653}02653         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02654}02654         \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02655}02655         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca6543730db63eef7a1068551cf62a6bda}{XPT\_TARGET\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02656}02656         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cafe6dc012995f03ba1826ecbc229fbdbe}{XPT\_CONT\_TARGET\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02657}02657                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a692447632a92215b9089398d63001f8f}{sense\_resid}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02658}02658                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02659}02659                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02660}02660         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caae32713c35c2f8312a1efe874803c7f6}{XPT\_ATA\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02661}02661                 \textcolor{keywordflow}{if} (start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} == \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caae32713c35c2f8312a1efe874803c7f6}{XPT\_ATA\_IO}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02662}02662                         start\_ccb-\/>\mbox{\hyperlink{unionccb_afa8355889ca1e90cbace03a5ac7c59cb}{ataio}}.\mbox{\hyperlink{structccb__ataio_aefaba554c51cf573d3c8839c782216c2}{resid}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02663}02663                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02664}02664         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca9f722f288854f5ebf54f7c1d7af86778}{XPT\_NVME\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02665}02665         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca2df003d0530635bd4ca955925bea3457}{XPT\_NVME\_ADMIN}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02666}02666         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca7c4cd1252b7b90f1c1aaf01cb6240fd8}{XPT\_MMC\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02667}02667         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca708c0b638548ebfed0b3efbefa903cf5}{XPT\_MMC\_GET\_TRAN\_SETTINGS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02668}02668         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cadc6fc7dd55d201d1f350ad207f393022}{XPT\_MMC\_SET\_TRAN\_SETTINGS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02669}02669         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca1eaac0f24214e1a486e98141b2924253}{XPT\_RESET\_DEV}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02670}02670         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca63c9d644f78ee4c9642706885d0f3705}{XPT\_ENG\_EXEC}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02671}02671         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cac8a7bc7663382c42fe6b2c4153b68c96}{XPT\_SMP\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02672}02672         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02673}02673                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02674}02674 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02675}02675                 devq = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02676}02676                 mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02677}02677                 \mbox{\hyperlink{cam__queue_8h_ac9402e54e81d675ae8624ad22f454d7f}{cam\_ccbq\_insert\_ccb}}(\&path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}, start\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02678}02678                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_a7148ea52669591ad852374d50345f34c}{xpt\_schedule\_devq}}(devq, path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02679}02679                         \mbox{\hyperlink{cam__xpt_8c_ab05d0a25c05fe9822eb4f60f903bf8bd}{xpt\_run\_devq}}(devq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02680}02680                 mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02681}02681                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02682}02682         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02683}02683         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caacbf4303a264c7c105b44031ddb3a8c8}{XPT\_CALC\_GEOMETRY}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02684}02684                 \textcolor{comment}{/* Filter out garbage */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02685}02685                 \textcolor{keywordflow}{if} (start\_ccb-\/>\mbox{\hyperlink{unionccb_a8846fda93a10c897b1edc8b18993639b}{ccg}}.\mbox{\hyperlink{structccb__calc__geometry_a2acdb03b92614575c50707d23f84dce7}{block\_size}} == 0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02686}02686                  || start\_ccb-\/>\mbox{\hyperlink{unionccb_a8846fda93a10c897b1edc8b18993639b}{ccg}}.\mbox{\hyperlink{structccb__calc__geometry_a33ff1f2ea5fd0e4ffe52c3a599fde81a}{volume\_size}} == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02687}02687                         start\_ccb-\/>\mbox{\hyperlink{unionccb_a8846fda93a10c897b1edc8b18993639b}{ccg}}.\mbox{\hyperlink{structccb__calc__geometry_a3bdffadfac813b994b0997edc8e5a7a5}{cylinders}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02688}02688                         start\_ccb-\/>\mbox{\hyperlink{unionccb_a8846fda93a10c897b1edc8b18993639b}{ccg}}.\mbox{\hyperlink{structccb__calc__geometry_a5d49448acd5416b5c7227deacb171283}{heads}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02689}02689                         start\_ccb-\/>\mbox{\hyperlink{unionccb_a8846fda93a10c897b1edc8b18993639b}{ccg}}.\mbox{\hyperlink{structccb__calc__geometry_ad8580494ee0e9850c262c20abb49eceb}{secs\_per\_track}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02690}02690                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02691}02691                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02692}02692                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02693}02693                 \textcolor{keywordflow}{goto} call\_sim;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02694}02694         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cac6104918fad106a7e3b6d8b873cdc81e}{XPT\_ABORT}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02695}02695         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02696}02696                 \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}}* abort\_ccb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02697}02697 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02698}02698                 abort\_ccb = start\_ccb-\/>\mbox{\hyperlink{unionccb_aa8b5d154d1737256860292029d1321ed}{cab}}.\mbox{\hyperlink{structccb__abort_aced06005f4d38499d7edc168331d20c0}{abort\_ccb}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02699}02699                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__ccb_8h_a5bd70f5fcf97524494b4bf5cd5aa73e6}{XPT\_FC\_IS\_DEV\_QUEUED}}(abort\_ccb)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02700}02700                         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02701}02701                         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02702}02702 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02703}02703                         device = abort\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02704}02704                         devq = device-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02705}02705 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02706}02706                         mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02707}02707                         \textcolor{keywordflow}{if} (abort\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} > 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02708}02708                                 \mbox{\hyperlink{cam__queue_8h_ac81587eab84a0dbc03fed74ee9ab9598}{cam\_ccbq\_remove\_ccb}}(\&device-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}, abort\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02709}02709                                 abort\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02710}02710                                     \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a880e0abf6511fcc6e7967258d6a74dda}{CAM\_REQ\_ABORTED}}|\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3afe5c2fa0edb1c8fea0119515430d223e}{CAM\_DEV\_QFRZN}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02711}02711                                 \mbox{\hyperlink{cam__xpt_8c_afaa5f8e162dc0a7ef6d0be2d892ec9e1}{xpt\_freeze\_devq\_device}}(device, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02712}02712                                 mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02713}02713                                 \mbox{\hyperlink{cam__xpt_8c_a708fed7e2d55a1b2a180bb4462513393}{xpt\_done}}(abort\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02714}02714                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02715}02715                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02716}02716                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02717}02717                         mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02718}02718 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02719}02719                         \textcolor{keywordflow}{if} (abort\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} == \mbox{\hyperlink{cam_8h_a7af58dadfb8e09c223ffed09239f787b}{CAM\_UNQUEUED\_INDEX}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02720}02720                          \&\& (abort\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3aab62757ffee7d501dc0b5e5977656ee8}{CAM\_SIM\_QUEUED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02721}02721                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02722}02722 \textcolor{comment}{                                 * We've caught this ccb en route to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02723}02723 \textcolor{comment}{                                 * the SIM.  Flag it for abort and the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02724}02724 \textcolor{comment}{                                 * SIM will do so just before starting}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02725}02725 \textcolor{comment}{                                 * real work on the CCB.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02726}02726 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02727}02727                                 abort\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02728}02728                                     \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a880e0abf6511fcc6e7967258d6a74dda}{CAM\_REQ\_ABORTED}}|\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3afe5c2fa0edb1c8fea0119515430d223e}{CAM\_DEV\_QFRZN}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02729}02729                                 \mbox{\hyperlink{cam__xpt_8c_a2cca45a6e91cae097f1d958c315231e8}{xpt\_freeze\_devq}}(abort\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02730}02730                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02731}02731                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02732}02732                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02733}02733                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02734}02734                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__ccb_8h_a8997e1fb2ed8d9928c8aa7ad8dadf9ca}{XPT\_FC\_IS\_QUEUED}}(abort\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02735}02735                  \&\& (abort\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} == \mbox{\hyperlink{cam_8h_a06bd059e5da01c9c769331e0b54b0e3a}{CAM\_DONEQ\_INDEX}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02736}02736                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02737}02737 \textcolor{comment}{                         * It's already completed but waiting}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02738}02738 \textcolor{comment}{                         * for our SWI to get to it.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02739}02739 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02740}02740                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a544462db07045bfd4ab1e3d09a24838b}{CAM\_UA\_ABORT}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02741}02741                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02742}02742                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02743}02743                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02744}02744 \textcolor{comment}{                 * If we weren't able to take care of the abort request}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02745}02745 \textcolor{comment}{                 * in the XPT, pass the request down to the SIM for processing.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02746}02746 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02747}02747         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02748}02748         \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02749}02749         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca48add9a54106574912cce60bea529c74}{XPT\_ACCEPT\_TARGET\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02750}02750         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cad21e8851e10698290517ef2aaad1db49}{XPT\_EN\_LUN}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02751}02751         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca1bf11edb15acb0712cc1cfe07703cb9c}{XPT\_IMMED\_NOTIFY}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02752}02752         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cac61ed4751810166bfd732aaf1d76cfa8}{XPT\_NOTIFY\_ACK}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02753}02753         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca377430b25b365e512334ca40798eafea}{XPT\_RESET\_BUS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02754}02754         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caab3472e495782390d0f7714a1f308b95}{XPT\_IMMEDIATE\_NOTIFY}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02755}02755         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae7bb5eb0f60404c52b021e2084982622}{XPT\_NOTIFY\_ACKNOWLEDGE}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02756}02756         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cacb14751ead3241dcffac95324ffecb33}{XPT\_GET\_SIM\_KNOB\_OLD}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02757}02757         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caacce54df8d003ba1653973153a64b920}{XPT\_GET\_SIM\_KNOB}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02758}02758         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa14bce9a170de19ea868a627874649e1}{XPT\_SET\_SIM\_KNOB}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02759}02759         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca4031c8b4cb9702134c45aee99474c0e7}{XPT\_GET\_TRAN\_SETTINGS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02760}02760         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca809010667fe314b6a4af69f3fef6bc9f}{XPT\_SET\_TRAN\_SETTINGS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02761}02761         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cad34c7b5cb68e0ed050bc95a55cd87f7c}{XPT\_PATH\_INQ}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02762}02762 call\_sim:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02763}02763                 sim = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02764}02764                 mtx = sim-\/>\mbox{\hyperlink{structcam__sim_a7019bfd905201eb7b0faac19c0a6645c}{mtx}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02765}02765                 \textcolor{keywordflow}{if} (mtx \&\& !mtx\_owned(mtx))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02766}02766                         mtx\_lock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02767}02767                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02768}02768                         mtx = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02769}02769 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02770}02770                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02771}02771                     (\textcolor{stringliteral}{"{}Calling sim-\/>sim\_action(): func=\%\#x\(\backslash\)n"{}}, start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02772}02772                 (*(sim-\/>\mbox{\hyperlink{structcam__sim_ac729513edd6aef72fa747e62390fc57f}{sim\_action}}))(sim, start\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02773}02773                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02774}02774                     (\textcolor{stringliteral}{"{}sim-\/>sim\_action returned: status=\%\#x\(\backslash\)n"{}}, start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02775}02775                 \textcolor{keywordflow}{if} (mtx)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02776}02776                         mtx\_unlock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02777}02777                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02778}02778         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cad8694eb4b672eedcb525a5f92c3e816f}{XPT\_PATH\_STATS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02779}02779                 start\_ccb-\/>\mbox{\hyperlink{unionccb_aaae6e865768353605717bd7b2751a76f}{cpis}}.\mbox{\hyperlink{structccb__pathstats_a28aba85593d81b09012afe473e780a2c}{last\_reset}} = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a05b90f0e17165a87df3aebfce4c2bc55}{last\_reset}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02780}02780                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02781}02781                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02782}02782         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae076749d68954cdfbd24a6060976168f}{XPT\_GDEV\_TYPE}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02783}02783         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02784}02784                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02785}02785 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02786}02786                 dev = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02787}02787                 \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a378601270c3c4caaa8c30d76901299fe}{CAM\_DEV\_UNCONFIGURED}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02788}02788                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a45b712a5be7c3910f37757908a444e0b}{CAM\_DEV\_NOT\_THERE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02789}02789                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02790}02790                         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdev}{ccb\_getdev}} *cgd;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02791}02791 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02792}02792                         cgd = \&start\_ccb-\/>\mbox{\hyperlink{unionccb_ad31f9c87f178e2e9f248fddf12ffc362}{cgd}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02793}02793                         cgd-\/>\mbox{\hyperlink{structccb__getdev_a019f53feca9e4c09b563eef64e19c1fd}{protocol}} = dev-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02794}02794                         cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}} = dev-\/>\mbox{\hyperlink{structcam__ed_af6726317eeed0cae9946ca90053653b8}{inq\_data}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02795}02795                         cgd-\/>\mbox{\hyperlink{structccb__getdev_acdfe49110ce5dd94d2263e5059c28968}{ident\_data}} = dev-\/>\mbox{\hyperlink{structcam__ed_a88754db4b8680958db3f42c1a9a0810c}{ident\_data}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02796}02796                         cgd-\/>\mbox{\hyperlink{structccb__getdev_afe94e2b043281179a60a057aae495d32}{inq\_flags}} = dev-\/>\mbox{\hyperlink{structcam__ed_a72233078c6c53a614e242b55ae7a4f25}{inq\_flags}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02797}02797                         cgd-\/>\mbox{\hyperlink{structccb__getdev_a5d14cdc58f775661b78dccb59121e90e}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02798}02798                         cgd-\/>\mbox{\hyperlink{structccb__getdev_a38340a037d79835f7face458aa1e9d3c}{serial\_num\_len}} = dev-\/>\mbox{\hyperlink{structcam__ed_a5ac00c1566eaed5d30763c9cbbda3201}{serial\_num\_len}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02799}02799                         \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_a5ac00c1566eaed5d30763c9cbbda3201}{serial\_num\_len}} > 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02800}02800                          \&\& (dev-\/>\mbox{\hyperlink{structcam__ed_a42307f2d582c88574f75c7e5393bdba0}{serial\_num}} != NULL))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02801}02801                                 bcopy(dev-\/>\mbox{\hyperlink{structcam__ed_a42307f2d582c88574f75c7e5393bdba0}{serial\_num}}, cgd-\/>\mbox{\hyperlink{structccb__getdev_a44757043db37e257e0cd4634ebf22695}{serial\_num}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02802}02802                                       dev-\/>\mbox{\hyperlink{structcam__ed_a5ac00c1566eaed5d30763c9cbbda3201}{serial\_num\_len}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02803}02803                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02804}02804                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02805}02805         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02806}02806         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca2db789d4d7f3dfd946a73494ea0f89e1}{XPT\_GDEV\_STATS}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02807}02807         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02808}02808                 \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdevstats}{ccb\_getdevstats}} *cgds = \&start\_ccb-\/>\mbox{\hyperlink{unionccb_a4627bd35c5f0906833e7e687a5b2e583}{cgds}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02809}02809                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02810}02810                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02811}02811                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *tar = path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02812}02812                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq = bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02813}02813 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02814}02814                 mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02815}02815                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_ad7a38723115d7471da58e0edc8ae48d9}{dev\_openings}} = dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_aef5404cb1fa8ad1c4ec40ad883c2b47c}{dev\_openings}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02816}02816                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a92fbaea4696064a25eb2af6ac4022cb0}{dev\_active}} = dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_a6a866cbf6518531b9b48c3521ca28d54}{dev\_active}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02817}02817                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a831e796bcdbe75d1a4bd7f48a4346215}{allocated}} = dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_a9e96a72cdbc06338b67045a1c2ee3877}{allocated}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02818}02818                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_adbd504f2d3f06ee269259d7f967bdb8c}{queued}} = \mbox{\hyperlink{cam__queue_8h_a0b82b99d54c4d5fb1a789d94335a65bf}{cam\_ccbq\_pending\_ccb\_count}}(\&dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02819}02819                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a66ed715b4ff1d924304a047729d0cfc8}{held}} = cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a831e796bcdbe75d1a4bd7f48a4346215}{allocated}} -\/ cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a92fbaea4696064a25eb2af6ac4022cb0}{dev\_active}} -\/ cgds-\/>\mbox{\hyperlink{structccb__getdevstats_adbd504f2d3f06ee269259d7f967bdb8c}{queued}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02820}02820                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a17b1459353d2c607f2c392770c0e59a2}{last\_reset}} = tar-\/>\mbox{\hyperlink{structcam__et_a313391c569c096c0c38bcf3b3098c95a}{last\_reset}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02821}02821                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a4876300862ac859a6acb90707e421c17}{maxtags}} = dev-\/>\mbox{\hyperlink{structcam__ed_a230a075b8326e7811f8d89e1ddbefe26}{maxtags}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02822}02822                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a6a8ab63c93154ef60bcd2b7ef92b7e17}{mintags}} = dev-\/>\mbox{\hyperlink{structcam__ed_a4c0260174102acd8aff3af41038f6b95}{mintags}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02823}02823                 \textcolor{keywordflow}{if} (timevalcmp(\&tar-\/>\mbox{\hyperlink{structcam__et_a313391c569c096c0c38bcf3b3098c95a}{last\_reset}}, \&bus-\/>\mbox{\hyperlink{structcam__eb_a05b90f0e17165a87df3aebfce4c2bc55}{last\_reset}}, <))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02824}02824                         cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a17b1459353d2c607f2c392770c0e59a2}{last\_reset}} = bus-\/>\mbox{\hyperlink{structcam__eb_a05b90f0e17165a87df3aebfce4c2bc55}{last\_reset}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02825}02825                 mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02826}02826                 cgds-\/>\mbox{\hyperlink{structccb__getdevstats_a12a9f3b24ba9b82dc758cf2f9c5835b4}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02827}02827                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02828}02828         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02829}02829         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa00d2bfd38da0425e3b52aeca7e6c9ff}{XPT\_GDEVLIST}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02830}02830         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02831}02831                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}}     *nperiph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02832}02832                 \textcolor{keyword}{struct }periph\_list      *periph\_head;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02833}02833                 \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdevlist}{ccb\_getdevlist}}     *cgdl;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02834}02834                 u\_int                   i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02835}02835                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}}             *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02836}02836                 \textcolor{keywordtype}{int}                     found;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02837}02837 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02838}02838                 found = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02839}02839 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02840}02840                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02841}02841 \textcolor{comment}{                 * Don't want anyone mucking with our data.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02842}02842 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02843}02843                 device = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02844}02844                 periph\_head = \&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02845}02845                 cgdl = \&start\_ccb-\/>\mbox{\hyperlink{unionccb_a30ab7d94e4f0b0dde29f6a078225ca1a}{cgdl}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02846}02846 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02847}02847                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02848}02848 \textcolor{comment}{                 * Check and see if the list has changed since the user}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02849}02849 \textcolor{comment}{                 * last requested a list member.  If so, tell them that the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02850}02850 \textcolor{comment}{                 * list has changed, and therefore they need to start over}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02851}02851 \textcolor{comment}{                 * from the beginning.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02852}02852 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02853}02853                 \textcolor{keywordflow}{if} ((cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_afb38bc42f3328dcf8792409b3a395006}{index}} != 0) \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02854}02854                     (cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_abbb83a5db4acb59c5caee9d5ac8b8b6b}{generation}} != device-\/>\mbox{\hyperlink{structcam__ed_a38440f387b4d1effb8611a32d4635671}{generation}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02855}02855                         cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_aa099d883a4127a7916bfed87d8053bcf}{status}} = \mbox{\hyperlink{cam__ccb_8h_a00f1b10c7206a163ea137cef6e4e0a84a7e4d6086e77a2969a25fc656ccceabf9}{CAM\_GDEVLIST\_LIST\_CHANGED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02856}02856                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02857}02857                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02858}02858 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02859}02859                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02860}02860 \textcolor{comment}{                 * Traverse the list of peripherals and attempt to find}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02861}02861 \textcolor{comment}{                 * the requested peripheral.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02862}02862 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02863}02863                 \textcolor{keywordflow}{for} (nperiph = SLIST\_FIRST(periph\_head), i = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02864}02864                      (nperiph != NULL) \&\& (i <= cgdl-\/>index);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02865}02865                      nperiph = SLIST\_NEXT(nperiph, periph\_links), i++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02866}02866                         \textcolor{keywordflow}{if} (i == cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_afb38bc42f3328dcf8792409b3a395006}{index}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02867}02867                                 strlcpy(cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_a744de6954321e3009c301d2fdef45130}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02868}02868                                         nperiph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02869}02869                                         \textcolor{keyword}{sizeof}(cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_a744de6954321e3009c301d2fdef45130}{periph\_name}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02870}02870                                 cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_af950c9c1e6459973bdc5a7807a228ee3}{unit\_number}} = nperiph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02871}02871                                 found = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02872}02872                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02873}02873                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02874}02874                 \textcolor{keywordflow}{if} (found == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02875}02875                         cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_aa099d883a4127a7916bfed87d8053bcf}{status}} = \mbox{\hyperlink{cam__ccb_8h_a00f1b10c7206a163ea137cef6e4e0a84a1be2befc4024cf6a12ae1d0543b637d1}{CAM\_GDEVLIST\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02876}02876                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02877}02877                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02878}02878 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02879}02879                 \textcolor{keywordflow}{if} (nperiph == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02880}02880                         cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_aa099d883a4127a7916bfed87d8053bcf}{status}} = \mbox{\hyperlink{cam__ccb_8h_a00f1b10c7206a163ea137cef6e4e0a84ac0b13b5f0b74e203c1a6be0de6e9d25d}{CAM\_GDEVLIST\_LAST\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02881}02881                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02882}02882                         cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_aa099d883a4127a7916bfed87d8053bcf}{status}} = \mbox{\hyperlink{cam__ccb_8h_a00f1b10c7206a163ea137cef6e4e0a84a161e42ae1f0b3c203143753d14b4ed4f}{CAM\_GDEVLIST\_MORE\_DEVS}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02883}02883 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02884}02884                 cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_afb38bc42f3328dcf8792409b3a395006}{index}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02885}02885                 cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_abbb83a5db4acb59c5caee9d5ac8b8b6b}{generation}} = device-\/>\mbox{\hyperlink{structcam__ed_a38440f387b4d1effb8611a32d4635671}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02886}02886 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02887}02887                 cgdl-\/>\mbox{\hyperlink{structccb__getdevlist_adefbf08497c4d8aafd4ea13db48de961}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02888}02888                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02889}02889         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02890}02890         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae3ef804cecfed4e6b10def2784de9ebc}{XPT\_DEV\_MATCH}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02891}02891         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02892}02892                 \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420ac}{dev\_pos\_type}} position\_type;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02893}02893                 \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__match}{ccb\_dev\_match}} *cdm;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02894}02894 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02895}02895                 cdm = \&start\_ccb-\/>\mbox{\hyperlink{unionccb_a2f6ddefe1fde14f8cb179565d2b1bc41}{cdm}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02896}02896 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02897}02897                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02898}02898 \textcolor{comment}{                 * There are two ways of getting at information in the EDT.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02899}02899 \textcolor{comment}{                 * The first way is via the primary EDT tree.  It starts}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02900}02900 \textcolor{comment}{                 * with a list of buses, then a list of targets on a bus,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02901}02901 \textcolor{comment}{                 * then devices/luns on a target, and then peripherals on a}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02902}02902 \textcolor{comment}{                 * device/lun.  The "{}other"{} way is by the peripheral driver}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02903}02903 \textcolor{comment}{                 * lists.  The peripheral driver lists are organized by}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02904}02904 \textcolor{comment}{                 * peripheral driver.  (obviously)  So it makes sense to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02905}02905 \textcolor{comment}{                 * use the peripheral driver list if the user is looking}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02906}02906 \textcolor{comment}{                 * for something like "{}da1"{}, or all "{}da"{} devices.  If the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02907}02907 \textcolor{comment}{                 * user is looking for something on a particular bus/target}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02908}02908 \textcolor{comment}{                 * or lun, it's generally better to go through the EDT tree.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02909}02909 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02910}02910 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02911}02911                 \textcolor{keywordflow}{if} (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}} != \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca99edbe9f504859683aa591a2ce573a20}{CAM\_DEV\_POS\_NONE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02912}02912                         position\_type = cdm-\/>\mbox{\hyperlink{structccb__dev__match_a08289c92a4b7a783562ce3ed8136dc69}{pos}}.\mbox{\hyperlink{structccb__dev__position_ad91d9aeb13a61c04d35e4dae646d89d5}{position\_type}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02913}02913                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02914}02914                         u\_int i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02915}02915 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02916}02916                         position\_type = \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca99edbe9f504859683aa591a2ce573a20}{CAM\_DEV\_POS\_NONE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02917}02917 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02918}02918                         \textcolor{keywordflow}{for} (i = 0; i < cdm-\/>\mbox{\hyperlink{structccb__dev__match_abcee1b49b97bbc13b242f8500fa311ac}{num\_patterns}}; i++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02919}02919                                 \textcolor{keywordflow}{if} ((cdm-\/>\mbox{\hyperlink{structccb__dev__match_ae84fb9c004ae07e669096cb0bbe4a96f}{patterns}}[i].\mbox{\hyperlink{structdev__match__pattern_a5bc287983c3535e8c61c1b5e80585cb5}{type}} == \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfa5e210e131b37614424c5d89c5c1d0ba6}{DEV\_MATCH\_BUS}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02920}02920                                  ||(cdm-\/>\mbox{\hyperlink{structccb__dev__match_ae84fb9c004ae07e669096cb0bbe4a96f}{patterns}}[i].\mbox{\hyperlink{structdev__match__pattern_a5bc287983c3535e8c61c1b5e80585cb5}{type}} == \mbox{\hyperlink{cam__ccb_8h_a467cd1728256cbdfe96078beb57901bfa580439a450044124c0131f54d56e2643}{DEV\_MATCH\_DEVICE}}))\{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02921}02921                                         position\_type = \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca6d0a284e02e74371382a3c02c9d523b2}{CAM\_DEV\_POS\_EDT}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02922}02922                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02923}02923                                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02924}02924                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02925}02925 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02926}02926                         \textcolor{keywordflow}{if} (cdm-\/>\mbox{\hyperlink{structccb__dev__match_abcee1b49b97bbc13b242f8500fa311ac}{num\_patterns}} == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02927}02927                                 position\_type = \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca6d0a284e02e74371382a3c02c9d523b2}{CAM\_DEV\_POS\_EDT}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02928}02928                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (position\_type == \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca99edbe9f504859683aa591a2ce573a20}{CAM\_DEV\_POS\_NONE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02929}02929                                 position\_type = \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca86c00457a08e41293104744830a3658b}{CAM\_DEV\_POS\_PDRV}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02930}02930                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02931}02931 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02932}02932                 \textcolor{keywordflow}{switch}(position\_type \& \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca3bfca6eb17929c425893571203b59a32}{CAM\_DEV\_POS\_TYPEMASK}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02933}02933                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca6d0a284e02e74371382a3c02c9d523b2}{CAM\_DEV\_POS\_EDT}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02934}02934                         \mbox{\hyperlink{cam__xpt_8c_a12adc843f48c1e53442b274c0fed5b31}{xptedtmatch}}(cdm);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02935}02935                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02936}02936                 \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a7cfe8257355ea5a1bc75cbca7e2420aca86c00457a08e41293104744830a3658b}{CAM\_DEV\_POS\_PDRV}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02937}02937                         \mbox{\hyperlink{cam__xpt_8c_ac35d40a501a9f80265a281b70d6ed561}{xptperiphlistmatch}}(cdm);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02938}02938                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02939}02939                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02940}02940                         cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} = \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a60033d08d16523928ac56c6e155111e9}{CAM\_DEV\_MATCH\_ERROR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02941}02941                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02942}02942                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02943}02943 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02944}02944                 \textcolor{keywordflow}{if} (cdm-\/>\mbox{\hyperlink{structccb__dev__match_a970ba736daf20b038bf92a9dec55484f}{status}} == \mbox{\hyperlink{cam__ccb_8h_a9e53358e7f8c9fb9ab1a6ddcd3b17491a60033d08d16523928ac56c6e155111e9}{CAM\_DEV\_MATCH\_ERROR}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02945}02945                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02946}02946                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02947}02947                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02948}02948 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02949}02949                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02950}02950         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02951}02951         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca721f8cc23e4415f173e15b31ed484cf2}{XPT\_SASYNC\_CB}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02952}02952         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02953}02953                 \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__setasync}{ccb\_setasync}} *csa;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02954}02954                 \textcolor{keyword}{struct }\mbox{\hyperlink{structasync__node}{async\_node}} *cur\_entry;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02955}02955                 \textcolor{keyword}{struct }async\_list *async\_head;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02956}02956                 u\_int32\_t added;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02957}02957 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02958}02958                 csa = \&start\_ccb-\/>\mbox{\hyperlink{unionccb_a5db68d756ec918c26efa7a0030e39ee6}{csa}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02959}02959                 added = csa-\/>\mbox{\hyperlink{structccb__setasync_a5228e04ae6feac2230035012bd1ae986}{event\_enable}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02960}02960                 async\_head = \&path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a9254b35826c53d78a258751e75334824}{asyncs}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02961}02961 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02962}02962                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02963}02963 \textcolor{comment}{                 * If there is already an entry for us, simply}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02964}02964 \textcolor{comment}{                 * update it.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02965}02965 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02966}02966                 cur\_entry = SLIST\_FIRST(async\_head);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02967}02967                 \textcolor{keywordflow}{while} (cur\_entry != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02968}02968                         \textcolor{keywordflow}{if} ((cur\_entry-\/>\mbox{\hyperlink{structasync__node_a0b4c09c594589adae8516a7f5d0602aa}{callback\_arg}} == csa-\/>\mbox{\hyperlink{structccb__setasync_a0a46376eb707a048d847392a0917a1cb}{callback\_arg}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02969}02969                          \&\& (cur\_entry-\/>\mbox{\hyperlink{structasync__node_a4f243a26de8cb1c99664a5c4f431c570}{callback}} == csa-\/>\mbox{\hyperlink{structccb__setasync_a8e7084ccce3c28f263877ec86cc31271}{callback}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02970}02970                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02971}02971                         cur\_entry = SLIST\_NEXT(cur\_entry, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02972}02972                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02973}02973 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02974}02974                 \textcolor{keywordflow}{if} (cur\_entry != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02975}02975                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02976}02976 \textcolor{comment}{                         * If the request has no flags set,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02977}02977 \textcolor{comment}{                         * remove the entry.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02978}02978 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02979}02979                         added \&= \string~cur\_entry-\/>event\_enable;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02980}02980                         \textcolor{keywordflow}{if} (csa-\/>\mbox{\hyperlink{structccb__setasync_a5228e04ae6feac2230035012bd1ae986}{event\_enable}} == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02981}02981                                 SLIST\_REMOVE(async\_head, cur\_entry,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02982}02982                                              \mbox{\hyperlink{structasync__node}{async\_node}}, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02983}02983                                 \mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{xpt\_release\_device}}(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02984}02984                                 free(cur\_entry, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02985}02985                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02986}02986                                 cur\_entry-\/>\mbox{\hyperlink{structasync__node_a8352093241e3702b449f76037a364aa0}{event\_enable}} = csa-\/>\mbox{\hyperlink{structccb__setasync_a5228e04ae6feac2230035012bd1ae986}{event\_enable}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02987}02987                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02988}02988                         csa-\/>\mbox{\hyperlink{structccb__setasync_a5228e04ae6feac2230035012bd1ae986}{event\_enable}} = added;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02989}02989                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02990}02990                         cur\_entry = malloc(\textcolor{keyword}{sizeof}(*cur\_entry), M\_CAMXPT,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02991}02991                                            M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02992}02992                         \textcolor{keywordflow}{if} (cur\_entry == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02993}02993                                 csa-\/>\mbox{\hyperlink{structccb__setasync_a51f1a58da3f3b8f093efb1c5d1f3310f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a5a51276e03f7dc0198831338a9ddda23}{CAM\_RESRC\_UNAVAIL}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02994}02994                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02995}02995                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02996}02996                         cur\_entry-\/>\mbox{\hyperlink{structasync__node_a8352093241e3702b449f76037a364aa0}{event\_enable}} = csa-\/>\mbox{\hyperlink{structccb__setasync_a5228e04ae6feac2230035012bd1ae986}{event\_enable}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02997}02997                         cur\_entry-\/>\mbox{\hyperlink{structasync__node_ada64f7ce93835af81a8a21f16eff2fb4}{event\_lock}} = (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a7019bfd905201eb7b0faac19c0a6645c}{mtx}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02998}02998                             mtx\_owned(path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a7019bfd905201eb7b0faac19c0a6645c}{mtx}})) ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l02999}02999                         cur\_entry-\/>\mbox{\hyperlink{structasync__node_a0b4c09c594589adae8516a7f5d0602aa}{callback\_arg}} = csa-\/>\mbox{\hyperlink{structccb__setasync_a0a46376eb707a048d847392a0917a1cb}{callback\_arg}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03000}03000                         cur\_entry-\/>\mbox{\hyperlink{structasync__node_a4f243a26de8cb1c99664a5c4f431c570}{callback}} = csa-\/>\mbox{\hyperlink{structccb__setasync_a8e7084ccce3c28f263877ec86cc31271}{callback}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03001}03001                         SLIST\_INSERT\_HEAD(async\_head, cur\_entry, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03002}03002                         \mbox{\hyperlink{cam__xpt_8c_a01bdf0561d2c7b64751461a89673df2e}{xpt\_acquire\_device}}(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03003}03003                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03004}03004                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03005}03005                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03006}03006         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03007}03007         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa82235704cd5b118816dff88c853f878}{XPT\_REL\_SIMQ}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03008}03008         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03009}03009                 \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__relsim}{ccb\_relsim}} *crs;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03010}03010                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03011}03011 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03012}03012                 crs = \&start\_ccb-\/>\mbox{\hyperlink{unionccb_a400fe31531eae294a9865e43380c2dd4}{crs}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03013}03013                 dev = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03014}03014                 \textcolor{keywordflow}{if} (dev == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03015}03015                         crs-\/>\mbox{\hyperlink{structccb__relsim_a60e6f1171486b67a1289676ed60323a9}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a45b712a5be7c3910f37757908a444e0b}{CAM\_DEV\_NOT\_THERE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03016}03016                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03017}03017                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03018}03018 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03019}03019                 \textcolor{keywordflow}{if} ((crs-\/>\mbox{\hyperlink{structccb__relsim_aa55861834a4598edae0905398ad79e04}{release\_flags}} \& \mbox{\hyperlink{cam__ccb_8h_a0e8874eb3f9170c43c922fa6546ea431}{RELSIM\_ADJUST\_OPENINGS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03020}03020                         \textcolor{comment}{/* Don't ever go below one opening */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03021}03021                         \textcolor{keywordflow}{if} (crs-\/>\mbox{\hyperlink{structccb__relsim_a6cfc4e527042fbf18804aa3148f93ef4}{openings}} > 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03022}03022                                 \mbox{\hyperlink{cam__xpt_8c_aed3014db44ac020729179ee619739084}{xpt\_dev\_ccbq\_resize}}(path, crs-\/>\mbox{\hyperlink{structccb__relsim_a6cfc4e527042fbf18804aa3148f93ef4}{openings}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03023}03023                                 \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03024}03024                                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(path,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03025}03025                                             \textcolor{stringliteral}{"{}number of openings is now \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03026}03026                                             crs-\/>\mbox{\hyperlink{structccb__relsim_a6cfc4e527042fbf18804aa3148f93ef4}{openings}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03027}03027                                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03028}03028                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03029}03029                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03030}03030 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03031}03031                 mtx\_lock(\&dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}}-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03032}03032                 \textcolor{keywordflow}{if} ((crs-\/>\mbox{\hyperlink{structccb__relsim_aa55861834a4598edae0905398ad79e04}{release\_flags}} \& \mbox{\hyperlink{cam__ccb_8h_a0407a96cfd383619ecbb3c210354d40c}{RELSIM\_RELEASE\_AFTER\_TIMEOUT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03033}03033                         \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a84bdff7b362347724ebba49af78d10cd}{CAM\_DEV\_REL\_TIMEOUT\_PENDING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03034}03034                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03035}03035 \textcolor{comment}{                                 * Just extend the old timeout and decrement}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03036}03036 \textcolor{comment}{                                 * the freeze count so that a single timeout}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03037}03037 \textcolor{comment}{                                 * is sufficient for releasing the queue.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03038}03038 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03039}03039                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \&= \string~CAM\_DEV\_QFREEZE;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03040}03040                                 callout\_stop(\&dev-\/>\mbox{\hyperlink{structcam__ed_ad5d1e1338689502438f7262ffd279a7e}{callout}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03041}03041                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03042}03042                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} |= \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a9d1d789b9d7dccd1083a984b9c22f5fb}{CAM\_DEV\_QFREEZE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03043}03043                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03044}03044 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03045}03045                         callout\_reset\_sbt(\&dev-\/>\mbox{\hyperlink{structcam__ed_ad5d1e1338689502438f7262ffd279a7e}{callout}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03046}03046                             SBT\_1MS * crs-\/>\mbox{\hyperlink{structccb__relsim_a9ee5057c69b461533b9d9362d5785a8a}{release\_timeout}}, SBT\_1MS,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03047}03047                             \mbox{\hyperlink{cam__xpt_8c_ab14bd2e082a51661171d8dd5a942433d}{xpt\_release\_devq\_timeout}}, dev, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03048}03048 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03049}03049                         dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} |= \mbox{\hyperlink{cam__xpt__internal_8h_a84bdff7b362347724ebba49af78d10cd}{CAM\_DEV\_REL\_TIMEOUT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03050}03050                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03051}03051 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03052}03052                 \textcolor{keywordflow}{if} ((crs-\/>\mbox{\hyperlink{structccb__relsim_aa55861834a4598edae0905398ad79e04}{release\_flags}} \& \mbox{\hyperlink{cam__ccb_8h_adc5d7c2a5c3b87a50a5918adf3e4c6b2}{RELSIM\_RELEASE\_AFTER\_CMDCMPLT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03053}03053                         \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a41e7fd8717b30aed3ebc5679924348fd}{CAM\_DEV\_REL\_ON\_COMPLETE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03054}03054                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03055}03055 \textcolor{comment}{                                 * Decrement the freeze count so that a single}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03056}03056 \textcolor{comment}{                                 * completion is still sufficient to unfreeze}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03057}03057 \textcolor{comment}{                                 * the queue.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03058}03058 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03059}03059                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \&= \string~CAM\_DEV\_QFREEZE;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03060}03060                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03061}03061                                 dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} |= \mbox{\hyperlink{cam__xpt__internal_8h_a41e7fd8717b30aed3ebc5679924348fd}{CAM\_DEV\_REL\_ON\_COMPLETE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03062}03062                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} |= \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a9d1d789b9d7dccd1083a984b9c22f5fb}{CAM\_DEV\_QFREEZE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03063}03063                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03064}03064                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03065}03065 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03066}03066                 \textcolor{keywordflow}{if} ((crs-\/>\mbox{\hyperlink{structccb__relsim_aa55861834a4598edae0905398ad79e04}{release\_flags}} \& \mbox{\hyperlink{cam__ccb_8h_aef41b42c864806b1c082fe3ae149c2c0}{RELSIM\_RELEASE\_AFTER\_QEMPTY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03067}03067                         \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_ae9cb5253fe2727d24d21749447861e54}{CAM\_DEV\_REL\_ON\_QUEUE\_EMPTY}}) != 0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03068}03068                          || (dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_a6a866cbf6518531b9b48c3521ca28d54}{dev\_active}} == 0)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03069}03069                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \&= \string~CAM\_DEV\_QFREEZE;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03070}03070                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03071}03071                                 dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} |= \mbox{\hyperlink{cam__xpt__internal_8h_ae9cb5253fe2727d24d21749447861e54}{CAM\_DEV\_REL\_ON\_QUEUE\_EMPTY}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03072}03072                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} |= \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a9d1d789b9d7dccd1083a984b9c22f5fb}{CAM\_DEV\_QFREEZE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03073}03073                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03074}03074                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03075}03075                 mtx\_unlock(\&dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}}-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03076}03076 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03077}03077                 \textcolor{keywordflow}{if} ((start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a9d1d789b9d7dccd1083a984b9c22f5fb}{CAM\_DEV\_QFREEZE}}) == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03078}03078                         \mbox{\hyperlink{cam__xpt_8c_aef6066745ed67b3a76eae33f691e338b}{xpt\_release\_devq}}(path, \textcolor{comment}{/*count*/}1, \textcolor{comment}{/*run\_queue*/}TRUE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03079}03079                 start\_ccb-\/>\mbox{\hyperlink{unionccb_a400fe31531eae294a9865e43380c2dd4}{crs}}.\mbox{\hyperlink{structccb__relsim_a293cc106fd8d988a327e7027cd2f5da4}{qfrozen\_cnt}} = dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03080}03080                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03081}03081                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03082}03082         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03083}03083         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca1da717b73387a659bc2e5cb7edb243d0}{XPT\_DEBUG}}: \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03084}03084                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *oldpath;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03085}03085 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03086}03086                 \textcolor{comment}{/* Check that all request bits are supported. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03087}03087                 \textcolor{keywordflow}{if} (start\_ccb-\/>\mbox{\hyperlink{unionccb_ab177487a9d54b18e3b3cefe000089cb6}{cdbg}}.\mbox{\hyperlink{structccb__debug_acf9da91662b49da96e344949cfa49e99}{flags}} \& \string~(\mbox{\hyperlink{cam__debug_8h_a9541bd34c0d7e55bbc7e31dda24235c3}{CAM\_DEBUG\_COMPILE}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03088}03088                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a926f1b895860f579351b1e714c881ad5}{CAM\_FUNC\_NOTAVAIL}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03089}03089                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03090}03090                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03091}03091 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03092}03092                 \mbox{\hyperlink{cam__xpt_8c_a730788b21146c843927c6b94532a3369}{cam\_dflags}} = \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a4ae4048d8d5898b144327d007632592c}{CAM\_DEBUG\_NONE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03093}03093                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aa56e84cf3a282c85a99d9c51a56dc9b0}{cam\_dpath}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03094}03094                         oldpath = \mbox{\hyperlink{cam__xpt_8c_aa56e84cf3a282c85a99d9c51a56dc9b0}{cam\_dpath}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03095}03095                         \mbox{\hyperlink{cam__xpt_8c_aa56e84cf3a282c85a99d9c51a56dc9b0}{cam\_dpath}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03096}03096                         \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(oldpath);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03097}03097                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03098}03098                 \textcolor{keywordflow}{if} (start\_ccb-\/>\mbox{\hyperlink{unionccb_ab177487a9d54b18e3b3cefe000089cb6}{cdbg}}.\mbox{\hyperlink{structccb__debug_acf9da91662b49da96e344949cfa49e99}{flags}} != \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a4ae4048d8d5898b144327d007632592c}{CAM\_DEBUG\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03099}03099                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(\&\mbox{\hyperlink{cam__xpt_8c_aa56e84cf3a282c85a99d9c51a56dc9b0}{cam\_dpath}}, NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03100}03100                                             start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2c528067aca740cf305d0036f5949daf}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03101}03101                                             start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03102}03102                                             start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}}) !=}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03103}03103                                             \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03104}03104                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a5a51276e03f7dc0198831338a9ddda23}{CAM\_RESRC\_UNAVAIL}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03105}03105                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03106}03106                                 \mbox{\hyperlink{cam__xpt_8c_a730788b21146c843927c6b94532a3369}{cam\_dflags}} = start\_ccb-\/>\mbox{\hyperlink{unionccb_ab177487a9d54b18e3b3cefe000089cb6}{cdbg}}.\mbox{\hyperlink{structccb__debug_acf9da91662b49da96e344949cfa49e99}{flags}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03107}03107                                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03108}03108                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{cam__xpt_8c_aa56e84cf3a282c85a99d9c51a56dc9b0}{cam\_dpath}}, \textcolor{stringliteral}{"{}debugging flags now \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03109}03109                                     \mbox{\hyperlink{cam__xpt_8c_a730788b21146c843927c6b94532a3369}{cam\_dflags}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03110}03110                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03111}03111                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03112}03112                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03113}03113                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03114}03114         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03115}03115         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca7b655443211fe21d3e0fdf4761080dfb}{XPT\_NOOP}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03116}03116                 \textcolor{keywordflow}{if} ((start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a9d1d789b9d7dccd1083a984b9c22f5fb}{CAM\_DEV\_QFREEZE}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03117}03117                         \mbox{\hyperlink{cam__xpt_8c_a2cca45a6e91cae097f1d958c315231e8}{xpt\_freeze\_devq}}(path, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03118}03118                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03119}03119                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03120}03120         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca32e69cf0064342358d6c400f55fb9434}{XPT\_REPROBE\_LUN}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03121}03121                 \mbox{\hyperlink{cam__xpt_8c_a60a033db88b93c6492304499e81774c0}{xpt\_async}}(\mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0abfdaf9e4a33c3d93914f1805bc5c3dcf}{AC\_INQ\_CHANGED}}, path, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03122}03122                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03123}03123                 \mbox{\hyperlink{cam__xpt_8c_a708fed7e2d55a1b2a180bb4462513393}{xpt\_done}}(start\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03124}03124                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03125}03125         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca359ed21ee05e6191b6100b5fbc9e17f1}{XPT\_ASYNC}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03126}03126                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03127}03127 \textcolor{comment}{                 * Queue the async operation so it can be run from a sleepable}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03128}03128 \textcolor{comment}{                 * context.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03129}03129 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03130}03130                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03131}03131                 mtx\_lock(\&\mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{cam\_async}}.\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03132}03132                 STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{cam\_async}}.cam\_doneq, \&start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}, sim\_links.stqe);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03133}03133                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} = \mbox{\hyperlink{cam_8h_a1f570e7e9c8f790c559b6b05d0b3cbb4}{CAM\_ASYNC\_INDEX}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03134}03134                 mtx\_unlock(\&\mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{cam\_async}}.\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03135}03135                 wakeup(\&\mbox{\hyperlink{cam__xpt_8c_ab0e732e6f474485cd8ba0e4450b9af90}{cam\_async}}.cam\_doneq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03136}03136                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03137}03137         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03138}03138         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae9a806ca73d695f0d70570781b3ff454}{XPT\_SDEV\_TYPE}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03139}03139         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca22d78c82cf16c42f50ea18046da1ef36}{XPT\_TERM\_IO}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03140}03140         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca4aeef46a854a08557b1a1f2290f98762}{XPT\_ENG\_INQ}}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03141}03141                 \textcolor{comment}{/* XXX Implement */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03142}03142                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03143}03143                     \textcolor{stringliteral}{"{}\%s: CCB type \%\#x \%s not supported\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03144}03144                     start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03145}03145                     \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03146}03146                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a2a1190144c9400cbdd81240bda66e6ca}{CAM\_PROVIDE\_FAIL}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03147}03147                 \textcolor{keywordflow}{if} (start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} \& \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cabe5efa04696a9e4986ae6a16ce2ff427}{XPT\_FC\_DEV\_QUEUED}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03148}03148                         \mbox{\hyperlink{cam__xpt_8c_a708fed7e2d55a1b2a180bb4462513393}{xpt\_done}}(start\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03149}03149                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03150}03150                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03151}03151         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03152}03152         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03153}03153             (\textcolor{stringliteral}{"{}xpt\_action\_default: func= \%\#x \%s status \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03154}03154                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03155}03155                 \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03156}03156                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03157}03157 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03158}03158 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03159}03159 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03160}03160 \textcolor{comment}{ * Call the sim poll routine to allow the sim to complete}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03161}03161 \textcolor{comment}{ * any inflight requests, then call camisr\_runqueue to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03162}03162 \textcolor{comment}{ * complete any CCB that the polling completed.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03163}03163 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03164}03164 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03165}\mbox{\hyperlink{cam__xpt_8c_a1c18a41f4b8e19be8ae4355078aa35fc}{03165}} \mbox{\hyperlink{cam__xpt_8c_a1c18a41f4b8e19be8ae4355078aa35fc}{xpt\_sim\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03166}03166 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03167}03167         \textcolor{keyword}{struct }mtx *mtx;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03168}03168 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03169}03169         KASSERT(\mbox{\hyperlink{cam__sim_8h_af3361015d6b660c5bf73f9164aa94311}{cam\_sim\_pollable}}(sim), (\textcolor{stringliteral}{"{}\%s: non-\/pollable sim"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03170}03170         mtx = sim-\/>\mbox{\hyperlink{structcam__sim_a7019bfd905201eb7b0faac19c0a6645c}{mtx}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03171}03171         \textcolor{keywordflow}{if} (mtx)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03172}03172                 mtx\_lock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03173}03173         (*(sim-\/>\mbox{\hyperlink{structcam__sim_a26d28cd10090a88660421f88f971ee00}{sim\_poll}}))(sim);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03174}03174         \textcolor{keywordflow}{if} (mtx)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03175}03175                 mtx\_unlock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03176}03176         \mbox{\hyperlink{cam__xpt_8c_a6a8f62bcf7ca451fd833304771418cc9}{camisr\_runqueue}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03177}03177 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03178}03178 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03179}03179 uint32\_t}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03180}\mbox{\hyperlink{cam__xpt_8c_a8b87de03aa3ce1af0886d89e30465e78}{03180}} \mbox{\hyperlink{cam__xpt_8c_a8b87de03aa3ce1af0886d89e30465e78}{xpt\_poll\_setup}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *start\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03181}03181 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03182}03182         u\_int32\_t timeout;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03183}03183         \textcolor{keyword}{struct    }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03184}03184         \textcolor{keyword}{struct    }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03185}03185         \textcolor{keyword}{struct    }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03186}03186 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03187}03187         timeout = start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_aafcc3aaf269bd00196097aa9ef85dd9b}{timeout}} * 10;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03188}03188         \mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}} = start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03189}03189         devq = \mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03190}03190         dev = start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03191}03191 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03192}03192         KASSERT(\mbox{\hyperlink{cam__sim_8h_af3361015d6b660c5bf73f9164aa94311}{cam\_sim\_pollable}}(\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}), (\textcolor{stringliteral}{"{}\%s: non-\/pollable sim"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03193}03193 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03194}03194         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03195}03195 \textcolor{comment}{         * Steal an opening so that no other queued requests}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03196}03196 \textcolor{comment}{         * can get it before us while we simulate interrupts.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03197}03197 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03198}03198         mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03199}03199         dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_aef5404cb1fa8ad1c4ec40ad883c2b47c}{dev\_openings}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03200}03200         \textcolor{keywordflow}{while}((devq-\/>\mbox{\hyperlink{structcam__devq_ae19320f9ccbf7d70b80e7bb05c0c5434}{send\_openings}} <= 0 || dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_aef5404cb1fa8ad1c4ec40ad883c2b47c}{dev\_openings}} < 0) \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03201}03201             (-\/-\/timeout > 0)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03202}03202                 mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03203}03203                 DELAY(100);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03204}03204                 \mbox{\hyperlink{cam__xpt_8c_a1c18a41f4b8e19be8ae4355078aa35fc}{xpt\_sim\_poll}}(\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03205}03205                 mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03206}03206         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03207}03207         dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_aef5404cb1fa8ad1c4ec40ad883c2b47c}{dev\_openings}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03208}03208         mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03209}03209 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03210}03210         \textcolor{keywordflow}{return} (timeout);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03211}03211 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03212}03212 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03213}03213 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03214}\mbox{\hyperlink{cam__xpt_8c_a3581d47dd830b753554fd0b94de1d7ba}{03214}} \mbox{\hyperlink{cam__xpt_8c_a3581d47dd830b753554fd0b94de1d7ba}{xpt\_pollwait}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *start\_ccb, uint32\_t timeout)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03215}03215 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03216}03216 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03217}03217         KASSERT(\mbox{\hyperlink{cam__sim_8h_af3361015d6b660c5bf73f9164aa94311}{cam\_sim\_pollable}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03218}03218             (\textcolor{stringliteral}{"{}\%s: non-\/pollable sim"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03219}03219         \textcolor{keywordflow}{while} (-\/-\/timeout > 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03220}03220                 \mbox{\hyperlink{cam__xpt_8c_a1c18a41f4b8e19be8ae4355078aa35fc}{xpt\_sim\_poll}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03221}03221                 \textcolor{keywordflow}{if} ((start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03222}03222                     != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a167c9bce81d6e65c16734d3e0d59fe24}{CAM\_REQ\_INPROG}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03223}03223                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03224}03224                 DELAY(100);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03225}03225         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03226}03226 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03227}03227         \textcolor{keywordflow}{if} (timeout == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03228}03228                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03229}03229 \textcolor{comment}{                 * XXX Is it worth adding a sim\_timeout entry}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03230}03230 \textcolor{comment}{                 * point so we can attempt recovery?  If}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03231}03231 \textcolor{comment}{                 * this is only used for dumps, I don't think}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03232}03232 \textcolor{comment}{                 * it is.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03233}03233 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03234}03234                 start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a515f15cec219130718fd7eafc4a1fbea}{CAM\_CMD\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03235}03235         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03236}03236 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03237}03237 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03238}03238 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03239}03239 \textcolor{comment}{ * Schedule a peripheral driver to receive a ccb when its}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03240}03240 \textcolor{comment}{ * target device has space for more transactions.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03241}03241 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03242}03242 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03243}\mbox{\hyperlink{cam__xpt_8c_a26e646d0732b4acab4667d28f24d026e}{03243}} \mbox{\hyperlink{cam__xpt_8c_a26e646d0732b4acab4667d28f24d026e}{xpt\_schedule}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, u\_int32\_t new\_priority)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03244}03244 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03245}03245 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03246}03246         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xpt\_schedule\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03247}03247         \mbox{\hyperlink{cam__periph_8h_a14a9062a3b53e1d1a2570a39695c2cd3}{cam\_periph\_assert}}(periph, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03248}03248         \textcolor{keywordflow}{if} (new\_priority < periph-\/>scheduled\_priority) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03249}03249                 periph-\/>\mbox{\hyperlink{structcam__periph_a8ea7f7f26af5a006b76a25b4d12a1c9a}{scheduled\_priority}} = new\_priority;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03250}03250                 \mbox{\hyperlink{cam__xpt_8c_a62dd0eb558b49674efbc5c50982ee25d}{xpt\_run\_allocq}}(periph, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03251}03251         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03252}03252 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03253}03253 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03254}03254 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03255}03255 \textcolor{comment}{ * Schedule a device to run on a given queue.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03256}03256 \textcolor{comment}{ * If the device was inserted as a new entry on the queue,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03257}03257 \textcolor{comment}{ * return 1 meaning the device queue should be run. If we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03258}03258 \textcolor{comment}{ * were already queued, implying someone else has already}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03259}03259 \textcolor{comment}{ * started the queue, return 0 so the caller doesn't attempt}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03260}03260 \textcolor{comment}{ * to run the queue.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03261}03261 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03262}03262 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03263}\mbox{\hyperlink{cam__xpt_8c_a5ed672de38e444d6b435cd427c102f91}{03263}} \mbox{\hyperlink{cam__xpt_8c_a5ed672de38e444d6b435cd427c102f91}{xpt\_schedule\_dev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcamq}{camq}} *queue, \mbox{\hyperlink{structcam__pinfo}{cam\_pinfo}} *pinfo,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03264}03264                  u\_int32\_t new\_priority)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03265}03265 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03266}03266         \textcolor{keywordtype}{int} retval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03267}03267         u\_int32\_t old\_priority;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03268}03268 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03269}03269         \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}}, (\textcolor{stringliteral}{"{}xpt\_schedule\_dev\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03270}03270 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03271}03271         old\_priority = pinfo-\/>\mbox{\hyperlink{structcam__pinfo_a006313c394eb385f8f4aa130f6a9d213}{priority}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03272}03272 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03273}03273         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03274}03274 \textcolor{comment}{         * Are we already queued?}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03275}03275 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03276}03276         \textcolor{keywordflow}{if} (pinfo-\/>\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} != \mbox{\hyperlink{cam_8h_a7af58dadfb8e09c223ffed09239f787b}{CAM\_UNQUEUED\_INDEX}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03277}03277                 \textcolor{comment}{/* Simply reorder based on new priority */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03278}03278                 \textcolor{keywordflow}{if} (new\_priority < old\_priority) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03279}03279                         \mbox{\hyperlink{cam__queue_8c_a6b98d9c94a02db39efb2460dad15af8f}{camq\_change\_priority}}(queue, pinfo-\/>\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03280}03280                                              new\_priority);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03281}03281                         \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03282}03282                                         (\textcolor{stringliteral}{"{}changed priority to \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03283}03283                                          new\_priority));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03284}03284                         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03285}03285                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03286}03286                         retval = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03287}03287         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03288}03288                 \textcolor{comment}{/* New entry on the queue */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03289}03289                 \textcolor{keywordflow}{if} (new\_priority < old\_priority)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03290}03290                         pinfo-\/>\mbox{\hyperlink{structcam__pinfo_a006313c394eb385f8f4aa130f6a9d213}{priority}} = new\_priority;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03291}03291 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03292}03292                 \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03293}03293                                 (\textcolor{stringliteral}{"{}Inserting onto queue\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03294}03294                 pinfo-\/>\mbox{\hyperlink{structcam__pinfo_a1e769219f43e7a79790aa0f1a7059c0f}{generation}} = ++queue-\/>\mbox{\hyperlink{structcamq_af9b6ac7f8a88cf49b2eee4fb889001fd}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03295}03295                 \mbox{\hyperlink{cam__queue_8c_a8ca07f8eba8e6dfcb814bb756a58942b}{camq\_insert}}(queue, pinfo);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03296}03296                 retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03297}03297         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03298}03298         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03299}03299 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03300}03300 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03301}03301 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03302}\mbox{\hyperlink{cam__xpt_8c_aec3a47b3c27335f54ff319748b7e8b24}{03302}} \mbox{\hyperlink{cam__xpt_8c_aec3a47b3c27335f54ff319748b7e8b24}{xpt\_run\_allocq\_task}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03303}03303 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03304}03304         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph = context;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03305}03305 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03306}03306         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03307}03307         periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} \&= \string~CAM\_PERIPH\_RUN\_TASK;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03308}03308         \mbox{\hyperlink{cam__xpt_8c_a62dd0eb558b49674efbc5c50982ee25d}{xpt\_run\_allocq}}(periph, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03309}03309         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03310}03310         \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03311}03311 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03312}03312 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03313}03313 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03314}\mbox{\hyperlink{cam__xpt_8c_a62dd0eb558b49674efbc5c50982ee25d}{03314}} \mbox{\hyperlink{cam__xpt_8c_a62dd0eb558b49674efbc5c50982ee25d}{xpt\_run\_allocq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int} sleep)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03315}03315 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03316}03316         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}}     *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03317}03317         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}}    *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03318}03318         uint32\_t         prio;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03319}03319 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03320}03320         \mbox{\hyperlink{cam__periph_8h_a14a9062a3b53e1d1a2570a39695c2cd3}{cam\_periph\_assert}}(periph, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03321}03321         \textcolor{keywordflow}{if} (periph-\/>\mbox{\hyperlink{structcam__periph_a1dc3d4a8bac867c6bd63834192d6102a}{periph\_allocating}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03322}03322                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03323}03323         \mbox{\hyperlink{cam__periph_8c_a65b22efc50fe81b25c61979986a32d50}{cam\_periph\_doacquire}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03324}03324         periph-\/>\mbox{\hyperlink{structcam__periph_a1dc3d4a8bac867c6bd63834192d6102a}{periph\_allocating}} = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03325}03325         \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}}, (\textcolor{stringliteral}{"{}xpt\_run\_allocq(\%p)\(\backslash\)n"{}}, periph));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03326}03326         device = periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03327}03327         \mbox{\hyperlink{unionccb}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03328}03328 restart:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03329}03329         \textcolor{keywordflow}{while} ((prio = min(periph-\/>\mbox{\hyperlink{structcam__periph_a8ea7f7f26af5a006b76a25b4d12a1c9a}{scheduled\_priority}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03330}03330             periph-\/>\mbox{\hyperlink{structcam__periph_ad46a22ba760d05d1922da2f566953c98}{immediate\_priority}})) != \mbox{\hyperlink{cam_8h_a4ea5a74a977c69b243128395749ac8e8}{CAM\_PRIORITY\_NONE}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03331}03331             (periph-\/>\mbox{\hyperlink{structcam__periph_ad7993682f9d53a1cd5209a5f4f8e0b42}{periph\_allocated}} -\/ (\mbox{\hyperlink{unionccb}{ccb}} != NULL ? 1 : 0) <}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03332}03332              device-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_a4f1703a5d89b449ce27b84ea4ef57dfd}{total\_openings}} || prio <= \mbox{\hyperlink{cam_8h_a06ee701833c385cfaf9e6dfcc57012ae}{CAM\_PRIORITY\_OOB}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03333}03333                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}} == NULL \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03334}03334                     (\mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__xpt_8c_a908eabd359e578d0146206824c00aa88}{xpt\_get\_ccb\_nowait}}(periph)) == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03335}03335                         \textcolor{keywordflow}{if} (sleep) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03336}03336                                 \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__xpt_8c_a87352808310f71c4abe047d15f51705a}{xpt\_get\_ccb}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03337}03337                                 \textcolor{keywordflow}{goto} restart;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03338}03338                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03339}03339                         \textcolor{keywordflow}{if} (periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} \& \mbox{\hyperlink{cam__periph_8h_ab3c9b8345d409c297ed58a731d47abbb}{CAM\_PERIPH\_RUN\_TASK}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03340}03340                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03341}03341                         \mbox{\hyperlink{cam__periph_8c_a65b22efc50fe81b25c61979986a32d50}{cam\_periph\_doacquire}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03342}03342                         periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} |= \mbox{\hyperlink{cam__periph_8h_ab3c9b8345d409c297ed58a731d47abbb}{CAM\_PERIPH\_RUN\_TASK}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03343}03343                         taskqueue\_enqueue(\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_taskq,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03344}03344                             \&periph-\/>\mbox{\hyperlink{structcam__periph_ab88b432b38f4cf28952c389e48171e01}{periph\_run\_task}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03345}03345                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03346}03346                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03347}03347                 \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}, periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, prio);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03348}03348                 \textcolor{keywordflow}{if} (prio == periph-\/>\mbox{\hyperlink{structcam__periph_ad46a22ba760d05d1922da2f566953c98}{immediate\_priority}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03349}03349                         periph-\/>\mbox{\hyperlink{structcam__periph_ad46a22ba760d05d1922da2f566953c98}{immediate\_priority}} = \mbox{\hyperlink{cam_8h_a4ea5a74a977c69b243128395749ac8e8}{CAM\_PRIORITY\_NONE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03350}03350                         \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03351}03351                                         (\textcolor{stringliteral}{"{}waking cam\_periph\_getccb()\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03352}03352                         SLIST\_INSERT\_HEAD(\&periph-\/>ccb\_list, \&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03353}03353                                           periph\_links.sle);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03354}03354                         wakeup(\&periph-\/>ccb\_list);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03355}03355                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03356}03356                         periph-\/>\mbox{\hyperlink{structcam__periph_a8ea7f7f26af5a006b76a25b4d12a1c9a}{scheduled\_priority}} = \mbox{\hyperlink{cam_8h_a4ea5a74a977c69b243128395749ac8e8}{CAM\_PRIORITY\_NONE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03357}03357                         \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03358}03358                                         (\textcolor{stringliteral}{"{}calling periph\_start()\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03359}03359                         periph-\/>\mbox{\hyperlink{structcam__periph_a0083e759c07220fcbada314db0dee3d4}{periph\_start}}(periph, \mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03360}03360                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03361}03361                 \mbox{\hyperlink{unionccb}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03362}03362         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03363}03363         \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03364}03364                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03365}03365         periph-\/>\mbox{\hyperlink{structcam__periph_a1dc3d4a8bac867c6bd63834192d6102a}{periph\_allocating}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03366}03366         \mbox{\hyperlink{cam__periph_8c_a06741cfe8f484a9dad6f9607a233908c}{cam\_periph\_release\_locked}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03367}03367 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03368}03368 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03369}03369 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03370}\mbox{\hyperlink{cam__xpt_8c_ab05d0a25c05fe9822eb4f60f903bf8bd}{03370}} \mbox{\hyperlink{cam__xpt_8c_ab05d0a25c05fe9822eb4f60f903bf8bd}{xpt\_run\_devq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03371}03371 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03372}03372         \textcolor{keyword}{struct }mtx *mtx;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03373}03373 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03374}03374         \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}}, (\textcolor{stringliteral}{"{}xpt\_run\_devq\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03375}03375 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03376}03376         devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03377}03377         \textcolor{keywordflow}{while} ((devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_aa6838891d6293a8697c3e15381835335}{entries}} > 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03378}03378             \&\& (devq-\/>\mbox{\hyperlink{structcam__devq_ae19320f9ccbf7d70b80e7bb05c0c5434}{send\_openings}} > 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03379}03379             \&\& (devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} <= 1)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03380}03380                 \textcolor{keyword}{struct  }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03381}03381                 \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *work\_ccb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03382}03382                 \textcolor{keyword}{struct  }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03383}03383                 \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__proto}{xpt\_proto}} *\mbox{\hyperlink{structxpt__proto_ac96093118d15deb30c681db7bb9307b7}{proto}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03384}03384 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03385}03385                 device = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *)\mbox{\hyperlink{cam__queue_8c_aceb69b00a057e05d894e44710436d9ba}{camq\_remove}}(\&devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03386}03386                                                            \mbox{\hyperlink{cam__queue_8h_a5cd5d725581af342b2f29d7d3905dc35}{CAMQ\_HEAD}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03387}03387                 \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03388}03388                                 (\textcolor{stringliteral}{"{}running device \%p\(\backslash\)n"{}}, device));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03389}03389 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03390}03390                 work\_ccb = \mbox{\hyperlink{cam__queue_8h_a88b04101c1b336d3159fe5f9dd2d9167}{cam\_ccbq\_peek\_ccb}}(\&device-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}, \mbox{\hyperlink{cam__queue_8h_a5cd5d725581af342b2f29d7d3905dc35}{CAMQ\_HEAD}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03391}03391                 \textcolor{keywordflow}{if} (work\_ccb == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03392}03392                         printf(\textcolor{stringliteral}{"{}device on run queue with no ccbs???\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03393}03393                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03394}03394                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03395}03395 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03396}03396                 \textcolor{keywordflow}{if} ((work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676aadfc92940078c684fb70f753954fa8f0}{CAM\_HIGH\_POWER}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03397}03397                         mtx\_lock(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{xpt\_highpower\_lock}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03398}03398                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.num\_highpower <= 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03399}03399                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03400}03400 \textcolor{comment}{                                 * We got a high power command, but we}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03401}03401 \textcolor{comment}{                                 * don't have any available slots.  Freeze}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03402}03402 \textcolor{comment}{                                 * the device queue until we have a slot}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03403}03403 \textcolor{comment}{                                 * available.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03404}03404 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03405}03405                                 \mbox{\hyperlink{cam__xpt_8c_afaa5f8e162dc0a7ef6d0be2d892ec9e1}{xpt\_freeze\_devq\_device}}(device, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03406}03406                                 STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.highpowerq, device,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03407}03407                                                    highpowerq\_entry);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03408}03408 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03409}03409                                 mtx\_unlock(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{xpt\_highpower\_lock}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03410}03410                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03411}03411                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03412}03412                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03413}03413 \textcolor{comment}{                                 * Consume a high power slot while}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03414}03414 \textcolor{comment}{                                 * this ccb runs.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03415}03415 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03416}03416                                 \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.num\_highpower-\/-\/;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03417}03417                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03418}03418                         mtx\_unlock(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{xpt\_highpower\_lock}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03419}03419                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03420}03420                 \mbox{\hyperlink{cam__queue_8h_ac81587eab84a0dbc03fed74ee9ab9598}{cam\_ccbq\_remove\_ccb}}(\&device-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}, work\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03421}03421                 \mbox{\hyperlink{cam__queue_8h_a8bad2c4c44090a886d9cc6f4a1ca99fc}{cam\_ccbq\_send\_ccb}}(\&device-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}, work\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03422}03422                 devq-\/>\mbox{\hyperlink{structcam__devq_ae19320f9ccbf7d70b80e7bb05c0c5434}{send\_openings}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03423}03423                 devq-\/>\mbox{\hyperlink{structcam__devq_a55994dd1e1bc3d195ac101d00c73821a}{send\_active}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03424}03424                 \mbox{\hyperlink{cam__xpt_8c_a7148ea52669591ad852374d50345f34c}{xpt\_schedule\_devq}}(devq, device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03425}03425                 mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03426}03426 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03427}03427                 \textcolor{keywordflow}{if} ((work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a9d1d789b9d7dccd1083a984b9c22f5fb}{CAM\_DEV\_QFREEZE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03428}03428                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03429}03429 \textcolor{comment}{                         * The client wants to freeze the queue}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03430}03430 \textcolor{comment}{                         * after this CCB is sent.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03431}03431 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03432}03432                         \mbox{\hyperlink{cam__xpt_8c_a2cca45a6e91cae097f1d958c315231e8}{xpt\_freeze\_devq}}(work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03433}03433                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03434}03434 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03435}03435                 \textcolor{comment}{/* In Target mode, the peripheral driver knows best... */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03436}03436                 \textcolor{keywordflow}{if} (work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} == \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca426a17499239f5751c747d094b4998dc}{XPT\_SCSI\_IO}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03437}03437                         \textcolor{keywordflow}{if} ((device-\/>\mbox{\hyperlink{structcam__ed_a72233078c6c53a614e242b55ae7a4f25}{inq\_flags}} \& \mbox{\hyperlink{scsi__all_8h_a2654353ac4dfee5fb1a94d06703a6921}{SID\_CmdQue}}) != 0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03438}03438                          \&\& work\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a574f17912e1a64938eebd868dbcc6554}{tag\_action}} != \mbox{\hyperlink{cam__ccb_8h_abc2846e666533f8bd438f0306ca7f2f9}{CAM\_TAG\_ACTION\_NONE}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03439}03439                                 work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} |= \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676ae002094f08598aaeaab3a8f7a69a7ca0}{CAM\_TAG\_ACTION\_VALID}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03440}03440                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03441}03441                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03442}03442 \textcolor{comment}{                                 * Clear this in case of a retried CCB that}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03443}03443 \textcolor{comment}{                                 * failed due to a rejected tag.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03444}03444 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03445}03445                                 work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \&= \string~CAM\_TAG\_ACTION\_VALID;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03446}03446                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03447}03447 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03448}03448                 KASSERT(device == work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03449}03449                     (\textcolor{stringliteral}{"{}device (\%p) / path-\/>device (\%p) mismatch"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03450}03450                         device, work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03451}03451                 proto = \mbox{\hyperlink{cam__xpt_8c_a35cb4d3a19c528cea29e080862738060}{xpt\_proto\_find}}(device-\/>\mbox{\hyperlink{structcam__ed_ac6da2e04833b965e68d91bcdd13e94c5}{protocol}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03452}03452                 \textcolor{keywordflow}{if} (proto \&\& proto-\/>\mbox{\hyperlink{structxpt__proto_a4d72f57574dbd6253c4819d51d32c3d9}{ops}}-\/>\mbox{\hyperlink{structxpt__proto__ops_a9f3ed72abb7add54ee9941f0697a93b3}{debug\_out}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03453}03453                         proto-\/>\mbox{\hyperlink{structxpt__proto_a4d72f57574dbd6253c4819d51d32c3d9}{ops}}-\/>\mbox{\hyperlink{structxpt__proto__ops_a9f3ed72abb7add54ee9941f0697a93b3}{debug\_out}}(work\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03454}03454 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03455}03455                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03456}03456 \textcolor{comment}{                 * Device queues can be shared among multiple SIM instances}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03457}03457 \textcolor{comment}{                 * that reside on different buses.  Use the SIM from the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03458}03458 \textcolor{comment}{                 * queued device, rather than the one from the calling bus.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03459}03459 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03460}03460                 \mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}} = device-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03461}03461                 mtx = \mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a7019bfd905201eb7b0faac19c0a6645c}{mtx}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03462}03462                 \textcolor{keywordflow}{if} (mtx \&\& !mtx\_owned(mtx))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03463}03463                         mtx\_lock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03464}03464                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03465}03465                         mtx = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03466}03466                 work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afd61d847dcabc1fbd30a99853e7d5852}{qos}}.\mbox{\hyperlink{structccb__qos__area_a2fc719c6f5aeb7e9f19f73143be94096}{periph\_data}} = \mbox{\hyperlink{cam__iosched_8h_a93c8403a771dc76811f4fd4d3886fbfe}{cam\_iosched\_now}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03467}03467                 (*(\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ac729513edd6aef72fa747e62390fc57f}{sim\_action}}))(\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}, work\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03468}03468                 \textcolor{keywordflow}{if} (mtx)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03469}03469                         mtx\_unlock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03470}03470                 mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03471}03471         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03472}03472         devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03473}03473 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03474}03474 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03475}03475 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03476}03476 \textcolor{comment}{ * This function merges stuff from the src ccb into the dst ccb, while keeping}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03477}03477 \textcolor{comment}{ * important fields in the dst ccb constant.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03478}03478 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03479}03479 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03480}\mbox{\hyperlink{cam__xpt_8c_a2772fa9dc3a53c92f75d3e9ba876f4bd}{03480}} \mbox{\hyperlink{cam__xpt_8c_a2772fa9dc3a53c92f75d3e9ba876f4bd}{xpt\_merge\_ccb}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *dst\_ccb, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *src\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03481}03481 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03482}03482 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03483}03483         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03484}03484 \textcolor{comment}{         * Pull fields that are valid for peripheral drivers to set}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03485}03485 \textcolor{comment}{         * into the dst CCB along with the CCB "{}payload"{}.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03486}03486 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03487}03487         dst\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_af69c58b4653ec0977d4ccfe89e30cfad}{retry\_count}} = src\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_af69c58b4653ec0977d4ccfe89e30cfad}{retry\_count}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03488}03488         dst\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = src\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03489}03489         dst\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_aafcc3aaf269bd00196097aa9ef85dd9b}{timeout}} = src\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_aafcc3aaf269bd00196097aa9ef85dd9b}{timeout}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03490}03490         dst\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} = src\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03491}03491         bcopy(\&(\&src\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}})[1], \&(\&dst\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}})[1],}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03492}03492               \textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}}) -\/ \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03493}03493 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03494}03494 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03495}03495 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03496}\mbox{\hyperlink{cam__xpt_8c_a2fcc1e3d58a6832c8a20a8f92401596b}{03496}} \mbox{\hyperlink{cam__xpt_8c_a2fcc1e3d58a6832c8a20a8f92401596b}{xpt\_setup\_ccb\_flags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *ccb\_h, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03497}03497                     u\_int32\_t priority, u\_int32\_t \mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03498}03498 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03499}03499 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03500}03500         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xpt\_setup\_ccb\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03501}03501         ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a006313c394eb385f8f4aa130f6a9d213}{priority}} = priority;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03502}03502         ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}} = path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03503}03503         ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a2c528067aca740cf305d0036f5949daf}{path\_id}} = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03504}03504         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03505}03505                 ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}} = path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03506}03506         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03507}03507                 ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}} = \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03508}03508         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03509}03509                 ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}} = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03510}03510                 ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a1e769219f43e7a79790aa0f1a7059c0f}{generation}} = ++path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_af9b6ac7f8a88cf49b2eee4fb889001fd}{generation}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03511}03511         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03512}03512                 ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}} = \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03513}03513         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03514}03514         ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} = \mbox{\hyperlink{cam_8h_a7af58dadfb8e09c223ffed09239f787b}{CAM\_UNQUEUED\_INDEX}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03515}03515         ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} = \mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03516}03516         ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a241600abd33d248a5dc841623817e630}{xflags}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03517}03517 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03518}03518 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03519}03519 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03520}\mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{03520}} \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *ccb\_h, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, u\_int32\_t priority)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03521}03521 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03522}03522         \mbox{\hyperlink{cam__xpt_8c_a2fcc1e3d58a6832c8a20a8f92401596b}{xpt\_setup\_ccb\_flags}}(ccb\_h, path, priority, \textcolor{comment}{/*flags*/} 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03523}03523 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03524}03524 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03525}03525 \textcolor{comment}{/* Path manipulation functions */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03526}03526 \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03527}\mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{03527}} \mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} **new\_path\_ptr, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *perph,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03528}03528                 \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} path\_id, \mbox{\hyperlink{cam_8h_af420b02e4c824e79ca80f8910b8e3a8f}{target\_id\_t}} target\_id, \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}} \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03529}03529 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03530}03530         \textcolor{keyword}{struct     }\mbox{\hyperlink{structcam__path}{cam\_path}} *path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03531}03531         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03532}03532 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03533}03533         path = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *)malloc(\textcolor{keyword}{sizeof}(*path), M\_CAMPATH, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03534}03534 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03535}03535         \textcolor{keywordflow}{if} (path == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03536}03536                 status = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a5a51276e03f7dc0198831338a9ddda23}{CAM\_RESRC\_UNAVAIL}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03537}03537                 \textcolor{keywordflow}{return}(status);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03538}03538         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03539}03539         status = \mbox{\hyperlink{cam__xpt_8c_ab88c6214d184761e24916fc4b5a87e6b}{xpt\_compile\_path}}(path, perph, path\_id, target\_id, lun\_id);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03540}03540         \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03541}03541                 free(path, M\_CAMPATH);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03542}03542                 path = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03543}03543         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03544}03544         *new\_path\_ptr = path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03545}03545         \textcolor{keywordflow}{return} (status);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03546}03546 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03547}03547 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03548}03548 \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03549}\mbox{\hyperlink{cam__xpt_8c_af4189442f7773a4931a68c8003e3fccb}{03549}} \mbox{\hyperlink{cam__xpt_8c_af4189442f7773a4931a68c8003e3fccb}{xpt\_create\_path\_unlocked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} **new\_path\_ptr,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03550}03550                          \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}, \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} path\_id,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03551}03551                          \mbox{\hyperlink{cam_8h_af420b02e4c824e79ca80f8910b8e3a8f}{target\_id\_t}} target\_id, \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}} lun\_id)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03552}03552 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03553}03553 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03554}03554         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(new\_path\_ptr, \mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}, path\_id, target\_id,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03555}03555             lun\_id));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03556}03556 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03557}03557 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03558}03558 \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03559}\mbox{\hyperlink{cam__xpt_8c_ab88c6214d184761e24916fc4b5a87e6b}{03559}} \mbox{\hyperlink{cam__xpt_8c_ab88c6214d184761e24916fc4b5a87e6b}{xpt\_compile\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *new\_path, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *perph,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03560}03560                  \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} path\_id, \mbox{\hyperlink{cam_8h_af420b02e4c824e79ca80f8910b8e3a8f}{target\_id\_t}} target\_id, \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}} lun\_id)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03561}03561 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03562}03562         \textcolor{keyword}{struct       }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03563}03563         \textcolor{keyword}{struct       }\mbox{\hyperlink{structcam__et}{cam\_et}} *target;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03564}03564         \textcolor{keyword}{struct       }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03565}03565         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}}   status;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03566}03566 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03567}03567         status = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};        \textcolor{comment}{/* Completed without error */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03568}03568         \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}} = NULL;            \textcolor{comment}{/* Wildcarded */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03569}03569         device = NULL;          \textcolor{comment}{/* Wildcarded */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03570}03570 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03571}03571         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03572}03572 \textcolor{comment}{         * We will potentially modify the EDT, so block interrupts}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03573}03573 \textcolor{comment}{         * that may attempt to create cam paths.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03574}03574 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03575}03575         bus = \mbox{\hyperlink{cam__xpt_8c_aadfcd79ce730e041b28a179f5296a75c}{xpt\_find\_bus}}(path\_id);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03576}03576         \textcolor{keywordflow}{if} (bus == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03577}03577                 status = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a049a0f56abedbe534f743e40c2df6b1e}{CAM\_PATH\_INVALID}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03578}03578         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03579}03579                 \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03580}03580                 mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03581}03581                 \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}} = \mbox{\hyperlink{cam__xpt_8c_afbab80f711435b3e0333daca06c674b4}{xpt\_find\_target}}(bus, target\_id);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03582}03582                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03583}03583                         \textcolor{comment}{/* Create one */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03584}03584                         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *new\_target;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03585}03585 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03586}03586                         new\_target = \mbox{\hyperlink{cam__xpt_8c_abe6202b8b7567c20f5e546c12e400935}{xpt\_alloc\_target}}(\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}, \mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03587}03587                         \textcolor{keywordflow}{if} (new\_target == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03588}03588                                 status = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a5a51276e03f7dc0198831338a9ddda23}{CAM\_RESRC\_UNAVAIL}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03589}03589                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03590}03590                                 target = new\_target;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03591}03591                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03592}03592                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03593}03593                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03594}03594                 \textcolor{keywordflow}{if} (target != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03595}03595                         device = \mbox{\hyperlink{cam__xpt_8c_a2cec196d96ce138d2f17712be8e8df94}{xpt\_find\_device}}(target, lun\_id);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03596}03596                         \textcolor{keywordflow}{if} (device == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03597}03597                                 \textcolor{comment}{/* Create one */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03598}03598                                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *new\_device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03599}03599 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03600}03600                                 new\_device =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03601}03601                                     (*(bus-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}}-\/>\mbox{\hyperlink{structxpt__xport_ac9deaad7cb0ff7eb57943fdc975e4c09}{ops}}-\/>\mbox{\hyperlink{structxpt__xport__ops_a98acc113c6109e80e39205f6f780b0ae}{alloc\_device}}))(bus,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03602}03602                                                                        \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03603}03603                                                                        \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03604}03604                                 \textcolor{keywordflow}{if} (new\_device == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03605}03605                                         status = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a5a51276e03f7dc0198831338a9ddda23}{CAM\_RESRC\_UNAVAIL}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03606}03606                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03607}03607                                         device = new\_device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03608}03608                                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03609}03609                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03610}03610                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03611}03611                 mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03612}03612         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03613}03613 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03614}03614         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03615}03615 \textcolor{comment}{         * Only touch the user's data if we are successful.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03616}03616 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03617}03617         \textcolor{keywordflow}{if} (status == \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03618}03618                 new\_path-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}} = perph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03619}03619                 new\_path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} = bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03620}03620                 new\_path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} = \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03621}03621                 new\_path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} = device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03622}03622                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(new\_path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xpt\_compile\_path\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03623}03623         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03624}03624                 \textcolor{keywordflow}{if} (device != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03625}03625                         \mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{xpt\_release\_device}}(device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03626}03626                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03627}03627                         \mbox{\hyperlink{cam__xpt_8c_aeb7a0a03a36fb04f959a5e4127bd539d}{xpt\_release\_target}}(\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03628}03628                 \textcolor{keywordflow}{if} (bus != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03629}03629                         \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03630}03630         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03631}03631         \textcolor{keywordflow}{return} (status);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03632}03632 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03633}03633 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03634}03634 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03635}\mbox{\hyperlink{cam__xpt_8c_ad3a9d391428d6a71f5f45af894971a43}{03635}} \mbox{\hyperlink{cam__xpt_8c_ad3a9d391428d6a71f5f45af894971a43}{xpt\_clone\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} **new\_path\_ptr, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03636}03636 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03637}03637         \textcolor{keyword}{struct     }\mbox{\hyperlink{structcam__path}{cam\_path}} *new\_path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03638}03638 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03639}03639         new\_path = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *)malloc(\textcolor{keyword}{sizeof}(*path), M\_CAMPATH, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03640}03640         \textcolor{keywordflow}{if} (new\_path == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03641}03641                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03642}03642         *new\_path = *path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03643}03643         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03644}03644                 \mbox{\hyperlink{cam__xpt_8c_a8730eabc5880108cc4d4327b7bc31c32}{xpt\_acquire\_bus}}(path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03645}03645         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03646}03646                 \mbox{\hyperlink{cam__xpt_8c_a3bc0f3fb9501e89310c749ade53142e5}{xpt\_acquire\_target}}(path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03647}03647         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03648}03648                 \mbox{\hyperlink{cam__xpt_8c_a01bdf0561d2c7b64751461a89673df2e}{xpt\_acquire\_device}}(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03649}03649         *new\_path\_ptr = new\_path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03650}03650         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03651}03651 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03652}03652 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03653}03653 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03654}\mbox{\hyperlink{cam__xpt_8c_a476dec2258dea421cff81f71541f347a}{03654}} \mbox{\hyperlink{cam__xpt_8c_a476dec2258dea421cff81f71541f347a}{xpt\_release\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03655}03655 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03656}03656         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xpt\_release\_path\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03657}03657         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03658}03658                 \mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{xpt\_release\_device}}(path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03659}03659                 path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03660}03660         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03661}03661         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03662}03662                 \mbox{\hyperlink{cam__xpt_8c_aeb7a0a03a36fb04f959a5e4127bd539d}{xpt\_release\_target}}(path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03663}03663                 path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03664}03664         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03665}03665         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03666}03666                 \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03667}03667                 path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03668}03668         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03669}03669 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03670}03670 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03671}03671 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03672}\mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{03672}} \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03673}03673 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03674}03674 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03675}03675         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xpt\_free\_path\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03676}03676         \mbox{\hyperlink{cam__xpt_8c_a476dec2258dea421cff81f71541f347a}{xpt\_release\_path}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03677}03677         free(path, M\_CAMPATH);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03678}03678 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03679}03679 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03680}03680 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03681}\mbox{\hyperlink{cam__xpt_8c_af7641a77ee5c109d44cb437c783a9b22}{03681}} \mbox{\hyperlink{cam__xpt_8c_af7641a77ee5c109d44cb437c783a9b22}{xpt\_path\_counts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, uint32\_t *bus\_ref,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03682}03682     uint32\_t *periph\_ref, uint32\_t *target\_ref, uint32\_t *device\_ref)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03683}03683 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03684}03684 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03685}03685         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03686}03686         \textcolor{keywordflow}{if} (bus\_ref) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03687}03687                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03688}03688                         *bus\_ref = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03689}03689                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03690}03690                         *bus\_ref = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03691}03691         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03692}03692         \textcolor{keywordflow}{if} (periph\_ref) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03693}03693                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03694}03694                         *periph\_ref = path-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a323850650392068aa6c35db83df2599e}{refcount}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03695}03695                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03696}03696                         *periph\_ref = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03697}03697         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03698}03698         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03699}03699         \textcolor{keywordflow}{if} (target\_ref) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03700}03700                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03701}03701                         *target\_ref = path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03702}03702                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03703}03703                         *target\_ref = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03704}03704         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03705}03705         \textcolor{keywordflow}{if} (device\_ref) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03706}03706                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03707}03707                         *device\_ref = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_afcbcee5cd61c742e161ff61bd7353a49}{refcount}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03708}03708                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03709}03709                         *device\_ref = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03710}03710         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03711}03711 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03712}03712 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03713}03713 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03714}03714 \textcolor{comment}{ * Return -\/1 for failure, 0 for exact match, 1 for match with wildcards}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03715}03715 \textcolor{comment}{ * in path1, 2 for match with wildcards in path2.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03716}03716 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03717}03717 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03718}\mbox{\hyperlink{cam__xpt_8c_a55d1a450c018a473cee8dfb0370688b4}{03718}} \mbox{\hyperlink{cam__xpt_8c_a55d1a450c018a473cee8dfb0370688b4}{xpt\_path\_comp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path1, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path2)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03719}03719 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03720}03720         \textcolor{keywordtype}{int} retval = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03721}03721 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03722}03722         \textcolor{keywordflow}{if} (path1-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} != path2-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03723}03723                 \textcolor{keywordflow}{if} (path1-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} == \mbox{\hyperlink{cam_8h_ab5f5f926ac019231720aaa2d64c99957}{CAM\_BUS\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03724}03724                         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03725}03725                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (path2-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} == \mbox{\hyperlink{cam_8h_ab5f5f926ac019231720aaa2d64c99957}{CAM\_BUS\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03726}03726                         retval = 2;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03727}03727                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03728}03728                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03729}03729         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03730}03730         \textcolor{keywordflow}{if} (path1-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} != path2-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03731}03731                 \textcolor{keywordflow}{if} (path1-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} == \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03732}03732                         \textcolor{keywordflow}{if} (retval == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03733}03733                                 retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03734}03734                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (path2-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} == \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03735}03735                         retval = 2;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03736}03736                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03737}03737                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03738}03738         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03739}03739         \textcolor{keywordflow}{if} (path1-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != path2-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03740}03740                 \textcolor{keywordflow}{if} (path1-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03741}03741                         \textcolor{keywordflow}{if} (retval == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03742}03742                                 retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03743}03743                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (path2-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03744}03744                         retval = 2;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03745}03745                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03746}03746                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03747}03747         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03748}03748         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03749}03749 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03750}03750 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03751}03751 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03752}\mbox{\hyperlink{cam__xpt_8c_a15dc6f4e1a78f94f252d25f34c877873}{03752}} \mbox{\hyperlink{cam__xpt_8c_a15dc6f4e1a78f94f252d25f34c877873}{xpt\_path\_comp\_dev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03753}03753 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03754}03754         \textcolor{keywordtype}{int} retval = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03755}03755 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03756}03756         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} != dev-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03757}03757                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} == \mbox{\hyperlink{cam_8h_ab5f5f926ac019231720aaa2d64c99957}{CAM\_BUS\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03758}03758                         retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03759}03759                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (dev-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} == \mbox{\hyperlink{cam_8h_ab5f5f926ac019231720aaa2d64c99957}{CAM\_BUS\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03760}03760                         retval = 2;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03761}03761                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03762}03762                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03763}03763         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03764}03764         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} != dev-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03765}03765                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} == \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03766}03766                         \textcolor{keywordflow}{if} (retval == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03767}03767                                 retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03768}03768                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (dev-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} == \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03769}03769                         retval = 2;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03770}03770                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03771}03771                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03772}03772         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03773}03773         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != dev) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03774}03774                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03775}03775                         \textcolor{keywordflow}{if} (retval == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03776}03776                                 retval = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03777}03777                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (dev-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03778}03778                         retval = 2;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03779}03779                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03780}03780                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03781}03781         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03782}03782         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03783}03783 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03784}03784 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03785}03785 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03786}\mbox{\hyperlink{cam__xpt_8c_a1de517aa78d2b98ed9ff46a85f31d54e}{03786}} \mbox{\hyperlink{cam__xpt_8c_a1de517aa78d2b98ed9ff46a85f31d54e}{xpt\_print\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03787}03787 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03788}03788         \textcolor{keyword}{struct }sbuf sb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03789}03789         \textcolor{keywordtype}{char} buffer[\mbox{\hyperlink{cam__xpt_8c_a39eb5b34690f92a6c03fed430163abbf}{XPT\_PRINT\_LEN}}];}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03790}03790 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03791}03791         sbuf\_new(\&sb, buffer, \mbox{\hyperlink{cam__xpt_8c_a39eb5b34690f92a6c03fed430163abbf}{XPT\_PRINT\_LEN}}, SBUF\_FIXEDLEN);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03792}03792         \mbox{\hyperlink{cam__xpt_8c_ab6816fa790bca1f94027204f12f4e3e7}{xpt\_path\_sbuf}}(path, \&sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03793}03793         sbuf\_finish(\&sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03794}03794         printf(\textcolor{stringliteral}{"{}\%s"{}}, sbuf\_data(\&sb));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03795}03795         sbuf\_delete(\&sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03796}03796 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03797}03797 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03798}03798 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03799}\mbox{\hyperlink{cam__xpt_8c_a9ef4101339107ea338a0d070876cf19a}{03799}} \mbox{\hyperlink{cam__xpt_8c_a9ef4101339107ea338a0d070876cf19a}{xpt\_print\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03800}03800 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03801}03801 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03802}03802         \textcolor{keywordflow}{if} (device == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03803}03803                 printf(\textcolor{stringliteral}{"{}(nopath): "{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03804}03804         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03805}03805                 printf(\textcolor{stringliteral}{"{}(noperiph:\%s\%d:\%d:\%d:\%jx): "{}}, device-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03806}03806                        device-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03807}03807                        device-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03808}03808                        device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03809}03809                        (uintmax\_t)device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03810}03810         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03811}03811 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03812}03812 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03813}03813 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03814}\mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{03814}} \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *fmt, ...)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03815}03815 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03816}03816         va\_list ap;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03817}03817         \textcolor{keyword}{struct }sbuf sb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03818}03818         \textcolor{keywordtype}{char} buffer[\mbox{\hyperlink{cam__xpt_8c_a39eb5b34690f92a6c03fed430163abbf}{XPT\_PRINT\_LEN}}];}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03819}03819 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03820}03820         sbuf\_new(\&sb, buffer, \mbox{\hyperlink{cam__xpt_8c_a39eb5b34690f92a6c03fed430163abbf}{XPT\_PRINT\_LEN}}, SBUF\_FIXEDLEN);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03821}03821 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03822}03822         \mbox{\hyperlink{cam__xpt_8c_ab6816fa790bca1f94027204f12f4e3e7}{xpt\_path\_sbuf}}(path, \&sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03823}03823         va\_start(ap, fmt);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03824}03824         sbuf\_vprintf(\&sb, fmt, ap);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03825}03825         va\_end(ap);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03826}03826 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03827}03827         sbuf\_finish(\&sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03828}03828         printf(\textcolor{stringliteral}{"{}\%s"{}}, sbuf\_data(\&sb));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03829}03829         sbuf\_delete(\&sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03830}03830 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03831}03831 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03832}03832 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03833}\mbox{\hyperlink{cam__xpt_8c_a2554466ccd1d9f2b6028c22308198ad9}{03833}} \mbox{\hyperlink{cam__xpt_8c_a2554466ccd1d9f2b6028c22308198ad9}{xpt\_path\_string}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keywordtype}{char} *str, \textcolor{keywordtype}{size\_t} str\_len)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03834}03834 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03835}03835         \textcolor{keyword}{struct }sbuf sb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03836}03836         \textcolor{keywordtype}{int} len;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03837}03837 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03838}03838         sbuf\_new(\&sb, str, str\_len, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03839}03839         len = \mbox{\hyperlink{cam__xpt_8c_ab6816fa790bca1f94027204f12f4e3e7}{xpt\_path\_sbuf}}(path, \&sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03840}03840         sbuf\_finish(\&sb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03841}03841         \textcolor{keywordflow}{return} (len);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03842}03842 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03843}03843 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03844}03844 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03845}\mbox{\hyperlink{cam__xpt_8c_ab6816fa790bca1f94027204f12f4e3e7}{03845}} \mbox{\hyperlink{cam__xpt_8c_ab6816fa790bca1f94027204f12f4e3e7}{xpt\_path\_sbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keyword}{struct} sbuf *sb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03846}03846 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03847}03847 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03848}03848         \textcolor{keywordflow}{if} (path == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03849}03849                 sbuf\_printf(sb, \textcolor{stringliteral}{"{}(nopath): "{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03850}03850         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03851}03851                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03852}03852                         sbuf\_printf(sb, \textcolor{stringliteral}{"{}(\%s\%d:"{}}, path-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03853}03853                                     path-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03854}03854                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03855}03855                         sbuf\_printf(sb, \textcolor{stringliteral}{"{}(noperiph:"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03856}03856 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03857}03857                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03858}03858                         sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%s\%d:\%d:"{}}, path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03859}03859                                     path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03860}03860                                     path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03861}03861                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03862}03862                         sbuf\_printf(sb, \textcolor{stringliteral}{"{}nobus:"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03863}03863 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03864}03864                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03865}03865                         sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%d:"{}}, path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03866}03866                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03867}03867                         sbuf\_printf(sb, \textcolor{stringliteral}{"{}X:"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03868}03868 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03869}03869                 \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03870}03870                         sbuf\_printf(sb, \textcolor{stringliteral}{"{}\%jx): "{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03871}03871                             (uintmax\_t)path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03872}03872                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03873}03873                         sbuf\_printf(sb, \textcolor{stringliteral}{"{}X): "{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03874}03874         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03875}03875 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03876}03876         \textcolor{keywordflow}{return}(sbuf\_len(sb));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03877}03877 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03878}03878 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03879}03879 \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03880}\mbox{\hyperlink{cam__xpt_8c_a59f0b7004d3c0cf8257a979c8bee69c7}{03880}} \mbox{\hyperlink{cam__xpt_8c_a59f0b7004d3c0cf8257a979c8bee69c7}{xpt\_path\_path\_id}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03881}03881 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03882}03882         \textcolor{keywordflow}{return}(path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03883}03883 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03884}03884 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03885}03885 \mbox{\hyperlink{cam_8h_af420b02e4c824e79ca80f8910b8e3a8f}{target\_id\_t}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03886}\mbox{\hyperlink{cam__xpt_8c_ade6ece3b1f31f60097eb81397bdd80df}{03886}} \mbox{\hyperlink{cam__xpt_8c_ade6ece3b1f31f60097eb81397bdd80df}{xpt\_path\_target\_id}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03887}03887 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03888}03888         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03889}03889                 \textcolor{keywordflow}{return} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03890}03890         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03891}03891                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03892}03892 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03893}03893 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03894}03894 \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03895}\mbox{\hyperlink{cam__xpt_8c_a8e1d3e8605e605c38025b24dbb62e145}{03895}} \mbox{\hyperlink{cam__xpt_8c_a8e1d3e8605e605c38025b24dbb62e145}{xpt\_path\_lun\_id}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03896}03896 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03897}03897         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03898}03898                 \textcolor{keywordflow}{return} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03899}03899         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03900}03900                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03901}03901 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03902}03902 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03903}03903 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03904}\mbox{\hyperlink{cam__xpt_8c_a9c489a3c42cb061c08fe0dbdaf61fc00}{03904}} \mbox{\hyperlink{cam__xpt_8c_a9c489a3c42cb061c08fe0dbdaf61fc00}{xpt\_path\_sim}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03905}03905 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03906}03906 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03907}03907         \textcolor{keywordflow}{return} (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03908}03908 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03909}03909 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03910}03910 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}}*}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03911}\mbox{\hyperlink{cam__xpt_8c_ac6ef509a45ba9a35eb670cd9c9ea9bc7}{03911}} \mbox{\hyperlink{cam__xpt_8c_ac6ef509a45ba9a35eb670cd9c9ea9bc7}{xpt\_path\_periph}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03912}03912 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03913}03913 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03914}03914         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03915}03915 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03916}03916 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03917}03917 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03918}03918 \textcolor{comment}{ * Release a CAM control block for the caller.  Remit the cost of the structure}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03919}03919 \textcolor{comment}{ * to the device referenced by the path.  If the this device had no 'credits'}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03920}03920 \textcolor{comment}{ * and peripheral drivers have registered async callbacks for this notification}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03921}03921 \textcolor{comment}{ * call them now.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03922}03922 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03923}03923 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03924}\mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{03924}} \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *free\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03925}03925 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03926}03926         \textcolor{keyword}{struct   }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03927}03927         \textcolor{keyword}{struct   }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03928}03928 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03929}03929         \mbox{\hyperlink{cam__debug_8h_afbbedaa6c92361400cc040358d047175}{CAM\_DEBUG\_PRINT}}(\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369ad56f355a3c3844d8ee703de154de86d5}{CAM\_DEBUG\_XPT}}, (\textcolor{stringliteral}{"{}xpt\_release\_ccb\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03930}03930         \mbox{\hyperlink{cam__xpt_8h_aa54087e85f491e70bff540b8b7d3cc1d}{xpt\_path\_assert}}(free\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03931}03931         device = free\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03932}03932         periph = free\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03933}03933 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03934}03934         \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(free\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03935}03935         periph-\/>\mbox{\hyperlink{structcam__periph_ad7993682f9d53a1cd5209a5f4f8e0b42}{periph\_allocated}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03936}03936         \mbox{\hyperlink{cam__queue_8h_aa5ba24545e74d7d96695981141068ef2}{cam\_ccbq\_release\_opening}}(\&device-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03937}03937         \mbox{\hyperlink{cam__xpt_8c_a62dd0eb558b49674efbc5c50982ee25d}{xpt\_run\_allocq}}(periph, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03938}03938 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03939}03939 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03940}03940 \textcolor{comment}{/* Functions accessed by SIM drivers */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03941}03941 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03942}\mbox{\hyperlink{cam__xpt_8c_a61ec5acc70db896decacf45167750dd1}{03942}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__xport__ops}{xpt\_xport\_ops}} \mbox{\hyperlink{cam__xpt_8c_a61ec5acc70db896decacf45167750dd1}{xport\_default\_ops}} = \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03943}03943         .\mbox{\hyperlink{structxpt__xport__ops_a98acc113c6109e80e39205f6f780b0ae}{alloc\_device}} = \mbox{\hyperlink{cam__xpt_8c_a3b6a29f143e4da0d07173d14ac816071}{xpt\_alloc\_device\_default}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03944}03944         .action = \mbox{\hyperlink{cam__xpt_8c_aa2dfec3d7dc6484408b51af5c19a9e13}{xpt\_action\_default}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03945}03945         .async = \mbox{\hyperlink{cam__xpt_8c_a144baa89ca8e7625910e3850643d426a}{xpt\_dev\_async\_default}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03946}03946 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03947}\mbox{\hyperlink{cam__xpt_8c_ab5a8043fee0738b4964ff3acedb70336}{03947}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__xport}{xpt\_xport}} \mbox{\hyperlink{cam__xpt_8c_ab5a8043fee0738b4964ff3acedb70336}{xport\_default}} = \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03948}03948         .\mbox{\hyperlink{structxpt__xport_a88eb18f2b285fac4bd08b7a008aca30a}{xport}} = \mbox{\hyperlink{cam__ccb_8h_a724bbd85a7f871ac9067f5ee489192fea9429f86c844a58a72125a916ef5f023a}{XPORT\_UNKNOWN}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03949}03949         .name = \textcolor{stringliteral}{"{}unknown"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03950}03950         .ops = \&\mbox{\hyperlink{cam__xpt_8c_a61ec5acc70db896decacf45167750dd1}{xport\_default\_ops}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03951}03951 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03952}03952 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03953}\mbox{\hyperlink{cam__xpt_8c_a1fd2a20c871696f68eeac70488fe96c7}{03953}} \mbox{\hyperlink{cam__xpt_8c_a1fd2a20c871696f68eeac70488fe96c7}{CAM\_XPT\_XPORT}}(\mbox{\hyperlink{cam__xpt_8c_ab5a8043fee0738b4964ff3acedb70336}{xport\_default}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03954}03954 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03955}03955 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03956}03956 \textcolor{comment}{ * A sim structure, listing the SIM entry points and instance}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03957}03957 \textcolor{comment}{ * identification info is passed to xpt\_bus\_register to hook the SIM}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03958}03958 \textcolor{comment}{ * into the CAM framework.  xpt\_bus\_register creates a cam\_eb entry}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03959}03959 \textcolor{comment}{ * for this new bus and places it in the array of buses and assigns}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03960}03960 \textcolor{comment}{ * it a path\_id.  The path\_id may be influenced by "{}hard wiring"{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03961}03961 \textcolor{comment}{ * information specified by the user.  Once interrupt services are}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03962}03962 \textcolor{comment}{ * available, the bus will be probed.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03963}03963 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03964}03964 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03965}\mbox{\hyperlink{cam__xpt_8c_ab01de6f5ed666604469e45c8c2998752}{03965}} \mbox{\hyperlink{cam__xpt_8c_ab01de6f5ed666604469e45c8c2998752}{xpt\_bus\_register}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim, device\_t parent, uint32\_t bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03966}03966 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03967}03967         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *new\_bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03968}03968         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *old\_bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03969}03969         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__pathinq}{ccb\_pathinq}} cpi;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03970}03970         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03971}03971         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03972}03972 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03973}03973         sim-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}} = \mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03974}03974         new\_bus = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *)malloc(\textcolor{keyword}{sizeof}(*new\_bus),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03975}03975                                           M\_CAMXPT, M\_NOWAIT|M\_ZERO);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03976}03976         \textcolor{keywordflow}{if} (new\_bus == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03977}03977                 \textcolor{comment}{/* Couldn't satisfy request */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03978}03978                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03979}03979         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03980}03980 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03981}03981         mtx\_init(\&new\_bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}}, \textcolor{stringliteral}{"{}CAM bus lock"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03982}03982         TAILQ\_INIT(\&new\_bus-\/>et\_entries);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03983}03983         \mbox{\hyperlink{cam__sim_8c_aae6227389ce7ad7082d7351e8b46ffa1}{cam\_sim\_hold}}(\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03984}03984         new\_bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}} = \mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03985}03985         timevalclear(\&new\_bus-\/>\mbox{\hyperlink{structcam__eb_a05b90f0e17165a87df3aebfce4c2bc55}{last\_reset}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03986}03986         new\_bus-\/>\mbox{\hyperlink{structcam__eb_ab050ba12a1628bf07aca698a5d9b289c}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03987}03987         new\_bus-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}} = 1;  \textcolor{comment}{/* Held until a bus\_deregister event */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03988}03988         new\_bus-\/>\mbox{\hyperlink{structcam__eb_a40650834f3f2b8fcd317b6730f708eff}{generation}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03989}03989         new\_bus-\/>\mbox{\hyperlink{structcam__eb_a6c371283eee2c1b8139f2fb3e630cda4}{parent\_dev}} = parent;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03990}03990 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03991}03991         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03992}03992         \mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a4bf10caf7885ac8832c4821de670159a}{path\_id}} = new\_bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} =}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03993}03993             \mbox{\hyperlink{cam__xpt_8c_a821f8ceab894fba06883b1704d731516}{xptpathid}}(\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}}, \mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}}, \mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03994}03994         old\_bus = TAILQ\_FIRST(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_busses);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03995}03995         \textcolor{keywordflow}{while} (old\_bus != NULL}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03996}03996             \&\& old\_bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} < new\_bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03997}03997                 old\_bus = TAILQ\_NEXT(old\_bus, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03998}03998         \textcolor{keywordflow}{if} (old\_bus != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l03999}03999                 TAILQ\_INSERT\_BEFORE(old\_bus, new\_bus, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04000}04000         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04001}04001                 TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_busses, new\_bus, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04002}04002         \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.bus\_generation++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04003}04003         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04004}04004 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04005}04005         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04006}04006 \textcolor{comment}{         * Set a default transport so that a PATH\_INQ can be issued to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04007}04007 \textcolor{comment}{         * the SIM.  This will then allow for probing and attaching of}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04008}04008 \textcolor{comment}{         * a more appropriate transport.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04009}04009 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04010}04010         new\_bus-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}} = \&\mbox{\hyperlink{cam__xpt_8c_ab5a8043fee0738b4964ff3acedb70336}{xport\_default}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04011}04011 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04012}04012         status = \mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(\&path, \textcolor{comment}{/*periph*/}NULL, \mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a4bf10caf7885ac8832c4821de670159a}{path\_id}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04013}04013                                   \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}}, \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04014}04014         \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04015}04015                 \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(new\_bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04016}04016                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04017}04017         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04018}04018 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04019}04019         \mbox{\hyperlink{cam__xpt_8h_ae111c3fbe95a53d1bdb2f112d86b929b}{xpt\_path\_inq}}(\&cpi, path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04020}04020 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04021}04021         \textcolor{keywordflow}{if} (cpi.\mbox{\hyperlink{structccb__pathinq_a9e4ef19d9e427247f68ee45ea48a93d2}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} == \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04022}04022                 \textcolor{keyword}{struct }\mbox{\hyperlink{structxpt__xport}{xpt\_xport}} **xpt;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04023}04023 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04024}04024                 SET\_FOREACH(xpt, cam\_xpt\_xport\_set) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04025}04025                         \textcolor{keywordflow}{if} ((*xpt)-\/>xport == cpi.\mbox{\hyperlink{structccb__pathinq_aaef7c0420017996140ae4bdede6a8152}{transport}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04026}04026                                 new\_bus-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}} = *xpt;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04027}04027                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04028}04028                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04029}04029                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04030}04030                 \textcolor{keywordflow}{if} (new\_bus-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04031}04031                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(path,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04032}04032                             \textcolor{stringliteral}{"{}No transport found for \%d\(\backslash\)n"{}}, cpi.\mbox{\hyperlink{structccb__pathinq_aaef7c0420017996140ae4bdede6a8152}{transport}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04033}04033                         \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(new\_bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04034}04034                         free(path, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04035}04035                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04036}04036                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04037}04037         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04038}04038 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04039}04039         \textcolor{comment}{/* Notify interested parties */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04040}04040         \textcolor{keywordflow}{if} (sim-\/>\mbox{\hyperlink{structcam__sim_a4bf10caf7885ac8832c4821de670159a}{path\_id}} != \mbox{\hyperlink{cam_8h_a1c5915081b16a0ed18a2a287e4992c13}{CAM\_XPT\_PATH\_ID}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04041}04041                 \mbox{\hyperlink{cam__xpt_8c_a60a033db88b93c6492304499e81774c0}{xpt\_async}}(\mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a929293d03108ae612b5f980b87deccb4}{AC\_PATH\_REGISTERED}}, path, \&cpi);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04042}04042                 \textcolor{keywordflow}{if} ((cpi.\mbox{\hyperlink{structccb__pathinq_a7b48ff4ce816b541a1c06a92bf0a4447}{hba\_misc}} \& \mbox{\hyperlink{cam__ccb_8h_a3c8f3fa68445478749d5dd7dcb4b014ea1b6256f063ffc870d9439d0b5bc43e17}{PIM\_NOSCAN}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04043}04043                         \textcolor{keyword}{union   }\mbox{\hyperlink{unionccb}{ccb}} *scan\_ccb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04044}04044 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04045}04045                         \textcolor{comment}{/* Initiate bus rescan. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04046}04046                         scan\_ccb = \mbox{\hyperlink{cam__xpt_8c_a9de65e290bb5d0c78183237169d6f8dd}{xpt\_alloc\_ccb\_nowait}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04047}04047                         \textcolor{keywordflow}{if} (scan\_ccb != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04048}04048                                 scan\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}} = path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04049}04049                                 scan\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca606ac2c0939d2858df5aef0e73c617c6}{XPT\_SCAN\_BUS}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04050}04050                                 scan\_ccb-\/>\mbox{\hyperlink{unionccb_aed03766d497ec7301e6741fa7fb11337}{crcn}}.\mbox{\hyperlink{structccb__rescan_a4be279ca6b7db9b43a9cd2528142e067}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04051}04051                                 \mbox{\hyperlink{cam__xpt_8c_a44ae64d5b5cc896268ac6b55f016b290}{xpt\_rescan}}(scan\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04052}04052                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04053}04053                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(path,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04054}04054                                           \textcolor{stringliteral}{"{}Can't allocate CCB to scan bus\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04055}04055                                 \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04056}04056                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04057}04057                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04058}04058                         \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04059}04059         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04060}04060                 \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04061}04061         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__ccb_8h_ab43e093b1ef15ad52763cde93572b5c4}{CAM\_SUCCESS}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04062}04062 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04063}04063 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04064}04064 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04065}\mbox{\hyperlink{cam__xpt_8c_a018ce6c39171a67eb71a63a507797f48}{04065}} \mbox{\hyperlink{cam__xpt_8c_a018ce6c39171a67eb71a63a507797f48}{xpt\_bus\_deregister}}(\mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} pathid)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04066}04066 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04067}04067         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} bus\_path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04068}04068         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04069}04069 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04070}04070         status = \mbox{\hyperlink{cam__xpt_8c_ab88c6214d184761e24916fc4b5a87e6b}{xpt\_compile\_path}}(\&bus\_path, NULL, pathid,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04071}04071                                   \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}}, \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04072}04072         \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04073}04073                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04074}04074 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04075}04075         \mbox{\hyperlink{cam__xpt_8c_a60a033db88b93c6492304499e81774c0}{xpt\_async}}(\mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0ac3008f99f93ca1448f9c8705b1653da5}{AC\_LOST\_DEVICE}}, \&bus\_path, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04076}04076         \mbox{\hyperlink{cam__xpt_8c_a60a033db88b93c6492304499e81774c0}{xpt\_async}}(\mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a3e8a29ba4ae3cdcc52cbe8fddad780b2}{AC\_PATH\_DEREGISTERED}}, \&bus\_path, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04077}04077 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04078}04078         \textcolor{comment}{/* Release the reference count held while registered. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04079}04079         \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(bus\_path.\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04080}04080         \mbox{\hyperlink{cam__xpt_8c_a476dec2258dea421cff81f71541f347a}{xpt\_release\_path}}(\&bus\_path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04081}04081 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04082}04082         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__ccb_8h_ab43e093b1ef15ad52763cde93572b5c4}{CAM\_SUCCESS}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04083}04083 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04084}04084 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04085}04085 \textcolor{keyword}{static} \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04086}\mbox{\hyperlink{cam__xpt_8c_afbb7b6ec78e59598ffbe23e6a406c757}{04086}} \mbox{\hyperlink{cam__xpt_8c_afbb7b6ec78e59598ffbe23e6a406c757}{xptnextfreepathid}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04087}04087 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04088}04088         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04089}04089         \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} pathid;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04090}04090         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *strval;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04091}04091 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04092}04092         mtx\_assert(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_topo\_lock, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04093}04093         pathid = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04094}04094         bus = TAILQ\_FIRST(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_busses);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04095}04095 retry:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04096}04096         \textcolor{comment}{/* Find an unoccupied pathid */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04097}04097         \textcolor{keywordflow}{while} (bus != NULL \&\& bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} <= pathid) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04098}04098                 \textcolor{keywordflow}{if} (bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} == pathid)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04099}04099                         pathid++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04100}04100                 bus = TAILQ\_NEXT(bus, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04101}04101         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04102}04102 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04103}04103         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04104}04104 \textcolor{comment}{         * Ensure that this pathid is not reserved for}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04105}04105 \textcolor{comment}{         * a bus that may be registered in the future.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04106}04106 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04107}04107         \textcolor{keywordflow}{if} (resource\_string\_value(\textcolor{stringliteral}{"{}scbus"{}}, pathid, \textcolor{stringliteral}{"{}at"{}}, \&strval) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04108}04108                 ++pathid;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04109}04109                 \textcolor{comment}{/* Start the search over */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04110}04110                 \textcolor{keywordflow}{goto} retry;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04111}04111         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04112}04112         \textcolor{keywordflow}{return} (pathid);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04113}04113 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04114}04114 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04115}04115 \textcolor{keyword}{static} \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04116}\mbox{\hyperlink{cam__xpt_8c_a821f8ceab894fba06883b1704d731516}{04116}} \mbox{\hyperlink{cam__xpt_8c_a821f8ceab894fba06883b1704d731516}{xptpathid}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *sim\_name, \textcolor{keywordtype}{int} sim\_unit, \textcolor{keywordtype}{int} sim\_bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04117}04117 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04118}04118         \mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} pathid;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04119}04119         \textcolor{keywordtype}{int} i, dunit, val;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04120}04120         \textcolor{keywordtype}{char} buf[32];}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04121}04121         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *dname;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04122}04122 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04123}04123         pathid = \mbox{\hyperlink{cam_8h_a1c5915081b16a0ed18a2a287e4992c13}{CAM\_XPT\_PATH\_ID}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04124}04124         snprintf(buf, \textcolor{keyword}{sizeof}(buf), \textcolor{stringliteral}{"{}\%s\%d"{}}, sim\_name, sim\_unit);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04125}04125         \textcolor{keywordflow}{if} (strcmp(buf, \textcolor{stringliteral}{"{}xpt0"{}}) == 0 \&\& sim\_bus == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04126}04126                 \textcolor{keywordflow}{return} (pathid);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04127}04127         i = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04128}04128         \textcolor{keywordflow}{while} ((resource\_find\_match(\&i, \&dname, \&dunit, \textcolor{stringliteral}{"{}at"{}}, buf)) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04129}04129                 \textcolor{keywordflow}{if} (strcmp(dname, \textcolor{stringliteral}{"{}scbus"{}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04130}04130                         \textcolor{comment}{/* Avoid a bit of foot shooting. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04131}04131                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04132}04132                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04133}04133                 \textcolor{keywordflow}{if} (dunit < 0)          \textcolor{comment}{/* unwired?! */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04134}04134                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04135}04135                 \textcolor{keywordflow}{if} (resource\_int\_value(\textcolor{stringliteral}{"{}scbus"{}}, dunit, \textcolor{stringliteral}{"{}bus"{}}, \&val) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04136}04136                         \textcolor{keywordflow}{if} (sim\_bus == val) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04137}04137                                 pathid = dunit;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04138}04138                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04139}04139                         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04140}04140                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sim\_bus == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04141}04141                         \textcolor{comment}{/* Unspecified matches bus 0 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04142}04142                         pathid = dunit;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04143}04143                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04144}04144                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04145}04145                         printf(\textcolor{stringliteral}{"{}Ambiguous scbus configuration for \%s\%d "{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04146}04146                                \textcolor{stringliteral}{"{}bus \%d, cannot wire down.  The kernel "{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04147}04147                                \textcolor{stringliteral}{"{}config entry for scbus\%d should "{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04148}04148                                \textcolor{stringliteral}{"{}specify a controller bus.\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04149}04149                                \textcolor{stringliteral}{"{}Scbus will be assigned dynamically.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04150}04150                                sim\_name, sim\_unit, sim\_bus, dunit);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04151}04151                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04152}04152                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04153}04153         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04154}04154 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04155}04155         \textcolor{keywordflow}{if} (pathid == \mbox{\hyperlink{cam_8h_a1c5915081b16a0ed18a2a287e4992c13}{CAM\_XPT\_PATH\_ID}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04156}04156                 pathid = \mbox{\hyperlink{cam__xpt_8c_afbb7b6ec78e59598ffbe23e6a406c757}{xptnextfreepathid}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04157}04157         \textcolor{keywordflow}{return} (pathid);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04158}04158 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04159}04159 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04160}04160 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04161}\mbox{\hyperlink{cam__xpt_8c_a1ec732da4ba2bb73b9d520a956f4ab7c}{04161}} \mbox{\hyperlink{cam__xpt_8c_a1ec732da4ba2bb73b9d520a956f4ab7c}{xpt\_async\_string}}(u\_int32\_t async\_code)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04162}04162 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04163}04163 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04164}04164         \textcolor{keywordflow}{switch} (async\_code) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04165}04165         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a562d924fbe74236d4f5403ef2fdbb94d}{AC\_BUS\_RESET}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_BUS\_RESET"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04166}04166         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a2fc5ca9e14182e33a2c69f4437863bcd}{AC\_UNSOL\_RESEL}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_UNSOL\_RESEL"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04167}04167         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a487d6f53126270a2a88518e79defa424}{AC\_SCSI\_AEN}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_SCSI\_AEN"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04168}04168         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0adf2dfbe2cd14380823c3b1e7544021e8}{AC\_SENT\_BDR}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_SENT\_BDR"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04169}04169         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a929293d03108ae612b5f980b87deccb4}{AC\_PATH\_REGISTERED}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_PATH\_REGISTERED"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04170}04170         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a3e8a29ba4ae3cdcc52cbe8fddad780b2}{AC\_PATH\_DEREGISTERED}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_PATH\_DEREGISTERED"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04171}04171         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a04183843e65dd16d378d105270a6debd}{AC\_FOUND\_DEVICE}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_FOUND\_DEVICE"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04172}04172         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0ac3008f99f93ca1448f9c8705b1653da5}{AC\_LOST\_DEVICE}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_LOST\_DEVICE"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04173}04173         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0abe66bf24e4b7ce1e26e6e096b22d9a4f}{AC\_TRANSFER\_NEG}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_TRANSFER\_NEG"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04174}04174         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0abfdaf9e4a33c3d93914f1805bc5c3dcf}{AC\_INQ\_CHANGED}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_INQ\_CHANGED"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04175}04175         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a761c3deb864c8b47c8123ee11a113df6}{AC\_GETDEV\_CHANGED}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_GETDEV\_CHANGED"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04176}04176         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a34ae5ae6dac5011e838e327180e27511}{AC\_CONTRACT}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_CONTRACT"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04177}04177         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a036a366f13e05e75d85915311d7acaf4}{AC\_ADVINFO\_CHANGED}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_ADVINFO\_CHANGED"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04178}04178         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a879e789f2f929720e248fbc5c6d5f930}{AC\_UNIT\_ATTENTION}}: \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_UNIT\_ATTENTION"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04179}04179         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04180}04180         \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AC\_UNKNOWN"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04181}04181 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04182}04182 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04183}04183 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04184}\mbox{\hyperlink{cam__xpt_8c_ae14afd24972e5bafb21b547c2958a12b}{04184}} \mbox{\hyperlink{cam__xpt_8c_ae14afd24972e5bafb21b547c2958a12b}{xpt\_async\_size}}(u\_int32\_t async\_code)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04185}04185 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04186}04186 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04187}04187         \textcolor{keywordflow}{switch} (async\_code) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04188}04188         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a562d924fbe74236d4f5403ef2fdbb94d}{AC\_BUS\_RESET}}: \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04189}04189         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a2fc5ca9e14182e33a2c69f4437863bcd}{AC\_UNSOL\_RESEL}}: \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04190}04190         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a487d6f53126270a2a88518e79defa424}{AC\_SCSI\_AEN}}: \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04191}04191         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0adf2dfbe2cd14380823c3b1e7544021e8}{AC\_SENT\_BDR}}: \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04192}04192         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a929293d03108ae612b5f980b87deccb4}{AC\_PATH\_REGISTERED}}: \textcolor{keywordflow}{return} (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__pathinq}{ccb\_pathinq}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04193}04193         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a3e8a29ba4ae3cdcc52cbe8fddad780b2}{AC\_PATH\_DEREGISTERED}}: \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04194}04194         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a04183843e65dd16d378d105270a6debd}{AC\_FOUND\_DEVICE}}: \textcolor{keywordflow}{return} (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__getdev}{ccb\_getdev}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04195}04195         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0ac3008f99f93ca1448f9c8705b1653da5}{AC\_LOST\_DEVICE}}: \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04196}04196         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0abe66bf24e4b7ce1e26e6e096b22d9a4f}{AC\_TRANSFER\_NEG}}: \textcolor{keywordflow}{return} (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__trans__settings}{ccb\_trans\_settings}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04197}04197         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0abfdaf9e4a33c3d93914f1805bc5c3dcf}{AC\_INQ\_CHANGED}}: \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04198}04198         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a761c3deb864c8b47c8123ee11a113df6}{AC\_GETDEV\_CHANGED}}: \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04199}04199         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a34ae5ae6dac5011e838e327180e27511}{AC\_CONTRACT}}: \textcolor{keywordflow}{return} (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structac__contract}{ac\_contract}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04200}04200         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a036a366f13e05e75d85915311d7acaf4}{AC\_ADVINFO\_CHANGED}}: \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04201}04201         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a879e789f2f929720e248fbc5c6d5f930}{AC\_UNIT\_ATTENTION}}: \textcolor{keywordflow}{return} (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04202}04202         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04203}04203         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04204}04204 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04205}04205 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04206}04206 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04207}\mbox{\hyperlink{cam__xpt_8c_a4d05fa6f7da1eb41184cbb2302b08843}{04207}} \mbox{\hyperlink{cam__xpt_8c_a4d05fa6f7da1eb41184cbb2302b08843}{xpt\_async\_process\_dev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04208}04208 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04209}04209         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}} = arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04210}04210         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *path = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04211}04211         \textcolor{keywordtype}{void} *async\_arg = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a1f22283425f7f3168876ae0a55853700}{async\_arg\_ptr}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04212}04212         u\_int32\_t async\_code = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a6b61b297fad1f7c6f14d210bdb1d9150}{async\_code}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04213}04213         \textcolor{keywordtype}{int} relock;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04214}04214 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04215}04215         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != \mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04216}04216          \&\& path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} != \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04217}04217          \&\& \mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} != \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04218}04218                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04219}04219 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04220}04220         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04221}04221 \textcolor{comment}{         * The async callback could free the device.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04222}04222 \textcolor{comment}{         * If it is a broadcast async, it doesn't hold}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04223}04223 \textcolor{comment}{         * device reference, so take our own reference.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04224}04224 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04225}04225         \mbox{\hyperlink{cam__xpt_8c_a01bdf0561d2c7b64751461a89673df2e}{xpt\_acquire\_device}}(\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04226}04226 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04227}04227         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04228}04228 \textcolor{comment}{         * If async for specific device is to be delivered to}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04229}04229 \textcolor{comment}{         * the wildcard client, take the specific device lock.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04230}04230 \textcolor{comment}{         * XXX: We may need a way for client to specify it.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04231}04231 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04232}04232         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04233}04233              path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} != \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}}) ||}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04234}04234             (\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} == \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04235}04235              path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} != \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}}) ||}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04236}04236             (\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} == \mbox{\hyperlink{cam_8h_ab5f5f926ac019231720aaa2d64c99957}{CAM\_BUS\_WILDCARD}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04237}04237              path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} != \mbox{\hyperlink{cam_8h_ab5f5f926ac019231720aaa2d64c99957}{CAM\_BUS\_WILDCARD}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04238}04238                 mtx\_unlock(\&\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a4586f693e9f95784f27c3c2e16ff31a1}{device\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04239}04239                 \mbox{\hyperlink{cam__xpt_8h_a81ce2d44dcd261d0d54d1c24b0e1f11e}{xpt\_path\_lock}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04240}04240                 relock = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04241}04241         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04242}04242                 relock = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04243}04243 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04244}04244         (*(\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a5bc445ca1e8a66752766e0e842b9a33f}{xport}}-\/>\mbox{\hyperlink{structxpt__xport_ac9deaad7cb0ff7eb57943fdc975e4c09}{ops}}-\/>\mbox{\hyperlink{structxpt__xport__ops_a50c8e7c230b5447c54648e6eeae802fb}{async}}))(async\_code,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04245}04245             \mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}, \mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}, \mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}, async\_arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04246}04246         \mbox{\hyperlink{cam__xpt_8c_a63c969368f5854bc6168837c2b728a62}{xpt\_async\_bcast}}(\&\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a9254b35826c53d78a258751e75334824}{asyncs}}, async\_code, path, async\_arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04247}04247 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04248}04248         \textcolor{keywordflow}{if} (relock) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04249}04249                 \mbox{\hyperlink{cam__xpt_8h_a14b8db5099e848843133059a192429af}{xpt\_path\_unlock}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04250}04250                 mtx\_lock(\&\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a4586f693e9f95784f27c3c2e16ff31a1}{device\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04251}04251         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04252}04252         \mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{xpt\_release\_device}}(\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04253}04253         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04254}04254 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04255}04255 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04256}04256 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04257}\mbox{\hyperlink{cam__xpt_8c_a09f8e8965c9802471b1b648c343c2ce6}{04257}} \mbox{\hyperlink{cam__xpt_8c_a09f8e8965c9802471b1b648c343c2ce6}{xpt\_async\_process\_tgt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04258}04258 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04259}04259         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}} = arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04260}04260         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *path = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04261}04261 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04262}04262         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}} != \mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04263}04263          \&\& path-\/>\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} != \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04264}04264          \&\& \mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} != \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04265}04265                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04266}04266 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04267}04267         \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a6b61b297fad1f7c6f14d210bdb1d9150}{async\_code}} == \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0adf2dfbe2cd14380823c3b1e7544021e8}{AC\_SENT\_BDR}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04268}04268                 \textcolor{comment}{/* Update our notion of when the last reset occurred */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04269}04269                 microtime(\&\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}-\/>\mbox{\hyperlink{structcam__et_a313391c569c096c0c38bcf3b3098c95a}{last\_reset}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04270}04270         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04271}04271 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04272}04272         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__xpt_8c_a431efc1763a41e6feb096f82a58e9af7}{xptdevicetraverse}}(\mbox{\hyperlink{structcam__path_a66488b7fe8bf2f9103257aa7c8d8e401}{target}}, NULL, \mbox{\hyperlink{cam__xpt_8c_a4d05fa6f7da1eb41184cbb2302b08843}{xpt\_async\_process\_dev}}, \mbox{\hyperlink{unionccb}{ccb}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04273}04273 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04274}04274 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04275}04275 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04276}\mbox{\hyperlink{cam__xpt_8c_a331ffe244292a2fa642c250f0fd597de}{04276}} \mbox{\hyperlink{cam__xpt_8c_a331ffe244292a2fa642c250f0fd597de}{xpt\_async\_process}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04277}04277 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04278}04278         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04279}04279         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__path}{cam\_path}} *path;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04280}04280         \textcolor{keywordtype}{void} *async\_arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04281}04281         u\_int32\_t async\_code;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04282}04282 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04283}04283         path = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04284}04284         async\_code = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a6b61b297fad1f7c6f14d210bdb1d9150}{async\_code}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04285}04285         async\_arg = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a1f22283425f7f3168876ae0a55853700}{async\_arg\_ptr}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04286}04286         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}} | \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04287}04287             (\textcolor{stringliteral}{"{}xpt\_async(\%s)\(\backslash\)n"{}}, \mbox{\hyperlink{cam__xpt_8c_a1ec732da4ba2bb73b9d520a956f4ab7c}{xpt\_async\_string}}(async\_code)));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04288}04288         \mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04289}04289 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04290}04290         \textcolor{keywordflow}{if} (async\_code == \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a562d924fbe74236d4f5403ef2fdbb94d}{AC\_BUS\_RESET}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04291}04291                 \textcolor{comment}{/* Update our notion of when the last reset occurred */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04292}04292                 microtime(\&\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a05b90f0e17165a87df3aebfce4c2bc55}{last\_reset}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04293}04293         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04294}04294 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04295}04295         \mbox{\hyperlink{cam__xpt_8c_af0013235e3adc7dd3ee9fcb12b03a3cd}{xpttargettraverse}}(\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}, NULL, \mbox{\hyperlink{cam__xpt_8c_a09f8e8965c9802471b1b648c343c2ce6}{xpt\_async\_process\_tgt}}, \mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04296}04296 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04297}04297         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04298}04298 \textcolor{comment}{         * If this wasn't a fully wildcarded async, tell all}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04299}04299 \textcolor{comment}{         * clients that want all async events.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04300}04300 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04301}04301         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}} != \mbox{\hyperlink{cam__xpt_8c_a88a107b9711f7cf295bb241e5bff985b}{xpt\_periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04302}04302                 \mbox{\hyperlink{cam__xpt_8h_a81ce2d44dcd261d0d54d1c24b0e1f11e}{xpt\_path\_lock}}(\mbox{\hyperlink{cam__xpt_8c_a88a107b9711f7cf295bb241e5bff985b}{xpt\_periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04303}04303                 \mbox{\hyperlink{cam__xpt_8c_a4d05fa6f7da1eb41184cbb2302b08843}{xpt\_async\_process\_dev}}(\mbox{\hyperlink{cam__xpt_8c_a88a107b9711f7cf295bb241e5bff985b}{xpt\_periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}, \mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04304}04304                 \mbox{\hyperlink{cam__xpt_8h_a14b8db5099e848843133059a192429af}{xpt\_path\_unlock}}(\mbox{\hyperlink{cam__xpt_8c_a88a107b9711f7cf295bb241e5bff985b}{xpt\_periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04305}04305         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04306}04306 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04307}04307         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != NULL \&\& path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} != \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04308}04308                 \mbox{\hyperlink{cam__xpt_8c_aef6066745ed67b3a76eae33f691e338b}{xpt\_release\_devq}}(path, 1, TRUE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04309}04309         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04310}04310                 \mbox{\hyperlink{cam__xpt_8c_a6e503a7a2e496272ea2135451a08a082}{xpt\_release\_simq}}(path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}, TRUE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04311}04311         \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a6ad30614313e28e5f04029688c931c02}{async\_arg\_size}} > 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04312}04312                 free(async\_arg, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04313}04313         \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04314}04314         \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04315}04315 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04316}04316 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04317}04317 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04318}\mbox{\hyperlink{cam__xpt_8c_a63c969368f5854bc6168837c2b728a62}{04318}} \mbox{\hyperlink{cam__xpt_8c_a63c969368f5854bc6168837c2b728a62}{xpt\_async\_bcast}}(\textcolor{keyword}{struct} async\_list *async\_head,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04319}04319                 u\_int32\_t async\_code,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04320}04320                 \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keywordtype}{void} *async\_arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04321}04321 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04322}04322         \textcolor{keyword}{struct }\mbox{\hyperlink{structasync__node}{async\_node}} *cur\_entry;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04323}04323         \textcolor{keyword}{struct }mtx *mtx;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04324}04324 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04325}04325         cur\_entry = SLIST\_FIRST(async\_head);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04326}04326         \textcolor{keywordflow}{while} (cur\_entry != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04327}04327                 \textcolor{keyword}{struct }\mbox{\hyperlink{structasync__node}{async\_node}} *next\_entry;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04328}04328                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04329}04329 \textcolor{comment}{                 * Grab the next list entry before we call the current}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04330}04330 \textcolor{comment}{                 * entry's callback.  This is because the callback function}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04331}04331 \textcolor{comment}{                 * can delete its async callback entry.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04332}04332 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04333}04333                 next\_entry = SLIST\_NEXT(cur\_entry, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04334}04334                 \textcolor{keywordflow}{if} ((cur\_entry-\/>\mbox{\hyperlink{structasync__node_a8352093241e3702b449f76037a364aa0}{event\_enable}} \& async\_code) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04335}04335                         mtx = cur\_entry-\/>\mbox{\hyperlink{structasync__node_ada64f7ce93835af81a8a21f16eff2fb4}{event\_lock}} ?}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04336}04336                             path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_a7019bfd905201eb7b0faac19c0a6645c}{mtx}} : NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04337}04337                         \textcolor{keywordflow}{if} (mtx)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04338}04338                                 mtx\_lock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04339}04339                         cur\_entry-\/>\mbox{\hyperlink{structasync__node_a4f243a26de8cb1c99664a5c4f431c570}{callback}}(cur\_entry-\/>\mbox{\hyperlink{structasync__node_a0b4c09c594589adae8516a7f5d0602aa}{callback\_arg}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04340}04340                                             async\_code, path,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04341}04341                                             async\_arg);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04342}04342                         \textcolor{keywordflow}{if} (mtx)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04343}04343                                 mtx\_unlock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04344}04344                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04345}04345                 cur\_entry = next\_entry;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04346}04346         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04347}04347 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04348}04348 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04349}04349 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04350}\mbox{\hyperlink{cam__xpt_8c_a60a033db88b93c6492304499e81774c0}{04350}} \mbox{\hyperlink{cam__xpt_8c_a60a033db88b93c6492304499e81774c0}{xpt\_async}}(u\_int32\_t async\_code, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keywordtype}{void} *async\_arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04351}04351 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04352}04352         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04353}04353         \textcolor{keywordtype}{int} size;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04354}04354 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04355}04355         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__xpt_8c_a9de65e290bb5d0c78183237169d6f8dd}{xpt\_alloc\_ccb\_nowait}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04356}04356         \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04357}04357                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(path, \textcolor{stringliteral}{"{}Can't allocate CCB to send \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04358}04358                     \mbox{\hyperlink{cam__xpt_8c_a1ec732da4ba2bb73b9d520a956f4ab7c}{xpt\_async\_string}}(async\_code));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04359}04359                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04360}04360         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04361}04361 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04362}04362         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_ad3a9d391428d6a71f5f45af894971a43}{xpt\_clone\_path}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, path) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04363}04363                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(path, \textcolor{stringliteral}{"{}Can't allocate path to send \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04364}04364                     \mbox{\hyperlink{cam__xpt_8c_a1ec732da4ba2bb73b9d520a956f4ab7c}{xpt\_async\_string}}(async\_code));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04365}04365                 \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04366}04366                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04367}04367         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04368}04368         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04369}04369         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca359ed21ee05e6191b6100b5fbc9e17f1}{XPT\_ASYNC}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04370}04370         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afe206cd92d25dfd137df5196cdfcfdae}{cbfcnp}} = \mbox{\hyperlink{cam__xpt_8c_a331ffe244292a2fa642c250f0fd597de}{xpt\_async\_process}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04371}04371         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} |= \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676aafb505767df8f8476b7cc67a621db845}{CAM\_UNLOCKED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04372}04372         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a6b61b297fad1f7c6f14d210bdb1d9150}{async\_code}} = async\_code;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04373}04373         \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a6ad30614313e28e5f04029688c931c02}{async\_arg\_size}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04374}04374         size = \mbox{\hyperlink{cam__xpt_8c_ae14afd24972e5bafb21b547c2958a12b}{xpt\_async\_size}}(async\_code);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04375}04375         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04376}04376             (\textcolor{stringliteral}{"{}xpt\_async: func \%\#x \%s aync\_code \%d \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04377}04377                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04378}04378                 \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04379}04379                 async\_code,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04380}04380                 \mbox{\hyperlink{cam__xpt_8c_a1ec732da4ba2bb73b9d520a956f4ab7c}{xpt\_async\_string}}(async\_code)));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04381}04381         \textcolor{keywordflow}{if} (size > 0 \&\& async\_arg != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04382}04382                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a1f22283425f7f3168876ae0a55853700}{async\_arg\_ptr}} = malloc(size, M\_CAMXPT, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04383}04383                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a1f22283425f7f3168876ae0a55853700}{async\_arg\_ptr}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04384}04384                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(path, \textcolor{stringliteral}{"{}Can't allocate argument to send \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04385}04385                             \mbox{\hyperlink{cam__xpt_8c_a1ec732da4ba2bb73b9d520a956f4ab7c}{xpt\_async\_string}}(async\_code));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04386}04386                         \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04387}04387                         \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04388}04388                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04389}04389                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04390}04390                 memcpy(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a1f22283425f7f3168876ae0a55853700}{async\_arg\_ptr}}, async\_arg, size);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04391}04391                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a6ad30614313e28e5f04029688c931c02}{async\_arg\_size}} = size;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04392}04392         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (size < 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04393}04393                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a1f22283425f7f3168876ae0a55853700}{async\_arg\_ptr}} = async\_arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04394}04394                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_aacddeb0149b7b13ece2af58b8f3960fd}{casync}}.\mbox{\hyperlink{structccb__async_a6ad30614313e28e5f04029688c931c02}{async\_arg\_size}} = size;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04395}04395         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04396}04396         \textcolor{keywordflow}{if} (path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}} != NULL \&\& path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} != \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04397}04397                 \mbox{\hyperlink{cam__xpt_8c_a2cca45a6e91cae097f1d958c315231e8}{xpt\_freeze\_devq}}(path, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04398}04398         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04399}04399                 \mbox{\hyperlink{cam__xpt_8c_a6b09ef72d09724ba44dc728dbb42e320}{xpt\_freeze\_simq}}(path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04400}04400         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04401}04401 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04402}04402 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04403}04403 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04404}\mbox{\hyperlink{cam__xpt_8c_a144baa89ca8e7625910e3850643d426a}{04404}} \mbox{\hyperlink{cam__xpt_8c_a144baa89ca8e7625910e3850643d426a}{xpt\_dev\_async\_default}}(u\_int32\_t async\_code, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04405}04405                       \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04406}04406                       \textcolor{keywordtype}{void} *async\_arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04407}04407 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04408}04408 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04409}04409         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04410}04410 \textcolor{comment}{         * We only need to handle events for real devices.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04411}04411 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04412}04412         \textcolor{keywordflow}{if} (target-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} == \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04413}04413          || device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04414}04414                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04415}04415 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04416}04416         printf(\textcolor{stringliteral}{"{}\%s called\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04417}04417 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04418}04418 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04419}04419 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04420}\mbox{\hyperlink{cam__xpt_8c_afaa5f8e162dc0a7ef6d0be2d892ec9e1}{04420}} \mbox{\hyperlink{cam__xpt_8c_afaa5f8e162dc0a7ef6d0be2d892ec9e1}{xpt\_freeze\_devq\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev, u\_int count)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04421}04421 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04422}04422         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04423}04423         uint32\_t freeze;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04424}04424 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04425}04425         devq = dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04426}04426         mtx\_assert(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04427}04427         \mbox{\hyperlink{cam__debug_8h_a42a23ab2c797f5006e0c754902a23500}{CAM\_DEBUG\_DEV}}(dev, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04428}04428             (\textcolor{stringliteral}{"{}xpt\_freeze\_devq\_device(\%d) \%u-\/>\%u\(\backslash\)n"{}}, count,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04429}04429             dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}}, dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} + count));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04430}04430         freeze = (dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} += count);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04431}04431         \textcolor{comment}{/* Remove frozen device from sendq. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04432}04432         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_ab7a9bbee8ca06cb1ce40cc1b830a6ca0}{device\_is\_queued}}(dev))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04433}04433                 \mbox{\hyperlink{cam__queue_8c_aceb69b00a057e05d894e44710436d9ba}{camq\_remove}}(\&devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}, dev-\/>\mbox{\hyperlink{structcam__ed_a464fc40a10046ceada30d79d23fe50fa}{devq\_entry}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04434}04434         \textcolor{keywordflow}{return} (freeze);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04435}04435 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04436}04436 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04437}04437 u\_int32\_t}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04438}\mbox{\hyperlink{cam__xpt_8c_a2cca45a6e91cae097f1d958c315231e8}{04438}} \mbox{\hyperlink{cam__xpt_8c_a2cca45a6e91cae097f1d958c315231e8}{xpt\_freeze\_devq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, u\_int count)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04439}04439 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04440}04440         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}}     *dev = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04441}04441         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04442}04442         uint32\_t         freeze;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04443}04443 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04444}04444         devq = dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04445}04445         mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04446}04446         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xpt\_freeze\_devq(\%d)\(\backslash\)n"{}}, count));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04447}04447         freeze = \mbox{\hyperlink{cam__xpt_8c_afaa5f8e162dc0a7ef6d0be2d892ec9e1}{xpt\_freeze\_devq\_device}}(dev, count);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04448}04448         mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04449}04449         \textcolor{keywordflow}{return} (freeze);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04450}04450 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04451}04451 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04452}04452 u\_int32\_t}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04453}\mbox{\hyperlink{cam__xpt_8c_a6b09ef72d09724ba44dc728dbb42e320}{04453}} \mbox{\hyperlink{cam__xpt_8c_a6b09ef72d09724ba44dc728dbb42e320}{xpt\_freeze\_simq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim, u\_int count)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04454}04454 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04455}04455         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04456}04456         uint32\_t         freeze;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04457}04457 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04458}04458         devq = sim-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04459}04459         mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04460}04460         freeze = (devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} += count);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04461}04461         mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04462}04462         \textcolor{keywordflow}{return} (freeze);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04463}04463 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04464}04464 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04465}04465 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04466}\mbox{\hyperlink{cam__xpt_8c_a173df78ed26820bb2220430b1a5272c7}{04466}} \mbox{\hyperlink{cam__xpt_8c_ab14bd2e082a51661171d8dd5a942433d}{xpt\_release\_devq\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04467}04467 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04468}04468         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04469}04469         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04470}04470 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04471}04471         dev = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *)arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04472}04472         \mbox{\hyperlink{cam__debug_8h_a42a23ab2c797f5006e0c754902a23500}{CAM\_DEBUG\_DEV}}(dev, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xpt\_release\_devq\_timeout\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04473}04473         devq = dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04474}04474         mtx\_assert(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04475}04475         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aa44f87ce4f64dfa1117d405e2d81daf6}{xpt\_release\_devq\_device}}(dev, \textcolor{comment}{/*count*/}1, \textcolor{comment}{/*run\_queue*/}TRUE))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04476}04476                 \mbox{\hyperlink{cam__xpt_8c_ab05d0a25c05fe9822eb4f60f903bf8bd}{xpt\_run\_devq}}(devq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04477}04477 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04478}04478 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04479}04479 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04480}\mbox{\hyperlink{cam__xpt_8c_aef6066745ed67b3a76eae33f691e338b}{04480}} \mbox{\hyperlink{cam__xpt_8c_aef6066745ed67b3a76eae33f691e338b}{xpt\_release\_devq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, u\_int count, \textcolor{keywordtype}{int} run\_queue)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04481}04481 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04482}04482         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04483}04483         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04484}04484 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04485}04485         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(path, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xpt\_release\_devq(\%d, \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04486}04486             count, run\_queue));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04487}04487         dev = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04488}04488         devq = dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04489}04489         mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04490}04490         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aa44f87ce4f64dfa1117d405e2d81daf6}{xpt\_release\_devq\_device}}(dev, count, run\_queue))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04491}04491                 \mbox{\hyperlink{cam__xpt_8c_ab05d0a25c05fe9822eb4f60f903bf8bd}{xpt\_run\_devq}}(dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04492}04492         mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04493}04493 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04494}04494 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04495}04495 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04496}\mbox{\hyperlink{cam__xpt_8c_aa44f87ce4f64dfa1117d405e2d81daf6}{04496}} \mbox{\hyperlink{cam__xpt_8c_aa44f87ce4f64dfa1117d405e2d81daf6}{xpt\_release\_devq\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev, u\_int count, \textcolor{keywordtype}{int} run\_queue)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04497}04497 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04498}04498 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04499}04499         mtx\_assert(\&dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}}-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04500}04500         \mbox{\hyperlink{cam__debug_8h_a42a23ab2c797f5006e0c754902a23500}{CAM\_DEBUG\_DEV}}(dev, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04501}04501             (\textcolor{stringliteral}{"{}xpt\_release\_devq\_device(\%d, \%d) \%u-\/>\%u\(\backslash\)n"{}}, count, run\_queue,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04502}04502             dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}}, dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} -\/ count));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04503}04503         \textcolor{keywordflow}{if} (count > dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04504}04504 \textcolor{preprocessor}{\#ifdef INVARIANTS}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04505}04505                 printf(\textcolor{stringliteral}{"{}xpt\_release\_devq(): requested \%u > present \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04506}04506                     count, dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04507}04507 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04508}04508                 count = dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04509}04509         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04510}04510         dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} -\/= count;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04511}04511         \textcolor{keywordflow}{if} (dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_af128199bb2be2854178209fbcfe4014e}{queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04512}04512                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04513}04513 \textcolor{comment}{                 * No longer need to wait for a successful}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04514}04514 \textcolor{comment}{                 * command completion.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04515}04515 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04516}04516                 dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \&= \string~CAM\_DEV\_REL\_ON\_COMPLETE;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04517}04517                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04518}04518 \textcolor{comment}{                 * Remove any timeouts that might be scheduled}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04519}04519 \textcolor{comment}{                 * to release this queue.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04520}04520 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04521}04521                 \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a84bdff7b362347724ebba49af78d10cd}{CAM\_DEV\_REL\_TIMEOUT\_PENDING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04522}04522                         callout\_stop(\&dev-\/>\mbox{\hyperlink{structcam__ed_ad5d1e1338689502438f7262ffd279a7e}{callout}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04523}04523                         dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \&= \string~CAM\_DEV\_REL\_TIMEOUT\_PENDING;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04524}04524                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04525}04525                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04526}04526 \textcolor{comment}{                 * Now that we are unfrozen schedule the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04527}04527 \textcolor{comment}{                 * device so any pending transactions are}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04528}04528 \textcolor{comment}{                 * run.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04529}04529 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04530}04530                 \mbox{\hyperlink{cam__xpt_8c_a7148ea52669591ad852374d50345f34c}{xpt\_schedule\_devq}}(dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}}, dev);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04531}04531         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04532}04532                 run\_queue = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04533}04533         \textcolor{keywordflow}{return} (run\_queue);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04534}04534 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04535}04535 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04536}04536 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04537}\mbox{\hyperlink{cam__xpt_8c_a6e503a7a2e496272ea2135451a08a082}{04537}} \mbox{\hyperlink{cam__xpt_8c_a6e503a7a2e496272ea2135451a08a082}{xpt\_release\_simq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim, \textcolor{keywordtype}{int} run\_queue)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04538}04538 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04539}04539         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04540}04540 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04541}04541         devq = sim-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04542}04542         mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04543}04543         \textcolor{keywordflow}{if} (devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} <= 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04544}04544 \textcolor{preprocessor}{\#ifdef INVARIANTS}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04545}04545                 printf(\textcolor{stringliteral}{"{}xpt\_release\_simq: requested 1 > present \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04546}04546                     devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04547}04547 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04548}04548         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04549}04549                 devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04550}04550         \textcolor{keywordflow}{if} (devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_acecce2d369e01e74f603936f820ce549}{qfrozen\_cnt}} == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04551}04551                 \textcolor{keywordflow}{if} (run\_queue) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04552}04552                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04553}04553 \textcolor{comment}{                         * Now that we are unfrozen run the send queue.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04554}04554 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04555}04555                         \mbox{\hyperlink{cam__xpt_8c_ab05d0a25c05fe9822eb4f60f903bf8bd}{xpt\_run\_devq}}(sim-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04556}04556                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04557}04557         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04558}04558         mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04559}04559 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04560}04560 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04561}04561 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04562}\mbox{\hyperlink{cam__xpt_8c_a708fed7e2d55a1b2a180bb4462513393}{04562}} \mbox{\hyperlink{cam__xpt_8c_a708fed7e2d55a1b2a180bb4462513393}{xpt\_done}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *done\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04563}04563 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04564}04564         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__doneq}{cam\_doneq}} *queue;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04565}04565         \textcolor{keywordtype}{int}     run, hash;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04566}04566 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04567}04567 \textcolor{preprocessor}{\#if defined(BUF\_TRACKING) || defined(FULL\_BUF\_TRACKING)}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04568}04568         \textcolor{keywordflow}{if} (done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} == \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca426a17499239f5751c747d094b4998dc}{XPT\_SCSI\_IO}} \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04569}04569             done\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.bio != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04570}04570                 biotrack(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.bio, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04571}04571 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04572}04572 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04573}04573         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04574}04574             (\textcolor{stringliteral}{"{}xpt\_done: func= \%\#x \%s status \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04575}04575                 done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04576}04576                 \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04577}04577                 done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04578}04578         \textcolor{keywordflow}{if} ((done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} \& \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca381e033b34c98c2fc6be5c52e3b1dcce}{XPT\_FC\_QUEUED}}) == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04579}04579                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04580}04580 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04581}04581         \textcolor{comment}{/* Store the time the ccb was in the sim */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04582}04582         done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afd61d847dcabc1fbd30a99853e7d5852}{qos}}.\mbox{\hyperlink{structccb__qos__area_a2fc719c6f5aeb7e9f19f73143be94096}{periph\_data}} = \mbox{\hyperlink{cam__iosched_8h_a11a3941fd89e15e1a16f059f7361f509}{cam\_iosched\_delta\_t}}(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afd61d847dcabc1fbd30a99853e7d5852}{qos}}.\mbox{\hyperlink{structccb__qos__area_a2fc719c6f5aeb7e9f19f73143be94096}{periph\_data}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04583}04583         done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} |= \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3ab31638e9012163f54141f839c703b645}{CAM\_QOS\_VALID}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04584}04584         hash = (u\_int)(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a2c528067aca740cf305d0036f5949daf}{path\_id}} + done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_ac1eea57a4b1b05fbe3a5b256dbbdc197}{target\_id}} +}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04585}04585             done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a9846ea08ea2a27c2c896bfe1ad3b6309}{target\_lun}}) \% \mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04586}04586         queue = \&\mbox{\hyperlink{cam__xpt_8c_ab0f84f295d3b76549908f2a897718483}{cam\_doneqs}}[hash];}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04587}04587         mtx\_lock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04588}04588         run = (queue-\/>cam\_doneq\_sleep \&\& STAILQ\_EMPTY(\&queue-\/>cam\_doneq));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04589}04589         STAILQ\_INSERT\_TAIL(\&queue-\/>cam\_doneq, \&done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}, sim\_links.stqe);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04590}04590         done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} = \mbox{\hyperlink{cam_8h_a06bd059e5da01c9c769331e0b54b0e3a}{CAM\_DONEQ\_INDEX}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04591}04591         mtx\_unlock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04592}04592         \textcolor{keywordflow}{if} (run \&\& !dumping)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04593}04593                 wakeup(\&queue-\/>cam\_doneq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04594}04594 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04595}04595 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04596}04596 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04597}\mbox{\hyperlink{cam__xpt_8c_ad367333ab3af1b111d8bd8ec767adea8}{04597}} \mbox{\hyperlink{cam__xpt_8c_ad367333ab3af1b111d8bd8ec767adea8}{xpt\_done\_direct}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *done\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04598}04598 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04599}04599 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04600}04600         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04601}04601             (\textcolor{stringliteral}{"{}xpt\_done\_direct: status \%\#x\(\backslash\)n"{}}, done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04602}04602         \textcolor{keywordflow}{if} ((done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} \& \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca381e033b34c98c2fc6be5c52e3b1dcce}{XPT\_FC\_QUEUED}}) == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04603}04603                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04604}04604 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04605}04605         \textcolor{comment}{/* Store the time the ccb was in the sim */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04606}04606         done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afd61d847dcabc1fbd30a99853e7d5852}{qos}}.\mbox{\hyperlink{structccb__qos__area_a2fc719c6f5aeb7e9f19f73143be94096}{periph\_data}} = \mbox{\hyperlink{cam__iosched_8h_a11a3941fd89e15e1a16f059f7361f509}{cam\_iosched\_delta\_t}}(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_afd61d847dcabc1fbd30a99853e7d5852}{qos}}.\mbox{\hyperlink{structccb__qos__area_a2fc719c6f5aeb7e9f19f73143be94096}{periph\_data}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04607}04607         done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} |= \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3ab31638e9012163f54141f839c703b645}{CAM\_QOS\_VALID}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04608}04608         \mbox{\hyperlink{cam__xpt_8c_a1503a02005a52c0726423254272541bd}{xpt\_done\_process}}(\&done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04609}04609 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04610}04610 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04611}04611 \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04612}\mbox{\hyperlink{cam__xpt_8c_a17fe920aa9698f9b81b06f08d0140fb2}{04612}} \mbox{\hyperlink{cam__xpt_8c_a17fe920aa9698f9b81b06f08d0140fb2}{xpt\_alloc\_ccb}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04613}04613 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04614}04614         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *new\_ccb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04615}04615 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04616}04616         new\_ccb = malloc(\textcolor{keyword}{sizeof}(*new\_ccb), M\_CAMCCB, M\_ZERO|M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04617}04617         \textcolor{keywordflow}{return} (new\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04618}04618 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04619}04619 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04620}04620 \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04621}\mbox{\hyperlink{cam__xpt_8c_a9de65e290bb5d0c78183237169d6f8dd}{04621}} \mbox{\hyperlink{cam__xpt_8c_a9de65e290bb5d0c78183237169d6f8dd}{xpt\_alloc\_ccb\_nowait}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04622}04622 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04623}04623         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *new\_ccb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04624}04624 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04625}04625         new\_ccb = malloc(\textcolor{keyword}{sizeof}(*new\_ccb), M\_CAMCCB, M\_ZERO|M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04626}04626         \textcolor{keywordflow}{return} (new\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04627}04627 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04628}04628 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04629}04629 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04630}\mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{04630}} \mbox{\hyperlink{cam__xpt_8c_af1e7540fc366b5cad2e58f29d1de0f60}{xpt\_free\_ccb}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *free\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04631}04631 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04632}04632         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04633}04633 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04634}04634         \textcolor{keywordflow}{if} (free\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a6927356f631d03b0c44a0841a83d33a6}{alloc\_flags}} \& \mbox{\hyperlink{cam__ccb_8h_aa4c58489d65e0a672163fff33ce0994dac88ae66c448d4c06b14d1f36658bd4c8}{CAM\_CCB\_FROM\_UMA}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04635}04635                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04636}04636 \textcolor{comment}{                 * Looks like a CCB allocated from a periph UMA zone.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04637}04637 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04638}04638                 periph = free\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04639}04639                 uma\_zfree(periph-\/>\mbox{\hyperlink{structcam__periph_a64b0c092dbce50aac1071871646527e5}{ccb\_zone}}, free\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04640}04640         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04641}04641                 free(free\_ccb, M\_CAMCCB);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04642}04642         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04643}04643 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04644}04644 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04645}04645 \textcolor{comment}{/* Private XPT functions */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04646}04646 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04647}04647 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04648}04648 \textcolor{comment}{ * Get a CAM control block for the caller. Charge the structure to the device}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04649}04649 \textcolor{comment}{ * referenced by the path.  If we don't have sufficient resources to allocate}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04650}04650 \textcolor{comment}{ * more ccbs, we return NULL.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04651}04651 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04652}04652 \textcolor{keyword}{static} \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04653}\mbox{\hyperlink{cam__xpt_8c_a908eabd359e578d0146206824c00aa88}{04653}} \mbox{\hyperlink{cam__xpt_8c_a908eabd359e578d0146206824c00aa88}{xpt\_get\_ccb\_nowait}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04654}04654 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04655}04655         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *new\_ccb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04656}04656         \textcolor{keywordtype}{int} alloc\_flags;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04657}04657 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04658}04658         \textcolor{keywordflow}{if} (periph-\/>\mbox{\hyperlink{structcam__periph_a64b0c092dbce50aac1071871646527e5}{ccb\_zone}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04659}04659                 alloc\_flags = \mbox{\hyperlink{cam__ccb_8h_aa4c58489d65e0a672163fff33ce0994dac88ae66c448d4c06b14d1f36658bd4c8}{CAM\_CCB\_FROM\_UMA}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04660}04660                 new\_ccb = uma\_zalloc(periph-\/>\mbox{\hyperlink{structcam__periph_a64b0c092dbce50aac1071871646527e5}{ccb\_zone}}, M\_ZERO|M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04661}04661         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04662}04662                 alloc\_flags = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04663}04663                 new\_ccb = malloc(\textcolor{keyword}{sizeof}(*new\_ccb), M\_CAMCCB, M\_ZERO|M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04664}04664         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04665}04665         \textcolor{keywordflow}{if} (new\_ccb == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04666}04666                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04667}04667         new\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a6927356f631d03b0c44a0841a83d33a6}{alloc\_flags}} = alloc\_flags;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04668}04668         periph-\/>\mbox{\hyperlink{structcam__periph_ad7993682f9d53a1cd5209a5f4f8e0b42}{periph\_allocated}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04669}04669         \mbox{\hyperlink{cam__queue_8h_ae816fd17d8099e7a084f95a762fad0a6}{cam\_ccbq\_take\_opening}}(\&periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04670}04670         \textcolor{keywordflow}{return} (new\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04671}04671 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04672}04672 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04673}04673 \textcolor{keyword}{static} \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04674}\mbox{\hyperlink{cam__xpt_8c_a87352808310f71c4abe047d15f51705a}{04674}} \mbox{\hyperlink{cam__xpt_8c_a87352808310f71c4abe047d15f51705a}{xpt\_get\_ccb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04675}04675 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04676}04676         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *new\_ccb;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04677}04677         \textcolor{keywordtype}{int} alloc\_flags;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04678}04678 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04679}04679         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04680}04680         \textcolor{keywordflow}{if} (periph-\/>\mbox{\hyperlink{structcam__periph_a64b0c092dbce50aac1071871646527e5}{ccb\_zone}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04681}04681                 alloc\_flags = \mbox{\hyperlink{cam__ccb_8h_aa4c58489d65e0a672163fff33ce0994dac88ae66c448d4c06b14d1f36658bd4c8}{CAM\_CCB\_FROM\_UMA}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04682}04682                 new\_ccb = uma\_zalloc(periph-\/>\mbox{\hyperlink{structcam__periph_a64b0c092dbce50aac1071871646527e5}{ccb\_zone}}, M\_ZERO|M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04683}04683         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04684}04684                 alloc\_flags = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04685}04685                 new\_ccb = malloc(\textcolor{keyword}{sizeof}(*new\_ccb), M\_CAMCCB, M\_ZERO|M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04686}04686         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04687}04687         new\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a6927356f631d03b0c44a0841a83d33a6}{alloc\_flags}} = alloc\_flags;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04688}04688         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04689}04689         periph-\/>\mbox{\hyperlink{structcam__periph_ad7993682f9d53a1cd5209a5f4f8e0b42}{periph\_allocated}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04690}04690         \mbox{\hyperlink{cam__queue_8h_ae816fd17d8099e7a084f95a762fad0a6}{cam\_ccbq\_take\_opening}}(\&periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04691}04691         \textcolor{keywordflow}{return} (new\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04692}04692 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04693}04693 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04694}04694 \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04695}\mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{04695}} \mbox{\hyperlink{cam__xpt_8c_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, u\_int32\_t priority)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04696}04696 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04697}04697         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *ccb\_h;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04698}04698 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04699}04699         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}cam\_periph\_getccb\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04700}04700         \mbox{\hyperlink{cam__periph_8h_a14a9062a3b53e1d1a2570a39695c2cd3}{cam\_periph\_assert}}(periph, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04701}04701         \textcolor{keywordflow}{while} ((ccb\_h = SLIST\_FIRST(\&periph-\/>ccb\_list)) == NULL ||}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04702}04702             ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a006313c394eb385f8f4aa130f6a9d213}{priority}} != priority) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04703}04703                 \textcolor{keywordflow}{if} (priority < periph-\/>immediate\_priority) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04704}04704                         periph-\/>\mbox{\hyperlink{structcam__periph_ad46a22ba760d05d1922da2f566953c98}{immediate\_priority}} = priority;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04705}04705                         \mbox{\hyperlink{cam__xpt_8c_a62dd0eb558b49674efbc5c50982ee25d}{xpt\_run\_allocq}}(periph, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04706}04706                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04707}04707                         \mbox{\hyperlink{cam__periph_8h_aca65f2f8c7cf5847b27c39ec84e232d7}{cam\_periph\_sleep}}(periph, \&periph-\/>ccb\_list, PRIBIO,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04708}04708                             \textcolor{stringliteral}{"{}cgticb"{}}, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04709}04709         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04710}04710         SLIST\_REMOVE\_HEAD(\&periph-\/>ccb\_list, \mbox{\hyperlink{structccb__hdr_addff89ed6dde745bda5e1ea7b5996dd2}{periph\_links}}.sle);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04711}04711         \textcolor{keywordflow}{return} ((\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)ccb\_h);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04712}04712 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04713}04713 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04714}04714 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04715}\mbox{\hyperlink{cam__xpt_8c_a8730eabc5880108cc4d4327b7bc31c32}{04715}} \mbox{\hyperlink{cam__xpt_8c_a8730eabc5880108cc4d4327b7bc31c32}{xpt\_acquire\_bus}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04716}04716 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04717}04717 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04718}04718         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04719}04719         bus-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04720}04720         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04721}04721 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04722}04722 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04723}04723 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04724}\mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{04724}} \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04725}04725 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04726}04726 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04727}04727         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04728}04728         KASSERT(bus-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}} >= 1, (\textcolor{stringliteral}{"{}bus-\/>refcount >= 1"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04729}04729         \textcolor{keywordflow}{if} (-\/-\/bus-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}} > 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04730}04730                 \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04731}04731                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04732}04732         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04733}04733         TAILQ\_REMOVE(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_busses, bus, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04734}04734         \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.bus\_generation++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04735}04735         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04736}04736         KASSERT(TAILQ\_EMPTY(\&bus-\/>et\_entries),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04737}04737             (\textcolor{stringliteral}{"{}destroying bus, but target list is not empty"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04738}04738         \mbox{\hyperlink{cam__sim_8c_a65eb54d0f1b7db78b17d6f3e6e32b358}{cam\_sim\_release}}(bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04739}04739         mtx\_destroy(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04740}04740         free(bus, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04741}04741 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04742}04742 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04743}04743 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04744}\mbox{\hyperlink{cam__xpt_8c_abe6202b8b7567c20f5e546c12e400935}{04744}} \mbox{\hyperlink{cam__xpt_8c_abe6202b8b7567c20f5e546c12e400935}{xpt\_alloc\_target}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}, \mbox{\hyperlink{cam_8h_af420b02e4c824e79ca80f8910b8e3a8f}{target\_id\_t}} \mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04745}04745 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04746}04746         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *cur\_target, *target;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04747}04747 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04748}04748         mtx\_assert(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_topo\_lock, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04749}04749         mtx\_assert(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04750}04750         target = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *)malloc(\textcolor{keyword}{sizeof}(*target), M\_CAMXPT,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04751}04751                                          M\_NOWAIT|M\_ZERO);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04752}04752         \textcolor{keywordflow}{if} (target == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04753}04753                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04754}04754 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04755}04755         TAILQ\_INIT(\&target-\/>ed\_entries);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04756}04756         target-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}} = \mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04757}04757         target-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} = \mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04758}04758         target-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}} = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04759}04759         target-\/>\mbox{\hyperlink{structcam__et_a2d6177af4f2835ea52e6d680130f23ee}{generation}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04760}04760         target-\/>\mbox{\hyperlink{structcam__et_ac4534ed644d3ad04b06def2f06f817bd}{luns}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04761}04761         mtx\_init(\&target-\/>\mbox{\hyperlink{structcam__et_a4006b0773c60f198186ad9b1ed73a715}{luns\_mtx}}, \textcolor{stringliteral}{"{}CAM LUNs lock"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04762}04762         timevalclear(\&target-\/>\mbox{\hyperlink{structcam__et_a313391c569c096c0c38bcf3b3098c95a}{last\_reset}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04763}04763         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04764}04764 \textcolor{comment}{         * Hold a reference to our parent bus so it}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04765}04765 \textcolor{comment}{         * will not go away before we do.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04766}04766 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04767}04767         \mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04768}04768 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04769}04769         \textcolor{comment}{/* Insertion sort into our bus's target list */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04770}04770         cur\_target = TAILQ\_FIRST(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>et\_entries);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04771}04771         \textcolor{keywordflow}{while} (cur\_target != NULL \&\& cur\_target-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} < \mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04772}04772                 cur\_target = TAILQ\_NEXT(cur\_target, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04773}04773         \textcolor{keywordflow}{if} (cur\_target != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04774}04774                 TAILQ\_INSERT\_BEFORE(cur\_target, target, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04775}04775         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04776}04776                 TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>et\_entries, target, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04777}04777         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04778}04778         \mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a40650834f3f2b8fcd317b6730f708eff}{generation}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04779}04779         \textcolor{keywordflow}{return} (target);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04780}04780 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04781}04781 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04782}04782 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04783}\mbox{\hyperlink{cam__xpt_8c_a3bc0f3fb9501e89310c749ade53142e5}{04783}} \mbox{\hyperlink{cam__xpt_8c_a3bc0f3fb9501e89310c749ade53142e5}{xpt\_acquire\_target}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04784}04784 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04785}04785         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus = target-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04786}04786 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04787}04787         mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04788}04788         target-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04789}04789         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04790}04790 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04791}04791 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04792}04792 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04793}\mbox{\hyperlink{cam__xpt_8c_aeb7a0a03a36fb04f959a5e4127bd539d}{04793}} \mbox{\hyperlink{cam__xpt_8c_aeb7a0a03a36fb04f959a5e4127bd539d}{xpt\_release\_target}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *target)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04794}04794 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04795}04795         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus = target-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04796}04796 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04797}04797         mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04798}04798         \textcolor{keywordflow}{if} (-\/-\/target-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}} > 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04799}04799                 mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04800}04800                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04801}04801         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04802}04802         TAILQ\_REMOVE(\&bus-\/>et\_entries, target, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04803}04803         bus-\/>\mbox{\hyperlink{structcam__eb_a40650834f3f2b8fcd317b6730f708eff}{generation}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04804}04804         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04805}04805         KASSERT(TAILQ\_EMPTY(\&target-\/>ed\_entries),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04806}04806             (\textcolor{stringliteral}{"{}destroying target, but device list is not empty"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04807}04807         \mbox{\hyperlink{cam__xpt_8c_a440d5af8ebf13754ae7f7766657c5aac}{xpt\_release\_bus}}(bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04808}04808         mtx\_destroy(\&target-\/>\mbox{\hyperlink{structcam__et_a4006b0773c60f198186ad9b1ed73a715}{luns\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04809}04809         \textcolor{keywordflow}{if} (target-\/>\mbox{\hyperlink{structcam__et_ac4534ed644d3ad04b06def2f06f817bd}{luns}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04810}04810                 free(target-\/>\mbox{\hyperlink{structcam__et_ac4534ed644d3ad04b06def2f06f817bd}{luns}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04811}04811         free(target, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04812}04812 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04813}04813 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04814}04814 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04815}\mbox{\hyperlink{cam__xpt_8c_a3b6a29f143e4da0d07173d14ac816071}{04815}} \mbox{\hyperlink{cam__xpt_8c_a3b6a29f143e4da0d07173d14ac816071}{xpt\_alloc\_device\_default}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04816}04816                          \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}} \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04817}04817 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04818}04818         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04819}04819 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04820}04820         device = \mbox{\hyperlink{cam__xpt_8c_ad60ccf109355adedbf688ff3480061f2}{xpt\_alloc\_device}}(bus, \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}, \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04821}04821         \textcolor{keywordflow}{if} (device == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04822}04822                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04823}04823 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04824}04824         device-\/>\mbox{\hyperlink{structcam__ed_a4c0260174102acd8aff3af41038f6b95}{mintags}} = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04825}04825         device-\/>\mbox{\hyperlink{structcam__ed_a230a075b8326e7811f8d89e1ddbefe26}{maxtags}} = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04826}04826         \textcolor{keywordflow}{return} (device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04827}04827 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04828}04828 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04829}04829 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04830}\mbox{\hyperlink{cam__xpt_8c_ad7652a8220540f709a55723dc455a40d}{04830}} \mbox{\hyperlink{cam__xpt_8c_ad7652a8220540f709a55723dc455a40d}{xpt\_destroy\_device}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04831}04831 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04832}04832         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}}     *device = context;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04833}04833 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04834}04834         mtx\_lock(\&device-\/>\mbox{\hyperlink{structcam__ed_a4586f693e9f95784f27c3c2e16ff31a1}{device\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04835}04835         mtx\_destroy(\&device-\/>\mbox{\hyperlink{structcam__ed_a4586f693e9f95784f27c3c2e16ff31a1}{device\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04836}04836         free(device, M\_CAMDEV);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04837}04837 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04838}04838 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04839}04839 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04840}\mbox{\hyperlink{cam__xpt_8c_ad60ccf109355adedbf688ff3480061f2}{04840}} \mbox{\hyperlink{cam__xpt_8c_ad60ccf109355adedbf688ff3480061f2}{xpt\_alloc\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}, \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}} \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04841}04841 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04842}04842         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}}     *cur\_device, *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04843}04843         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04844}04844         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04845}04845 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04846}04846         mtx\_assert(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04847}04847         \textcolor{comment}{/* Make space for us in the device queue on our bus */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04848}04848         devq = bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04849}04849         mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04850}04850         status = \mbox{\hyperlink{cam__queue_8c_a00ad773d879419fea0586a0d9ccfb235}{cam\_devq\_resize}}(devq, devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_a0f52bb514dd299f383aeb4cb7a7f6de3}{array\_size}} + 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04851}04851         mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04852}04852         \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04853}04853                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04854}04854 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04855}04855         device = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *)malloc(\textcolor{keyword}{sizeof}(*device),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04856}04856                                          M\_CAMDEV, M\_NOWAIT|M\_ZERO);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04857}04857         \textcolor{keywordflow}{if} (device == NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04858}04858                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04859}04859 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04860}04860         \mbox{\hyperlink{cam_8h_a9674f287f7b9ceab22e4ef97ef25e321}{cam\_init\_pinfo}}(\&device-\/>\mbox{\hyperlink{structcam__ed_a464fc40a10046ceada30d79d23fe50fa}{devq\_entry}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04861}04861         device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}} = \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04862}04862         device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} = \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04863}04863         device-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}} = bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04864}04864         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__queue_8c_af080e7b003aa14fe7afb73390f8616ad}{cam\_ccbq\_init}}(\&device-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04865}04865                           bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad117131f8d189c50127fe6caad5ec165}{max\_dev\_openings}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04866}04866                 free(device, M\_CAMDEV);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04867}04867                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04868}04868         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04869}04869         SLIST\_INIT(\&device-\/>\mbox{\hyperlink{structcam__ed_a9254b35826c53d78a258751e75334824}{asyncs}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04870}04870         SLIST\_INIT(\&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04871}04871         device-\/>\mbox{\hyperlink{structcam__ed_a38440f387b4d1effb8611a32d4635671}{generation}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04872}04872         device-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} = \mbox{\hyperlink{cam__xpt__internal_8h_a378601270c3c4caaa8c30d76901299fe}{CAM\_DEV\_UNCONFIGURED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04873}04873         device-\/>\mbox{\hyperlink{structcam__ed_a31e46af12be79e6c7f02e4d640203e85}{tag\_delay\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04874}04874         device-\/>\mbox{\hyperlink{structcam__ed_ae324dfbe5de027f81d1415400aa72f21}{tag\_saved\_openings}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04875}04875         device-\/>\mbox{\hyperlink{structcam__ed_afcbcee5cd61c742e161ff61bd7353a49}{refcount}} = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04876}04876         mtx\_init(\&device-\/>\mbox{\hyperlink{structcam__ed_a4586f693e9f95784f27c3c2e16ff31a1}{device\_mtx}}, \textcolor{stringliteral}{"{}CAM device lock"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04877}04877         callout\_init\_mtx(\&device-\/>\mbox{\hyperlink{structcam__ed_ad5d1e1338689502438f7262ffd279a7e}{callout}}, \&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04878}04878         TASK\_INIT(\&device-\/>\mbox{\hyperlink{structcam__ed_a187e700e15b6e37fbb2a8cd12b0748df}{device\_destroy\_task}}, 0, \mbox{\hyperlink{cam__xpt_8c_ad7652a8220540f709a55723dc455a40d}{xpt\_destroy\_device}}, device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04879}04879         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04880}04880 \textcolor{comment}{         * Hold a reference to our parent bus so it}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04881}04881 \textcolor{comment}{         * will not go away before we do.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04882}04882 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04883}04883         \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04884}04884 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04885}04885         cur\_device = TAILQ\_FIRST(\&\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>ed\_entries);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04886}04886         \textcolor{keywordflow}{while} (cur\_device != NULL \&\& cur\_device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} < \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04887}04887                 cur\_device = TAILQ\_NEXT(cur\_device, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04888}04888         \textcolor{keywordflow}{if} (cur\_device != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04889}04889                 TAILQ\_INSERT\_BEFORE(cur\_device, device, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04890}04890         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04891}04891                 TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>ed\_entries, device, links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04892}04892         \mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a2d6177af4f2835ea52e6d680130f23ee}{generation}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04893}04893         \textcolor{keywordflow}{return} (device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04894}04894 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04895}04895 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04896}04896 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04897}\mbox{\hyperlink{cam__xpt_8c_a01bdf0561d2c7b64751461a89673df2e}{04897}} \mbox{\hyperlink{cam__xpt_8c_a01bdf0561d2c7b64751461a89673df2e}{xpt\_acquire\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04898}04898 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04899}04899         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus = device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04900}04900 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04901}04901         mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04902}04902         device-\/>\mbox{\hyperlink{structcam__ed_afcbcee5cd61c742e161ff61bd7353a49}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04903}04903         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04904}04904 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04905}04905 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04906}04906 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04907}\mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{04907}} \mbox{\hyperlink{cam__xpt_8c_a33e988a8edce9afeed8fbf53f8114163}{xpt\_release\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04908}04908 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04909}04909         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus = device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04910}04910         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04911}04911 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04912}04912         mtx\_lock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04913}04913         \textcolor{keywordflow}{if} (-\/-\/device-\/>\mbox{\hyperlink{structcam__ed_afcbcee5cd61c742e161ff61bd7353a49}{refcount}} > 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04914}04914                 mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04915}04915                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04916}04916         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04917}04917 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04918}04918         TAILQ\_REMOVE(\&device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>ed\_entries, device,links);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04919}04919         device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_a2d6177af4f2835ea52e6d680130f23ee}{generation}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04920}04920         mtx\_unlock(\&bus-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04921}04921 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04922}04922         \textcolor{comment}{/* Release our slot in the devq */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04923}04923         devq = bus-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04924}04924         mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04925}04925         \mbox{\hyperlink{cam__queue_8c_a00ad773d879419fea0586a0d9ccfb235}{cam\_devq\_resize}}(devq, devq-\/>\mbox{\hyperlink{structcam__devq_a7f843e3c67a07551caa448b9280163ea}{send\_queue}}.\mbox{\hyperlink{structcamq_a0f52bb514dd299f383aeb4cb7a7f6de3}{array\_size}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04926}04926 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04927}04927         KASSERT(SLIST\_EMPTY(\&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}}),}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04928}04928             (\textcolor{stringliteral}{"{}destroying device, but periphs list is not empty"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04929}04929         KASSERT(device-\/>\mbox{\hyperlink{structcam__ed_a464fc40a10046ceada30d79d23fe50fa}{devq\_entry}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} == \mbox{\hyperlink{cam_8h_a7af58dadfb8e09c223ffed09239f787b}{CAM\_UNQUEUED\_INDEX}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04930}04930             (\textcolor{stringliteral}{"{}destroying device while still queued for ccbs"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04931}04931 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04932}04932         \textcolor{comment}{/* The send\_mtx must be held when accessing the callout */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04933}04933         \textcolor{keywordflow}{if} ((device-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a84bdff7b362347724ebba49af78d10cd}{CAM\_DEV\_REL\_TIMEOUT\_PENDING}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04934}04934                 callout\_stop(\&device-\/>\mbox{\hyperlink{structcam__ed_ad5d1e1338689502438f7262ffd279a7e}{callout}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04935}04935 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04936}04936         mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04937}04937 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04938}04938         \mbox{\hyperlink{cam__xpt_8c_aeb7a0a03a36fb04f959a5e4127bd539d}{xpt\_release\_target}}(device-\/>\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04939}04939 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04940}04940         \mbox{\hyperlink{cam__queue_8c_a30c0078f2814cdd41c6cd9dcee022119}{cam\_ccbq\_fini}}(\&device-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04941}04941         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04942}04942 \textcolor{comment}{         * Free allocated memory.  free(9) does nothing if the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04943}04943 \textcolor{comment}{         * supplied pointer is NULL, so it is safe to call without}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04944}04944 \textcolor{comment}{         * checking.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04945}04945 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04946}04946         free(device-\/>\mbox{\hyperlink{structcam__ed_a056919ab6eda9fff216f16677304dc32}{supported\_vpds}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04947}04947         free(device-\/>\mbox{\hyperlink{structcam__ed_a8feeaac693e585319cf80960ea87d222}{device\_id}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04948}04948         free(device-\/>\mbox{\hyperlink{structcam__ed_a11d2002f014fcbf40e6655a9de633c4c}{ext\_inq}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04949}04949         free(device-\/>\mbox{\hyperlink{structcam__ed_ab158b981cc2792577163c83a3835180c}{physpath}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04950}04950         free(device-\/>\mbox{\hyperlink{structcam__ed_a14acca8a7d98b710a74d90e6ffd4f6db}{rcap\_buf}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04951}04951         free(device-\/>\mbox{\hyperlink{structcam__ed_a42307f2d582c88574f75c7e5393bdba0}{serial\_num}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04952}04952         free(device-\/>\mbox{\hyperlink{structcam__ed_a79fd79b1a87fbb82381a280d6308203a}{nvme\_data}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04953}04953         free(device-\/>\mbox{\hyperlink{structcam__ed_ac9cd8c5b428dc6009c3d953ed4035cf5}{nvme\_cdata}}, M\_CAMXPT);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04954}04954         taskqueue\_enqueue(\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_taskq, \&device-\/>\mbox{\hyperlink{structcam__ed_a187e700e15b6e37fbb2a8cd12b0748df}{device\_destroy\_task}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04955}04955 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04956}04956 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04957}04957 u\_int32\_t}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04958}\mbox{\hyperlink{cam__xpt_8c_aed3014db44ac020729179ee619739084}{04958}} \mbox{\hyperlink{cam__xpt_8c_aed3014db44ac020729179ee619739084}{xpt\_dev\_ccbq\_resize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keywordtype}{int} newopenings)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04959}04959 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04960}04960         \textcolor{keywordtype}{int}     result;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04961}04961         \textcolor{keyword}{struct  }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04962}04962 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04963}04963         dev = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04964}04964         mtx\_lock(\&dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}}-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04965}04965         result = \mbox{\hyperlink{cam__queue_8c_aa34590944e10adf215c6f2f2145d2696}{cam\_ccbq\_resize}}(\&dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}, newopenings);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04966}04966         mtx\_unlock(\&dev-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}}-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04967}04967         \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a9a3734688d136304232eafe4a96b6e7a}{CAM\_DEV\_TAG\_AFTER\_COUNT}}) != 0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04968}04968          || (dev-\/>\mbox{\hyperlink{structcam__ed_a72233078c6c53a614e242b55ae7a4f25}{inq\_flags}} \& \mbox{\hyperlink{scsi__all_8h_a2654353ac4dfee5fb1a94d06703a6921}{SID\_CmdQue}}) != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04969}04969                 dev-\/>\mbox{\hyperlink{structcam__ed_ae324dfbe5de027f81d1415400aa72f21}{tag\_saved\_openings}} = newopenings;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04970}04970         \textcolor{keywordflow}{return} (result);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04971}04971 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04972}04972 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04973}04973 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04974}\mbox{\hyperlink{cam__xpt_8c_aadfcd79ce730e041b28a179f5296a75c}{04974}} \mbox{\hyperlink{cam__xpt_8c_aadfcd79ce730e041b28a179f5296a75c}{xpt\_find\_bus}}(\mbox{\hyperlink{cam_8h_a8169e7df03a9de6f19329cf8e5bbac14}{path\_id\_t}} \mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04975}04975 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04976}04976         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__eb}{cam\_eb}} *bus;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04977}04977 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04978}04978         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04979}04979         \textcolor{keywordflow}{for} (bus = TAILQ\_FIRST(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_busses);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04980}04980              bus != NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04981}04981              bus = TAILQ\_NEXT(bus, links)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04982}04982                 \textcolor{keywordflow}{if} (bus-\/>\mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}} == \mbox{\hyperlink{structcam__eb_a27766463afc51bfd89522e76e57a7b13}{path\_id}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04983}04983                         bus-\/>\mbox{\hyperlink{structcam__eb_a06dbc0388f2a8fc73098f69e5af03a77}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04984}04984                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04985}04985                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04986}04986         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04987}04987         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04988}04988         \textcolor{keywordflow}{return} (bus);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04989}04989 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04990}04990 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04991}04991 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04992}\mbox{\hyperlink{cam__xpt_8c_afbab80f711435b3e0333daca06c674b4}{04992}} \mbox{\hyperlink{cam__xpt_8c_afbab80f711435b3e0333daca06c674b4}{xpt\_find\_target}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__eb}{cam\_eb}} *\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}, \mbox{\hyperlink{cam_8h_af420b02e4c824e79ca80f8910b8e3a8f}{target\_id\_t}}      \mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04993}04993 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04994}04994         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__et}{cam\_et}} *target;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04995}04995 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04996}04996         mtx\_assert(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04997}04997         \textcolor{keywordflow}{for} (target = TAILQ\_FIRST(\&\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>et\_entries);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04998}04998              target != NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l04999}04999              target = TAILQ\_NEXT(target, links)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05000}05000                 \textcolor{keywordflow}{if} (target-\/>\mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}} == \mbox{\hyperlink{structcam__et_a5dfc9f710a2a378252232d2a5704bca6}{target\_id}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05001}05001                         target-\/>\mbox{\hyperlink{structcam__et_a56b0cc908749709d1113bd5c8f7bc859}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05002}05002                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05003}05003                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05004}05004         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05005}05005         \textcolor{keywordflow}{return} (target);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05006}05006 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05007}05007 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05008}05008 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05009}\mbox{\hyperlink{cam__xpt_8c_a2cec196d96ce138d2f17712be8e8df94}{05009}} \mbox{\hyperlink{cam__xpt_8c_a2cec196d96ce138d2f17712be8e8df94}{xpt\_find\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__et}{cam\_et}} *\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}, \mbox{\hyperlink{cam_8h_afed71736dc694710016fe1e7c75b6a62}{lun\_id\_t}} \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05010}05010 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05011}05011         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05012}05012 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05013}05013         mtx\_assert(\&\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>\mbox{\hyperlink{structcam__et_afddf501c08771b3f59461b6f04eb2327}{bus}}-\/>\mbox{\hyperlink{structcam__eb_ac0e07f48acbe0dbc37759f3cefd37e40}{eb\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05014}05014         \textcolor{keywordflow}{for} (device = TAILQ\_FIRST(\&\mbox{\hyperlink{structcam__ed_a50ca7346e6bf2b64351c207e6ee7a3d6}{target}}-\/>ed\_entries);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05015}05015              device != NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05016}05016              device = TAILQ\_NEXT(device, links)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05017}05017                 \textcolor{keywordflow}{if} (device-\/>\mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}} == \mbox{\hyperlink{structcam__ed_a66726e4150e5824da5b8ae7fd80b207d}{lun\_id}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05018}05018                         device-\/>\mbox{\hyperlink{structcam__ed_afcbcee5cd61c742e161ff61bd7353a49}{refcount}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05019}05019                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05020}05020                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05021}05021         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05022}05022         \textcolor{keywordflow}{return} (device);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05023}05023 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05024}05024 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05025}05025 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05026}\mbox{\hyperlink{cam__xpt_8c_a2d32cd31929e656475e99dd720955e75}{05026}} \mbox{\hyperlink{cam__xpt_8c_a2d32cd31929e656475e99dd720955e75}{xpt\_start\_tags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05027}05027 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05028}05028         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__relsim}{ccb\_relsim}} crs;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05029}05029         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05030}05030         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05031}05031         \textcolor{keywordtype}{int}    newopenings;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05032}05032 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05033}05033         device = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05034}05034         sim = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05035}05035         device-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \&= \string~CAM\_DEV\_TAG\_AFTER\_COUNT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05036}05036         \mbox{\hyperlink{cam__xpt_8c_a2cca45a6e91cae097f1d958c315231e8}{xpt\_freeze\_devq}}(path, \textcolor{comment}{/*count*/}1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05037}05037         device-\/>\mbox{\hyperlink{structcam__ed_a72233078c6c53a614e242b55ae7a4f25}{inq\_flags}} |= \mbox{\hyperlink{scsi__all_8h_a2654353ac4dfee5fb1a94d06703a6921}{SID\_CmdQue}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05038}05038         \textcolor{keywordflow}{if} (device-\/>\mbox{\hyperlink{structcam__ed_ae324dfbe5de027f81d1415400aa72f21}{tag\_saved\_openings}} != 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05039}05039                 newopenings = device-\/>\mbox{\hyperlink{structcam__ed_ae324dfbe5de027f81d1415400aa72f21}{tag\_saved\_openings}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05040}05040         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05041}05041                 newopenings = min(device-\/>\mbox{\hyperlink{structcam__ed_a230a075b8326e7811f8d89e1ddbefe26}{maxtags}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05042}05042                                   sim-\/>\mbox{\hyperlink{structcam__sim_a6f05fe863b1d5022065a73c42765ca2e}{max\_tagged\_dev\_openings}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05043}05043         \mbox{\hyperlink{cam__xpt_8c_aed3014db44ac020729179ee619739084}{xpt\_dev\_ccbq\_resize}}(path, newopenings);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05044}05044         \mbox{\hyperlink{cam__xpt_8c_a60a033db88b93c6492304499e81774c0}{xpt\_async}}(\mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a761c3deb864c8b47c8123ee11a113df6}{AC\_GETDEV\_CHANGED}}, path, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05045}05045         memset(\&crs, 0, \textcolor{keyword}{sizeof}(crs));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05046}05046         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&crs.\mbox{\hyperlink{structccb__relsim_a60e6f1171486b67a1289676ed60323a9}{ccb\_h}}, path, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05047}05047         crs.\mbox{\hyperlink{structccb__relsim_a60e6f1171486b67a1289676ed60323a9}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa82235704cd5b118816dff88c853f878}{XPT\_REL\_SIMQ}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05048}05048         crs.\mbox{\hyperlink{structccb__relsim_aa55861834a4598edae0905398ad79e04}{release\_flags}} = \mbox{\hyperlink{cam__ccb_8h_aef41b42c864806b1c082fe3ae149c2c0}{RELSIM\_RELEASE\_AFTER\_QEMPTY}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05049}05049         crs.\mbox{\hyperlink{structccb__relsim_a6cfc4e527042fbf18804aa3148f93ef4}{openings}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05050}05050             = crs.\mbox{\hyperlink{structccb__relsim_a9ee5057c69b461533b9d9362d5785a8a}{release\_timeout}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05051}05051             = crs.\mbox{\hyperlink{structccb__relsim_a293cc106fd8d988a327e7027cd2f5da4}{qfrozen\_cnt}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05052}05052             = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05053}05053         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}((\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)\&crs);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05054}05054 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05055}05055 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05056}05056 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05057}\mbox{\hyperlink{cam__xpt_8c_ab8a4bce48c1c51d3bc007b96d2c3bf61}{05057}} \mbox{\hyperlink{cam__xpt_8c_ab8a4bce48c1c51d3bc007b96d2c3bf61}{xpt\_stop\_tags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05058}05058 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05059}05059         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__relsim}{ccb\_relsim}} crs;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05060}05060         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05061}05061         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05062}05062 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05063}05063         device = path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05064}05064         sim = path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05065}05065         device-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \&= \string~CAM\_DEV\_TAG\_AFTER\_COUNT;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05066}05066         device-\/>\mbox{\hyperlink{structcam__ed_a31e46af12be79e6c7f02e4d640203e85}{tag\_delay\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05067}05067         \mbox{\hyperlink{cam__xpt_8c_a2cca45a6e91cae097f1d958c315231e8}{xpt\_freeze\_devq}}(path, \textcolor{comment}{/*count*/}1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05068}05068         device-\/>\mbox{\hyperlink{structcam__ed_a72233078c6c53a614e242b55ae7a4f25}{inq\_flags}} \&= \string~SID\_CmdQue;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05069}05069         \mbox{\hyperlink{cam__xpt_8c_aed3014db44ac020729179ee619739084}{xpt\_dev\_ccbq\_resize}}(path, sim-\/>\mbox{\hyperlink{structcam__sim_ad117131f8d189c50127fe6caad5ec165}{max\_dev\_openings}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05070}05070         \mbox{\hyperlink{cam__xpt_8c_a60a033db88b93c6492304499e81774c0}{xpt\_async}}(\mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a761c3deb864c8b47c8123ee11a113df6}{AC\_GETDEV\_CHANGED}}, path, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05071}05071         memset(\&crs, 0, \textcolor{keyword}{sizeof}(crs));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05072}05072         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&crs.\mbox{\hyperlink{structccb__relsim_a60e6f1171486b67a1289676ed60323a9}{ccb\_h}}, path, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05073}05073         crs.\mbox{\hyperlink{structccb__relsim_a60e6f1171486b67a1289676ed60323a9}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa82235704cd5b118816dff88c853f878}{XPT\_REL\_SIMQ}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05074}05074         crs.\mbox{\hyperlink{structccb__relsim_aa55861834a4598edae0905398ad79e04}{release\_flags}} = \mbox{\hyperlink{cam__ccb_8h_aef41b42c864806b1c082fe3ae149c2c0}{RELSIM\_RELEASE\_AFTER\_QEMPTY}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05075}05075         crs.\mbox{\hyperlink{structccb__relsim_a6cfc4e527042fbf18804aa3148f93ef4}{openings}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05076}05076             = crs.\mbox{\hyperlink{structccb__relsim_a9ee5057c69b461533b9d9362d5785a8a}{release\_timeout}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05077}05077             = crs.\mbox{\hyperlink{structccb__relsim_a293cc106fd8d988a327e7027cd2f5da4}{qfrozen\_cnt}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05078}05078             = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05079}05079         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}((\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)\&crs);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05080}05080 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05081}05081 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05082}05082 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05083}05083 \textcolor{comment}{ * Assume all possible buses are detected by this time, so allow boot}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05084}05084 \textcolor{comment}{ * as soon as they all are scanned.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05085}05085 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05086}05086 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05087}\mbox{\hyperlink{cam__xpt_8c_a413ceca6c4f3a06de8832b023151dedc}{05087}} \mbox{\hyperlink{cam__xpt_8c_a413ceca6c4f3a06de8832b023151dedc}{xpt\_boot\_delay}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05088}05088 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05089}05089 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05090}05090         \mbox{\hyperlink{cam__xpt_8c_aad3a8063d503635e6b907c8825fbbded}{xpt\_release\_boot}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05091}05091 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05092}05092 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05093}05093 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05094}05094 \textcolor{comment}{ * Now that all config hooks have completed, start boot\_delay timer,}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05095}05095 \textcolor{comment}{ * waiting for possibly still undetected buses (USB) to appear.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05096}05096 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05097}05097 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05098}\mbox{\hyperlink{cam__xpt_8c_aef5cbf3f54c3f3398cc8614450b3163f}{05098}} \mbox{\hyperlink{cam__xpt_8c_aef5cbf3f54c3f3398cc8614450b3163f}{xpt\_ch\_done}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05099}05099 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05100}05100 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05101}05101         callout\_init(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.boot\_callout, 1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05102}05102         callout\_reset\_sbt(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.boot\_callout, SBT\_1MS * \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.boot\_delay,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05103}05103             SBT\_1MS, \mbox{\hyperlink{cam__xpt_8c_a413ceca6c4f3a06de8832b023151dedc}{xpt\_boot\_delay}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05104}05104 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05105}\mbox{\hyperlink{cam__xpt_8c_a6723133dcbe5cc63cbb1e78640f70165}{05105}} \mbox{\hyperlink{cam__xpt_8c_a6723133dcbe5cc63cbb1e78640f70165}{SYSINIT}}(xpt\_hw\_delay, SI\_SUB\_INT\_CONFIG\_HOOKS, SI\_ORDER\_ANY, \mbox{\hyperlink{cam__xpt_8c_aef5cbf3f54c3f3398cc8614450b3163f}{xpt\_ch\_done}}, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05106}05106 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05107}05107 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05108}05108 \textcolor{comment}{ * Now that interrupts are enabled, go find our devices}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05109}05109 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05110}05110 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05111}\mbox{\hyperlink{cam__xpt_8c_a43cdc0766fd1a67f91f3f86190af6842}{05111}} \mbox{\hyperlink{cam__xpt_8c_a43cdc0766fd1a67f91f3f86190af6842}{xpt\_config}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05112}05112 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05113}05113         \textcolor{keywordflow}{if} (taskqueue\_start\_threads(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_taskq, 1, PRIBIO, \textcolor{stringliteral}{"{}CAM taskq"{}}))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05114}05114                 printf(\textcolor{stringliteral}{"{}xpt\_config: failed to create taskqueue thread.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05115}05115 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05116}05116         \textcolor{comment}{/* Setup debugging path */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05117}05117         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_a730788b21146c843927c6b94532a3369}{cam\_dflags}} != \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a4ae4048d8d5898b144327d007632592c}{CAM\_DEBUG\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05118}05118                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(\&\mbox{\hyperlink{cam__xpt_8c_aa56e84cf3a282c85a99d9c51a56dc9b0}{cam\_dpath}}, NULL,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05119}05119                                     \mbox{\hyperlink{cam__debug_8h_a81aaed238e1e02063ad3cdaf1a73ec11}{CAM\_DEBUG\_BUS}}, \mbox{\hyperlink{cam__debug_8h_a73f6a7f1d672bc02678c31eb68f537dd}{CAM\_DEBUG\_TARGET}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05120}05120                                     \mbox{\hyperlink{cam__debug_8h_a56b6b75bb15680cdbf584562bd9fb0f9}{CAM\_DEBUG\_LUN}}) != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05121}05121                         printf(\textcolor{stringliteral}{"{}xpt\_config: xpt\_create\_path() failed for debug"{}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05122}05122                                \textcolor{stringliteral}{"{} target \%d:\%d:\%d, debugging disabled\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05123}05123                                \mbox{\hyperlink{cam__debug_8h_a81aaed238e1e02063ad3cdaf1a73ec11}{CAM\_DEBUG\_BUS}}, \mbox{\hyperlink{cam__debug_8h_a73f6a7f1d672bc02678c31eb68f537dd}{CAM\_DEBUG\_TARGET}}, \mbox{\hyperlink{cam__debug_8h_a56b6b75bb15680cdbf584562bd9fb0f9}{CAM\_DEBUG\_LUN}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05124}05124                         \mbox{\hyperlink{cam__xpt_8c_a730788b21146c843927c6b94532a3369}{cam\_dflags}} = \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a4ae4048d8d5898b144327d007632592c}{CAM\_DEBUG\_NONE}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05125}05125                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05126}05126         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05127}05127                 \mbox{\hyperlink{cam__xpt_8c_aa56e84cf3a282c85a99d9c51a56dc9b0}{cam\_dpath}} = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05128}05128 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05129}05129         \mbox{\hyperlink{cam__periph_8c_a082e5a0e304354a31963e9265919b055}{periphdriver\_init}}(1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05130}05130         \mbox{\hyperlink{cam__xpt_8c_aeb14882e71ed9fda76b47ef9600097a8}{xpt\_hold\_boot}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05131}05131 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05132}05132         \textcolor{comment}{/* Fire up rescan thread. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05133}05133         \textcolor{keywordflow}{if} (kproc\_kthread\_add(\mbox{\hyperlink{cam__xpt_8c_a9f540c30ee9a6bed2f45aa3adb14a208}{xpt\_scanner\_thread}}, NULL, \&\mbox{\hyperlink{cam__xpt_8c_a018571c1d0ded4716fe7113c268f7d2d}{cam\_proc}}, NULL, 0, 0,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05134}05134             \textcolor{stringliteral}{"{}cam"{}}, \textcolor{stringliteral}{"{}scanner"{}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05135}05135                 printf(\textcolor{stringliteral}{"{}xpt\_config: failed to create rescan thread.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05136}05136         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05137}05137 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05138}05138 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05139}05139 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05140}\mbox{\hyperlink{cam__xpt_8c_ad01dbb9bc02336206aa099362fbeabe9}{05140}} \mbox{\hyperlink{cam__xpt_8c_ad01dbb9bc02336206aa099362fbeabe9}{xpt\_hold\_boot\_locked}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05141}05141 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05142}05142 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05143}05143         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.buses\_to\_config++ == 0)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05144}05144                 root\_mount\_hold\_token(\textcolor{stringliteral}{"{}CAM"{}}, \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_rootmount);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05145}05145 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05146}05146 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05147}05147 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05148}\mbox{\hyperlink{cam__xpt_8c_aeb14882e71ed9fda76b47ef9600097a8}{05148}} \mbox{\hyperlink{cam__xpt_8c_aeb14882e71ed9fda76b47ef9600097a8}{xpt\_hold\_boot}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05149}05149 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05150}05150 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05151}05151         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05152}05152         \mbox{\hyperlink{cam__xpt_8c_ad01dbb9bc02336206aa099362fbeabe9}{xpt\_hold\_boot\_locked}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05153}05153         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05154}05154 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05155}05155 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05156}05156 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05157}\mbox{\hyperlink{cam__xpt_8c_aad3a8063d503635e6b907c8825fbbded}{05157}} \mbox{\hyperlink{cam__xpt_8c_aad3a8063d503635e6b907c8825fbbded}{xpt\_release\_boot}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05158}05158 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05159}05159 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05160}05160         \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05161}05161         \textcolor{keywordflow}{if} (-\/-\/\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.buses\_to\_config == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05162}05162                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.buses\_config\_done == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05163}05163                         \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.buses\_config\_done = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05164}05164                         \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.buses\_to\_config++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05165}05165                         TASK\_INIT(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.boot\_task, 0, \mbox{\hyperlink{cam__xpt_8c_a8f8fa8daf701a20b8297a61dbfa3bd48}{xpt\_finishconfig\_task}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05166}05166                             NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05167}05167                         taskqueue\_enqueue(taskqueue\_thread, \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.boot\_task);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05168}05168                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05169}05169                         root\_mount\_rel(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_rootmount);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05170}05170         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05171}05171         \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05172}05172 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05173}05173 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05174}05174 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05175}05175 \textcolor{comment}{ * If the given device only has one peripheral attached to it, and if that}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05176}05176 \textcolor{comment}{ * peripheral is the passthrough driver, announce it.  This insures that the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05177}05177 \textcolor{comment}{ * user sees some sort of announcement for every peripheral in their system.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05178}05178 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05179}05179 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05180}\mbox{\hyperlink{cam__xpt_8c_a548c22c210f104ac23735987f0707d1e}{05180}} \mbox{\hyperlink{cam__xpt_8c_a8280cf68dc955496a729d510d673ec96}{xptpassannouncefunc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__ed}{cam\_ed}} *device, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05181}05181 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05182}05182         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05183}05183         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05184}05184 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05185}05185         \textcolor{keywordflow}{for} (periph = SLIST\_FIRST(\&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}}), i = 0; periph != NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05186}05186              periph = SLIST\_NEXT(periph, periph\_links), i++);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05187}05187 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05188}05188         periph = SLIST\_FIRST(\&device-\/>\mbox{\hyperlink{structcam__ed_a351c14e819e48036b418dff7ea2cea8d}{periphs}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05189}05189         \textcolor{keywordflow}{if} ((i == 1)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05190}05190          \&\& (strncmp(periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, \textcolor{stringliteral}{"{}pass"{}}, 4) == 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05191}05191                 \mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{xpt\_announce\_periph}}(periph, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05192}05192 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05193}05193         \textcolor{keywordflow}{return}(1);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05194}05194 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05195}05195 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05196}05196 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05197}\mbox{\hyperlink{cam__xpt_8c_a8f8fa8daf701a20b8297a61dbfa3bd48}{05197}} \mbox{\hyperlink{cam__xpt_8c_a8f8fa8daf701a20b8297a61dbfa3bd48}{xpt\_finishconfig\_task}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05198}05198 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05199}05199 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05200}05200         \mbox{\hyperlink{cam__periph_8c_a082e5a0e304354a31963e9265919b055}{periphdriver\_init}}(2);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05201}05201         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05202}05202 \textcolor{comment}{         * Check for devices with no "{}standard"{} peripheral driver}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05203}05203 \textcolor{comment}{         * attached.  For any devices like that, announce the}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05204}05204 \textcolor{comment}{         * passthrough driver so the user will see something.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05205}05205 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05206}05206         \textcolor{keywordflow}{if} (!bootverbose)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05207}05207                 \mbox{\hyperlink{cam__xpt_8c_aacaf969f9c27c1098dfdad8cc92089ec}{xpt\_for\_all\_devices}}(\mbox{\hyperlink{cam__xpt_8c_a8280cf68dc955496a729d510d673ec96}{xptpassannouncefunc}}, NULL);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05208}05208 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05209}05209         \mbox{\hyperlink{cam__xpt_8c_aad3a8063d503635e6b907c8825fbbded}{xpt\_release\_boot}}();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05210}05210 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05211}05211 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05212}05212 \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05213}\mbox{\hyperlink{cam__xpt_8c_a8307586c12fb4774768a25a1fa4e6388}{05213}} \mbox{\hyperlink{cam__xpt_8c_a8307586c12fb4774768a25a1fa4e6388}{xpt\_register\_async}}(\textcolor{keywordtype}{int} event, \mbox{\hyperlink{cam__ccb_8h_a146226ffe8ddbefd259cd315198f3fec}{ac\_callback\_t}} *cbfunc, \textcolor{keywordtype}{void} *cbarg,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05214}05214                    \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05215}05215 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05216}05216         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__setasync}{ccb\_setasync}} csa;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05217}05217         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05218}05218         \textcolor{keywordtype}{int} xptpath = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05219}05219 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05220}05220         \textcolor{keywordflow}{if} (path == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05221}05221                 status = \mbox{\hyperlink{cam__xpt_8c_a29b31416ba01fbf7ab51c968bc637d30}{xpt\_create\_path}}(\&path, \textcolor{comment}{/*periph*/}NULL, \mbox{\hyperlink{cam_8h_a1c5915081b16a0ed18a2a287e4992c13}{CAM\_XPT\_PATH\_ID}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05222}05222                                          \mbox{\hyperlink{cam_8h_a08317e5f8591315faef6fecfd3817fed}{CAM\_TARGET\_WILDCARD}}, \mbox{\hyperlink{cam_8h_a18ef98c84b4cf578514faec8ba1a8d28}{CAM\_LUN\_WILDCARD}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05223}05223                 \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05224}05224                         \textcolor{keywordflow}{return} (status);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05225}05225                 \mbox{\hyperlink{cam__xpt_8h_a81ce2d44dcd261d0d54d1c24b0e1f11e}{xpt\_path\_lock}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05226}05226                 xptpath = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05227}05227         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05228}05228 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05229}05229         memset(\&csa, 0, \textcolor{keyword}{sizeof}(csa));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05230}05230         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&csa.\mbox{\hyperlink{structccb__setasync_a51f1a58da3f3b8f093efb1c5d1f3310f}{ccb\_h}}, path, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05231}05231         csa.\mbox{\hyperlink{structccb__setasync_a51f1a58da3f3b8f093efb1c5d1f3310f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca721f8cc23e4415f173e15b31ed484cf2}{XPT\_SASYNC\_CB}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05232}05232         csa.\mbox{\hyperlink{structccb__setasync_a5228e04ae6feac2230035012bd1ae986}{event\_enable}} = event;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05233}05233         csa.\mbox{\hyperlink{structccb__setasync_a8e7084ccce3c28f263877ec86cc31271}{callback}} = cbfunc;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05234}05234         csa.\mbox{\hyperlink{structccb__setasync_a0a46376eb707a048d847392a0917a1cb}{callback\_arg}} = cbarg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05235}05235         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}((\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)\&csa);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05236}05236         status = csa.\mbox{\hyperlink{structccb__setasync_a51f1a58da3f3b8f093efb1c5d1f3310f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05237}05237 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05238}05238         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(csa.\mbox{\hyperlink{structccb__setasync_a51f1a58da3f3b8f093efb1c5d1f3310f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05239}05239             (\textcolor{stringliteral}{"{}xpt\_register\_async: func \%p\(\backslash\)n"{}}, cbfunc));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05240}05240 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05241}05241         \textcolor{keywordflow}{if} (xptpath) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05242}05242                 \mbox{\hyperlink{cam__xpt_8h_a14b8db5099e848843133059a192429af}{xpt\_path\_unlock}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05243}05243                 \mbox{\hyperlink{cam__xpt_8c_aa27bbf640d7c4e3bf9fb31d90c3da929}{xpt\_free\_path}}(path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05244}05244         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05245}05245 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05246}05246         \textcolor{keywordflow}{if} ((status == \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05247}05247             (csa.\mbox{\hyperlink{structccb__setasync_a5228e04ae6feac2230035012bd1ae986}{event\_enable}} \& \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a04183843e65dd16d378d105270a6debd}{AC\_FOUND\_DEVICE}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05248}05248                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05249}05249 \textcolor{comment}{                 * Get this peripheral up to date with all}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05250}05250 \textcolor{comment}{                 * the currently existing devices.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05251}05251 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05252}05252                 \mbox{\hyperlink{cam__xpt_8c_aacaf969f9c27c1098dfdad8cc92089ec}{xpt\_for\_all\_devices}}(\mbox{\hyperlink{cam__xpt_8c_a8724a857fbfa39e441e8bfcc30270481}{xptsetasyncfunc}}, \&csa);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05253}05253         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05254}05254         \textcolor{keywordflow}{if} ((status == \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \&\&}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05255}05255             (csa.\mbox{\hyperlink{structccb__setasync_a5228e04ae6feac2230035012bd1ae986}{event\_enable}} \& \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a929293d03108ae612b5f980b87deccb4}{AC\_PATH\_REGISTERED}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05256}05256                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05257}05257 \textcolor{comment}{                 * Get this peripheral up to date with all}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05258}05258 \textcolor{comment}{                 * the currently existing buses.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05259}05259 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05260}05260                 \mbox{\hyperlink{cam__xpt_8c_ab42e66d2a282daadeb18819fe9f7e690}{xpt\_for\_all\_busses}}(\mbox{\hyperlink{cam__xpt_8c_ab9e5ad80e9182de58620f6eea2ed342d}{xptsetasyncbusfunc}}, \&csa);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05261}05261         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05262}05262 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05263}05263         \textcolor{keywordflow}{return} (status);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05264}05264 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05265}05265 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05266}05266 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05267}\mbox{\hyperlink{cam__xpt_8c_a69ff8dd020000ddf4567d70c30c58d5f}{05267}} \mbox{\hyperlink{cam__xpt_8c_a69ff8dd020000ddf4567d70c30c58d5f}{xptaction}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *work\_ccb)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05268}05268 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05269}05269         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}xptaction\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05270}05270 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05271}05271         \textcolor{keywordflow}{switch} (work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05272}05272         \textcolor{comment}{/* Common cases first */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05273}05273         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cad34c7b5cb68e0ed050bc95a55cd87f7c}{XPT\_PATH\_INQ}}:          \textcolor{comment}{/* Path routing inquiry */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05274}05274         \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05275}05275                 \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__pathinq}{ccb\_pathinq}} *cpi;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05276}05276 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05277}05277                 cpi = \&work\_ccb-\/>\mbox{\hyperlink{unionccb_af5f8e018edd68ac4078165c32ef6aa82}{cpi}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05278}05278                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a186b2ecd616f68937803d71dc650a452}{version\_num}} = 1; \textcolor{comment}{/* XXX??? */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05279}05279                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a8b368b467067fee18bb09e83859ecaa1}{hba\_inquiry}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05280}05280                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a923e6a1383bc827632294040e0545ce5}{target\_sprt}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05281}05281                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a7b48ff4ce816b541a1c06a92bf0a4447}{hba\_misc}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05282}05282                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a16b6c273fb16591cf693774c1262943d}{hba\_eng\_cnt}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05283}05283                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a2629d14fcfe43ae557567ec7122716cd}{max\_target}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05284}05284                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_aa34411e891163e736104ee783f82c17c}{max\_lun}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05285}05285                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_ac9f9c21909016837f81bdea36c0e63db}{initiator\_id}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05286}05286                 strlcpy(cpi-\/>\mbox{\hyperlink{structccb__pathinq_a8cfa668dd6fa253ba49f5b33fea2ad00}{sim\_vid}}, \textcolor{stringliteral}{"{}FreeBSD"{}}, \mbox{\hyperlink{cam__ccb_8h_ad96f7253a5daa2b903b136b892f3adb9}{SIM\_IDLEN}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05287}05287                 strlcpy(cpi-\/>\mbox{\hyperlink{structccb__pathinq_a52fac0091fb32cab83b5b60a868a145a}{hba\_vid}}, \textcolor{stringliteral}{"{}"{}}, \mbox{\hyperlink{cam__ccb_8h_abd60e5ed8cd7bf05c5bf99bab99af73e}{HBA\_IDLEN}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05288}05288                 strlcpy(cpi-\/>\mbox{\hyperlink{structccb__pathinq_a59c310c25aeebc87e2238f4e9fdde59c}{dev\_name}}, sim-\/>\mbox{\hyperlink{structcam__sim_ada801eb1672157418a9b8a99d79fa18c}{sim\_name}}, \mbox{\hyperlink{cam__ccb_8h_aea661c8c832c80ccc92e62f1a37b3cec}{DEV\_IDLEN}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05289}05289                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a39cb13194f2d3b32ba291584ef9c5b6a}{unit\_number}} = sim-\/>\mbox{\hyperlink{structcam__sim_a409a92688b2c8e54c1c22b8099f76ba2}{unit\_number}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05290}05290                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_ae61da712ae294939a70488cec8cba2ba}{bus\_id}} = sim-\/>\mbox{\hyperlink{structcam__sim_aabf5e9edfe6899dc7fc411977a811b16}{bus\_id}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05291}05291                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_aa99a953da5f645be9a9658555e91a4a3}{base\_transfer\_speed}} = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05292}05292                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a0fd2217429605ad2fb67e9e8bca6a4f2}{protocol}} = \mbox{\hyperlink{cam__ccb_8h_a283e001579038402a95e23bef57107e8a694540aaf16fd7588cfde979770f2804}{PROTO\_UNSPECIFIED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05293}05293                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a41b70fcb8e7e4b6dad351296978a7693}{protocol\_version}} = \mbox{\hyperlink{cam__ccb_8h_a31812df4e72f139c8371149a286e76c8}{PROTO\_VERSION\_UNSPECIFIED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05294}05294                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_aaef7c0420017996140ae4bdede6a8152}{transport}} = \mbox{\hyperlink{cam__ccb_8h_a724bbd85a7f871ac9067f5ee489192fead5c75112f2a9626810cc5d7d0ad3476a}{XPORT\_UNSPECIFIED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05295}05295                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_acb3156bdd68be769552f3814625a9691}{transport\_version}} = \mbox{\hyperlink{cam__ccb_8h_a6e3be6c5fed7007b0809d04661f5be82}{XPORT\_VERSION\_UNSPECIFIED}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05296}05296                 cpi-\/>\mbox{\hyperlink{structccb__pathinq_a9e4ef19d9e427247f68ee45ea48a93d2}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05297}05297                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05298}05298         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05299}05299         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05300}05300                 work\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} = \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a12f00b32285d7ae4b17eb8aaeae0d0fb}{CAM\_REQ\_INVALID}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05301}05301                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05302}05302         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05303}05303         \mbox{\hyperlink{cam__xpt_8c_a708fed7e2d55a1b2a180bb4462513393}{xpt\_done}}(work\_ccb);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05304}05304 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05305}05305 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05306}05306 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05307}05307 \textcolor{comment}{ * The xpt as a "{}controller"{} has no interrupt sources, so polling}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05308}05308 \textcolor{comment}{ * is a no-\/op.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05309}05309 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05310}05310 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05311}\mbox{\hyperlink{cam__xpt_8c_ab73c282e25bb07b4979fd6d181436346}{05311}} \mbox{\hyperlink{cam__xpt_8c_ab73c282e25bb07b4979fd6d181436346}{xptpoll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05312}05312 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05313}05313 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05314}05314 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05315}05315 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05316}\mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{05316}} \mbox{\hyperlink{cam__xpt_8c_a60b1de7ad262d5101af7e0560c41ec69}{xpt\_lock\_buses}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05317}05317 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05318}05318         mtx\_lock(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_topo\_lock);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05319}05319 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05320}05320 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05321}05321 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05322}\mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{05322}} \mbox{\hyperlink{cam__xpt_8c_a33e1e27cfd3b1661c4631f2b6aefd961}{xpt\_unlock\_buses}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05323}05323 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05324}05324         mtx\_unlock(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.xpt\_topo\_lock);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05325}05325 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05326}05326 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05327}05327 \textcolor{keyword}{struct }mtx *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05328}\mbox{\hyperlink{cam__xpt_8c_a1fc98e6b0f369df2a0f686e9f66ddfe5}{05328}} \mbox{\hyperlink{cam__xpt_8c_a1fc98e6b0f369df2a0f686e9f66ddfe5}{xpt\_path\_mtx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05329}05329 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05330}05330 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05331}05331         \textcolor{keywordflow}{return} (\&path-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}}-\/>\mbox{\hyperlink{structcam__ed_a4586f693e9f95784f27c3c2e16ff31a1}{device\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05332}05332 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05333}05333 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05334}05334 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05335}\mbox{\hyperlink{cam__xpt_8c_a1503a02005a52c0726423254272541bd}{05335}} \mbox{\hyperlink{cam__xpt_8c_a1503a02005a52c0726423254272541bd}{xpt\_done\_process}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *ccb\_h)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05336}05336 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05337}05337         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__sim}{cam\_sim}} *sim = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05338}05338         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__devq}{cam\_devq}} *devq = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05339}05339         \textcolor{keyword}{struct }mtx *mtx = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05340}05340 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05341}05341 \textcolor{preprocessor}{\#if defined(BUF\_TRACKING) || defined(FULL\_BUF\_TRACKING)}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05342}05342         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05343}05343 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05344}05344         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structccb__scsiio_a267ba491b17e3e5820fdf56425a635b1}{ccb\_h}}-\/>\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} == \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca426a17499239f5751c747d094b4998dc}{XPT\_SCSI\_IO}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05345}05345                 csio = \&((\textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *)\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}})-\/>csio;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05346}05346                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}-\/>bio != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05347}05347                         biotrack(\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}-\/>bio, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05348}05348         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05349}05349 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05350}05350 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05351}05351         \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}-\/>\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676aadfc92940078c684fb70f753954fa8f0}{CAM\_HIGH\_POWER}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05352}05352                 \textcolor{keyword}{struct }highpowerlist    *hphead;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05353}05353                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}}             *device;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05354}05354 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05355}05355                 mtx\_lock(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{xpt\_highpower\_lock}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05356}05356                 hphead = \&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.highpowerq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05357}05357 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05358}05358                 device = STAILQ\_FIRST(hphead);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05359}05359 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05360}05360                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05361}05361 \textcolor{comment}{                 * Increment the count since this command is done.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05362}05362 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05363}05363                 \mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.num\_highpower++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05364}05364 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05365}05365                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05366}05366 \textcolor{comment}{                 * Any high powered commands queued up?}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05367}05367 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05368}05368                 \textcolor{keywordflow}{if} (device != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05369}05369                         STAILQ\_REMOVE\_HEAD(hphead, highpowerq\_entry);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05370}05370                         mtx\_unlock(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{xpt\_highpower\_lock}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05371}05371 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05372}05372                         mtx\_lock(\&device-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}}-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05373}05373                         \mbox{\hyperlink{cam__xpt_8c_aa44f87ce4f64dfa1117d405e2d81daf6}{xpt\_release\_devq\_device}}(device,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05374}05374                                          \textcolor{comment}{/*count*/}1, \textcolor{comment}{/*runqueue*/}TRUE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05375}05375                         mtx\_unlock(\&device-\/>\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}}-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05376}05376                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05377}05377                         mtx\_unlock(\&\mbox{\hyperlink{cam__xpt_8c_aae96238f80eaab0e060d9ee112efe546}{xsoftc}}.\mbox{\hyperlink{structxpt__softc_af1fb2e917b956eebfda9bd812343a47d}{xpt\_highpower\_lock}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05378}05378         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05379}05379 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05380}05380         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05381}05381 \textcolor{comment}{         * Insulate against a race where the periph is destroyed but CCBs are}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05382}05382 \textcolor{comment}{         * still not all processed. This shouldn't happen, but allows us better}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05383}05383 \textcolor{comment}{         * bug diagnostic when it does.}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05384}05384 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05385}05385         \textcolor{keywordflow}{if} (ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05386}05386                 \mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}} = ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a9e8c541457dae855abc61ad6277efaf6}{sim}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05387}05387 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05388}05388         \textcolor{keywordflow}{if} (ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a935c580c28f4ace910f06a69ce5e2e5c}{CAM\_RELEASE\_SIMQ}}) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05389}05389                 KASSERT(\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}, (\textcolor{stringliteral}{"{}sim missing for CAM\_RELEASE\_SIMQ request"{}}));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05390}05390                 \mbox{\hyperlink{cam__xpt_8c_a6e503a7a2e496272ea2135451a08a082}{xpt\_release\_simq}}(\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}, \textcolor{comment}{/*run\_queue*/}FALSE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05391}05391                 ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \&= \string~CAM\_RELEASE\_SIMQ;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05392}05392         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05393}05393 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05394}05394         \textcolor{keywordflow}{if} ((ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676ad020b99f94e8b2864672d09f388dc4e5}{CAM\_DEV\_QFRZDIS}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05395}05395          \&\& (ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3afe5c2fa0edb1c8fea0119515430d223e}{CAM\_DEV\_QFRZN}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05396}05396                 \mbox{\hyperlink{cam__xpt_8c_aef6066745ed67b3a76eae33f691e338b}{xpt\_release\_devq}}(ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \textcolor{comment}{/*count*/}1, \textcolor{comment}{/*run\_queue*/}TRUE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05397}05397                 ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \&= \string~CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05398}05398         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05399}05399 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05400}05400         \textcolor{keywordflow}{if} ((ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} \& \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cabaa3982afe2804b2936ae961ecd7aa5d}{XPT\_FC\_USER\_CCB}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05401}05401                 \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__ed}{cam\_ed}} *dev = ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_a0f0edbfe3286687ab3bebd9f5fe83d69}{device}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05402}05402 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05403}05403                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05404}05404                         devq = \mbox{\hyperlink{structcam__ed_a0d64b73d366fd787275f19734d6fee10}{sim}}-\/>\mbox{\hyperlink{structcam__sim_ad830cbc8394dc455e5567834074e2536}{devq}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05405}05405                 KASSERT(devq, (\textcolor{stringliteral}{"{}Periph disappeared with CCB \%p \%s request pending."{}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05406}05406                         ccb\_h, \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}})));}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05407}05407 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05408}05408                 mtx\_lock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05409}05409                 devq-\/>\mbox{\hyperlink{structcam__devq_a55994dd1e1bc3d195ac101d00c73821a}{send\_active}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05410}05410                 devq-\/>\mbox{\hyperlink{structcam__devq_ae19320f9ccbf7d70b80e7bb05c0c5434}{send\_openings}}++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05411}05411                 \mbox{\hyperlink{cam__queue_8h_ade394640c8b7360942ce215d7950a22d}{cam\_ccbq\_ccb\_done}}(\&dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}, (\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)ccb\_h);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05412}05412 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05413}05413                 \textcolor{keywordflow}{if} (((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_ae9cb5253fe2727d24d21749447861e54}{CAM\_DEV\_REL\_ON\_QUEUE\_EMPTY}}) != 0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05414}05414                   \&\& (dev-\/>\mbox{\hyperlink{structcam__ed_a3ba6aadc26fd444d657f4dc29c69a447}{ccbq}}.\mbox{\hyperlink{structcam__ccbq_a6a866cbf6518531b9b48c3521ca28d54}{dev\_active}} == 0))) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05415}05415                         dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \&= \string~CAM\_DEV\_REL\_ON\_QUEUE\_EMPTY;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05416}05416                         \mbox{\hyperlink{cam__xpt_8c_aa44f87ce4f64dfa1117d405e2d81daf6}{xpt\_release\_devq\_device}}(dev, \textcolor{comment}{/*count*/}1,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05417}05417                                          \textcolor{comment}{/*run\_queue*/}FALSE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05418}05418                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05419}05419 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05420}05420                 \textcolor{keywordflow}{if} (((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a41e7fd8717b30aed3ebc5679924348fd}{CAM\_DEV\_REL\_ON\_COMPLETE}}) != 0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05421}05421                   \&\& (ccb\_h-\/>status\&\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}}) != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a39da0d951738b6f5b83378ffaed66ef9}{CAM\_REQUEUE\_REQ}})) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05422}05422                         dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \&= \string~CAM\_DEV\_REL\_ON\_COMPLETE;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05423}05423                         \mbox{\hyperlink{cam__xpt_8c_aa44f87ce4f64dfa1117d405e2d81daf6}{xpt\_release\_devq\_device}}(dev, \textcolor{comment}{/*count*/}1,}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05424}05424                                          \textcolor{comment}{/*run\_queue*/}FALSE);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05425}05425                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05426}05426 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05427}05427                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{cam__xpt_8c_ab7a9bbee8ca06cb1ce40cc1b830a6ca0}{device\_is\_queued}}(dev))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05428}05428                         (void)\mbox{\hyperlink{cam__xpt_8c_a7148ea52669591ad852374d50345f34c}{xpt\_schedule\_devq}}(devq, dev);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05429}05429                 \mbox{\hyperlink{cam__xpt_8c_ab05d0a25c05fe9822eb4f60f903bf8bd}{xpt\_run\_devq}}(devq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05430}05430                 mtx\_unlock(\&devq-\/>\mbox{\hyperlink{structcam__devq_ab217a0eaf915be52c98e4c8b24d8af04}{send\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05431}05431 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05432}05432                 \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a9a3734688d136304232eafe4a96b6e7a}{CAM\_DEV\_TAG\_AFTER\_COUNT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05433}05433                         mtx = \mbox{\hyperlink{cam__xpt_8c_a1fc98e6b0f369df2a0f686e9f66ddfe5}{xpt\_path\_mtx}}(ccb\_h-\/>path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05434}05434                         mtx\_lock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05435}05435 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05436}05436                         \textcolor{keywordflow}{if} ((dev-\/>\mbox{\hyperlink{structcam__ed_af3f8ff703ffbab8d5b16b175a6646e23}{flags}} \& \mbox{\hyperlink{cam__xpt__internal_8h_a9a3734688d136304232eafe4a96b6e7a}{CAM\_DEV\_TAG\_AFTER\_COUNT}}) != 0}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05437}05437                          \&\& (-\/-\/dev-\/>\mbox{\hyperlink{structcam__ed_a31e46af12be79e6c7f02e4d640203e85}{tag\_delay\_count}} == 0))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05438}05438                                 \mbox{\hyperlink{cam__xpt_8c_a2d32cd31929e656475e99dd720955e75}{xpt\_start\_tags}}(ccb\_h-\/>path);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05439}05439                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05440}05440         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05441}05441 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05442}05442         \textcolor{keywordflow}{if} ((ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a2b92b9f93c185a3bcd5da48c751c0c05}{flags}} \& \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676aafb505767df8f8476b7cc67a621db845}{CAM\_UNLOCKED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05443}05443                 \textcolor{keywordflow}{if} (mtx == NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05444}05444                         mtx = \mbox{\hyperlink{cam__xpt_8c_a1fc98e6b0f369df2a0f686e9f66ddfe5}{xpt\_path\_mtx}}(ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05445}05445                         mtx\_lock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05446}05446                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05447}05447         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05448}05448                 \textcolor{keywordflow}{if} (mtx != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05449}05449                         mtx\_unlock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05450}05450                         mtx = NULL;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05451}05451                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05452}05452         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05453}05453 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05454}05454         \textcolor{comment}{/* Call the peripheral driver's callback */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05455}05455         ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a5f28f6d8f0a215f677b69fb9c04caf8c}{pinfo}}.\mbox{\hyperlink{structcam__pinfo_a47744d2d5380c9fc3f1b25aedd56c3c5}{index}} = \mbox{\hyperlink{cam_8h_a7af58dadfb8e09c223ffed09239f787b}{CAM\_UNQUEUED\_INDEX}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05456}05456         (*ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_afe206cd92d25dfd137df5196cdfcfdae}{cbfcnp}})(ccb\_h-\/>\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}-\/>\mbox{\hyperlink{structcam__path_af86a5c85f988da0c716d32729373e265}{periph}}, (\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)ccb\_h);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05457}05457         \textcolor{keywordflow}{if} (mtx != NULL)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05458}05458                 mtx\_unlock(mtx);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05459}05459 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05460}05460 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05461}05461 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05462}05462 \textcolor{comment}{ * Parameterize instead and use xpt\_done\_td?}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05463}05463 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05464}05464 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05465}\mbox{\hyperlink{cam__xpt_8c_a6da9f4e7e5e9f07f758eee137baffc41}{05465}} \mbox{\hyperlink{cam__xpt_8c_a6da9f4e7e5e9f07f758eee137baffc41}{xpt\_async\_td}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05466}05466 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05467}05467         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__doneq}{cam\_doneq}} *queue = arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05468}05468         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *ccb\_h;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05469}05469         \mbox{\hyperlink{scsi__ctl_8c_a7742b802bd73b22a2fbbea5b4e16ebaf}{STAILQ\_HEAD}}(, \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}})        doneq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05470}05470 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05471}05471         STAILQ\_INIT(\&doneq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05472}05472         mtx\_lock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05473}05473         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05474}05474                 \textcolor{keywordflow}{while} (STAILQ\_EMPTY(\&queue-\/>cam\_doneq))}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05475}05475                         msleep(\&queue-\/>cam\_doneq, \&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05476}05476                             PRIBIO, \textcolor{stringliteral}{"{}-\/"{}}, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05477}05477                 STAILQ\_CONCAT(\&doneq, \&queue-\/>cam\_doneq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05478}05478                 mtx\_unlock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05479}05479 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05480}05480                 \textcolor{keywordflow}{while} ((ccb\_h = STAILQ\_FIRST(\&doneq)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05481}05481                         STAILQ\_REMOVE\_HEAD(\&doneq, \mbox{\hyperlink{structccb__hdr_a44b3ff1ed4c144fb7e4a9794aaa18420}{sim\_links}}.stqe);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05482}05482                         \mbox{\hyperlink{cam__xpt_8c_a1503a02005a52c0726423254272541bd}{xpt\_done\_process}}(ccb\_h);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05483}05483                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05484}05484 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05485}05485                 mtx\_lock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05486}05486         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05487}05487 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05488}05488 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05489}05489 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05490}\mbox{\hyperlink{cam__xpt_8c_aee0553bab4e39fc924dc0d1453c7d61e}{05490}} \mbox{\hyperlink{cam__xpt_8c_aee0553bab4e39fc924dc0d1453c7d61e}{xpt\_done\_td}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05491}05491 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05492}05492         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__doneq}{cam\_doneq}} *queue = arg;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05493}05493         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *ccb\_h;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05494}05494         \mbox{\hyperlink{scsi__ctl_8c_a7742b802bd73b22a2fbbea5b4e16ebaf}{STAILQ\_HEAD}}(, \mbox{\hyperlink{structccb__hdr}{ccb\_hdr}})        doneq;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05495}05495 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05496}05496         STAILQ\_INIT(\&doneq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05497}05497         mtx\_lock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05498}05498         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05499}05499                 \textcolor{keywordflow}{while} (STAILQ\_EMPTY(\&queue-\/>cam\_doneq)) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05500}05500                         queue-\/>cam\_doneq\_sleep = 1;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05501}05501                         msleep(\&queue-\/>cam\_doneq, \&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05502}05502                             PRIBIO, \textcolor{stringliteral}{"{}-\/"{}}, 0);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05503}05503                         queue-\/>cam\_doneq\_sleep = 0;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05504}05504                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05505}05505                 STAILQ\_CONCAT(\&doneq, \&queue-\/>cam\_doneq);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05506}05506                 mtx\_unlock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05507}05507 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05508}05508                 THREAD\_NO\_SLEEPING();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05509}05509                 \textcolor{keywordflow}{while} ((ccb\_h = STAILQ\_FIRST(\&doneq)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05510}05510                         STAILQ\_REMOVE\_HEAD(\&doneq, \mbox{\hyperlink{structccb__hdr_a44b3ff1ed4c144fb7e4a9794aaa18420}{sim\_links}}.stqe);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05511}05511                         \mbox{\hyperlink{cam__xpt_8c_a1503a02005a52c0726423254272541bd}{xpt\_done\_process}}(ccb\_h);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05512}05512                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05513}05513                 THREAD\_SLEEPING\_OK();}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05514}05514 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05515}05515                 mtx\_lock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05516}05516         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05517}05517 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05518}05518 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05519}05519 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05520}\mbox{\hyperlink{cam__xpt_8c_a6a8f62bcf7ca451fd833304771418cc9}{05520}} \mbox{\hyperlink{cam__xpt_8c_a6a8f62bcf7ca451fd833304771418cc9}{camisr\_runqueue}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05521}05521 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05522}05522         \textcolor{keyword}{struct  }\mbox{\hyperlink{structccb__hdr}{ccb\_hdr}} *ccb\_h;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05523}05523         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__doneq}{cam\_doneq}} *queue;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05524}05524         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05525}05525 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05526}05526         \textcolor{comment}{/* Process global queues. */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05527}05527         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{cam__xpt_8c_ab7dca7b3623269dfbb462cb15a122058}{cam\_num\_doneqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05528}05528                 queue = \&\mbox{\hyperlink{cam__xpt_8c_ab0f84f295d3b76549908f2a897718483}{cam\_doneqs}}[i];}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05529}05529                 mtx\_lock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05530}05530                 \textcolor{keywordflow}{while} ((ccb\_h = STAILQ\_FIRST(\&queue-\/>cam\_doneq)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05531}05531                         STAILQ\_REMOVE\_HEAD(\&queue-\/>cam\_doneq, sim\_links.stqe);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05532}05532                         mtx\_unlock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05533}05533                         \mbox{\hyperlink{cam__xpt_8c_a1503a02005a52c0726423254272541bd}{xpt\_done\_process}}(ccb\_h);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05534}05534                         mtx\_lock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05535}05535                 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05536}05536                 mtx\_unlock(\&queue-\/>\mbox{\hyperlink{structcam__doneq_aa5fb92e470316d0069af0a07ce2c1cb6}{cam\_doneq\_mtx}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05537}05537         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05538}05538 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05539}05539 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05550}05550 device\_t}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05551}\mbox{\hyperlink{cam__xpt_8c_ae8682bfa68f98afecaa8e5a5dfcb9e74}{05551}} \mbox{\hyperlink{cam__xpt_8c_ae8682bfa68f98afecaa8e5a5dfcb9e74}{xpt\_path\_sim\_device}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05552}05552 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05553}05553         \textcolor{keywordflow}{return} (path-\/>\mbox{\hyperlink{structcam__path_ae73f7fe4c13e3bf9836b79f93c0d26e8}{bus}}-\/>\mbox{\hyperlink{structcam__eb_a6c371283eee2c1b8139f2fb3e630cda4}{parent\_dev}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05554}05554 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05555}05555 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05556}\mbox{\hyperlink{structkv}{05556}} \textcolor{keyword}{struct }\mbox{\hyperlink{structkv}{kv}} }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05557}05557 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05558}\mbox{\hyperlink{structkv_aa50a5af802a164f4285205b8d51bc9c7}{05558}}         uint32\_t \mbox{\hyperlink{structkv_aa50a5af802a164f4285205b8d51bc9c7}{v}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05559}\mbox{\hyperlink{structkv_a817fa997dc4b744502609117884fc18a}{05559}}         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{structkv_a817fa997dc4b744502609117884fc18a}{name}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05560}05560 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05561}05561 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05562}\mbox{\hyperlink{cam__xpt_8c_a49a181537d4b1d19223ef91a0e9274b3}{05562}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structkv}{kv}} \mbox{\hyperlink{cam__xpt_8c_a49a181537d4b1d19223ef91a0e9274b3}{map}}[] = \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05563}05563         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca7b655443211fe21d3e0fdf4761080dfb}{XPT\_NOOP}}, \textcolor{stringliteral}{"{}XPT\_NOOP"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05564}05564         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca426a17499239f5751c747d094b4998dc}{XPT\_SCSI\_IO}}, \textcolor{stringliteral}{"{}XPT\_SCSI\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05565}05565         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae076749d68954cdfbd24a6060976168f}{XPT\_GDEV\_TYPE}}, \textcolor{stringliteral}{"{}XPT\_GDEV\_TYPE"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05566}05566         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa00d2bfd38da0425e3b52aeca7e6c9ff}{XPT\_GDEVLIST}}, \textcolor{stringliteral}{"{}XPT\_GDEVLIST"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05567}05567         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cad34c7b5cb68e0ed050bc95a55cd87f7c}{XPT\_PATH\_INQ}}, \textcolor{stringliteral}{"{}XPT\_PATH\_INQ"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05568}05568         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa82235704cd5b118816dff88c853f878}{XPT\_REL\_SIMQ}}, \textcolor{stringliteral}{"{}XPT\_REL\_SIMQ"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05569}05569         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca721f8cc23e4415f173e15b31ed484cf2}{XPT\_SASYNC\_CB}}, \textcolor{stringliteral}{"{}XPT\_SASYNC\_CB"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05570}05570         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae9a806ca73d695f0d70570781b3ff454}{XPT\_SDEV\_TYPE}}, \textcolor{stringliteral}{"{}XPT\_SDEV\_TYPE"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05571}05571         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca606ac2c0939d2858df5aef0e73c617c6}{XPT\_SCAN\_BUS}}, \textcolor{stringliteral}{"{}XPT\_SCAN\_BUS"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05572}05572         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae3ef804cecfed4e6b10def2784de9ebc}{XPT\_DEV\_MATCH}}, \textcolor{stringliteral}{"{}XPT\_DEV\_MATCH"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05573}05573         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca1da717b73387a659bc2e5cb7edb243d0}{XPT\_DEBUG}}, \textcolor{stringliteral}{"{}XPT\_DEBUG"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05574}05574         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cad8694eb4b672eedcb525a5f92c3e816f}{XPT\_PATH\_STATS}}, \textcolor{stringliteral}{"{}XPT\_PATH\_STATS"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05575}05575         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca2db789d4d7f3dfd946a73494ea0f89e1}{XPT\_GDEV\_STATS}}, \textcolor{stringliteral}{"{}XPT\_GDEV\_STATS"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05576}05576         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca2c75d86cab0c5759920462cc2176ba5c}{XPT\_DEV\_ADVINFO}}, \textcolor{stringliteral}{"{}XPT\_DEV\_ADVINFO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05577}05577         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca359ed21ee05e6191b6100b5fbc9e17f1}{XPT\_ASYNC}}, \textcolor{stringliteral}{"{}XPT\_ASYNC"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05578}05578         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cac6104918fad106a7e3b6d8b873cdc81e}{XPT\_ABORT}}, \textcolor{stringliteral}{"{}XPT\_ABORT"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05579}05579         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca377430b25b365e512334ca40798eafea}{XPT\_RESET\_BUS}}, \textcolor{stringliteral}{"{}XPT\_RESET\_BUS"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05580}05580         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca1eaac0f24214e1a486e98141b2924253}{XPT\_RESET\_DEV}}, \textcolor{stringliteral}{"{}XPT\_RESET\_DEV"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05581}05581         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca22d78c82cf16c42f50ea18046da1ef36}{XPT\_TERM\_IO}}, \textcolor{stringliteral}{"{}XPT\_TERM\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05582}05582         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa2828a4a48f97489aed4478e936020de}{XPT\_SCAN\_LUN}}, \textcolor{stringliteral}{"{}XPT\_SCAN\_LUN"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05583}05583         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca4031c8b4cb9702134c45aee99474c0e7}{XPT\_GET\_TRAN\_SETTINGS}}, \textcolor{stringliteral}{"{}XPT\_GET\_TRAN\_SETTINGS"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05584}05584         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca809010667fe314b6a4af69f3fef6bc9f}{XPT\_SET\_TRAN\_SETTINGS}}, \textcolor{stringliteral}{"{}XPT\_SET\_TRAN\_SETTINGS"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05585}05585         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caacbf4303a264c7c105b44031ddb3a8c8}{XPT\_CALC\_GEOMETRY}}, \textcolor{stringliteral}{"{}XPT\_CALC\_GEOMETRY"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05586}05586         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caae32713c35c2f8312a1efe874803c7f6}{XPT\_ATA\_IO}}, \textcolor{stringliteral}{"{}XPT\_ATA\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05587}05587         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caacce54df8d003ba1653973153a64b920}{XPT\_GET\_SIM\_KNOB}}, \textcolor{stringliteral}{"{}XPT\_GET\_SIM\_KNOB"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05588}05588         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caa14bce9a170de19ea868a627874649e1}{XPT\_SET\_SIM\_KNOB}}, \textcolor{stringliteral}{"{}XPT\_SET\_SIM\_KNOB"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05589}05589         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca9f722f288854f5ebf54f7c1d7af86778}{XPT\_NVME\_IO}}, \textcolor{stringliteral}{"{}XPT\_NVME\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05590}05590         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca7c4cd1252b7b90f1c1aaf01cb6240fd8}{XPT\_MMC\_IO}}, \textcolor{stringliteral}{"{}XPT\_MMC\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05591}05591         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cac8a7bc7663382c42fe6b2c4153b68c96}{XPT\_SMP\_IO}}, \textcolor{stringliteral}{"{}XPT\_SMP\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05592}05592         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca45eb936f3f3c24b0e02ff4baa1b58a36}{XPT\_SCAN\_TGT}}, \textcolor{stringliteral}{"{}XPT\_SCAN\_TGT"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05593}05593         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca2df003d0530635bd4ca955925bea3457}{XPT\_NVME\_ADMIN}}, \textcolor{stringliteral}{"{}XPT\_NVME\_ADMIN"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05594}05594         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca4aeef46a854a08557b1a1f2290f98762}{XPT\_ENG\_INQ}}, \textcolor{stringliteral}{"{}XPT\_ENG\_INQ"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05595}05595         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca63c9d644f78ee4c9642706885d0f3705}{XPT\_ENG\_EXEC}}, \textcolor{stringliteral}{"{}XPT\_ENG\_EXEC"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05596}05596         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cad21e8851e10698290517ef2aaad1db49}{XPT\_EN\_LUN}}, \textcolor{stringliteral}{"{}XPT\_EN\_LUN"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05597}05597         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca6543730db63eef7a1068551cf62a6bda}{XPT\_TARGET\_IO}}, \textcolor{stringliteral}{"{}XPT\_TARGET\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05598}05598         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca48add9a54106574912cce60bea529c74}{XPT\_ACCEPT\_TARGET\_IO}}, \textcolor{stringliteral}{"{}XPT\_ACCEPT\_TARGET\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05599}05599         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cafe6dc012995f03ba1826ecbc229fbdbe}{XPT\_CONT\_TARGET\_IO}}, \textcolor{stringliteral}{"{}XPT\_CONT\_TARGET\_IO"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05600}05600         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca1bf11edb15acb0712cc1cfe07703cb9c}{XPT\_IMMED\_NOTIFY}}, \textcolor{stringliteral}{"{}XPT\_IMMED\_NOTIFY"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05601}05601         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cac61ed4751810166bfd732aaf1d76cfa8}{XPT\_NOTIFY\_ACK}}, \textcolor{stringliteral}{"{}XPT\_NOTIFY\_ACK"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05602}05602         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055caab3472e495782390d0f7714a1f308b95}{XPT\_IMMEDIATE\_NOTIFY}}, \textcolor{stringliteral}{"{}XPT\_IMMEDIATE\_NOTIFY"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05603}05603         \{ \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae7bb5eb0f60404c52b021e2084982622}{XPT\_NOTIFY\_ACKNOWLEDGE}}, \textcolor{stringliteral}{"{}XPT\_NOTIFY\_ACKNOWLEDGE"{}} \},}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05604}05604         \{ 0, 0 \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05605}05605 \};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05606}05606 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05607}05607 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05608}\mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{05608}} \mbox{\hyperlink{cam__xpt_8c_ad670b71d83c813fbc5d89991acd24165}{xpt\_action\_name}}(uint32\_t action)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05609}05609 \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05610}05610         \textcolor{keyword}{static} \textcolor{keywordtype}{char} buffer[32]; \textcolor{comment}{/* Only for unknown messages -\/-\/ racy */}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05611}05611         \textcolor{keyword}{struct }\mbox{\hyperlink{structkv}{kv}} *walker = \mbox{\hyperlink{cam__xpt_8c_a49a181537d4b1d19223ef91a0e9274b3}{map}};}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05612}05612 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05613}05613         \textcolor{keywordflow}{while} (walker-\/>\mbox{\hyperlink{structkv_a817fa997dc4b744502609117884fc18a}{name}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05614}05614                 \textcolor{keywordflow}{if} (walker-\/>\mbox{\hyperlink{structkv_aa50a5af802a164f4285205b8d51bc9c7}{v}} == action)}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05615}05615                         \textcolor{keywordflow}{return} (walker-\/>\mbox{\hyperlink{structkv_a817fa997dc4b744502609117884fc18a}{name}});}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05616}05616                 walker++;}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05617}05617         \}}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05618}05618 }
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05619}05619         snprintf(buffer, \textcolor{keyword}{sizeof}(buffer), \textcolor{stringliteral}{"{}\%\#x"{}}, action);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05620}05620         \textcolor{keywordflow}{return} (buffer);}
\DoxyCodeLine{\Hypertarget{cam__xpt_8c_source_l05621}05621 \}}

\end{DoxyCode}
