\hypertarget{mlxvar_8h_source}{}\doxysection{mlxvar.\+h}
\label{mlxvar_8h_source}\index{dev/mlx/mlxvar.h@{dev/mlx/mlxvar.h}}
\mbox{\hyperlink{mlxvar_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1999 Michael Smith}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00027}00027 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00028}00028 \textcolor{comment}{ *      \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00029}00029 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00031}00031 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00034}00034 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00035}00035 \textcolor{comment}{ * Debugging levels:}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00036}00036 \textcolor{comment}{ *  0 -\/ quiet, only emit warnings}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00037}00037 \textcolor{comment}{ *  1 -\/ noisy, emit major function points and things done}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00038}00038 \textcolor{comment}{ *  2 -\/ extremely noisy, emit trace items in loops, etc.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00039}00039 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00040}00040 \textcolor{preprocessor}{\#ifdef MLX\_DEBUG}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00041}00041 \textcolor{preprocessor}{\#define debug(level, fmt, args...)      do \{ if (level <= MLX\_DEBUG) printf("{}\%s: "{}} fmt "{}\(\backslash\)n"{}, \_\_func\_\_ , \#\#args); \} while(0)}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00042}00042 \textcolor{preprocessor}{\#define debug\_called(level)             do \{ if (level <= MLX\_DEBUG) printf(\_\_func\_\_ "{}: called\(\backslash\)n"{}}); \} while(0)}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00043}00043 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00044}\mbox{\hyperlink{mlxvar_8h_ac4824dfe0c68ba5d23e776016c6c74d1}{00044}} \textcolor{preprocessor}{\#define debug(level, fmt, args...)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00045}\mbox{\hyperlink{mlxvar_8h_a26ec422c6238d5430b54259279c83df2}{00045}} \textcolor{preprocessor}{\#define debug\_called(level)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00046}00046 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00048}00048 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00049}00049 \textcolor{comment}{ * Regardless of the actual capacity of the controller, we will allocate space}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00050}00050 \textcolor{comment}{ * for 64 s/g entries.  Typically controllers support 17 or 33 entries (64k or}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00051}00051 \textcolor{comment}{ * 128k maximum transfer assuming 4k page size and non-\/optimal alignment), but}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00052}00052 \textcolor{comment}{ * making that fit cleanly without crossing page boundaries requires rounding up}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00053}00053 \textcolor{comment}{ * to the next power of two.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00054}00054 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00055}\mbox{\hyperlink{mlxvar_8h_ae136292db3463a06bf37adb0d50f35da}{00055}} \textcolor{preprocessor}{\#define MLX\_MAXPHYS     (128 * 1024)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00056}\mbox{\hyperlink{mlxvar_8h_a14cff86b4d768b3986694d415a38c3df}{00056}} \textcolor{preprocessor}{\#define MLX\_NSEG        64}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00058}\mbox{\hyperlink{mlxvar_8h_a7f39c2d89a3595d640e0ff777618208f}{00058}} \textcolor{preprocessor}{\#define MLX\_NSLOTS      256             }\textcolor{comment}{/* max number of command slots */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00060}\mbox{\hyperlink{mlxvar_8h_ab7b977033c712e0e55377ae994dff41d}{00060}} \textcolor{preprocessor}{\#define MLX\_MAXDRIVES   32              }\textcolor{comment}{/* max number of system drives */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00062}00062 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00063}00063 \textcolor{comment}{ * Structure describing a System Drive as attached to the controller.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00064}00064 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00065}\mbox{\hyperlink{structmlx__sysdrive}{00065}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__sysdrive}{mlx\_sysdrive}} }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00066}00066 \{}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00067}00067     \textcolor{comment}{/* from MLX\_CMD\_ENQSYSDRIVE */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00068}\mbox{\hyperlink{structmlx__sysdrive_a5655b8ca53e90b3f13de47eead5a8224}{00068}}     u\_int32\_t           \mbox{\hyperlink{structmlx__sysdrive_a5655b8ca53e90b3f13de47eead5a8224}{ms\_size}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00069}\mbox{\hyperlink{structmlx__sysdrive_a74141932c196f6bafd5e7818662e6baa}{00069}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__sysdrive_a74141932c196f6bafd5e7818662e6baa}{ms\_state}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00070}\mbox{\hyperlink{structmlx__sysdrive_a9fec2edbedbdf374656bdbe65382b04e}{00070}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__sysdrive_a9fec2edbedbdf374656bdbe65382b04e}{ms\_raidlevel}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00072}00072     \textcolor{comment}{/* synthetic geometry */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00073}\mbox{\hyperlink{structmlx__sysdrive_adcb177209741e3e2b02c343e52748d0f}{00073}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__sysdrive_adcb177209741e3e2b02c343e52748d0f}{ms\_cylinders}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00074}\mbox{\hyperlink{structmlx__sysdrive_ad41be35893fe5f98ed320e98eca6e7ba}{00074}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__sysdrive_ad41be35893fe5f98ed320e98eca6e7ba}{ms\_heads}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00075}\mbox{\hyperlink{structmlx__sysdrive_ad6b900e0395b9ba1cb6a15f23aec7cb6}{00075}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__sysdrive_ad6b900e0395b9ba1cb6a15f23aec7cb6}{ms\_sectors}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00077}00077     \textcolor{comment}{/* handle for attached driver */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00078}\mbox{\hyperlink{structmlx__sysdrive_a396f27b00f412f75b2eba81c94718c0d}{00078}}     device\_t            \mbox{\hyperlink{structmlx__sysdrive_a396f27b00f412f75b2eba81c94718c0d}{ms\_disk}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00079}00079 \};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00081}00081 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00082}00082 \textcolor{comment}{ * Per-\/command control structure.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00083}00083 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00084}\mbox{\hyperlink{structmlx__command}{00084}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__command}{mlx\_command}} }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00085}00085 \{}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00086}\mbox{\hyperlink{structmlx__command_aa11f15cc378af90de86e8a64d6ab0e92}{00086}}     \mbox{\hyperlink{structmlx__command_aa11f15cc378af90de86e8a64d6ab0e92}{TAILQ\_ENTRY}}(\mbox{\hyperlink{structmlx__command}{mlx\_command}})      mc\_link;        \textcolor{comment}{/* list linkage */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00088}\mbox{\hyperlink{structmlx__command_a45d49b6790cdf8194523411b829d9e5c}{00088}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__softc}{mlx\_softc}}           *\mbox{\hyperlink{structmlx__command_a45d49b6790cdf8194523411b829d9e5c}{mc\_sc}};            \textcolor{comment}{/* controller that owns us */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00089}\mbox{\hyperlink{structmlx__command_a7fa0bc6a24a6c06abb9b8d115243cc5a}{00089}}     u\_int8\_t                    \mbox{\hyperlink{structmlx__command_a7fa0bc6a24a6c06abb9b8d115243cc5a}{mc\_slot}}; \textcolor{comment}{/* command slot we occupy */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00090}\mbox{\hyperlink{structmlx__command_aba763359ddbd7dc37528e52358228f27}{00090}}     u\_int16\_t                   \mbox{\hyperlink{structmlx__command_aba763359ddbd7dc37528e52358228f27}{mc\_status}};     \textcolor{comment}{/* command completion status */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00091}\mbox{\hyperlink{structmlx__command_ac375f004c40b9d2697a76a62189113dd}{00091}}     time\_t                      \mbox{\hyperlink{structmlx__command_ac375f004c40b9d2697a76a62189113dd}{mc\_timeout}};   \textcolor{comment}{/* when this command expires */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00092}\mbox{\hyperlink{structmlx__command_a9a4d5f7d2c7b1d1d8b368869a033f28e}{00092}}     u\_int8\_t                    \mbox{\hyperlink{structmlx__command_a9a4d5f7d2c7b1d1d8b368869a033f28e}{mc\_mailbox}}[16];       \textcolor{comment}{/* command mailbox */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00093}\mbox{\hyperlink{structmlx__command_a35ee0f0caf1cccf6033c4d8b3cf6d894}{00093}}     u\_int32\_t                   \mbox{\hyperlink{structmlx__command_a35ee0f0caf1cccf6033c4d8b3cf6d894}{mc\_sgphys}};     \textcolor{comment}{/* physical address of s/g array in controller space */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00094}\mbox{\hyperlink{structmlx__command_a915bf9d9880783b9c2be1447c573ab57}{00094}}     \textcolor{keywordtype}{int}                         \mbox{\hyperlink{structmlx__command_a915bf9d9880783b9c2be1447c573ab57}{mc\_nsgent}};     \textcolor{comment}{/* number of entries in s/g map */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00095}\mbox{\hyperlink{structmlx__command_aa6096ddf3a12dd056e2cba5fb7259a5e}{00095}}     \textcolor{keywordtype}{int}                         \mbox{\hyperlink{structmlx__command_aa6096ddf3a12dd056e2cba5fb7259a5e}{mc\_flags}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00096}\mbox{\hyperlink{mlxvar_8h_a83a6cb5ef432c0b0b507eb18c798a0c2}{00096}} \textcolor{preprocessor}{\#define MLX\_CMD\_DATAIN          (1<<0)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00097}\mbox{\hyperlink{mlxvar_8h_a8caaa9261e55adc709a3cb0ab6e5dc14}{00097}} \textcolor{preprocessor}{\#define MLX\_CMD\_DATAOUT         (1<<1)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00098}\mbox{\hyperlink{mlxvar_8h_ae8c0291c3c36075e0b4e2c3a7544dd2b}{00098}} \textcolor{preprocessor}{\#define MLX\_CMD\_PRIORITY        (1<<2)          }\textcolor{comment}{/* high-\/priority command */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00100}\mbox{\hyperlink{structmlx__command_a06be08f76813e811d151414ee39e4689}{00100}}     \textcolor{keywordtype}{void}                        *\mbox{\hyperlink{structmlx__command_a06be08f76813e811d151414ee39e4689}{mc\_data}};        \textcolor{comment}{/* data buffer */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00101}\mbox{\hyperlink{structmlx__command_a0968ad9c0037e76aabd367da8997bbe3}{00101}}     \textcolor{keywordtype}{size\_t}                      \mbox{\hyperlink{structmlx__command_a0968ad9c0037e76aabd367da8997bbe3}{mc\_length}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00102}\mbox{\hyperlink{structmlx__command_a1e5461154f2d3783d1e6fb92e9b72ed5}{00102}}     bus\_dmamap\_t                \mbox{\hyperlink{structmlx__command_a1e5461154f2d3783d1e6fb92e9b72ed5}{mc\_dmamap}};     \textcolor{comment}{/* DMA map for data */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00103}\mbox{\hyperlink{structmlx__command_ae97f5229a98799fbcbb1de57690b1eee}{00103}}     u\_int32\_t                   \mbox{\hyperlink{structmlx__command_ae97f5229a98799fbcbb1de57690b1eee}{mc\_dataphys}}; \textcolor{comment}{/* data buffer base address controller space */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00105}\mbox{\hyperlink{structmlx__command_a49755599d586892433e8adb2e6aa7d80}{00105}}     void                        (* \mbox{\hyperlink{structmlx__command_a49755599d586892433e8adb2e6aa7d80}{mc\_complete}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__command}{mlx\_command}} *mc);  \textcolor{comment}{/* completion handler */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00106}\mbox{\hyperlink{structmlx__command_a22aad1b6deb675df963861cb19154572}{00106}}     \textcolor{keywordtype}{void}                        *\mbox{\hyperlink{structmlx__command_a22aad1b6deb675df963861cb19154572}{mc\_private}};  \textcolor{comment}{/* submitter-\/private data or wait channel */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00107}\mbox{\hyperlink{structmlx__command_a6f7b920a1518599e9599ae016e4d8348}{00107}}     \textcolor{keywordtype}{int}                         \mbox{\hyperlink{structmlx__command_a6f7b920a1518599e9599ae016e4d8348}{mc\_command}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00108}00108 \};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00110}00110 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00111}00111 \textcolor{comment}{ * Per-\/controller structure.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00112}00112 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00113}\mbox{\hyperlink{structmlx__softc}{00113}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__softc}{mlx\_softc}} }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00114}00114 \{}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00115}00115     \textcolor{comment}{/* bus connections */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00116}\mbox{\hyperlink{structmlx__softc_adf9cc518a439e1fafaa07159862648ee}{00116}}     device\_t            \mbox{\hyperlink{structmlx__softc_adf9cc518a439e1fafaa07159862648ee}{mlx\_dev}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00117}\mbox{\hyperlink{structmlx__softc_aab602970860f4ba6029f321e226ffd59}{00117}}     \textcolor{keyword}{struct }cdev *\mbox{\hyperlink{structmlx__softc_aab602970860f4ba6029f321e226ffd59}{mlx\_dev\_t}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00118}\mbox{\hyperlink{structmlx__softc_a0f0c6b8041e91fafdc668b584296b8bc}{00118}}     \textcolor{keyword}{struct }resource     *\mbox{\hyperlink{structmlx__softc_a0f0c6b8041e91fafdc668b584296b8bc}{mlx\_mem}};        \textcolor{comment}{/* mailbox interface window */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00119}\mbox{\hyperlink{structmlx__softc_a69b49940ed7c1a2de224640cdaa691e8}{00119}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_a69b49940ed7c1a2de224640cdaa691e8}{mlx\_mem\_rid}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00120}\mbox{\hyperlink{structmlx__softc_ae53a0bba10bc8a2a2a0b3f251065bbd7}{00120}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_ae53a0bba10bc8a2a2a0b3f251065bbd7}{mlx\_mem\_type}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00121}\mbox{\hyperlink{structmlx__softc_a945e1c3e4ba968a2fcc28582d5b1fe3e}{00121}}     bus\_dma\_tag\_t       \mbox{\hyperlink{structmlx__softc_a945e1c3e4ba968a2fcc28582d5b1fe3e}{mlx\_parent\_dmat}};\textcolor{comment}{/* parent DMA tag */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00122}\mbox{\hyperlink{structmlx__softc_a97206d0ee9c846d46c9b1d5d5cebf831}{00122}}     bus\_dma\_tag\_t       \mbox{\hyperlink{structmlx__softc_a97206d0ee9c846d46c9b1d5d5cebf831}{mlx\_buffer\_dmat}};\textcolor{comment}{/* data buffer DMA tag */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00123}\mbox{\hyperlink{structmlx__softc_a0d20af374da6f4400b07ecf21b4f35d0}{00123}}     \textcolor{keyword}{struct }resource     *\mbox{\hyperlink{structmlx__softc_a0d20af374da6f4400b07ecf21b4f35d0}{mlx\_irq}};        \textcolor{comment}{/* interrupt */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00124}\mbox{\hyperlink{structmlx__softc_a07325c5a632c35c3ed4bff5cd5af4cea}{00124}}     \textcolor{keywordtype}{void}                *\mbox{\hyperlink{structmlx__softc_a07325c5a632c35c3ed4bff5cd5af4cea}{mlx\_intr}};      \textcolor{comment}{/* interrupt handle */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00126}00126     \textcolor{comment}{/* scatter/gather lists and their controller-\/visible mappings */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00127}\mbox{\hyperlink{structmlx__softc_a0c4c7c575131a14f29b339ecd6151004}{00127}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__sgentry}{mlx\_sgentry}}       *\mbox{\hyperlink{structmlx__softc_a0c4c7c575131a14f29b339ecd6151004}{mlx\_sgtable}};        \textcolor{comment}{/* s/g lists */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00128}\mbox{\hyperlink{structmlx__softc_a8628e2bc6027922e7de642d78f5f47c2}{00128}}     u\_int32\_t           \mbox{\hyperlink{structmlx__softc_a8628e2bc6027922e7de642d78f5f47c2}{mlx\_sgbusaddr}};     \textcolor{comment}{/* s/g table base address in bus space */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00129}\mbox{\hyperlink{structmlx__softc_a6334013c1ebda6c66e8fbd2ad7dc1f12}{00129}}     bus\_dma\_tag\_t       \mbox{\hyperlink{structmlx__softc_a6334013c1ebda6c66e8fbd2ad7dc1f12}{mlx\_sg\_dmat}}; \textcolor{comment}{/* s/g buffer DMA tag */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00130}\mbox{\hyperlink{structmlx__softc_a8cb1bbf787d16528712f5cf36603ccfc}{00130}}     bus\_dmamap\_t        \mbox{\hyperlink{structmlx__softc_a8cb1bbf787d16528712f5cf36603ccfc}{mlx\_sg\_dmamap}};     \textcolor{comment}{/* map for s/g buffers */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00131}00131     }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00132}00132     \textcolor{comment}{/* controller limits and features */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00133}\mbox{\hyperlink{structmlx__softc_a5d6de7c391bd402366bf8c1fe4daf42c}{00133}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__enquiry2}{mlx\_enquiry2}}     *\mbox{\hyperlink{structmlx__softc_a5d6de7c391bd402366bf8c1fe4daf42c}{mlx\_enq2}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00134}\mbox{\hyperlink{structmlx__softc_a08ed910f57902cfafae3825f6f045069}{00134}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_a08ed910f57902cfafae3825f6f045069}{mlx\_feature}}; \textcolor{comment}{/* controller features/quirks */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00135}\mbox{\hyperlink{mlxvar_8h_ab3255a6b3731c0ad6881a2e4ab5157ac}{00135}} \textcolor{preprocessor}{\#define MLX\_FEAT\_PAUSEWORKS     (1<<0)  }\textcolor{comment}{/* channel pause works as expected */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00137}00137     \textcolor{comment}{/* controller queues and arrays */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00138}\mbox{\hyperlink{structmlx__softc_a2493f7e8df1bd62008a0dfe2449f2dfd}{00138}}     \mbox{\hyperlink{structmlx__softc_a2493f7e8df1bd62008a0dfe2449f2dfd}{TAILQ\_HEAD}}(, \mbox{\hyperlink{structmlx__command}{mlx\_command}})      mlx\_freecmds;           \textcolor{comment}{/* command structures available for reuse */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00139}\mbox{\hyperlink{structmlx__softc_a68d7c933a6754e84cc5b72ab88083c67}{00139}}     \mbox{\hyperlink{structmlx__softc_a68d7c933a6754e84cc5b72ab88083c67}{TAILQ\_HEAD}}(, \mbox{\hyperlink{structmlx__command}{mlx\_command}})      mlx\_work;               \textcolor{comment}{/* active commands */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00140}\mbox{\hyperlink{structmlx__softc_ac71dcdf272e7888dd9f6238b9c722b48}{00140}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__command}{mlx\_command}}       *\mbox{\hyperlink{structmlx__softc_ac71dcdf272e7888dd9f6238b9c722b48}{mlx\_busycmd}}[\mbox{\hyperlink{mlxvar_8h_a7f39c2d89a3595d640e0ff777618208f}{MLX\_NSLOTS}}];  \textcolor{comment}{/* busy commands */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00141}\mbox{\hyperlink{structmlx__softc_ab286580fcb111b5acd72cf71c1cb4c59}{00141}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_ab286580fcb111b5acd72cf71c1cb4c59}{mlx\_busycmds}};                       \textcolor{comment}{/* count of busy commands */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00142}\mbox{\hyperlink{structmlx__softc_af9208eeedaff1bb524c204bc38fd81e6}{00142}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__sysdrive}{mlx\_sysdrive}}     \mbox{\hyperlink{structmlx__sysdrive}{mlx\_sysdrive}}[\mbox{\hyperlink{mlxvar_8h_ab7b977033c712e0e55377ae994dff41d}{MLX\_MAXDRIVES}}];   \textcolor{comment}{/* system drives */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00143}\mbox{\hyperlink{structmlx__softc_abbb15d0bef9da2dc9d8a9d12631edb9e}{00143}}     \textcolor{keyword}{struct }bio\_queue\_head \mbox{\hyperlink{structmlx__softc_abbb15d0bef9da2dc9d8a9d12631edb9e}{mlx\_bioq}};                     \textcolor{comment}{/* outstanding I/O operations */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00144}\mbox{\hyperlink{structmlx__softc_ab4f3d397b7eb0f62eb7ed0a4d37cc5e6}{00144}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_ab4f3d397b7eb0f62eb7ed0a4d37cc5e6}{mlx\_waitbufs}};                       \textcolor{comment}{/* number of bufs awaiting commands */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00146}00146     \textcolor{comment}{/* controller status */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00147}\mbox{\hyperlink{structmlx__softc_ae8259899bc74ed2eaa422716ded6ee6a}{00147}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_ae8259899bc74ed2eaa422716ded6ee6a}{mlx\_geom}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00148}\mbox{\hyperlink{mlxvar_8h_a7f9ae1e3825dd74696f3eec76ed0eca5}{00148}} \textcolor{preprocessor}{\#define MLX\_GEOM\_128\_32         0       }\textcolor{comment}{/* geoemetry translation modes */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00149}\mbox{\hyperlink{mlxvar_8h_ad8d189c81b5fecee2e46ac950ad129e3}{00149}} \textcolor{preprocessor}{\#define MLX\_GEOM\_256\_63         1}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00150}\mbox{\hyperlink{structmlx__softc_a377d796f64dc774b21a405ca7f8a63e9}{00150}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_a377d796f64dc774b21a405ca7f8a63e9}{mlx\_state}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00151}\mbox{\hyperlink{mlxvar_8h_a7053aba92dea579a0411a3604fd1ca16}{00151}} \textcolor{preprocessor}{\#define MLX\_STATE\_INTEN         (1<<0)  }\textcolor{comment}{/* interrupts have been enabled */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00152}\mbox{\hyperlink{mlxvar_8h_a45cb00a3b4be5d4bc36ae222a04438a7}{00152}} \textcolor{preprocessor}{\#define MLX\_STATE\_SHUTDOWN      (1<<1)  }\textcolor{comment}{/* controller is shut down */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00153}\mbox{\hyperlink{mlxvar_8h_aba2860cdde7bb00516a60f8e0bdc29cd}{00153}} \textcolor{preprocessor}{\#define MLX\_STATE\_OPEN          (1<<2)  }\textcolor{comment}{/* control device is open */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00154}\mbox{\hyperlink{mlxvar_8h_a268cfdf3696cc5bc1f30a6ed129950e3}{00154}} \textcolor{preprocessor}{\#define MLX\_STATE\_SUSPEND       (1<<3)  }\textcolor{comment}{/* controller is suspended */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00155}\mbox{\hyperlink{mlxvar_8h_a7cc21bf8f01377a6b73013df91728799}{00155}} \textcolor{preprocessor}{\#define MLX\_STATE\_QFROZEN       (1<<4)  }\textcolor{comment}{/* bio queue frozen */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00156}\mbox{\hyperlink{structmlx__softc_a9a39412dc812ce1a0ba42df81560d923}{00156}}     \textcolor{keyword}{struct }mtx          \mbox{\hyperlink{structmlx__softc_a9a39412dc812ce1a0ba42df81560d923}{mlx\_io\_lock}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00157}\mbox{\hyperlink{structmlx__softc_ad5cb2df90388d3357e4020b5dce67652}{00157}}     \textcolor{keyword}{struct }sx           \mbox{\hyperlink{structmlx__softc_ad5cb2df90388d3357e4020b5dce67652}{mlx\_config\_lock}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00158}\mbox{\hyperlink{structmlx__softc_a17739728cf38d36522fd8b8a253e623d}{00158}}     \textcolor{keyword}{struct }callout      \mbox{\hyperlink{structmlx__softc_a17739728cf38d36522fd8b8a253e623d}{mlx\_timeout}}; \textcolor{comment}{/* periodic status monitor */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00159}\mbox{\hyperlink{structmlx__softc_abe27e7f148e6e718172d43218e8e27c8}{00159}}     time\_t              \mbox{\hyperlink{structmlx__softc_abe27e7f148e6e718172d43218e8e27c8}{mlx\_lastpoll}};       \textcolor{comment}{/* last time\_second we polled for status */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00160}\mbox{\hyperlink{structmlx__softc_afc77bda59cba77f48d06c8f53e7aa16d}{00160}}     u\_int16\_t           \mbox{\hyperlink{structmlx__softc_afc77bda59cba77f48d06c8f53e7aa16d}{mlx\_lastevent}};     \textcolor{comment}{/* sequence number of the last event we recorded */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00161}\mbox{\hyperlink{structmlx__softc_a756a722854725896180fa2ac0930ef2b}{00161}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_a756a722854725896180fa2ac0930ef2b}{mlx\_currevent}};     \textcolor{comment}{/* sequence number last time we looked */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00162}\mbox{\hyperlink{structmlx__softc_a13e9469c517809681b090994b6b22547}{00162}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_a13e9469c517809681b090994b6b22547}{mlx\_background}};   \textcolor{comment}{/* if != 0 rebuild or check is in progress */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00163}\mbox{\hyperlink{mlxvar_8h_a84250d814521af702f38c11486708d94}{00163}} \textcolor{preprocessor}{\#define MLX\_BACKGROUND\_CHECK            1       }\textcolor{comment}{/* we started a check */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00164}\mbox{\hyperlink{mlxvar_8h_a10ecd1ee42c74eb64439123d5d82da82}{00164}} \textcolor{preprocessor}{\#define MLX\_BACKGROUND\_REBUILD          2       }\textcolor{comment}{/* we started a rebuild */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00165}\mbox{\hyperlink{mlxvar_8h_a1f54b4d02b5ccd1a364471240106758c}{00165}} \textcolor{preprocessor}{\#define MLX\_BACKGROUND\_SPONTANEOUS      3       }\textcolor{comment}{/* it just happened somehow */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00166}\mbox{\hyperlink{structmlx__softc_a90d151dffab8fa829359ab1ba851800f}{00166}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__rebuild__status}{mlx\_rebuild\_status}} \mbox{\hyperlink{structmlx__softc_a90d151dffab8fa829359ab1ba851800f}{mlx\_rebuildstat}}; \textcolor{comment}{/* last rebuild status */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00167}\mbox{\hyperlink{structmlx__softc_aca36485331801cbf671b0e4e303be725}{00167}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__pause}{mlx\_pause}}   \mbox{\hyperlink{structmlx__pause}{mlx\_pause}};     \textcolor{comment}{/* pending pause operation details */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00169}\mbox{\hyperlink{structmlx__softc_abd4c488af9dbbc232412538481d433e6}{00169}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_abd4c488af9dbbc232412538481d433e6}{mlx\_flags}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00170}\mbox{\hyperlink{mlxvar_8h_a2063bc2ccc4b6fc72e1311b4a65c6eb1}{00170}} \textcolor{preprocessor}{\#define MLX\_SPINUP\_REPORTED     (1<<0)  }\textcolor{comment}{/* "{}spinning up drives"{} message displayed */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00171}\mbox{\hyperlink{mlxvar_8h_a466344b7f5d965874f09706fb14d381a}{00171}} \textcolor{preprocessor}{\#define MLX\_EVENTLOG\_BUSY       (1<<1)  }\textcolor{comment}{/* currently reading event log */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00173}00173     \textcolor{comment}{/* interface-\/specific accessor functions */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00174}\mbox{\hyperlink{structmlx__softc_a01a1882362b59c2497ce787e891a28d7}{00174}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlx__softc_a01a1882362b59c2497ce787e891a28d7}{mlx\_iftype}};   \textcolor{comment}{/* interface protocol */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00175}\mbox{\hyperlink{mlxvar_8h_a7562b729584eda792894291fa88fa5f1}{00175}} \textcolor{preprocessor}{\#define MLX\_IFTYPE\_2    2}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00176}\mbox{\hyperlink{mlxvar_8h_a96558cdb66c1bfb9d46528ee58438951}{00176}} \textcolor{preprocessor}{\#define MLX\_IFTYPE\_3    3}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00177}\mbox{\hyperlink{mlxvar_8h_a4c90492c83d76fb6e9878999df35c7c5}{00177}} \textcolor{preprocessor}{\#define MLX\_IFTYPE\_4    4}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00178}\mbox{\hyperlink{mlxvar_8h_a9398993c12e3a2c5c55b2201929178ed}{00178}} \textcolor{preprocessor}{\#define MLX\_IFTYPE\_5    5}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00179}\mbox{\hyperlink{structmlx__softc_a416e9fe5f3bce152ad0d8935ec62aeca}{00179}}     int                 (* \mbox{\hyperlink{structmlx__softc_a416e9fe5f3bce152ad0d8935ec62aeca}{mlx\_tryqueue}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc, \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__command}{mlx\_command}} *mc);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00180}\mbox{\hyperlink{structmlx__softc_ae996c10df7f079046eb0f5145a728e7c}{00180}}     int                 (* \mbox{\hyperlink{structmlx__softc_ae996c10df7f079046eb0f5145a728e7c}{mlx\_findcomplete}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc, u\_int8\_t *slot, u\_int16\_t *\mbox{\hyperlink{mlx_8c_aa59fc2edf1dd0b7c08324fe157b5f046}{status}});}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00181}\mbox{\hyperlink{structmlx__softc_a431f9d8a233235d615ef793ac69b980e}{00181}}     void                (* \mbox{\hyperlink{structmlx__softc_a431f9d8a233235d615ef793ac69b980e}{mlx\_intaction}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc, \textcolor{keywordtype}{int} action);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00182}\mbox{\hyperlink{structmlx__softc_addb67379973fdf595acb17e586a3069c}{00182}}     int                 (* \mbox{\hyperlink{structmlx__softc_addb67379973fdf595acb17e586a3069c}{mlx\_fw\_handshake}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc, \textcolor{keywordtype}{int} *error, \textcolor{keywordtype}{int} *param1, \textcolor{keywordtype}{int} *param2, \textcolor{keywordtype}{int} first);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00183}\mbox{\hyperlink{mlxvar_8h_aee2ff636d0b301ba09196958b064759b}{00183}} \textcolor{preprocessor}{\#define MLX\_INTACTION\_DISABLE           0}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00184}\mbox{\hyperlink{mlxvar_8h_a8677f41f9c598c944a7be6514ec94d71}{00184}} \textcolor{preprocessor}{\#define MLX\_INTACTION\_ENABLE            1}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00185}00185 \};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00186}00186 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00187}\mbox{\hyperlink{mlxvar_8h_a212f851827576990500e82d16f52a7a5}{00187}} \textcolor{preprocessor}{\#define MLX\_IO\_LOCK(sc)                 mtx\_lock(\&(sc)-\/>mlx\_io\_lock)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00188}\mbox{\hyperlink{mlxvar_8h_a1bee0d2834e12cf814fd3f439b6eae3c}{00188}} \textcolor{preprocessor}{\#define MLX\_IO\_UNLOCK(sc)               mtx\_unlock(\&(sc)-\/>mlx\_io\_lock)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00189}\mbox{\hyperlink{mlxvar_8h_aade29edc7ab4213a7acfb736922f50ba}{00189}} \textcolor{preprocessor}{\#define MLX\_IO\_ASSERT\_LOCKED(sc)        mtx\_assert(\&(sc)-\/>mlx\_io\_lock, MA\_OWNED)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00190}\mbox{\hyperlink{mlxvar_8h_a205575b09a9ae7a08bf032b32ce0be9b}{00190}} \textcolor{preprocessor}{\#define MLX\_CONFIG\_LOCK(sc)             sx\_xlock(\&(sc)-\/>mlx\_config\_lock)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00191}\mbox{\hyperlink{mlxvar_8h_afcacecc5f5386acb5c3b66eb5a68967f}{00191}} \textcolor{preprocessor}{\#define MLX\_CONFIG\_UNLOCK(sc)           sx\_xunlock(\&(sc)-\/>mlx\_config\_lock)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00192}\mbox{\hyperlink{mlxvar_8h_a28b8d0bbeeb362efc7ced9e9b185e7a6}{00192}} \textcolor{preprocessor}{\#define MLX\_CONFIG\_ASSERT\_LOCKED(sc)    sx\_assert(\&(sc)-\/>mlx\_config\_lock, SA\_XLOCKED)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00194}00194 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00195}00195 \textcolor{comment}{ * Interface between bus connections and driver core.}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00196}00196 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00197}00197 \textcolor{keyword}{extern} \textcolor{keywordtype}{void}             \mbox{\hyperlink{mlxvar_8h_a82d7b33fa52d0c9a5bf81a577d71c771}{mlx\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00198}00198 \textcolor{keyword}{extern} \textcolor{keywordtype}{int}              \mbox{\hyperlink{mlxvar_8h_a86ed09fc5e729503c09f6bd1826b389b}{mlx\_attach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00199}00199 \textcolor{keyword}{extern} \textcolor{keywordtype}{void}             \mbox{\hyperlink{mlxvar_8h_a4aaa43d7534a313055228065ede89914}{mlx\_startup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00200}00200 \textcolor{keyword}{extern} \textcolor{keywordtype}{void}             \mbox{\hyperlink{mlxvar_8h_af6eec6c34c9682f9c7409332a945e308}{mlx\_intr}}(\textcolor{keywordtype}{void} *data);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00201}00201 \textcolor{keyword}{extern} \textcolor{keywordtype}{int}              \mbox{\hyperlink{mlxvar_8h_a9e9c3397d47e22356f452a358e17e1fc}{mlx\_detach}}(device\_t dev);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00202}00202 \textcolor{keyword}{extern} \textcolor{keywordtype}{int}              \mbox{\hyperlink{mlxvar_8h_aba54295aa9fb7816f075b7e5fdc62e1f}{mlx\_shutdown}}(device\_t dev);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00203}00203 \textcolor{keyword}{extern} \textcolor{keywordtype}{int}              \mbox{\hyperlink{mlxvar_8h_ad16891f47c1f4cddbfa80203b995adbe}{mlx\_suspend}}(device\_t dev); }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00204}00204 \textcolor{keyword}{extern} \textcolor{keywordtype}{int}              \mbox{\hyperlink{mlxvar_8h_a6f4ead514ce98d182a0c7b2e45809ef7}{mlx\_resume}}(device\_t dev);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00205}00205 \textcolor{keyword}{extern} d\_open\_t         \mbox{\hyperlink{mlxvar_8h_ac6b2fc985d3bff02771a908fade3d987}{mlx\_open}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00206}00206 \textcolor{keyword}{extern} d\_close\_t        \mbox{\hyperlink{mlxvar_8h_a8d3199dd496ae0152e9a6929a0e2b8c8}{mlx\_close}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00207}00207 \textcolor{keyword}{extern} d\_ioctl\_t        \mbox{\hyperlink{mlxvar_8h_a42ec1982c907c38bb99cb0fd7f42593d}{mlx\_ioctl}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00208}00208 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00209}00209 \textcolor{keyword}{extern} devclass\_t       \mbox{\hyperlink{mlxvar_8h_a6fbe84a6d477f3b2d6814a7131cacb85}{mlx\_devclass}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00210}00210 \textcolor{keyword}{extern} devclass\_t       \mbox{\hyperlink{mlxvar_8h_a880bcfe6456201c7392300fb53acf215}{mlxd\_devclass}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00211}00211 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00212}00212 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00213}00213 \textcolor{comment}{ * Mylex System Disk driver}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00214}00214 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00215}\mbox{\hyperlink{structmlxd__softc}{00215}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlxd__softc}{mlxd\_softc}} }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00216}00216 \{}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00217}\mbox{\hyperlink{structmlxd__softc_a4269bf533fbbe41ebef477165d53c1f7}{00217}}     device\_t            \mbox{\hyperlink{structmlxd__softc_a4269bf533fbbe41ebef477165d53c1f7}{mlxd\_dev}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00218}\mbox{\hyperlink{structmlxd__softc_a14b2da2937024d2569e6ac7cbff555a8}{00218}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__softc}{mlx\_softc}}   *\mbox{\hyperlink{structmlxd__softc_a14b2da2937024d2569e6ac7cbff555a8}{mlxd\_controller}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00219}\mbox{\hyperlink{structmlxd__softc_aaa3edbae75582d05bce1369690b3f317}{00219}}     \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__sysdrive}{mlx\_sysdrive}}     *\mbox{\hyperlink{structmlxd__softc_aaa3edbae75582d05bce1369690b3f317}{mlxd\_drive}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00220}\mbox{\hyperlink{structmlxd__softc_a7f172f4edc3821df55cacbae7d3f5e32}{00220}}     \textcolor{keyword}{struct }disk         *\mbox{\hyperlink{structmlxd__softc_a7f172f4edc3821df55cacbae7d3f5e32}{mlxd\_disk}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00221}\mbox{\hyperlink{structmlxd__softc_a6b244539863a7317c4940df58d16c3b2}{00221}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlxd__softc_a6b244539863a7317c4940df58d16c3b2}{mlxd\_unit}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00222}\mbox{\hyperlink{structmlxd__softc_a30f8da28a54d906c417831bd8fcfa95d}{00222}}     \textcolor{keywordtype}{int}                 \mbox{\hyperlink{structmlxd__softc_a30f8da28a54d906c417831bd8fcfa95d}{mlxd\_flags}};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00223}\mbox{\hyperlink{mlxvar_8h_aa176b6139fdaf7a1648c3d0641305b69}{00223}} \textcolor{preprocessor}{\#define MLXD\_OPEN       (1<<0)          }\textcolor{comment}{/* drive is open (can't shut down) */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00224}00224 \};}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00226}00226 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00227}00227 \textcolor{comment}{ * Interface between driver core and disk driver (should be using a bus?)}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00228}00228 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00229}00229 \textcolor{keyword}{extern} \textcolor{keywordtype}{int}      \mbox{\hyperlink{mlxvar_8h_a8bc5108350a85e8a66746fca78b36d65}{mlx\_submit\_buf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc, \textcolor{keyword}{struct} bio *bp);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00230}00230 \textcolor{keyword}{extern} \textcolor{keywordtype}{int}      \mbox{\hyperlink{mlxvar_8h_afe65655705129173f5d203e4fc3991c3}{mlx\_submit\_ioctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx__softc}{mlx\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00231}00231                         \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx__sysdrive}{mlx\_sysdrive}} *drive, u\_long cmd, }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00232}00232                         caddr\_t addr, int32\_t flag, \textcolor{keyword}{struct} thread *td);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00233}00233 \textcolor{keyword}{extern} \textcolor{keywordtype}{void}     \mbox{\hyperlink{mlxvar_8h_a8fb7c674b4558babb1326ceef2bf4953}{mlxd\_intr}}(\textcolor{keyword}{struct} bio *bp);}
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{mlxvar_8h_source_l00235}00235 }

\end{DoxyCode}
