\hypertarget{mlxio_8h_source}{}\doxysection{mlxio.\+h}
\label{mlxio_8h_source}\index{dev/mlx/mlxio.h@{dev/mlx/mlxio.h}}
\mbox{\hyperlink{mlxio_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1999 Michael Smith}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00027}00027 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00028}00028 \textcolor{comment}{ *      \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00029}00029 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00031}00031 \textcolor{preprocessor}{\#include <sys/ioccom.h>}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00033}00033 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00034}00034 \textcolor{comment}{ * System Disk ioctls}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00035}00035 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00036}00036 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00037}00037 \textcolor{comment}{/* system disk status values */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00038}\mbox{\hyperlink{mlxio_8h_ae471a0790af1ab286d5c6546c87b1d73}{00038}} \textcolor{preprocessor}{\#define MLX\_SYSD\_ONLINE         0x03}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00039}\mbox{\hyperlink{mlxio_8h_a0a57c7c04e868c99a755714de4a2d29b}{00039}} \textcolor{preprocessor}{\#define MLX\_SYSD\_CRITICAL       0x04}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00040}\mbox{\hyperlink{mlxio_8h_a4cc2598600d4f5b11f8ab543128724b1}{00040}} \textcolor{preprocessor}{\#define MLX\_SYSD\_OFFLINE        0xff}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00042}\mbox{\hyperlink{mlxio_8h_af817b47cb8feb8271056987be3199136}{00042}} \textcolor{preprocessor}{\#define MLXD\_STATUS             \_IOR ('M', 100, int)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00043}\mbox{\hyperlink{mlxio_8h_a100b7cf008b3d8a3bb735cfd10694936}{00043}} \textcolor{preprocessor}{\#define MLXD\_CHECKASYNC         \_IOR ('M', 101, int)    }\textcolor{comment}{/* command result returned in argument */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00045}00045 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00046}00046 \textcolor{comment}{ * Controller ioctls}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00047}00047 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00048}\mbox{\hyperlink{structmlx__pause}{00048}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__pause}{mlx\_pause}} }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00049}00049 \{}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00050}\mbox{\hyperlink{structmlx__pause_ad2be3d33ed120a005a2ca66df82c1be2}{00050}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__pause_ad2be3d33ed120a005a2ca66df82c1be2}{mp\_which}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00051}\mbox{\hyperlink{mlxio_8h_ac13e5bc20a4729e24e1ad4bc1bccd7c2}{00051}} \textcolor{preprocessor}{\#define MLX\_PAUSE\_ALL           0xff}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00052}\mbox{\hyperlink{mlxio_8h_a64f29b4b624e54749889af6cc71e5ecb}{00052}} \textcolor{preprocessor}{\#define MLX\_PAUSE\_CANCEL        0x00}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00053}\mbox{\hyperlink{structmlx__pause_a3b4abe930e2a568c82d61d3590c1f903}{00053}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__pause_a3b4abe930e2a568c82d61d3590c1f903}{mp\_when}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00054}\mbox{\hyperlink{structmlx__pause_af0cc1f4608441933048cd5514b25e898}{00054}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__pause_af0cc1f4608441933048cd5514b25e898}{mp\_howlong}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00055}00055 \};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00057}\mbox{\hyperlink{structmlx__usercommand}{00057}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__usercommand}{mlx\_usercommand}}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00058}00058 \{}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00059}00059     \textcolor{comment}{/* data buffer */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00060}\mbox{\hyperlink{structmlx__usercommand_a9d0b39f5e5aa4b975b15235787ba7c1f}{00060}}     \textcolor{keywordtype}{size\_t}      \mbox{\hyperlink{structmlx__usercommand_a9d0b39f5e5aa4b975b15235787ba7c1f}{mu\_datasize}}; \textcolor{comment}{/* size of databuffer */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00061}\mbox{\hyperlink{structmlx__usercommand_a72493b1ac791f6c8d29d0d8f5d0367dc}{00061}}     \textcolor{keywordtype}{void}        *\mbox{\hyperlink{structmlx__usercommand_a72493b1ac791f6c8d29d0d8f5d0367dc}{mu\_buf}};  \textcolor{comment}{/* address in userspace of databuffer */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00062}\mbox{\hyperlink{structmlx__usercommand_a6e053842350314cc59e63d5c1eb4f0d6}{00062}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__usercommand_a6e053842350314cc59e63d5c1eb4f0d6}{mu\_bufptr}};     \textcolor{comment}{/* offset into command mailbox to place databuffer address */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00064}00064     \textcolor{comment}{/* command */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00065}\mbox{\hyperlink{structmlx__usercommand_af55a4eaab26ea3527ce75fc623df4570}{00065}}     u\_int16\_t   \mbox{\hyperlink{structmlx__usercommand_af55a4eaab26ea3527ce75fc623df4570}{mu\_status}};     \textcolor{comment}{/* command status returned */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00066}\mbox{\hyperlink{structmlx__usercommand_a0b8a39402f36c0338a9ee103360e7146}{00066}}     u\_int8\_t    \mbox{\hyperlink{structmlx__usercommand_a0b8a39402f36c0338a9ee103360e7146}{mu\_command}}[16];       \textcolor{comment}{/* command mailbox contents */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00068}00068     \textcolor{comment}{/* wrapper */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00069}\mbox{\hyperlink{structmlx__usercommand_a624a4ebc13cf1056c26f3eb03ce5f77b}{00069}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__usercommand_a624a4ebc13cf1056c26f3eb03ce5f77b}{mu\_error}};       \textcolor{comment}{/* result of submission to driver */}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00071}00071 \};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00073}\mbox{\hyperlink{structmlx__rebuild__request}{00073}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__rebuild__request}{mlx\_rebuild\_request}}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00074}00074 \{}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00075}\mbox{\hyperlink{structmlx__rebuild__request_adde8967ad493f03f1b745e3d00790fd9}{00075}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__rebuild__request_adde8967ad493f03f1b745e3d00790fd9}{rr\_channel}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00076}\mbox{\hyperlink{structmlx__rebuild__request_a2deae256fb78798a97040662d569655f}{00076}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__rebuild__request_a2deae256fb78798a97040662d569655f}{rr\_target}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00077}\mbox{\hyperlink{structmlx__rebuild__request_a3fe093c80edb6963810fafae33c2e0d9}{00077}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__rebuild__request_a3fe093c80edb6963810fafae33c2e0d9}{rr\_status}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00078}00078 \};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00080}\mbox{\hyperlink{structmlx__rebuild__status}{00080}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx__rebuild__status}{mlx\_rebuild\_status}}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00081}00081 \{}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00082}\mbox{\hyperlink{structmlx__rebuild__status_aa9d2777c41b5bcfe7827241d1d4d3748}{00082}}     u\_int16\_t   \mbox{\hyperlink{structmlx__rebuild__status_aa9d2777c41b5bcfe7827241d1d4d3748}{rs\_code}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00083}\mbox{\hyperlink{mlxio_8h_a9c4f193823dd614d6cdbd60aa56592bd}{00083}} \textcolor{preprocessor}{\#define MLX\_REBUILDSTAT\_REBUILDCHECK    0x0000}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00084}\mbox{\hyperlink{mlxio_8h_a7adec5e76ee987be0e828c91f6d4c20e}{00084}} \textcolor{preprocessor}{\#define MLX\_REBUILDSTAT\_ADDCAPACITY     0x0400}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00085}\mbox{\hyperlink{mlxio_8h_a0f76fe57d54432a44763921822fd3348}{00085}} \textcolor{preprocessor}{\#define MLX\_REBUILDSTAT\_ADDCAPACITYINIT 0x0500}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00086}\mbox{\hyperlink{mlxio_8h_a7986bf02772b6e4967ee8160ac80edcb}{00086}} \textcolor{preprocessor}{\#define MLX\_REBUILDSTAT\_IDLE            0xffff}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00087}\mbox{\hyperlink{structmlx__rebuild__status_a293de999d1b9f00d0fc1e71efa73e049}{00087}}     u\_int16\_t   \mbox{\hyperlink{structmlx__rebuild__status_a293de999d1b9f00d0fc1e71efa73e049}{rs\_drive}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00088}\mbox{\hyperlink{structmlx__rebuild__status_a84c0f5bdcb638d96983b83bdf5c80e9e}{00088}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__rebuild__status_a84c0f5bdcb638d96983b83bdf5c80e9e}{rs\_size}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00089}\mbox{\hyperlink{structmlx__rebuild__status_a3f8ca2a8c7e41adcae4a10313558b945}{00089}}     \textcolor{keywordtype}{int}         \mbox{\hyperlink{structmlx__rebuild__status_a3f8ca2a8c7e41adcae4a10313558b945}{rs\_remaining}};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00090}00090 \};}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00092}\mbox{\hyperlink{mlxio_8h_ab8c142bc6c389fdfdb228d8c7e6448a5}{00092}} \textcolor{preprocessor}{\#define MLX\_NEXT\_CHILD          \_IOWR('M', 0, int)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00093}\mbox{\hyperlink{mlxio_8h_a6f79dbc51255693d79e276ed449200ba}{00093}} \textcolor{preprocessor}{\#define MLX\_RESCAN\_DRIVES       \_IO  ('M', 1)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00094}\mbox{\hyperlink{mlxio_8h_a259bf2bcca42e1548b76a3b41fb33198}{00094}} \textcolor{preprocessor}{\#define MLX\_DETACH\_DRIVE        \_IOW ('M', 2, int)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00095}\mbox{\hyperlink{mlxio_8h_a9c7359b5739c4d660f3abdd7b3302bea}{00095}} \textcolor{preprocessor}{\#define MLX\_PAUSE\_CHANNEL       \_IOW ('M', 3, struct mlx\_pause)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00096}\mbox{\hyperlink{mlxio_8h_a12e5bf645bbed6300d7bce27a60f3c81}{00096}} \textcolor{preprocessor}{\#define MLX\_COMMAND             \_IOWR('M', 4, struct mlx\_usercommand)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00097}\mbox{\hyperlink{mlxio_8h_ab30a3ec3949e1bddbb681265cd30eb6e}{00097}} \textcolor{preprocessor}{\#define MLX\_REBUILDASYNC        \_IOWR('M', 5, struct mlx\_rebuild\_request)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00098}\mbox{\hyperlink{mlxio_8h_a6751d9d95fc2cef206e978cd9df7be50}{00098}} \textcolor{preprocessor}{\#define MLX\_REBUILDSTAT         \_IOR ('M', 6, struct mlx\_rebuild\_status)}}
\DoxyCodeLine{\Hypertarget{mlxio_8h_source_l00099}\mbox{\hyperlink{mlxio_8h_a4ee6a06f34bf1a12f43b5ce0fb968beb}{00099}} \textcolor{preprocessor}{\#define MLX\_GET\_SYSDRIVE        \_IOWR('M', 7, int)}}

\end{DoxyCode}
