\hypertarget{ctl__backend_8c_source}{}\doxysection{ctl\+\_\+backend.\+c}
\label{ctl__backend_8c_source}\index{cam/ctl/ctl\_backend.c@{cam/ctl/ctl\_backend.c}}
\mbox{\hyperlink{ctl__backend_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2003 Silicon Graphics International Corp.}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions, and the following disclaimer,}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00012}00012 \textcolor{comment}{ *    without modification.}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce at minimum a disclaimer}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00014}00014 \textcolor{comment}{ *    substantially similar to the "{}NO WARRANTY"{} disclaimer below}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00015}00015 \textcolor{comment}{ *    ("{}Disclaimer"{}) and any redistribution must be conditioned upon}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00016}00016 \textcolor{comment}{ *    including a substantially similar Disclaimer requirement for further}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00017}00017 \textcolor{comment}{ *    binary redistribution.}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00018}00018 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00019}00019 \textcolor{comment}{ * NO WARRANTY}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00020}00020 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00021}00021 \textcolor{comment}{ * "{}AS IS"{} AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00022}00022 \textcolor{comment}{ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00023}00023 \textcolor{comment}{ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00024}00024 \textcolor{comment}{ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00025}00025 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00026}00026 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00027}00027 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00028}00028 \textcolor{comment}{ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00029}00029 \textcolor{comment}{ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00030}00030 \textcolor{comment}{ * POSSIBILITY OF SUCH DAMAGES.}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00031}00031 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00032}00032 \textcolor{comment}{ * \$Id: //depot/users/kenm/FreeBSD-\/test2/sys/cam/ctl/ctl\_backend.c\#3 \$}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00033}00033 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00034}00034 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00035}00035 \textcolor{comment}{ * CTL backend driver registration routines}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00036}00036 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00037}00037 \textcolor{comment}{ * Author: Ken Merry <ken@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00038}00038 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00039}00039 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00041}\mbox{\hyperlink{ctl__backend_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00041}} \mbox{\hyperlink{ctl__backend_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{scsi__all_8h}{cam/scsi/scsi\_all.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{scsi__da_8h}{cam/scsi/scsi\_da.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ctl__io_8h}{cam/ctl/ctl\_io.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ctl_8h}{cam/ctl/ctl.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ctl__frontend_8h}{cam/ctl/ctl\_frontend.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ctl__backend_8h}{cam/ctl/ctl\_backend.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ctl__ioctl_8h}{cam/ctl/ctl\_ioctl.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ctl__ha_8h}{cam/ctl/ctl\_ha.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ctl__private_8h}{cam/ctl/ctl\_private.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ctl__debug_8h}{cam/ctl/ctl\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00065}00065 \textcolor{keyword}{extern} \textcolor{keyword}{struct }\mbox{\hyperlink{structctl__softc}{ctl\_softc}} *\mbox{\hyperlink{ctl__backend_8c_a287e67b9712ba52864797bb0b454975e}{control\_softc}};}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00067}00067 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00068}\mbox{\hyperlink{ctl__backend_8c_a7a92c5111a207f3aff58a85687df0eb4}{00068}} \mbox{\hyperlink{ctl__backend_8c_a7a92c5111a207f3aff58a85687df0eb4}{ctl\_backend\_register}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structctl__backend__driver}{ctl\_backend\_driver}} *be)}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00069}00069 \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00070}00070         \textcolor{keyword}{struct }\mbox{\hyperlink{structctl__softc}{ctl\_softc}} *softc = \mbox{\hyperlink{ctl__backend_8c_a287e67b9712ba52864797bb0b454975e}{control\_softc}};}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00071}00071         \textcolor{keyword}{struct }\mbox{\hyperlink{structctl__backend__driver}{ctl\_backend\_driver}} *be\_tmp;}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00072}00072         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00074}00074         \textcolor{comment}{/* Sanity check, make sure this isn't a duplicate registration. */}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00075}00075         mtx\_lock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00076}00076         STAILQ\_FOREACH(be\_tmp, \&softc-\/>be\_list, links) \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00077}00077                 \textcolor{keywordflow}{if} (strcmp(be\_tmp-\/>\mbox{\hyperlink{structctl__backend__driver_ac7dd95e44765645b3edbfee2b7f49c93}{name}}, be-\/>\mbox{\hyperlink{structctl__backend__driver_ac7dd95e44765645b3edbfee2b7f49c93}{name}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00078}00078                         mtx\_unlock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00079}00079                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00080}00080                 \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00081}00081         \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00082}00082         mtx\_unlock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00083}00083 \textcolor{preprocessor}{\#ifdef CS\_BE\_CONFIG\_MOVE\_DONE\_IS\_NOT\_USED}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00084}00084         be-\/>config\_move\_done = \mbox{\hyperlink{ctl_8c_a1ffd9db72d8cb9fba3a833bf23519c89}{ctl\_config\_move\_done}};}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00085}00085 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00087}00087         \textcolor{comment}{/* Call the backend's initialization routine. */}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00088}00088         \textcolor{keywordflow}{if} (be-\/>\mbox{\hyperlink{structctl__backend__driver_ad473c53bbb015bf5a9c1f5797f1a2976}{init}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00089}00089                 \textcolor{keywordflow}{if} ((error = be-\/>\mbox{\hyperlink{structctl__backend__driver_ad473c53bbb015bf5a9c1f5797f1a2976}{init}}()) != 0) \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00090}00090                         printf(\textcolor{stringliteral}{"{}\%s backend init error: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00091}00091                             be-\/>\mbox{\hyperlink{structctl__backend__driver_ac7dd95e44765645b3edbfee2b7f49c93}{name}}, error);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00092}00092                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00093}00093                 \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00094}00094         \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00096}00096         mtx\_lock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00097}00097         STAILQ\_INSERT\_TAIL(\&softc-\/>be\_list, be, links);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00098}00098         softc-\/>\mbox{\hyperlink{structctl__softc_a027f0b4ab35b5718667b5bff42b5cc7a}{num\_backends}}++;}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00099}00099         mtx\_unlock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00100}00100         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00101}00101 \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00103}00103 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00104}\mbox{\hyperlink{ctl__backend_8c_a9725bf364c0b5e7a6204314334667721}{00104}} \mbox{\hyperlink{ctl__backend_8c_a9725bf364c0b5e7a6204314334667721}{ctl\_backend\_deregister}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structctl__backend__driver}{ctl\_backend\_driver}} *be)}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00105}00105 \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00106}00106         \textcolor{keyword}{struct }\mbox{\hyperlink{structctl__softc}{ctl\_softc}} *softc = \mbox{\hyperlink{ctl__backend_8c_a287e67b9712ba52864797bb0b454975e}{control\_softc}};}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00107}00107         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00108}00108 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00109}00109         \textcolor{comment}{/* Call the backend's shutdown routine. */}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00110}00110         \textcolor{keywordflow}{if} (be-\/>\mbox{\hyperlink{structctl__backend__driver_ad8d54776a10946801440ba0e2108fa36}{shutdown}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00111}00111                 \textcolor{keywordflow}{if} ((error = be-\/>\mbox{\hyperlink{structctl__backend__driver_ad8d54776a10946801440ba0e2108fa36}{shutdown}}()) != 0) \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00112}00112                         printf(\textcolor{stringliteral}{"{}\%s backend shutdown error: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00113}00113                             be-\/>\mbox{\hyperlink{structctl__backend__driver_ac7dd95e44765645b3edbfee2b7f49c93}{name}}, error);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00114}00114                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00115}00115                 \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00116}00116         \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00118}00118         mtx\_lock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00119}00119         STAILQ\_REMOVE(\&softc-\/>be\_list, be, \mbox{\hyperlink{structctl__backend__driver}{ctl\_backend\_driver}}, links);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00120}00120         softc-\/>\mbox{\hyperlink{structctl__softc_a027f0b4ab35b5718667b5bff42b5cc7a}{num\_backends}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00121}00121         mtx\_unlock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00122}00122         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00123}00123 \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00125}00125 \textcolor{keyword}{struct }\mbox{\hyperlink{structctl__backend__driver}{ctl\_backend\_driver}} *}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00126}\mbox{\hyperlink{ctl__backend_8c_af1030577e0877add0cc83e447190cf83}{00126}} \mbox{\hyperlink{ctl__backend_8c_af1030577e0877add0cc83e447190cf83}{ctl\_backend\_find}}(\textcolor{keywordtype}{char} *backend\_name)}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00127}00127 \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00128}00128         \textcolor{keyword}{struct }\mbox{\hyperlink{structctl__softc}{ctl\_softc}} *softc = \mbox{\hyperlink{ctl__backend_8c_a287e67b9712ba52864797bb0b454975e}{control\_softc}};}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00129}00129         \textcolor{keyword}{struct }\mbox{\hyperlink{structctl__backend__driver}{ctl\_backend\_driver}} *be\_tmp;}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00131}00131         mtx\_lock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00132}00132         STAILQ\_FOREACH(be\_tmp, \&softc-\/>be\_list, links) \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00133}00133                 \textcolor{keywordflow}{if} (strcmp(be\_tmp-\/>\mbox{\hyperlink{structctl__backend__driver_ac7dd95e44765645b3edbfee2b7f49c93}{name}}, backend\_name) == 0) \{}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00134}00134                         mtx\_unlock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00135}00135                         \textcolor{keywordflow}{return} (be\_tmp);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00136}00136                 \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00137}00137         \}}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00138}00138         mtx\_unlock(\&softc-\/>\mbox{\hyperlink{structctl__softc_ab7e54e9b5e5040934e784732b0396b20}{ctl\_lock}});}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00140}00140         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{ctl__backend_8c_source_l00141}00141 \}}

\end{DoxyCode}
