\hypertarget{mlx5__cmd_8c_source}{}\doxysection{mlx5\+\_\+cmd.\+c}
\label{mlx5__cmd_8c_source}\index{dev/mlx5/mlx5\_core/mlx5\_cmd.c@{dev/mlx5/mlx5\_core/mlx5\_cmd.c}}
\mbox{\hyperlink{mlx5__cmd_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2013-\/2019, Mellanox Technologies, Ltd.  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00004}00004 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00005}00005 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00006}00006 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00007}00007 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00008}00008 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00009}00009 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00011}00011 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00013}00013 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00014}00014 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00015}00015 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00016}00016 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00017}00017 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00018}00018 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00019}00019 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00020}00020 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00021}00021 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00022}00022 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00023}00023 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00024}00024 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00025}00025 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}opt\_rss.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}opt\_ratelimit.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <linux/module.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <linux/errno.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <linux/pci.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <linux/dma-\/mapping.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <linux/slab.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <linux/delay.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <linux/random.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <linux/io-\/mapping.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <linux/hardirq.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <linux/ktime.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{driver_8h}{dev/mlx5/driver.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cmd_8h}{dev/mlx5/cmd.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{mlx5__core_8h}{dev/mlx5/mlx5\_core/mlx5\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00045}00045 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a5c6d86f1a938f4eaaad350780cc26c85}{mlx5\_copy\_from\_msg}}(\textcolor{keywordtype}{void} *to, \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *from, \textcolor{keywordtype}{int} size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00046}00046 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a7105113b70ff1e22cf30ca6f622a94e5}{mlx5\_free\_cmd\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00047}00047                               \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00048}00048 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_acb2b052e8e6fa2cf5097212d89a7f16d}{free\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00050}00050 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00051}\mbox{\hyperlink{mlx5__cmd_8c_a7646ae03981912f97626c39dfe9318daabd273453f640ef7fe974b43f0b3a62c6}{00051}}         \mbox{\hyperlink{mlx5__cmd_8c_a7646ae03981912f97626c39dfe9318daabd273453f640ef7fe974b43f0b3a62c6}{CMD\_IF\_REV}} = 5,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00052}00052 \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00054}00054 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00055}\mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a35367654f452528414c93acebe03341c}{00055}}         \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a35367654f452528414c93acebe03341c}{NUM\_LONG\_LISTS}}      = 2,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00056}\mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a39dfe7963379a9f58c3202ab33105cef}{00056}}         \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a39dfe7963379a9f58c3202ab33105cef}{NUM\_MED\_LISTS}}        = 64,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00057}00057         \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1af9c490dec5c300441d5a0481dcde357a}{LONG\_LIST\_SIZE}}      = (2ULL * 1024 * 1024 * 1024 / PAGE\_SIZE) * 8 + 16 +}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00058}\mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1af9c490dec5c300441d5a0481dcde357a}{00058}}                                 \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a446a81d5adbbeff683a2e55a589349d5}{MLX5\_CMD\_DATA\_BLOCK\_SIZE}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00059}\mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a224b9993c67b24b3c06e8dd98c0c0e34}{00059}}         \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a224b9993c67b24b3c06e8dd98c0c0e34}{MED\_LIST\_SIZE}}        = 16 + \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a446a81d5adbbeff683a2e55a589349d5}{MLX5\_CMD\_DATA\_BLOCK\_SIZE}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00060}00060 \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00062}00062 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00063}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dab1efa025e210bbef7ec91f22b7f327be}{00063}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dab1efa025e210bbef7ec91f22b7f327be}{MLX5\_CMD\_DELIVERY\_STAT\_OK}}                      = 0x0,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00064}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dad6b59027138a36930106e2cc538d075e}{00064}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dad6b59027138a36930106e2cc538d075e}{MLX5\_CMD\_DELIVERY\_STAT\_SIGNAT\_ERR}}              = 0x1,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00065}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dabb3a86102da8fa746aa331e266f0fde2}{00065}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dabb3a86102da8fa746aa331e266f0fde2}{MLX5\_CMD\_DELIVERY\_STAT\_TOK\_ERR}}                    = 0x2,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00066}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da6fa135203527fde8b9cc3bc6b735ef7c}{00066}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da6fa135203527fde8b9cc3bc6b735ef7c}{MLX5\_CMD\_DELIVERY\_STAT\_BAD\_BLK\_NUM\_ERR}}            = 0x3,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00067}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da32069657c8d82287756b0d2d0408164f}{00067}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da32069657c8d82287756b0d2d0408164f}{MLX5\_CMD\_DELIVERY\_STAT\_OUT\_PTR\_ALIGN\_ERR}}        = 0x4,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00068}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dab76c010814174e526bc2d45031aba526}{00068}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dab76c010814174e526bc2d45031aba526}{MLX5\_CMD\_DELIVERY\_STAT\_IN\_PTR\_ALIGN\_ERR}}          = 0x5,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00069}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dae17173712abdd5e026251b5db86fd56d}{00069}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dae17173712abdd5e026251b5db86fd56d}{MLX5\_CMD\_DELIVERY\_STAT\_FW\_ERR}}                      = 0x6,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00070}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da5a4e0f581778942c37824eabb8685e61}{00070}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da5a4e0f581778942c37824eabb8685e61}{MLX5\_CMD\_DELIVERY\_STAT\_IN\_LENGTH\_ERR}}                = 0x7,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00071}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da2284e83bcc8317d12216ff63d56dcfe3}{00071}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da2284e83bcc8317d12216ff63d56dcfe3}{MLX5\_CMD\_DELIVERY\_STAT\_OUT\_LENGTH\_ERR}}              = 0x8,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00072}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da94f68954b0a8181b6fc0abe1558f8af4}{00072}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da94f68954b0a8181b6fc0abe1558f8af4}{MLX5\_CMD\_DELIVERY\_STAT\_RES\_FLD\_NOT\_CLR\_ERR}}    = 0x9,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00073}\mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da389a223a0e567e2e20af773d14baa38a}{00073}}         \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da389a223a0e567e2e20af773d14baa38a}{MLX5\_CMD\_DELIVERY\_STAT\_CMD\_DESCR\_ERR}}                = 0x10,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00074}00074 \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00076}\mbox{\hyperlink{structmlx5__ifc__mbox__out__bits}{00076}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__ifc__mbox__out__bits}{mlx5\_ifc\_mbox\_out\_bits}} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00077}\mbox{\hyperlink{structmlx5__ifc__mbox__out__bits_ac3dee28aab361884016155020125791b}{00077}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__out__bits_ac3dee28aab361884016155020125791b}{status}}[0x8];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00078}\mbox{\hyperlink{structmlx5__ifc__mbox__out__bits_affa7ccb089d450c66373b87616925a58}{00078}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__out__bits_affa7ccb089d450c66373b87616925a58}{reserved\_at\_8}}[0x18];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00080}\mbox{\hyperlink{structmlx5__ifc__mbox__out__bits_a372ade79aab524a8692a530c5f85a557}{00080}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__out__bits_a372ade79aab524a8692a530c5f85a557}{syndrome}}[0x20];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00082}\mbox{\hyperlink{structmlx5__ifc__mbox__out__bits_a696ccba55aff9bfb782e7a80e80f2bb7}{00082}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__out__bits_a696ccba55aff9bfb782e7a80e80f2bb7}{reserved\_at\_40}}[0x40];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00083}00083 \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00085}\mbox{\hyperlink{structmlx5__ifc__mbox__in__bits}{00085}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__ifc__mbox__in__bits}{mlx5\_ifc\_mbox\_in\_bits}} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00086}\mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a39a37b61270a1a4f841f9f6ecfc81a7c}{00086}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a39a37b61270a1a4f841f9f6ecfc81a7c}{opcode}}[0x10];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00087}\mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a1f9a9c07440103097f315e9711a9c105}{00087}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a1f9a9c07440103097f315e9711a9c105}{reserved\_at\_10}}[0x10];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00089}\mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a03fc7084eed425eff56f30be9f66e5a7}{00089}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a03fc7084eed425eff56f30be9f66e5a7}{reserved\_at\_20}}[0x10];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00090}\mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a661aef3976b6829a859b7237e9846fdc}{00090}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a661aef3976b6829a859b7237e9846fdc}{op\_mod}}[0x10];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00092}\mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a63b77da9c26e81739e3ee026ed36b89c}{00092}}         u8         \mbox{\hyperlink{structmlx5__ifc__mbox__in__bits_a63b77da9c26e81739e3ee026ed36b89c}{reserved\_at\_40}}[0x40];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00093}00093 \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00096}\mbox{\hyperlink{mlx5__cmd_8c_a89d947d5a868926a46536cff140dfb48}{00096}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *\mbox{\hyperlink{mlx5__cmd_8c_a89d947d5a868926a46536cff140dfb48}{alloc\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00097}00097                                            \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00098}00098                                            \textcolor{keywordtype}{int} \mbox{\hyperlink{structmlx5__cmd__work__ent_a070dd0731f2011a5b26472d1a6da5d35}{uin\_size}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00099}00099                                            \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00100}00100                                            \textcolor{keywordtype}{void} *\mbox{\hyperlink{structmlx5__cmd__work__ent_aa5763af54cf417c085920d16f92b5111}{uout}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{structmlx5__cmd__work__ent_a3f5be640cc1a2eaca0f71162f9821f93}{uout\_size}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00101}00101                                            \mbox{\hyperlink{driver_8h_ac6c246dcbc31bef1fd1700ddd505dd46}{mlx5\_cmd\_cbk\_t}} cbk,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00102}00102                                            \textcolor{keywordtype}{void} *\mbox{\hyperlink{structmlx5__cmd__work__ent_ac6828af5b41e1e97cdb1789cf83a778b}{context}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{structmlx5__cmd__work__ent_a0cf62883b9cc23eaf42caa54cb75aafa}{page\_queue}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00103}00103 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00104}00104         gfp\_t alloc\_flags = cbk ? GFP\_ATOMIC : GFP\_KERNEL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00105}00105         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00107}00107         ent = kzalloc(\textcolor{keyword}{sizeof}(*ent), alloc\_flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00108}00108         \textcolor{keywordflow}{if} (!ent)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00109}00109                 \textcolor{keywordflow}{return} ERR\_PTR(-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00111}00111         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}               = \mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00112}00112         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a070dd0731f2011a5b26472d1a6da5d35}{uin\_size}}   = \mbox{\hyperlink{structmlx5__cmd__work__ent_a070dd0731f2011a5b26472d1a6da5d35}{uin\_size}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00113}00113         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}}     = \mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00114}00114         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa5763af54cf417c085920d16f92b5111}{uout}}   = \mbox{\hyperlink{structmlx5__cmd__work__ent_aa5763af54cf417c085920d16f92b5111}{uout}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00115}00115         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a3f5be640cc1a2eaca0f71162f9821f93}{uout\_size}} = \mbox{\hyperlink{structmlx5__cmd__work__ent_a3f5be640cc1a2eaca0f71162f9821f93}{uout\_size}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00116}00116         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a5cd47e90f76c0f58861b9621811325c2}{callback}}   = cbk;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00117}00117         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ac6828af5b41e1e97cdb1789cf83a778b}{context}}     = \mbox{\hyperlink{structmlx5__cmd__work__ent_ac6828af5b41e1e97cdb1789cf83a778b}{context}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00118}00118         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}     = \mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00119}00119         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a0cf62883b9cc23eaf42caa54cb75aafa}{page\_queue}} = \mbox{\hyperlink{structmlx5__cmd__work__ent_a0cf62883b9cc23eaf42caa54cb75aafa}{page\_queue}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00121}00121         \textcolor{keywordflow}{return} ent;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00122}00122 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00124}\mbox{\hyperlink{mlx5__cmd_8c_ae167ff311a9ab5b008d8627e8c4b3600}{00124}} \textcolor{keyword}{static} u8 \mbox{\hyperlink{mlx5__cmd_8c_ae167ff311a9ab5b008d8627e8c4b3600}{alloc\_token}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00125}00125 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00126}00126         u8 \mbox{\hyperlink{structmlx5__cmd__work__ent_a7326130f5094685d15659a88682754ed}{token}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00128}00128         spin\_lock(\&\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a077911ec9a0848dd85c0310f9bf6db01}{token\_lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00129}00129         \mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_ae10f2a1d698e399c51fe75b4efded5c3}{token}}++;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00130}00130         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_ae10f2a1d698e399c51fe75b4efded5c3}{token}} == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00131}00131                 \mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_ae10f2a1d698e399c51fe75b4efded5c3}{token}}++;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00132}00132         \mbox{\hyperlink{structmlx5__cmd__work__ent_a7326130f5094685d15659a88682754ed}{token}} = \mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_ae10f2a1d698e399c51fe75b4efded5c3}{token}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00133}00133         spin\_unlock(\&\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a077911ec9a0848dd85c0310f9bf6db01}{token\_lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00135}00135         \textcolor{keywordflow}{return} \mbox{\hyperlink{structmlx5__cmd__work__ent_a7326130f5094685d15659a88682754ed}{token}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00136}00136 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00137}00137 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00138}\mbox{\hyperlink{mlx5__cmd_8c_a57216a96f076d222545e5db4d4d49b43}{00138}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a57216a96f076d222545e5db4d4d49b43}{alloc\_ent}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00139}00139 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00140}00140         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} flags;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00141}00141         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00142}00142         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev =}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00143}00143                 container\_of(\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}}, \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00144}00144         \textcolor{keywordtype}{int} ret = \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a17723a8554f95a9f7d146d15563f0e01}{max\_reg\_cmds}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00146}00146         spin\_lock\_irqsave(\&\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a897adc31400e41efaa87ba597d900b55}{alloc\_lock}}, flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00147}00147         \textcolor{keywordflow}{if} (!ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a0cf62883b9cc23eaf42caa54cb75aafa}{page\_queue}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00148}00148                 ret = find\_first\_bit(\&\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a96097dfffdddb66077547910297c09e4}{bitmask}}, \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a17723a8554f95a9f7d146d15563f0e01}{max\_reg\_cmds}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00149}00149                 \textcolor{keywordflow}{if} (ret >= \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a17723a8554f95a9f7d146d15563f0e01}{max\_reg\_cmds}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00150}00150                         ret = -\/1;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00151}00151         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00153}00153         \textcolor{keywordflow}{if} (dev-\/>\mbox{\hyperlink{structmlx5__core__dev_aaee056f22d7ec1c4298ffb20189ec7e5}{state}} != \mbox{\hyperlink{driver_8h_aa42b19437cec785545106d8c76e3d9dda5e5ae327aea9f21a9ec42bf3982c5daa}{MLX5\_DEVICE\_STATE\_UP}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00154}00154                 ret = -\/1;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00156}00156         \textcolor{keywordflow}{if} (ret != -\/1) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00157}00157                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a3f89cdd7543f4e429de4b2b959f3cc1c}{busy}} = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00158}00158                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}} = ret;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00159}00159                 clear\_bit(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}}, \&\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a96097dfffdddb66077547910297c09e4}{bitmask}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00160}00160                 \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_aed9b022c92f963e4285c8be7143462b8}{ent\_mode}}[ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}}] =}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00161}00161                     ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7f5a1bcd1d21f6ea36c3693aaa594b15}{polling}} ? \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa77c7e41bd91dff9bc7cf2c617f4648d0}{MLX5\_CMD\_MODE\_POLLING}} : \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa7cc9a077ee2d7a7fde1d1bc96d0a7a65}{MLX5\_CMD\_MODE\_EVENTS}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00162}00162                 \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_aff4286b8b836aedcb13712cb8d6faa5c}{ent\_arr}}[ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}}] = ent;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00163}00163         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00164}00164         spin\_unlock\_irqrestore(\&\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a897adc31400e41efaa87ba597d900b55}{alloc\_lock}}, flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00166}00166         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00167}00167 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00169}\mbox{\hyperlink{mlx5__cmd_8c_ae729c4708c834a6c760b7c7d49a8aad2}{00169}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_ae729c4708c834a6c760b7c7d49a8aad2}{free\_ent}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}, \textcolor{keywordtype}{int} idx)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00170}00170 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00171}00171         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} flags;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00173}00173         spin\_lock\_irqsave(\&\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a897adc31400e41efaa87ba597d900b55}{alloc\_lock}}, flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00174}00174         \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_aff4286b8b836aedcb13712cb8d6faa5c}{ent\_arr}}[idx] = NULL;     \textcolor{comment}{/* safety clear */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00175}00175         \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_aed9b022c92f963e4285c8be7143462b8}{ent\_mode}}[idx] = \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa77c7e41bd91dff9bc7cf2c617f4648d0}{MLX5\_CMD\_MODE\_POLLING}};     \textcolor{comment}{/* reset mode */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00176}00176         set\_bit(idx, \&\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a96097dfffdddb66077547910297c09e4}{bitmask}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00177}00177         spin\_unlock\_irqrestore(\&\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_a897adc31400e41efaa87ba597d900b55}{alloc\_lock}}, flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00178}00178 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00180}\mbox{\hyperlink{mlx5__cmd_8c_a931b3cfccda93bc6c68d017449f69503}{00180}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__layout}{mlx5\_cmd\_layout}} *\mbox{\hyperlink{mlx5__cmd_8c_a931b3cfccda93bc6c68d017449f69503}{get\_inst}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd, \textcolor{keywordtype}{int} idx)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00181}00181 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00182}00182         \textcolor{keywordflow}{return} cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a632db1b3eefc8ed83e7f523b09d494e8}{cmd\_buf}} + (idx << cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a69cba4436fee10bf5580e2e58b11e4dd}{log\_stride}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00183}00183 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00185}\mbox{\hyperlink{mlx5__cmd_8c_a453eca48da20a446960a6ba287ac2275}{00185}} \textcolor{keyword}{static} u8 \mbox{\hyperlink{mlx5__cmd_8c_a453eca48da20a446960a6ba287ac2275}{xor8\_buf}}(\textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} len)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00186}00186 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00187}00187         u8 *ptr = buf;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00188}00188         u8 sum = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00189}00189         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00190}00190 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00191}00191         \textcolor{keywordflow}{for} (i = 0; i < len; i++)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00192}00192                 sum \string^= ptr[i];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00194}00194         \textcolor{keywordflow}{return} sum;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00195}00195 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00197}\mbox{\hyperlink{mlx5__cmd_8c_a58d07398ef43609917feea0d031787ee}{00197}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a58d07398ef43609917feea0d031787ee}{verify\_block\_sig}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__prot__block}{mlx5\_cmd\_prot\_block}} *block)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00198}00198 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00199}00199         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__cmd_8c_a453eca48da20a446960a6ba287ac2275}{xor8\_buf}}(block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_ac36d6c88d9ea70c0f2e0c18e1e048707}{rsvd0}}, \textcolor{keyword}{sizeof}(*block) -\/ \textcolor{keyword}{sizeof}(block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_ac03617f4dd54fc019d0a708820f189ab}{data}}) -\/ 1) != 0xff)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00200}00200                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00202}00202         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__cmd_8c_a453eca48da20a446960a6ba287ac2275}{xor8\_buf}}(block, \textcolor{keyword}{sizeof}(*block)) != 0xff)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00203}00203                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00205}00205         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00206}00206 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00207}00207 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00208}\mbox{\hyperlink{mlx5__cmd_8c_a0cab44a214ef7679977c34a2673af4ff}{00208}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a0cab44a214ef7679977c34a2673af4ff}{calc\_block\_sig}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__prot__block}{mlx5\_cmd\_prot\_block}} *block, u8 \mbox{\hyperlink{structmlx5__cmd__layout_a8ff342139d6238d153ac3aada8f3a1db}{token}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00209}00209                            \textcolor{keywordtype}{int} csum)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00210}00210 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00211}00211         block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_a8c002dc2c3c675d4e0392e5520d8ca5a}{token}} = \mbox{\hyperlink{structmlx5__cmd__layout_a8ff342139d6238d153ac3aada8f3a1db}{token}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00212}00212         \textcolor{keywordflow}{if} (csum) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00213}00213                 block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_a5211b83275a20a701324d07847fb6339}{ctrl\_sig}} = \string~xor8\_buf(block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_ac36d6c88d9ea70c0f2e0c18e1e048707}{rsvd0}}, \textcolor{keyword}{sizeof}(*block) -\/}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00214}00214                                             \textcolor{keyword}{sizeof}(block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_ac03617f4dd54fc019d0a708820f189ab}{data}}) -\/ 2);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00215}00215                 block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_ae0ae4b4766aa11782a6840eaf865526a}{sig}} = \string~xor8\_buf(block, \textcolor{keyword}{sizeof}(*block) -\/ 1);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00216}00216         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00217}00217 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00219}00219 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00220}\mbox{\hyperlink{mlx5__cmd_8c_a3eba35993974b8f933468945fdbc08d4}{00220}} \mbox{\hyperlink{mlx5__cmd_8c_a3eba35993974b8f933468945fdbc08d4}{calc\_chain\_sig}}(\textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg, u8 \mbox{\hyperlink{structmlx5__cmd__layout_a8ff342139d6238d153ac3aada8f3a1db}{token}}, \textcolor{keywordtype}{int} csum)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00221}00221 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00222}00222         \textcolor{keywordtype}{size\_t} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00224}00224         \textcolor{keywordflow}{for} (i = 0; i != (msg-\/>numpages * \mbox{\hyperlink{device_8h_ae1121d1be3d327f42b7e84432ddc6f97}{MLX5\_NUM\_CMDS\_IN\_ADAPTER\_PAGE}}); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00225}00225                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__prot__block}{mlx5\_cmd\_prot\_block}} *block;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00227}00227                 block = \mbox{\hyperlink{driver_8h_a9b7a9a99381a8f5793a5363f4c59ac06}{mlx5\_fwp\_get\_virt}}(msg, i * \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a4a1376f40493299c9383e3c4a595ca65}{MLX5\_CMD\_MBOX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00229}00229                 \textcolor{comment}{/* compute signature */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00230}00230                 \mbox{\hyperlink{mlx5__cmd_8c_a0cab44a214ef7679977c34a2673af4ff}{calc\_block\_sig}}(block, \mbox{\hyperlink{structmlx5__cmd__prot__block_a8c002dc2c3c675d4e0392e5520d8ca5a}{token}}, csum);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00232}00232                 \textcolor{comment}{/* check for last block */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00233}00233                 \textcolor{keywordflow}{if} (block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_a6b2295836ba3151f3818bc606e967631}{next}} == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00234}00234                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00235}00235         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00237}00237         \textcolor{comment}{/* make sure data gets written to RAM */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00238}00238         \mbox{\hyperlink{driver_8h_aa68b621074745fa70058262b61654aca}{mlx5\_fwp\_flush}}(msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00239}00239 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00241}\mbox{\hyperlink{mlx5__cmd_8c_ab2473494d756400222f910a8457bb232}{00241}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_ab2473494d756400222f910a8457bb232}{set\_signature}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent, \textcolor{keywordtype}{int} csum)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00242}00242 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00243}00243         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_afbe0e80b1343004de168a8875194e0bc}{sig}} = \string~xor8\_buf(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}, \textcolor{keyword}{sizeof}(*ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00244}00244         \mbox{\hyperlink{mlx5__cmd_8c_a3eba35993974b8f933468945fdbc08d4}{calc\_chain\_sig}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7326130f5094685d15659a88682754ed}{token}}, csum);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00245}00245         \mbox{\hyperlink{mlx5__cmd_8c_a3eba35993974b8f933468945fdbc08d4}{calc\_chain\_sig}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}}, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7326130f5094685d15659a88682754ed}{token}}, csum);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00246}00246 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00248}\mbox{\hyperlink{mlx5__cmd_8c_a357c1d68dfb19b9b5f668c998721ee49}{00248}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a357c1d68dfb19b9b5f668c998721ee49}{poll\_timeout}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00249}00249 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00250}00250         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev = container\_of(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00251}00251                                                  \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}}, \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00252}00252         \textcolor{keywordtype}{int} poll\_end = jiffies +}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00253}00253                                 msecs\_to\_jiffies(\mbox{\hyperlink{driver_8h_a7859c0a3efa8b1c360f5c2376baf051ea97001fa8a9e80520a119c15ead82b91a}{MLX5\_CMD\_TIMEOUT\_MSEC}} + 1000);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00254}00254         u8 own;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00256}00256         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00257}00257                 own = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a3d61ca0eb6b8153438ee46ab7b779d15}{status\_own}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00258}00258                 \textcolor{keywordflow}{if} (!(own \& \mbox{\hyperlink{driver_8h_a79e9f285d34216706a748fd7ba8941b7a281be2979472056d6c5f2b59a4ba9a40}{CMD\_OWNER\_HW}}) ||}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00259}00259                     dev-\/>\mbox{\hyperlink{structmlx5__core__dev_aaee056f22d7ec1c4298ffb20189ec7e5}{state}} != \mbox{\hyperlink{driver_8h_aa42b19437cec785545106d8c76e3d9dda5e5ae327aea9f21a9ec42bf3982c5daa}{MLX5\_DEVICE\_STATE\_UP}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00260}00260                         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00261}00261                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00262}00262                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00263}00263                 usleep\_range(5000, 10000);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00264}00264         \} \textcolor{keywordflow}{while} (time\_before(jiffies, poll\_end));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00266}00266         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}} = -\/ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00267}00267 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00269}\mbox{\hyperlink{mlx5__cmd_8c_a30eb6994cbee58d4d531004c310259be}{00269}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a30eb6994cbee58d4d531004c310259be}{free\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00270}00270 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00271}00271         cancel\_delayed\_work\_sync(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a93fd168f31b7af55031122f1cda4dafe}{cb\_timeout\_work}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00272}00272         kfree(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00273}00273 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00274}00274 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00275}00275 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00276}\mbox{\hyperlink{mlx5__cmd_8c_acfb74597355510f1e2c92ddd6473f88b}{00276}} \mbox{\hyperlink{mlx5__cmd_8c_acfb74597355510f1e2c92ddd6473f88b}{verify\_signature}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00277}00277 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00278}00278         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00279}00279         \textcolor{keywordtype}{size\_t} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00280}00280         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00281}00281         u8 sig;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00282}00282 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00283}00283         sig = \mbox{\hyperlink{mlx5__cmd_8c_a453eca48da20a446960a6ba287ac2275}{xor8\_buf}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}, \textcolor{keyword}{sizeof}(*ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00284}00284         \textcolor{keywordflow}{if} (sig != 0xff)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00285}00285                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00286}00286 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00287}00287         \textcolor{keywordflow}{for} (i = 0; i != (msg-\/>numpages * \mbox{\hyperlink{device_8h_ae1121d1be3d327f42b7e84432ddc6f97}{MLX5\_NUM\_CMDS\_IN\_ADAPTER\_PAGE}}); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00288}00288                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__prot__block}{mlx5\_cmd\_prot\_block}} *block;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00290}00290                 block = \mbox{\hyperlink{driver_8h_a9b7a9a99381a8f5793a5363f4c59ac06}{mlx5\_fwp\_get\_virt}}(msg, i * \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a4a1376f40493299c9383e3c4a595ca65}{MLX5\_CMD\_MBOX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00291}00291 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00292}00292                 \textcolor{comment}{/* compute signature */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00293}00293                 err = \mbox{\hyperlink{mlx5__cmd_8c_a58d07398ef43609917feea0d031787ee}{verify\_block\_sig}}(block);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00294}00294                 \textcolor{keywordflow}{if} (err != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00295}00295                         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00297}00297                 \textcolor{comment}{/* check for last block */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00298}00298                 \textcolor{keywordflow}{if} (block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_a6b2295836ba3151f3818bc606e967631}{next}} == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00299}00299                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00300}00300         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00301}00301         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00302}00302 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00304}\mbox{\hyperlink{mlx5__cmd_8c_ac806b7ec704bbe653ebeed4fd0be1ab5}{00304}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_ac806b7ec704bbe653ebeed4fd0be1ab5}{dump\_buf}}(\textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} size, \textcolor{keywordtype}{int} data\_only, \textcolor{keywordtype}{int} offset)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00305}00305 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00306}00306         \_\_be32 *p = buf;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00307}00307         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00309}00309         \textcolor{keywordflow}{for} (i = 0; i < size; i += 16) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00310}00310                 pr\_debug(\textcolor{stringliteral}{"{}\%03x: \%08x \%08x \%08x \%08x\(\backslash\)n"{}}, offset, be32\_to\_cpu(p[0]),}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00311}00311                          be32\_to\_cpu(p[1]), be32\_to\_cpu(p[2]),}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00312}00312                          be32\_to\_cpu(p[3]));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00313}00313                 p += 4;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00314}00314                 offset += 16;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00315}00315         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00316}00316         \textcolor{keywordflow}{if} (!data\_only)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00317}00317                 pr\_debug(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00318}00318 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00320}00320 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00321}\mbox{\hyperlink{mlx5__cmd_8c_a098384b0034af0daa7c9c5c82b563567a08a3f25a0de0e515eadbe480ef6a3f28}{00321}}         \mbox{\hyperlink{mlx5__cmd_8c_a098384b0034af0daa7c9c5c82b563567a08a3f25a0de0e515eadbe480ef6a3f28}{MLX5\_DRIVER\_STATUS\_ABORTED}} = 0xfe,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00322}\mbox{\hyperlink{mlx5__cmd_8c_a098384b0034af0daa7c9c5c82b563567af359bd123d07fb4eca075eb883558c92}{00322}}         \mbox{\hyperlink{mlx5__cmd_8c_a098384b0034af0daa7c9c5c82b563567af359bd123d07fb4eca075eb883558c92}{MLX5\_DRIVER\_SYND}} = 0xbadd00de,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00323}00323 \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00324}00324 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00325}\mbox{\hyperlink{mlx5__cmd_8c_a263a0f90a54856c5a9018815c00024e0}{00325}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a263a0f90a54856c5a9018815c00024e0}{mlx5\_internal\_err\_ret\_value}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u16 op,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00326}00326                                        u32 *synd, u8 *status)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00327}00327 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00328}00328         *synd = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00329}00329         *status = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00331}00331         \textcolor{keywordflow}{switch} (op) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00332}00332         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a129be181e5c0fa0e79233e5b07005ed0}{MLX5\_CMD\_OP\_TEARDOWN\_HCA}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00333}00333         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a06023aad699a4c0e879f633f5d28a9d2}{MLX5\_CMD\_OP\_DISABLE\_HCA}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00334}00334         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aba28e67a911560d49746f4672dd3ee20}{MLX5\_CMD\_OP\_MANAGE\_PAGES}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00335}00335         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a5beff7af51bca1a3a43a91a4f08f5eaa}{MLX5\_CMD\_OP\_DESTROY\_MKEY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00336}00336         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a6b2b9e78bf79f8b781a454c134de23d1}{MLX5\_CMD\_OP\_DESTROY\_EQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00337}00337         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a587431d31459660605a978e362777bd7}{MLX5\_CMD\_OP\_DESTROY\_CQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00338}00338         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a0fd8ef2b8c798e1b74be0cc59c192ded}{MLX5\_CMD\_OP\_DESTROY\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00339}00339         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1231bfc879cae08a3e981efb31b83c76}{MLX5\_CMD\_OP\_DESTROY\_PSV}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00340}00340         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ab2f71ba0c5d35bc2731fc04ccb99a3fd}{MLX5\_CMD\_OP\_DESTROY\_SRQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00341}00341         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a7eeb0208790ba40d8d4a7e0a2b93f550}{MLX5\_CMD\_OP\_DESTROY\_XRC\_SRQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00342}00342         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2858e69344b613d3e17805fa2000dad8}{MLX5\_CMD\_OP\_DESTROY\_DCT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00343}00343         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a9d0ad1690561b18030a6d1d1ce297647}{MLX5\_CMD\_OP\_DEALLOC\_Q\_COUNTER}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00344}00344         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ac0e70c86d9db73fcd520f15803e148cb}{MLX5\_CMD\_OP\_DEALLOC\_PD}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00345}00345         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a4b57ff2135d0eb0dc9077819fb4e64ae}{MLX5\_CMD\_OP\_DEALLOC\_UAR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00346}00346         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39acb428c091c28180a8256c8f26e6f35f6}{MLX5\_CMD\_OP\_DETACH\_FROM\_MCG}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00347}00347         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a082189fe0629ae2b47542600d29b1c32}{MLX5\_CMD\_OP\_DEALLOC\_XRCD}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00348}00348         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a5a9a808e05664625df176fd1bfd2474c}{MLX5\_CMD\_OP\_DEALLOC\_TRANSPORT\_DOMAIN}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00349}00349         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1a646c18cfb9e382cdcf849dadb1a96f}{MLX5\_CMD\_OP\_DELETE\_VXLAN\_UDP\_DPORT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00350}00350         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a27c4ceca6fe6e7c7517226e342620193}{MLX5\_CMD\_OP\_DELETE\_L2\_TABLE\_ENTRY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00351}00351         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a57ab07fdc1c537013a79918fdb8b0cff}{MLX5\_CMD\_OP\_DESTROY\_TIR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00352}00352         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a61031173d5504ed4e2a10c38435572e1}{MLX5\_CMD\_OP\_DESTROY\_SQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00353}00353         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ad555b4abf5aa1db8fdaaf2f38fc3e015}{MLX5\_CMD\_OP\_DESTROY\_RQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00354}00354         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ad082563f25e1f7e0beffdbe93539fd9f}{MLX5\_CMD\_OP\_DESTROY\_RMP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00355}00355         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aac75b1cf3beb7dc5892f6676ba661fb7}{MLX5\_CMD\_OP\_DESTROY\_TIS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00356}00356         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ada71d25301e3684bb5a8387e8052382b}{MLX5\_CMD\_OP\_DESTROY\_RQT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00357}00357         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a3d72512e2644965de1d79509226208d4}{MLX5\_CMD\_OP\_DESTROY\_FLOW\_TABLE}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00358}00358         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a04e77f499f72efbf53d97eacff567b83}{MLX5\_CMD\_OP\_DESTROY\_FLOW\_GROUP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00359}00359         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ad6462b14b74ba00f95efadd77dbf4e21}{MLX5\_CMD\_OP\_DELETE\_FLOW\_TABLE\_ENTRY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00360}00360         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ad85c8bb740182b92cdc1387bb3b7f8c0}{MLX5\_CMD\_OP\_2ERR\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00361}00361         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2e3268ef4cf852853a5bbcbd823a7810}{MLX5\_CMD\_OP\_2RST\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00362}00362         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39afed264e15620f391048e69b2c4533c7b}{MLX5\_CMD\_OP\_MODIFY\_NIC\_VPORT\_CONTEXT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00363}00363         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1b61bbcb4f57a598bc010269ba9fb37d}{MLX5\_CMD\_OP\_MODIFY\_FLOW\_TABLE}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00364}00364         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1dc38f067ec9bb908df3a3591d8e6bc1}{MLX5\_CMD\_OP\_SET\_FLOW\_TABLE\_ENTRY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00365}00365         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39af32604e625e714705537d9cac6af4cfc}{MLX5\_CMD\_OP\_SET\_FLOW\_TABLE\_ROOT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00366}00366         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a6f3a58f3f7f83b53984fc5990a2c0fb0}{MLX5\_CMD\_OP\_DESTROY\_GENERAL\_OBJ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00367}00367                 \textcolor{keywordflow}{return} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aaf670c1ccbee5d4d1add2dc82e1c07158}{MLX5\_CMD\_STAT\_OK}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00368}00368 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00369}00369         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a6e3d368fd0ecb541ae300d45abd4c915}{MLX5\_CMD\_OP\_QUERY\_HCA\_CAP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00370}00370         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a9ccb9b2697cd9105949d1baaa0882261}{MLX5\_CMD\_OP\_QUERY\_ADAPTER}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00371}00371         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a3856ada89c731a7c97933bdcf3a1801b}{MLX5\_CMD\_OP\_INIT\_HCA}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00372}00372         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a3556be83573b14c718a2678552d3e4f9}{MLX5\_CMD\_OP\_ENABLE\_HCA}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00373}00373         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aea219d6c4f15a4a8f416daf00495fb8d}{MLX5\_CMD\_OP\_QUERY\_PAGES}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00374}00374         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ae28bed2883f1062fcb90339f52b367ed}{MLX5\_CMD\_OP\_SET\_HCA\_CAP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00375}00375         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a923caaa3ded5ef2ab885290efa954f14}{MLX5\_CMD\_OP\_QUERY\_ISSI}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00376}00376         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a6c2ce1ad5e65c7817e18c6d774bab02b}{MLX5\_CMD\_OP\_SET\_ISSI}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00377}00377         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a223c7109f2adb1f20c60cf4848534536}{MLX5\_CMD\_OP\_CREATE\_MKEY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00378}00378         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a401bfa5cbf748b1e5ea0f4afd5ffd572}{MLX5\_CMD\_OP\_QUERY\_MKEY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00379}00379         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a741e638ed9bc3438af8f173ab8570cd6}{MLX5\_CMD\_OP\_QUERY\_SPECIAL\_CONTEXTS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00380}00380         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39abda64c7824d83a8bfa33b228dd51bec8}{MLX5\_CMD\_OP\_PAGE\_FAULT\_RESUME}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00381}00381         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ac2ad98031182dee77893a1c7ab4d66da}{MLX5\_CMD\_OP\_CREATE\_EQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00382}00382         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a882c9a9f594546de44fa53474cd6f3f3}{MLX5\_CMD\_OP\_QUERY\_EQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00383}00383         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39af3a4a59e771dcd9372c3738a559fe36c}{MLX5\_CMD\_OP\_GEN\_EQE}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00384}00384         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39adafb39333f61741603c45f14abedf47d}{MLX5\_CMD\_OP\_CREATE\_CQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00385}00385         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ac5f34d01394a843f130e47c64e13659f}{MLX5\_CMD\_OP\_QUERY\_CQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00386}00386         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a4958220e0cdb1c570d5098fff978646c}{MLX5\_CMD\_OP\_MODIFY\_CQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00387}00387         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a0260f80617372ae750561d39d1d707fb}{MLX5\_CMD\_OP\_CREATE\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00388}00388         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aeaf86cbb5c495b4cc31c1b70d8b218fc}{MLX5\_CMD\_OP\_RST2INIT\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00389}00389         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a387223d6eef7fb7e5bb7eebef319217b}{MLX5\_CMD\_OP\_INIT2RTR\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00390}00390         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1be97ac5ef366b071bec44e9f737ae58}{MLX5\_CMD\_OP\_RTR2RTS\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00391}00391         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a43a6d4a17d7940bb805e0b634b92b68c}{MLX5\_CMD\_OP\_RTS2RTS\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00392}00392         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a31c09abe481aa86bc8fb8fcbdfeb0af4}{MLX5\_CMD\_OP\_SQERR2RTS\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00393}00393         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a7f7a923428ef1696d0a5a6c35e7e31b4}{MLX5\_CMD\_OP\_QUERY\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00394}00394         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ac6b1bf1ed75615d20ddc501022baeea2}{MLX5\_CMD\_OP\_SQD\_RTS\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00395}00395         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a537a051a316964839877a93517ae8a7c}{MLX5\_CMD\_OP\_INIT2INIT\_QP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00396}00396         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a423f59a079c4d7fb418a24af82270e31}{MLX5\_CMD\_OP\_CREATE\_PSV}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00397}00397         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39af99fdc71851c3ff01edc17b545078324}{MLX5\_CMD\_OP\_CREATE\_SRQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00398}00398         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ac7719d61efa81e3699002cf45240676d}{MLX5\_CMD\_OP\_QUERY\_SRQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00399}00399         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a977a05025bb667fd37bcabf9915433c1}{MLX5\_CMD\_OP\_ARM\_RQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00400}00400         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a5dda71576a166c3929369e36139b7cda}{MLX5\_CMD\_OP\_CREATE\_XRC\_SRQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00401}00401         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ad2b157b35eefe3c3769619d4193d09b2}{MLX5\_CMD\_OP\_QUERY\_XRC\_SRQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00402}00402         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39abbd4c3719bc60ac0205bc3c7a16aa198}{MLX5\_CMD\_OP\_ARM\_XRC\_SRQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00403}00403         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a058d2eaf5f53fad2252eba4d97e73f4d}{MLX5\_CMD\_OP\_CREATE\_DCT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00404}00404         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2e63dec22270e0c5214786fbf8fac501}{MLX5\_CMD\_OP\_DRAIN\_DCT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00405}00405         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a5cff024168e90992073f5aa0390ee322}{MLX5\_CMD\_OP\_QUERY\_DCT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00406}00406         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a61416cc97c8b8bf131faef81525ddee3}{MLX5\_CMD\_OP\_ARM\_DCT\_FOR\_KEY\_VIOLATION}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00407}00407         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a4866d2ad0209891d01e7b68b9e5129ed}{MLX5\_CMD\_OP\_QUERY\_VPORT\_STATE}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00408}00408         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aec317a0ac4e83560073a95ddb7e8768e}{MLX5\_CMD\_OP\_MODIFY\_VPORT\_STATE}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00409}00409         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a5ad0f2ba234ff43d3c5313dba6429a17}{MLX5\_CMD\_OP\_QUERY\_ESW\_VPORT\_CONTEXT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00410}00410         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a05b2cf5a3de3b50fe11a6575113c9416}{MLX5\_CMD\_OP\_MODIFY\_ESW\_VPORT\_CONTEXT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00411}00411         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aa5349b2506c3972d18ad18b969dea68e}{MLX5\_CMD\_OP\_QUERY\_NIC\_VPORT\_CONTEXT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00412}00412         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a71e5dd95a8a718827f1992f00b453950}{MLX5\_CMD\_OP\_QUERY\_ROCE\_ADDRESS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00413}00413         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a95a44596630a83f55eede2a8b1ef7c90}{MLX5\_CMD\_OP\_SET\_ROCE\_ADDRESS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00414}00414         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aa7a48351141a882422c3f6e854124828}{MLX5\_CMD\_OP\_QUERY\_HCA\_VPORT\_CONTEXT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00415}00415         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a018210b93dc4e5512f0386bf27a6e64e}{MLX5\_CMD\_OP\_MODIFY\_HCA\_VPORT\_CONTEXT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00416}00416         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a5f94541f6fcef06d2159ff8527518fe6}{MLX5\_CMD\_OP\_QUERY\_HCA\_VPORT\_GID}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00417}00417         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a03074772ac5eadf3092e2d35d82d7026}{MLX5\_CMD\_OP\_QUERY\_HCA\_VPORT\_PKEY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00418}00418         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a9ae1766bfa403643453fd1ef43863ee8}{MLX5\_CMD\_OP\_QUERY\_VNIC\_ENV}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00419}00419         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39afd0be6db5429a55777802c01c6adcbeb}{MLX5\_CMD\_OP\_QUERY\_VPORT\_COUNTER}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00420}00420         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a931ced657a7ab666aa5cdab63c641119}{MLX5\_CMD\_OP\_ALLOC\_Q\_COUNTER}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00421}00421         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ab3d6d4a8a02c57521167807a8fe75b9d}{MLX5\_CMD\_OP\_QUERY\_Q\_COUNTER}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00422}00422         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a8a022f8bb3717c70f276d91ec5035ebd}{MLX5\_CMD\_OP\_ALLOC\_PD}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00423}00423         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a783bbb4fdaa0ca6d1c615b88c9c1e06c}{MLX5\_CMD\_OP\_ALLOC\_UAR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00424}00424         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a77ba230118506b67df9a182fe910f63d}{MLX5\_CMD\_OP\_CONFIG\_INT\_MODERATION}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00425}00425         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a616069805f3723d24a4f2de066470148}{MLX5\_CMD\_OP\_ACCESS\_REG}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00426}00426         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aae00c73948446b62900fff1f66d0e434}{MLX5\_CMD\_OP\_ATTACH\_TO\_MCG}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00427}00427         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a34fb2ba8f8dbd79cba85c72070890611}{MLX5\_CMD\_OP\_GET\_DROPPED\_PACKET\_LOG}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00428}00428         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39af66e86b21151f6f039abca99cfeeeb98}{MLX5\_CMD\_OP\_MAD\_IFC}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00429}00429         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a7278395b1458cf036a37098ae99da87e}{MLX5\_CMD\_OP\_QUERY\_MAD\_DEMUX}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00430}00430         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a3ef6e0810270400b5be2129f6e99581e}{MLX5\_CMD\_OP\_SET\_MAD\_DEMUX}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00431}00431         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a9bd12f4a70243f1158e5c1261ee314e0}{MLX5\_CMD\_OP\_NOP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00432}00432         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a013e145158a10b4b6f2cd1998cfb9688}{MLX5\_CMD\_OP\_ALLOC\_XRCD}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00433}00433         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a27c581cc3dc5de164f93cf2b9b1bc202}{MLX5\_CMD\_OP\_ALLOC\_TRANSPORT\_DOMAIN}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00434}00434         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2d936010f51a9b59fc45f3bebc9ab493}{MLX5\_CMD\_OP\_QUERY\_CONG\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00435}00435         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ab5f275ca129c733bccd688818f611304}{MLX5\_CMD\_OP\_MODIFY\_CONG\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00436}00436         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39af202c2cc7e24dc5536d056713f27df4a}{MLX5\_CMD\_OP\_QUERY\_CONG\_PARAMS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00437}00437         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ac4ca2e5fe0225094cdaa033cb0c2cc33}{MLX5\_CMD\_OP\_MODIFY\_CONG\_PARAMS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00438}00438         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a7e53ff99e9969af60b797174607b8808}{MLX5\_CMD\_OP\_QUERY\_CONG\_STATISTICS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00439}00439         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a95d00a01f678391b19bb4b4b0aaff31b}{MLX5\_CMD\_OP\_ADD\_VXLAN\_UDP\_DPORT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00440}00440         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2a9b8416f821083a7c1e4db4169d44ac}{MLX5\_CMD\_OP\_SET\_L2\_TABLE\_ENTRY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00441}00441         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a769ab96d3aad59fa0d1f8ed2a15fe346}{MLX5\_CMD\_OP\_QUERY\_L2\_TABLE\_ENTRY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00442}00442         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39acb9080bb168c69b3e3a6262c750007c6}{MLX5\_CMD\_OP\_CREATE\_TIR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00443}00443         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2001f1137d4a70abcdfbee4883eb99d7}{MLX5\_CMD\_OP\_MODIFY\_TIR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00444}00444         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a520436d39f50805ba56bbfd1158da3cc}{MLX5\_CMD\_OP\_QUERY\_TIR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00445}00445         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a0a9493337125df5407e33fa68fc5f0a1}{MLX5\_CMD\_OP\_CREATE\_SQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00446}00446         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a37552ea85a2002bbe09cde38a8e06740}{MLX5\_CMD\_OP\_MODIFY\_SQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00447}00447         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a0fccdd3b762e4d7c98202d752dd2d41d}{MLX5\_CMD\_OP\_QUERY\_SQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00448}00448         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a06f4dd906dff6d5eb14d1dc86eac325e}{MLX5\_CMD\_OP\_CREATE\_RQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00449}00449         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a7e99c95a3c94c3b381b5513ffbe43e42}{MLX5\_CMD\_OP\_MODIFY\_RQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00450}00450         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a845b0785f841828825d0b8402c0a7ca5}{MLX5\_CMD\_OP\_QUERY\_RQ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00451}00451         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1d1b790e07bacce7bbadab9ab46cbdbd}{MLX5\_CMD\_OP\_CREATE\_RMP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00452}00452         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a75b2209e95d0e4d8b164a07d31886d1e}{MLX5\_CMD\_OP\_MODIFY\_RMP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00453}00453         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a405ead77dd15cafa0ea59195333003f6}{MLX5\_CMD\_OP\_QUERY\_RMP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00454}00454         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a5c776159e38bc81e56e29d20af39cc34}{MLX5\_CMD\_OP\_CREATE\_TIS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00455}00455         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a5ebbd292ba903cd7b3f5748022ce25ce}{MLX5\_CMD\_OP\_MODIFY\_TIS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00456}00456         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a320c5d02df77270abe56e349ddfda2d4}{MLX5\_CMD\_OP\_QUERY\_TIS}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00457}00457         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a8fee8cfe7bef2e2b3345af786727493f}{MLX5\_CMD\_OP\_CREATE\_RQT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00458}00458         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a53d192774bbb0b3e914578b583a58711}{MLX5\_CMD\_OP\_MODIFY\_RQT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00459}00459         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ac970342c91d60207b268cb6752963be6}{MLX5\_CMD\_OP\_QUERY\_RQT}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00460}00460         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ae4807c37c389b2f8e034a16cad5e967e}{MLX5\_CMD\_OP\_CREATE\_FLOW\_TABLE}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00461}00461         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a204b29cbdd4848de16465481039aefad}{MLX5\_CMD\_OP\_QUERY\_FLOW\_TABLE}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00462}00462         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a8b8bd8e3d455fd5758e27633014ff871}{MLX5\_CMD\_OP\_CREATE\_FLOW\_GROUP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00463}00463         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a627e71e32e10cdc6e4f5eece64a685db}{MLX5\_CMD\_OP\_QUERY\_FLOW\_GROUP}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00464}00464         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39acf4f9bd6f3acd926e21f8294e92ba6bb}{MLX5\_CMD\_OP\_QUERY\_FLOW\_TABLE\_ENTRY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00465}00465         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a4cec65632507a48bfac46d7f86b541e3}{MLX5\_CMD\_OP\_CREATE\_GENERAL\_OBJ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00466}00466         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a161ec70f7444fa4e97684507da70e376}{MLX5\_CMD\_OP\_MODIFY\_GENERAL\_OBJ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00467}00467         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aef2c4cfdcda8b99113b61835b5c98e79}{MLX5\_CMD\_OP\_QUERY\_GENERAL\_OBJ}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00468}00468                 *status = \mbox{\hyperlink{mlx5__cmd_8c_a098384b0034af0daa7c9c5c82b563567a08a3f25a0de0e515eadbe480ef6a3f28}{MLX5\_DRIVER\_STATUS\_ABORTED}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00469}00469                 *synd = \mbox{\hyperlink{mlx5__cmd_8c_a098384b0034af0daa7c9c5c82b563567af359bd123d07fb4eca075eb883558c92}{MLX5\_DRIVER\_SYND}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00470}00470                 \textcolor{keywordflow}{return} -\/EIO;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00471}00471         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00472}00472                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev, \textcolor{stringliteral}{"{}Unknown FW command (\%d)\(\backslash\)n"{}}, op);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00473}00473                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00474}00474         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00475}00475 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00476}00476 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00477}\mbox{\hyperlink{driver_8h_adabffbb2b458257640a76aa8cfd265cd}{00477}} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{mlx5__cmd_8c_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(\textcolor{keywordtype}{int} command)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00478}00478 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00479}00479 \textcolor{preprocessor}{        \#define MLX5\_COMMAND\_STR\_CASE(\_\_cmd) case MLX5\_CMD\_OP\_ \#\# \_\_cmd: return \#\_\_cmd}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00480}00480 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00481}00481         \textcolor{keywordflow}{switch} (command) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00482}00482         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_HCA\_CAP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00483}00483         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_HCA\_CAP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00484}00484         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_ADAPTER);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00485}00485         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(INIT\_HCA);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00486}00486         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(TEARDOWN\_HCA);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00487}00487         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ENABLE\_HCA);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00488}00488         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DISABLE\_HCA);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00489}00489         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_PAGES);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00490}00490         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MANAGE\_PAGES);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00491}00491         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_ISSI);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00492}00492         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_ISSI);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00493}00493         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_MKEY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00494}00494         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_MKEY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00495}00495         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_MKEY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00496}00496         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_SPECIAL\_CONTEXTS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00497}00497         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(PAGE\_FAULT\_RESUME);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00498}00498         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_EQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00499}00499         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_EQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00500}00500         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_EQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00501}00501         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(GEN\_EQE);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00502}00502         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_CQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00503}00503         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_CQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00504}00504         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_CQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00505}00505         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_CQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00506}00506         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00507}00507         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00508}00508         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(RST2INIT\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00509}00509         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(INIT2RTR\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00510}00510         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(RTR2RTS\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00511}00511         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(RTS2RTS\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00512}00512         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SQERR2RTS\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00513}00513         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(2ERR\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00514}00514         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(2RST\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00515}00515         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00516}00516         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SQD\_RTS\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00517}00517         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MAD\_IFC);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00518}00518         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(INIT2INIT\_QP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00519}00519         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_PSV);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00520}00520         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_PSV);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00521}00521         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_SRQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00522}00522         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_SRQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00523}00523         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_SRQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00524}00524         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ARM\_RQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00525}00525         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_XRC\_SRQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00526}00526         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_XRC\_SRQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00527}00527         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_XRC\_SRQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00528}00528         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ARM\_XRC\_SRQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00529}00529         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_DCT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00530}00530         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_DC\_CNAK\_TRACE);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00531}00531         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_DCT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00532}00532         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DRAIN\_DCT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00533}00533         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_DCT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00534}00534         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ARM\_DCT\_FOR\_KEY\_VIOLATION);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00535}00535         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_VPORT\_STATE);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00536}00536         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_VPORT\_STATE);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00537}00537         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_ESW\_VPORT\_CONTEXT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00538}00538         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_ESW\_VPORT\_CONTEXT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00539}00539         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_NIC\_VPORT\_CONTEXT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00540}00540         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_NIC\_VPORT\_CONTEXT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00541}00541         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_ROCE\_ADDRESS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00542}00542         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_ROCE\_ADDRESS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00543}00543         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_HCA\_VPORT\_CONTEXT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00544}00544         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_HCA\_VPORT\_CONTEXT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00545}00545         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_HCA\_VPORT\_GID);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00546}00546         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_HCA\_VPORT\_PKEY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00547}00547         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_VNIC\_ENV);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00548}00548         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_VPORT\_COUNTER);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00549}00549         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_WOL\_ROL);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00550}00550         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_WOL\_ROL);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00551}00551         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ALLOC\_Q\_COUNTER);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00552}00552         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DEALLOC\_Q\_COUNTER);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00553}00553         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_Q\_COUNTER);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00554}00554         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ALLOC\_PD);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00555}00555         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DEALLOC\_PD);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00556}00556         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ALLOC\_UAR);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00557}00557         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DEALLOC\_UAR);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00558}00558         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CONFIG\_INT\_MODERATION);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00559}00559         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ATTACH\_TO\_MCG);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00560}00560         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DETACH\_FROM\_MCG);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00561}00561         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(GET\_DROPPED\_PACKET\_LOG);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00562}00562         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_MAD\_DEMUX);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00563}00563         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_MAD\_DEMUX);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00564}00564         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(NOP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00565}00565         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ALLOC\_XRCD);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00566}00566         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DEALLOC\_XRCD);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00567}00567         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ALLOC\_TRANSPORT\_DOMAIN);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00568}00568         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DEALLOC\_TRANSPORT\_DOMAIN);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00569}00569         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_CONG\_STATUS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00570}00570         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_CONG\_STATUS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00571}00571         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_CONG\_PARAMS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00572}00572         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_CONG\_PARAMS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00573}00573         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_CONG\_STATISTICS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00574}00574         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ADD\_VXLAN\_UDP\_DPORT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00575}00575         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DELETE\_VXLAN\_UDP\_DPORT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00576}00576         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_L2\_TABLE\_ENTRY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00577}00577         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_L2\_TABLE\_ENTRY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00578}00578         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DELETE\_L2\_TABLE\_ENTRY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00579}00579         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_RMP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00580}00580         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_RMP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00581}00581         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_RMP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00582}00582         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_RMP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00583}00583         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_RQT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00584}00584         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_RQT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00585}00585         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_RQT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00586}00586         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_RQT);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00587}00587         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(ACCESS\_REG);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00588}00588         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_SQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00589}00589         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_SQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00590}00590         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_SQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00591}00591         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_SQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00592}00592         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_RQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00593}00593         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_RQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00594}00594         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_RQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00595}00595         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_RQ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00596}00596         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_TIR);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00597}00597         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_TIR);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00598}00598         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_TIR);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00599}00599         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_TIR);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00600}00600         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_TIS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00601}00601         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_TIS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00602}00602         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_TIS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00603}00603         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_TIS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00604}00604         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_FLOW\_TABLE);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00605}00605         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_FLOW\_TABLE);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00606}00606         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_FLOW\_TABLE);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00607}00607         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_FLOW\_GROUP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00608}00608         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_FLOW\_GROUP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00609}00609         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_FLOW\_GROUP);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00610}00610         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_FLOW\_TABLE\_ENTRY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00611}00611         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_FLOW\_TABLE\_ENTRY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00612}00612         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DELETE\_FLOW\_TABLE\_ENTRY);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00613}00613         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(SET\_DIAGNOSTICS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00614}00614         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_DIAGNOSTICS);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00615}00615         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(CREATE\_GENERAL\_OBJ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00616}00616         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(MODIFY\_GENERAL\_OBJ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00617}00617         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(QUERY\_GENERAL\_OBJ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00618}00618         \mbox{\hyperlink{mlx5__cmd_8c_a127263e45899877b56a2cbcc72171d13}{MLX5\_COMMAND\_STR\_CASE}}(DESTROY\_GENERAL\_OBJ);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00619}00619         \textcolor{keywordflow}{default}: \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}unknown command opcode"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00620}00620         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00621}00621 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00622}00622 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00623}\mbox{\hyperlink{mlx5__cmd_8c_a31f3a19fe25b3f72dc3b38306b3c9656}{00623}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{mlx5__cmd_8c_a31f3a19fe25b3f72dc3b38306b3c9656}{cmd\_status\_str}}(u8 status)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00624}00624 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00625}00625         \textcolor{keywordflow}{switch} (status) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00626}00626         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aaf670c1ccbee5d4d1add2dc82e1c07158}{MLX5\_CMD\_STAT\_OK}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00627}00627                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}OK"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00628}00628         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa7cd3dc2b3a5e8a968dd5e198077bf1ab}{MLX5\_CMD\_STAT\_INT\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00629}00629                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}internal error"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00630}00630         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa72273831cf02bbe38b99c52dd31eb84c}{MLX5\_CMD\_STAT\_BAD\_OP\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00631}00631                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad operation"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00632}00632         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa6e171bb5e361d31c8e4512dd0ba284c1}{MLX5\_CMD\_STAT\_BAD\_PARAM\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00633}00633                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad parameter"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00634}00634         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aab13acdf2ef5c57f926a868e3a97237ca}{MLX5\_CMD\_STAT\_BAD\_SYS\_STATE\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00635}00635                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad system state"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00636}00636         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa07b7ff899013879f480d7b7beb269870}{MLX5\_CMD\_STAT\_BAD\_RES\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00637}00637                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad resource"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00638}00638         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa1d5dde1d55f973b5bf8806930794a1d3}{MLX5\_CMD\_STAT\_RES\_BUSY}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00639}00639                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}resource busy"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00640}00640         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa3ae8cce932e0840309dc2e6314f2fc76}{MLX5\_CMD\_STAT\_LIM\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00641}00641                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}limits exceeded"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00642}00642         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa7236df30f14054a56d73d015b9f63b2c}{MLX5\_CMD\_STAT\_BAD\_RES\_STATE\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00643}00643                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad resource state"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00644}00644         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aab78ede41b310d6112965af10e0b78935}{MLX5\_CMD\_STAT\_IX\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00645}00645                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad index"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00646}00646         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aaa33f4309bfee799cec7e5c4cac46e37a}{MLX5\_CMD\_STAT\_NO\_RES\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00647}00647                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}no resources"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00648}00648         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa9d1eff6db525656b532c150d60fd851f}{MLX5\_CMD\_STAT\_BAD\_INP\_LEN\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00649}00649                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad input length"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00650}00650         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa94b03b6efcf7bd2d440d4628300a5dd9}{MLX5\_CMD\_STAT\_BAD\_OUTP\_LEN\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00651}00651                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad output length"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00652}00652         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aadca0cd401d4797384c57d8a7c1aab451}{MLX5\_CMD\_STAT\_BAD\_QP\_STATE\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00653}00653                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad QP state"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00654}00654         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa2e22dcf20b70caf21c57045c6f09daef}{MLX5\_CMD\_STAT\_BAD\_PKT\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00655}00655                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad packet (discarded)"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00656}00656         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa369b82e63db56215ddb24f1f936599af}{MLX5\_CMD\_STAT\_BAD\_SIZE\_OUTS\_CQES\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00657}00657                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad size too many outstanding CQEs"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00658}00658         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00659}00659                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}unknown status"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00660}00660         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00661}00661 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00662}00662 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00663}\mbox{\hyperlink{mlx5__cmd_8c_a5cd4ed8d1a6d2c7c9a3ffbe71e36c60d}{00663}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a5cd4ed8d1a6d2c7c9a3ffbe71e36c60d}{cmd\_status\_to\_err\_helper}}(u8 status)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00664}00664 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00665}00665         \textcolor{keywordflow}{switch} (status) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00666}00666         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aaf670c1ccbee5d4d1add2dc82e1c07158}{MLX5\_CMD\_STAT\_OK}}:                          \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00667}00667         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa7cd3dc2b3a5e8a968dd5e198077bf1ab}{MLX5\_CMD\_STAT\_INT\_ERR}}:                        \textcolor{keywordflow}{return} -\/EIO;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00668}00668         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa72273831cf02bbe38b99c52dd31eb84c}{MLX5\_CMD\_STAT\_BAD\_OP\_ERR}}:                  \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00669}00669         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa6e171bb5e361d31c8e4512dd0ba284c1}{MLX5\_CMD\_STAT\_BAD\_PARAM\_ERR}}:            \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00670}00670         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aab13acdf2ef5c57f926a868e3a97237ca}{MLX5\_CMD\_STAT\_BAD\_SYS\_STATE\_ERR}}:            \textcolor{keywordflow}{return} -\/EIO;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00671}00671         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa07b7ff899013879f480d7b7beb269870}{MLX5\_CMD\_STAT\_BAD\_RES\_ERR}}:                        \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00672}00672         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa1d5dde1d55f973b5bf8806930794a1d3}{MLX5\_CMD\_STAT\_RES\_BUSY}}:                      \textcolor{keywordflow}{return} -\/EBUSY;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00673}00673         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa3ae8cce932e0840309dc2e6314f2fc76}{MLX5\_CMD\_STAT\_LIM\_ERR}}:                        \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00674}00674         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa7236df30f14054a56d73d015b9f63b2c}{MLX5\_CMD\_STAT\_BAD\_RES\_STATE\_ERR}}:            \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00675}00675         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aab78ede41b310d6112965af10e0b78935}{MLX5\_CMD\_STAT\_IX\_ERR}}:                  \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00676}00676         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aaa33f4309bfee799cec7e5c4cac46e37a}{MLX5\_CMD\_STAT\_NO\_RES\_ERR}}:                  \textcolor{keywordflow}{return} -\/EAGAIN;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00677}00677         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa9d1eff6db525656b532c150d60fd851f}{MLX5\_CMD\_STAT\_BAD\_INP\_LEN\_ERR}}:                \textcolor{keywordflow}{return} -\/EIO;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00678}00678         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa94b03b6efcf7bd2d440d4628300a5dd9}{MLX5\_CMD\_STAT\_BAD\_OUTP\_LEN\_ERR}}:              \textcolor{keywordflow}{return} -\/EIO;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00679}00679         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aadca0cd401d4797384c57d8a7c1aab451}{MLX5\_CMD\_STAT\_BAD\_QP\_STATE\_ERR}}:              \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00680}00680         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa2e22dcf20b70caf21c57045c6f09daef}{MLX5\_CMD\_STAT\_BAD\_PKT\_ERR}}:                        \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00681}00681         \textcolor{keywordflow}{case} \mbox{\hyperlink{device_8h_aa156d1cebb38c8a65846c4d9c006012aa369b82e63db56215ddb24f1f936599af}{MLX5\_CMD\_STAT\_BAD\_SIZE\_OUTS\_CQES\_ERR}}:  \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00682}00682         \textcolor{keywordflow}{default}:                                        \textcolor{keywordflow}{return} -\/EIO;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00683}00683         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00684}00684 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00686}\mbox{\hyperlink{driver_8h_a037098c288034559b2eea2cca5fd4ce1}{00686}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a037098c288034559b2eea2cca5fd4ce1}{mlx5\_cmd\_mbox\_status}}(\textcolor{keywordtype}{void} *out, u8 *status, u32 *syndrome)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00687}00687 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00688}00688         *status = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_out, out, status);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00689}00689         *syndrome = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_out, out, syndrome);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00690}00690 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00691}00691 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00692}\mbox{\hyperlink{mlx5__cmd_8c_a0e2de27e06bbe4e019c78e74d5d7c8b9}{00692}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a0e2de27e06bbe4e019c78e74d5d7c8b9}{mlx5\_cmd\_check}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{void} *out)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00693}00693 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00694}00694         u32 syndrome;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00695}00695         u8  status;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00696}00696         u16 opcode;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00697}00697         u16 op\_mod;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00698}00698 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00699}00699         \mbox{\hyperlink{mlx5__cmd_8c_a037098c288034559b2eea2cca5fd4ce1}{mlx5\_cmd\_mbox\_status}}(out, \&status, \&syndrome);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00700}00700         \textcolor{keywordflow}{if} (!status)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00701}00701                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00702}00702 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00703}00703         opcode = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_in, in, opcode);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00704}00704         op\_mod = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_in, in, op\_mod);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00705}00705 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00706}00706         \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00707}00707                       \textcolor{stringliteral}{"{}\%s(0x\%x) op\_mod(0x\%x) failed, status \%s(0x\%x), syndrome (0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00708}00708                        \mbox{\hyperlink{mlx5__cmd_8c_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(opcode),}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00709}00709                        opcode, op\_mod,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00710}00710                        \mbox{\hyperlink{mlx5__cmd_8c_a31f3a19fe25b3f72dc3b38306b3c9656}{cmd\_status\_str}}(status),}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00711}00711                        status,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00712}00712                        syndrome);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00713}00713 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00714}00714         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__cmd_8c_a5cd4ed8d1a6d2c7c9a3ffbe71e36c60d}{cmd\_status\_to\_err\_helper}}(status);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00715}00715 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00716}00716 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00717}\mbox{\hyperlink{mlx5__cmd_8c_a7bc0bba6845fecefc6d5d5c22a6e3cf8}{00717}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a7bc0bba6845fecefc6d5d5c22a6e3cf8}{dump\_command}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00718}00718                          \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent, \textcolor{keywordtype}{int} input)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00719}00719 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00720}00720         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg = input ? ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}} : ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00721}00721         u16 op = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_in, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a5ba40ad9f27af23c3dda827dbe0d8c12}{in}}, opcode);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00722}00722         \textcolor{keywordtype}{size\_t} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00723}00723         \textcolor{keywordtype}{int} data\_only;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00724}00724         \textcolor{keywordtype}{int} offset = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00725}00725         \textcolor{keywordtype}{int} msg\_len = input ? ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a070dd0731f2011a5b26472d1a6da5d35}{uin\_size}} : ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a3f5be640cc1a2eaca0f71162f9821f93}{uout\_size}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00726}00726         \textcolor{keywordtype}{int} dump\_len;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00727}00727 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00728}00728         data\_only = !!(\mbox{\hyperlink{mlx5__core_8h_ad7cef3de617977f80cbdb417ef079d21}{mlx5\_core\_debug\_mask}} \& (1 << \mbox{\hyperlink{mlx5__core_8h_a92c4bd66c8074c3d126a069275a0a80ca72b45b7223ceb7c4dfc17b22086532df}{MLX5\_CMD\_DATA}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00729}00729 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00730}00730         \textcolor{keywordflow}{if} (data\_only)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00731}00731                 \mbox{\hyperlink{mlx5__core_8h_a57871c3748353b2e1665613542782b45}{mlx5\_core\_dbg\_mask}}(dev, 1 << \mbox{\hyperlink{mlx5__core_8h_a92c4bd66c8074c3d126a069275a0a80ca72b45b7223ceb7c4dfc17b22086532df}{MLX5\_CMD\_DATA}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00732}00732                                    \textcolor{stringliteral}{"{}dump command data \%s(0x\%x) \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00733}00733                                    \mbox{\hyperlink{mlx5__cmd_8c_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(op), op,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00734}00734                                    input ? \textcolor{stringliteral}{"{}INPUT"{}} : \textcolor{stringliteral}{"{}OUTPUT"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00735}00735         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00736}00736                 \mbox{\hyperlink{mlx5__core_8h_abecf5f90e845f80efc57b10bd4c67c2b}{mlx5\_core\_dbg}}(dev, \textcolor{stringliteral}{"{}dump command \%s(0x\%x) \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00737}00737                               \mbox{\hyperlink{mlx5__cmd_8c_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(op), op,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00738}00738                               input ? \textcolor{stringliteral}{"{}INPUT"{}} : \textcolor{stringliteral}{"{}OUTPUT"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00739}00739 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00740}00740         \textcolor{keywordflow}{if} (data\_only) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00741}00741                 \textcolor{keywordflow}{if} (input) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00742}00742                         \mbox{\hyperlink{mlx5__cmd_8c_ac806b7ec704bbe653ebeed4fd0be1ab5}{dump\_buf}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a5ba40ad9f27af23c3dda827dbe0d8c12}{in}}, \textcolor{keyword}{sizeof}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a5ba40ad9f27af23c3dda827dbe0d8c12}{in}}), 1, offset);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00743}00743                         offset += \textcolor{keyword}{sizeof}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a5ba40ad9f27af23c3dda827dbe0d8c12}{in}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00744}00744                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00745}00745                         \mbox{\hyperlink{mlx5__cmd_8c_ac806b7ec704bbe653ebeed4fd0be1ab5}{dump\_buf}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_ac48ad186ce626a53b073c7b53fe42466}{out}}, \textcolor{keyword}{sizeof}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_ac48ad186ce626a53b073c7b53fe42466}{out}}), 1, offset);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00746}00746                         offset += \textcolor{keyword}{sizeof}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_ac48ad186ce626a53b073c7b53fe42466}{out}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00747}00747                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00748}00748         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00749}00749                 \mbox{\hyperlink{mlx5__cmd_8c_ac806b7ec704bbe653ebeed4fd0be1ab5}{dump\_buf}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}, \textcolor{keyword}{sizeof}(*ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}), 0, offset);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00750}00750                 offset += \textcolor{keyword}{sizeof}(*ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00751}00751         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00752}00752 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00753}00753         \textcolor{keywordflow}{for} (i = 0; i != (msg-\/>numpages * \mbox{\hyperlink{device_8h_ae1121d1be3d327f42b7e84432ddc6f97}{MLX5\_NUM\_CMDS\_IN\_ADAPTER\_PAGE}}); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00754}00754                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__prot__block}{mlx5\_cmd\_prot\_block}} *block;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00755}00755 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00756}00756                 block = \mbox{\hyperlink{driver_8h_a9b7a9a99381a8f5793a5363f4c59ac06}{mlx5\_fwp\_get\_virt}}(msg, i * \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a4a1376f40493299c9383e3c4a595ca65}{MLX5\_CMD\_MBOX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00757}00757 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00758}00758                 \textcolor{keywordflow}{if} (data\_only) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00759}00759                         \textcolor{keywordflow}{if} (offset >= msg\_len)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00760}00760                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00761}00761                         dump\_len = min\_t(\textcolor{keywordtype}{int},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00762}00762                             \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a446a81d5adbbeff683a2e55a589349d5}{MLX5\_CMD\_DATA\_BLOCK\_SIZE}}, msg\_len -\/ offset);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00763}00763 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00764}00764                         \mbox{\hyperlink{mlx5__cmd_8c_ac806b7ec704bbe653ebeed4fd0be1ab5}{dump\_buf}}(block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_ac03617f4dd54fc019d0a708820f189ab}{data}}, dump\_len, 1, offset);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00765}00765                         offset += \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a446a81d5adbbeff683a2e55a589349d5}{MLX5\_CMD\_DATA\_BLOCK\_SIZE}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00766}00766                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00767}00767                         \mbox{\hyperlink{mlx5__core_8h_abecf5f90e845f80efc57b10bd4c67c2b}{mlx5\_core\_dbg}}(dev, \textcolor{stringliteral}{"{}command block:\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00768}00768                         \mbox{\hyperlink{mlx5__cmd_8c_ac806b7ec704bbe653ebeed4fd0be1ab5}{dump\_buf}}(block, \textcolor{keyword}{sizeof}(*block), 0, offset);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00769}00769                         offset += \textcolor{keyword}{sizeof}(*block);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00770}00770                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00771}00771 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00772}00772                 \textcolor{comment}{/* check for last block */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00773}00773                 \textcolor{keywordflow}{if} (block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_a6b2295836ba3151f3818bc606e967631}{next}} == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00774}00774                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00775}00775         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00776}00776 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00777}00777         \textcolor{keywordflow}{if} (data\_only)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00778}00778                 pr\_debug(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00779}00779 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00780}00780 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00781}\mbox{\hyperlink{mlx5__cmd_8c_aa08cb0629f85e5618c6aaf99ea162381}{00781}} \textcolor{keyword}{static} u16 \mbox{\hyperlink{mlx5__cmd_8c_aa08cb0629f85e5618c6aaf99ea162381}{msg\_to\_opcode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *in)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00782}00782 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00783}00783         \textcolor{keywordflow}{return} \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_in, in-\/>first.data, opcode);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00784}00784 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00785}00785 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00786}\mbox{\hyperlink{mlx5__cmd_8c_a044016f89b9dfacb9e419b94a5f5f244}{00786}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a044016f89b9dfacb9e419b94a5f5f244}{cb\_timeout\_handler}}(\textcolor{keyword}{struct} work\_struct *\mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00787}00787 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00788}00788         \textcolor{keyword}{struct }delayed\_work *dwork = container\_of(\mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}}, \textcolor{keyword}{struct} delayed\_work,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00789}00789                                                   \mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00790}00790         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent = container\_of(dwork,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00791}00791                                                      \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00792}00792                                                      \mbox{\hyperlink{structmlx5__cmd__work__ent_a93fd168f31b7af55031122f1cda4dafe}{cb\_timeout\_work}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00793}00793         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev = container\_of(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00794}00794                                                  \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00795}00795 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00796}00796         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}} = -\/ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00797}00797         \mbox{\hyperlink{mlx5__core_8h_ac024f7b881a7d4965ecc662bc4be81ca}{mlx5\_core\_warn}}(dev, \textcolor{stringliteral}{"{}\%s(0x\%x) timeout. Will cause a leak of a command resource\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00798}00798                        \mbox{\hyperlink{mlx5__cmd_8c_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(\mbox{\hyperlink{mlx5__cmd_8c_aa08cb0629f85e5618c6aaf99ea162381}{msg\_to\_opcode}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}})),}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00799}00799                        \mbox{\hyperlink{mlx5__cmd_8c_aa08cb0629f85e5618c6aaf99ea162381}{msg\_to\_opcode}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00800}00800         \mbox{\hyperlink{mlx5__cmd_8c_ab63397a05dbcd2b70371f471d0392c2c}{mlx5\_cmd\_comp\_handler}}(dev, 1UL << ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}}, \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa7cc9a077ee2d7a7fde1d1bc96d0a7a65}{MLX5\_CMD\_MODE\_EVENTS}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00801}00801 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00802}00802 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00803}\mbox{\hyperlink{mlx5__cmd_8c_a1976434abf52a91bd6c42d9cb9e6405e}{00803}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a1976434abf52a91bd6c42d9cb9e6405e}{complete\_command}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00804}00804 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00805}00805         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00806}00806         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev = container\_of(\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00807}00807                                                  \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00808}00808         \mbox{\hyperlink{driver_8h_ac6c246dcbc31bef1fd1700ddd505dd46}{mlx5\_cmd\_cbk\_t}} callback;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00809}00809         \textcolor{keywordtype}{void} *context;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00810}00810 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00811}00811         s64 ds;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00812}00812         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__stats}{mlx5\_cmd\_stats}} *\mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00813}00813         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} flags;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00814}00814         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00815}00815         \textcolor{keyword}{struct }semaphore *sem;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00816}00816 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00817}00817         \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a0cf62883b9cc23eaf42caa54cb75aafa}{page\_queue}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00818}00818                 sem = \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a5c5a2eab0664218b417807dc3dc9abf0}{pages\_sem}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00819}00819         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00820}00820                 sem = \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a28955ec05505ec6136e6c8f4f74ce5ca}{sem}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00821}00821 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00822}00822         \textcolor{keywordflow}{if} (dev-\/>\mbox{\hyperlink{structmlx5__core__dev_aaee056f22d7ec1c4298ffb20189ec7e5}{state}} != \mbox{\hyperlink{driver_8h_aa42b19437cec785545106d8c76e3d9dda5e5ae327aea9f21a9ec42bf3982c5daa}{MLX5\_DEVICE\_STATE\_UP}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00823}00823                 u8 status = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00824}00824                 u32 drv\_synd;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00826}00826                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}} = \mbox{\hyperlink{mlx5__cmd_8c_a263a0f90a54856c5a9018815c00024e0}{mlx5\_internal\_err\_ret\_value}}(dev, \mbox{\hyperlink{mlx5__cmd_8c_aa08cb0629f85e5618c6aaf99ea162381}{msg\_to\_opcode}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}), \&drv\_synd, \&status);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00827}00827                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mbox\_out, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}}, status, status);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00828}00828                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mbox\_out, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}}, syndrome, drv\_synd);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00829}00829         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00830}00830 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00831}00831         \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a5cd47e90f76c0f58861b9621811325c2}{callback}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00832}00832                 ds = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab7cef9bda94545e353b90453df15c782}{ts2}} -\/ ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa9683fc13720d6d7c46e5aaf53911e29}{ts1}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00833}00833                 \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_afdff463a57abdadc2ecb66579a2f7df9}{op}} < ARRAY\_SIZE(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_abfbac04246dfc0086dedea4873fb0f93}{stats}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00834}00834                         \mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}} = \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_abfbac04246dfc0086dedea4873fb0f93}{stats}}[ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_afdff463a57abdadc2ecb66579a2f7df9}{op}}];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00835}00835                         spin\_lock\_irqsave(\&\mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}}-\/>lock, flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00836}00836                         \mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}}-\/>sum += ds;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00837}00837                         ++\mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}}-\/>n;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00838}00838                         spin\_unlock\_irqrestore(\&\mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}}-\/>lock, flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00839}00839                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00840}00840 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00841}00841                 callback = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a5cd47e90f76c0f58861b9621811325c2}{callback}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00842}00842                 context = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ac6828af5b41e1e97cdb1789cf83a778b}{context}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00843}00843                 err = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00844}00844                 \textcolor{keywordflow}{if} (!err) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00845}00845                         err = \mbox{\hyperlink{mlx5__cmd_8c_a5c6d86f1a938f4eaaad350780cc26c85}{mlx5\_copy\_from\_msg}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa5763af54cf417c085920d16f92b5111}{uout}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00846}00846                                                  ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00847}00847                                                  ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a3f5be640cc1a2eaca0f71162f9821f93}{uout\_size}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00848}00848                         err = err ? err : \mbox{\hyperlink{mlx5__cmd_8c_a0e2de27e06bbe4e019c78e74d5d7c8b9}{mlx5\_cmd\_check}}(dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00849}00849                                                          ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}-\/>first.data,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00850}00850                                                          ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa5763af54cf417c085920d16f92b5111}{uout}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00851}00851                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00852}00852 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00853}00853                 \mbox{\hyperlink{mlx5__cmd_8c_a7105113b70ff1e22cf30ca6f622a94e5}{mlx5\_free\_cmd\_msg}}(dev, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00854}00854                 \mbox{\hyperlink{mlx5__cmd_8c_acb2b052e8e6fa2cf5097212d89a7f16d}{free\_msg}}(dev, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00855}00855 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00856}00856                 err = err ? err : ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00857}00857                 \mbox{\hyperlink{mlx5__cmd_8c_a30eb6994cbee58d4d531004c310259be}{free\_cmd}}(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00858}00858                 callback(err, context);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00859}00859         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00860}00860                 complete(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a16be1250a5ef833f3ce157ae602faf2d}{done}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00861}00861         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00862}00862         up(sem);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00863}00863 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00864}00864 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00865}\mbox{\hyperlink{mlx5__cmd_8c_a30e339d331afbe8478a4baf0b7cc20d2}{00865}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a30e339d331afbe8478a4baf0b7cc20d2}{cmd\_work\_handler}}(\textcolor{keyword}{struct} work\_struct *\mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00866}00866 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00867}00867         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent = container\_of(\mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}}, \mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00868}00868         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00869}00869         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev = container\_of(\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}}, \mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00870}00870         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} cb\_timeout = msecs\_to\_jiffies(\mbox{\hyperlink{driver_8h_a7859c0a3efa8b1c360f5c2376baf051ea97001fa8a9e80520a119c15ead82b91a}{MLX5\_CMD\_TIMEOUT\_MSEC}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00871}00871         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__layout}{mlx5\_cmd\_layout}} *lay;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00872}00872         \textcolor{keyword}{struct }semaphore *sem;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00873}00873         \textcolor{keywordtype}{bool} poll\_cmd = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7f5a1bcd1d21f6ea36c3693aaa594b15}{polling}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00874}00874 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00875}00875         sem = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a0cf62883b9cc23eaf42caa54cb75aafa}{page\_queue}} ? \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a5c5a2eab0664218b417807dc3dc9abf0}{pages\_sem}} : \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a28955ec05505ec6136e6c8f4f74ce5ca}{sem}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00876}00876         down(sem);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00877}00877 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00878}00878         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mlx5__cmd_8c_a57216a96f076d222545e5db4d4d49b43}{alloc\_ent}}(ent) < 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00879}00879                 \mbox{\hyperlink{mlx5__cmd_8c_a1976434abf52a91bd6c42d9cb9e6405e}{complete\_command}}(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00880}00880                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00881}00881         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00882}00882 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00883}00883         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7326130f5094685d15659a88682754ed}{token}} = \mbox{\hyperlink{mlx5__cmd_8c_ae167ff311a9ab5b008d8627e8c4b3600}{alloc\_token}}(cmd);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00884}00884         lay = \mbox{\hyperlink{mlx5__cmd_8c_a931b3cfccda93bc6c68d017449f69503}{get\_inst}}(cmd, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00885}00885         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}} = lay;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00886}00886         memset(lay, 0, \textcolor{keyword}{sizeof}(*lay));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00887}00887         memcpy(lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a5ba40ad9f27af23c3dda827dbe0d8c12}{in}}, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}-\/>first.data, \textcolor{keyword}{sizeof}(lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a5ba40ad9f27af23c3dda827dbe0d8c12}{in}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00888}00888         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_afdff463a57abdadc2ecb66579a2f7df9}{op}} = be32\_to\_cpu(lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a5ba40ad9f27af23c3dda827dbe0d8c12}{in}}[0]) >> 16;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00889}00889         \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}-\/>numpages != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00890}00890                 lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a1d0b4e4dfc7a6165ccb6f94a77ccd6db}{in\_ptr}} = cpu\_to\_be64(\mbox{\hyperlink{driver_8h_a88503190bbecdabfe8e3c4086418b450}{mlx5\_fwp\_get\_dma}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}, 0));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00891}00891         \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}}-\/>numpages != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00892}00892                 lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a7d5b54043100badcad4dd901702bdd62}{out\_ptr}} = cpu\_to\_be64(\mbox{\hyperlink{driver_8h_a88503190bbecdabfe8e3c4086418b450}{mlx5\_fwp\_get\_dma}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}}, 0));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00893}00893         lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a8feb4f8a75dfac25bb578337763d62df}{inlen}} = cpu\_to\_be32(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a070dd0731f2011a5b26472d1a6da5d35}{uin\_size}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00894}00894         lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a730289c7fb1228d21a47cb2c69ab9a53}{outlen}} = cpu\_to\_be32(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a3f5be640cc1a2eaca0f71162f9821f93}{uout\_size}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00895}00895         lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_ac7e7a0b9cb14b7a857ef2ff0c43e05b5}{type}} = \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57afdc83dc9088a0e95af593022df6e6fdc}{MLX5\_PCI\_CMD\_XPORT}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00896}00896         lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a8ff342139d6238d153ac3aada8f3a1db}{token}} = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7326130f5094685d15659a88682754ed}{token}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00897}00897         lay-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a3d61ca0eb6b8153438ee46ab7b779d15}{status\_own}} = \mbox{\hyperlink{driver_8h_a79e9f285d34216706a748fd7ba8941b7a281be2979472056d6c5f2b59a4ba9a40}{CMD\_OWNER\_HW}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00898}00898         \mbox{\hyperlink{mlx5__cmd_8c_ab2473494d756400222f910a8457bb232}{set\_signature}}(ent, !cmd-\/>\mbox{\hyperlink{structmlx5__cmd_ab026cdfd4c1a083703ad8984b9d21268}{checksum\_disabled}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00899}00899         \mbox{\hyperlink{mlx5__cmd_8c_a7bc0bba6845fecefc6d5d5c22a6e3cf8}{dump\_command}}(dev, ent, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00900}00900         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa9683fc13720d6d7c46e5aaf53911e29}{ts1}} = ktime\_get\_ns();}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00901}00901         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a3f89cdd7543f4e429de4b2b959f3cc1c}{busy}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00902}00902         \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a5cd47e90f76c0f58861b9621811325c2}{callback}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00903}00903                 schedule\_delayed\_work(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a93fd168f31b7af55031122f1cda4dafe}{cb\_timeout\_work}}, cb\_timeout);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00904}00904 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00905}00905         \textcolor{comment}{/* ring doorbell after the descriptor is valid */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00906}00906         \mbox{\hyperlink{mlx5__core_8h_abecf5f90e845f80efc57b10bd4c67c2b}{mlx5\_core\_dbg}}(dev, \textcolor{stringliteral}{"{}writing 0x\%x to command doorbell\(\backslash\)n"{}}, 1 << ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00907}00907         \textcolor{comment}{/* make sure data is written to RAM */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00908}00908         \mbox{\hyperlink{driver_8h_aa68b621074745fa70058262b61654aca}{mlx5\_fwp\_flush}}(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_aa8696fb359a5170f23ff4ab9f35fc6e5}{cmd\_page}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00909}00909         iowrite32be(1 << ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}}, \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_ac514aa4f9af277aed19346d52ec30073}{iseg}}-\/>\mbox{\hyperlink{structmlx5__init__seg_a56b004d6d0bb8107a1a2d9d41214dc06}{cmd\_dbell}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00910}00910         mmiowb();}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00911}00911 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00912}00912         \textcolor{comment}{/* if not in polling don't use ent after this point */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00913}00913         \textcolor{keywordflow}{if} (poll\_cmd) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00914}00914                 \mbox{\hyperlink{mlx5__cmd_8c_a357c1d68dfb19b9b5f668c998721ee49}{poll\_timeout}}(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00915}00915                 \textcolor{comment}{/* make sure we read the descriptor after ownership is SW */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00916}00916                 \mbox{\hyperlink{mlx5__cmd_8c_ab63397a05dbcd2b70371f471d0392c2c}{mlx5\_cmd\_comp\_handler}}(dev, 1U << ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}}, \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa77c7e41bd91dff9bc7cf2c617f4648d0}{MLX5\_CMD\_MODE\_POLLING}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00917}00917         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00918}00918 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00919}00919 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00920}\mbox{\hyperlink{mlx5__cmd_8c_a702062996bd403b41a1bb8ceb9947922}{00920}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{mlx5__cmd_8c_a702062996bd403b41a1bb8ceb9947922}{deliv\_status\_to\_str}}(u8 status)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00921}00921 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00922}00922         \textcolor{keywordflow}{switch} (status) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00923}00923         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dab1efa025e210bbef7ec91f22b7f327be}{MLX5\_CMD\_DELIVERY\_STAT\_OK}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00924}00924                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}no errors"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00925}00925         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dad6b59027138a36930106e2cc538d075e}{MLX5\_CMD\_DELIVERY\_STAT\_SIGNAT\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00926}00926                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}signature error"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00927}00927         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dabb3a86102da8fa746aa331e266f0fde2}{MLX5\_CMD\_DELIVERY\_STAT\_TOK\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00928}00928                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}token error"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00929}00929         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da6fa135203527fde8b9cc3bc6b735ef7c}{MLX5\_CMD\_DELIVERY\_STAT\_BAD\_BLK\_NUM\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00930}00930                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad block number"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00931}00931         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da32069657c8d82287756b0d2d0408164f}{MLX5\_CMD\_DELIVERY\_STAT\_OUT\_PTR\_ALIGN\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00932}00932                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}output pointer not aligned to block size"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00933}00933         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dab76c010814174e526bc2d45031aba526}{MLX5\_CMD\_DELIVERY\_STAT\_IN\_PTR\_ALIGN\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00934}00934                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}input pointer not aligned to block size"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00935}00935         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829dae17173712abdd5e026251b5db86fd56d}{MLX5\_CMD\_DELIVERY\_STAT\_FW\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00936}00936                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}firmware internal error"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00937}00937         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da5a4e0f581778942c37824eabb8685e61}{MLX5\_CMD\_DELIVERY\_STAT\_IN\_LENGTH\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00938}00938                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}command input length error"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00939}00939         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da2284e83bcc8317d12216ff63d56dcfe3}{MLX5\_CMD\_DELIVERY\_STAT\_OUT\_LENGTH\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00940}00940                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}command ouput length error"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00941}00941         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da94f68954b0a8181b6fc0abe1558f8af4}{MLX5\_CMD\_DELIVERY\_STAT\_RES\_FLD\_NOT\_CLR\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00942}00942                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}reserved fields not cleared"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00943}00943         \textcolor{keywordflow}{case} \mbox{\hyperlink{mlx5__cmd_8c_a1b7b7893d940926615b39239ac05829da389a223a0e567e2e20af773d14baa38a}{MLX5\_CMD\_DELIVERY\_STAT\_CMD\_DESCR\_ERR}}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00944}00944                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}bad command descriptor type"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00945}00945         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00946}00946                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}unknown status code"{}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00947}00947         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00948}00948 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00949}00949 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00950}\mbox{\hyperlink{mlx5__cmd_8c_a2f9032469be11f2de5a00480ad8512dd}{00950}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a2f9032469be11f2de5a00480ad8512dd}{wait\_func}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00951}00951 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00952}00952         \textcolor{keywordtype}{int} timeout = msecs\_to\_jiffies(\mbox{\hyperlink{driver_8h_a7859c0a3efa8b1c360f5c2376baf051ea97001fa8a9e80520a119c15ead82b91a}{MLX5\_CMD\_TIMEOUT\_MSEC}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00953}00953         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00954}00954 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00955}00955         \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7f5a1bcd1d21f6ea36c3693aaa594b15}{polling}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00956}00956                 wait\_for\_completion(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a16be1250a5ef833f3ce157ae602faf2d}{done}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00957}00957         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!wait\_for\_completion\_timeout(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a16be1250a5ef833f3ce157ae602faf2d}{done}}, timeout)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00958}00958                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}} = -\/ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00959}00959                 \mbox{\hyperlink{mlx5__cmd_8c_ab63397a05dbcd2b70371f471d0392c2c}{mlx5\_cmd\_comp\_handler}}(dev, 1UL << ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}}, \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa7cc9a077ee2d7a7fde1d1bc96d0a7a65}{MLX5\_CMD\_MODE\_EVENTS}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00960}00960         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00962}00962         err = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00963}00963 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00964}00964         \textcolor{keywordflow}{if} (err == -\/ETIMEDOUT) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00965}00965                 \mbox{\hyperlink{mlx5__core_8h_ac024f7b881a7d4965ecc662bc4be81ca}{mlx5\_core\_warn}}(dev, \textcolor{stringliteral}{"{}\%s(0x\%x) timeout. Will cause a leak of a command resource\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00966}00966                                \mbox{\hyperlink{mlx5__cmd_8c_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(\mbox{\hyperlink{mlx5__cmd_8c_aa08cb0629f85e5618c6aaf99ea162381}{msg\_to\_opcode}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}})),}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00967}00967                                \mbox{\hyperlink{mlx5__cmd_8c_aa08cb0629f85e5618c6aaf99ea162381}{msg\_to\_opcode}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab42014f1c7a167dfcea7dbbba3403cdc}{in}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00968}00968         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00969}00969         \mbox{\hyperlink{mlx5__core_8h_abecf5f90e845f80efc57b10bd4c67c2b}{mlx5\_core\_dbg}}(dev, \textcolor{stringliteral}{"{}err \%d, delivery status \%s(\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00970}00970                       err, \mbox{\hyperlink{mlx5__cmd_8c_a702062996bd403b41a1bb8ceb9947922}{deliv\_status\_to\_str}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}}), ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00971}00971 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00972}00972         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00973}00973 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00974}00974 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00975}00975 \textcolor{comment}{/*  Notes:}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00976}00976 \textcolor{comment}{ *    1. Callback functions may not sleep}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00977}00977 \textcolor{comment}{ *    2. page queue commands do not support asynchrous completion}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00978}00978 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00979}\mbox{\hyperlink{mlx5__cmd_8c_a2d86ab573d2d2f3a1f4c95122b3735c9}{00979}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a2d86ab573d2d2f3a1f4c95122b3735c9}{mlx5\_cmd\_invoke}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *in,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00980}00980                            \textcolor{keywordtype}{int} uin\_size,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00981}00981                            \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *out, \textcolor{keywordtype}{void} *uout, \textcolor{keywordtype}{int} uout\_size,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00982}00982                            \mbox{\hyperlink{driver_8h_ac6c246dcbc31bef1fd1700ddd505dd46}{mlx5\_cmd\_cbk\_t}} callback,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00983}00983                            \textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} page\_queue, u8 *status,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00984}00984                            \textcolor{keywordtype}{bool} force\_polling)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00985}00985 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00986}00986         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00987}00987         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00988}00988         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__stats}{mlx5\_cmd\_stats}} *\mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00989}00989         \textcolor{keywordtype}{int} err = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00990}00990         s64 ds;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00991}00991         u16 op;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00992}00992 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00993}00993         \textcolor{keywordflow}{if} (callback \&\& page\_queue)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00994}00994                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00995}00995 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00996}00996         ent = \mbox{\hyperlink{mlx5__cmd_8c_a89d947d5a868926a46536cff140dfb48}{alloc\_cmd}}(cmd, in, uin\_size, out, uout, uout\_size, callback,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00997}00997                         context, page\_queue);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00998}00998         \textcolor{keywordflow}{if} (IS\_ERR(ent))}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l00999}00999                 \textcolor{keywordflow}{return} PTR\_ERR(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01000}01000 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01001}01001         ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7f5a1bcd1d21f6ea36c3693aaa594b15}{polling}} = force\_polling || (cmd-\/>\mbox{\hyperlink{structmlx5__cmd_af2a362561b0fc7d2ba5c8cdc89b03a7d}{mode}} == \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa77c7e41bd91dff9bc7cf2c617f4648d0}{MLX5\_CMD\_MODE\_POLLING}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01002}01002 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01003}01003         \textcolor{keywordflow}{if} (!callback)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01004}01004                 init\_completion(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a16be1250a5ef833f3ce157ae602faf2d}{done}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01005}01005 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01006}01006         INIT\_DELAYED\_WORK(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a93fd168f31b7af55031122f1cda4dafe}{cb\_timeout\_work}}, \mbox{\hyperlink{mlx5__cmd_8c_a044016f89b9dfacb9e419b94a5f5f244}{cb\_timeout\_handler}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01007}01007         INIT\_WORK(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa4864d4b21c54c8ba907f2aba0d7c250}{work}}, \mbox{\hyperlink{mlx5__cmd_8c_a30e339d331afbe8478a4baf0b7cc20d2}{cmd\_work\_handler}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01008}01008         \textcolor{keywordflow}{if} (page\_queue) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01009}01009                 \mbox{\hyperlink{mlx5__cmd_8c_a30e339d331afbe8478a4baf0b7cc20d2}{cmd\_work\_handler}}(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa4864d4b21c54c8ba907f2aba0d7c250}{work}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01010}01010         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!queue\_work(dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a56f7f55842c148cd02b5aa28703df66a}{health}}.\mbox{\hyperlink{structmlx5__core__health_aaafb4b00274478e67265067726291d8b}{wq\_cmd}}, \&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa4864d4b21c54c8ba907f2aba0d7c250}{work}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01011}01011                 \mbox{\hyperlink{mlx5__core_8h_ac024f7b881a7d4965ecc662bc4be81ca}{mlx5\_core\_warn}}(dev, \textcolor{stringliteral}{"{}failed to queue work\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01012}01012                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01013}01013                 \textcolor{keywordflow}{goto} out\_free;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01014}01014         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01015}01015 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01016}01016         \textcolor{keywordflow}{if} (callback)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01017}01017                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01018}01018 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01019}01019         err = \mbox{\hyperlink{mlx5__cmd_8c_a2f9032469be11f2de5a00480ad8512dd}{wait\_func}}(dev, ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01020}01020         \textcolor{keywordflow}{if} (err == -\/ETIMEDOUT)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01021}01021                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01022}01022 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01023}01023         ds = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab7cef9bda94545e353b90453df15c782}{ts2}} -\/ ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa9683fc13720d6d7c46e5aaf53911e29}{ts1}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01024}01024         op = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_in, in-\/>first.data, opcode);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01025}01025         \textcolor{keywordflow}{if} (op < ARRAY\_SIZE(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_abfbac04246dfc0086dedea4873fb0f93}{stats}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01026}01026                 \mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}} = \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_abfbac04246dfc0086dedea4873fb0f93}{stats}}[op];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01027}01027                 spin\_lock\_irq(\&\mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}}-\/>lock);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01028}01028                 \mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}}-\/>sum += ds;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01029}01029                 ++\mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}}-\/>n;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01030}01030                 spin\_unlock\_irq(\&\mbox{\hyperlink{en_8h_a06ea5e538252d6110418c0edd5351c0b}{stats}}-\/>lock);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01031}01031         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01032}01032         \mbox{\hyperlink{mlx5__core_8h_a57871c3748353b2e1665613542782b45}{mlx5\_core\_dbg\_mask}}(dev, 1 << \mbox{\hyperlink{mlx5__core_8h_a92c4bd66c8074c3d126a069275a0a80cad31a2c594954cf5a3eb511bf08ffcd04}{MLX5\_CMD\_TIME}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01033}01033                            \textcolor{stringliteral}{"{}fw exec time for \%s is \%lld nsec\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01034}01034                            \mbox{\hyperlink{mlx5__cmd_8c_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(op), (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})ds);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01035}01035         *status = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01036}01036         \mbox{\hyperlink{mlx5__cmd_8c_a30eb6994cbee58d4d531004c310259be}{free\_cmd}}(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01037}01037 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01038}01038         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01039}01039 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01040}01040 out\_free:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01041}01041         \mbox{\hyperlink{mlx5__cmd_8c_a30eb6994cbee58d4d531004c310259be}{free\_cmd}}(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01042}01042 out:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01043}01043         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01044}01044 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01045}01045 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01046}\mbox{\hyperlink{mlx5__cmd_8c_accd9ef10f367cc3f30209a1338845846}{01046}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_accd9ef10f367cc3f30209a1338845846}{mlx5\_copy\_to\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *to, \textcolor{keywordtype}{void} *from, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01047}01047 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01048}01048         \textcolor{keywordtype}{size\_t} delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01049}01049         \textcolor{keywordtype}{size\_t} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01050}01050 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01051}01051         \textcolor{keywordflow}{if} (to == NULL || from == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01052}01052                 \textcolor{keywordflow}{return} (-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01054}01054         delta = min\_t(\textcolor{keywordtype}{size\_t}, size, \textcolor{keyword}{sizeof}(to-\/>first.data));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01055}01055         memcpy(to-\/>first.data, from, delta);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01056}01056         from = (\textcolor{keywordtype}{char} *)from + delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01057}01057         size -\/= delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01058}01058 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01059}01059         \textcolor{keywordflow}{for} (i = 0; size != 0; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01060}01060                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__prot__block}{mlx5\_cmd\_prot\_block}} *block;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01061}01061 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01062}01062                 block = \mbox{\hyperlink{driver_8h_a9b7a9a99381a8f5793a5363f4c59ac06}{mlx5\_fwp\_get\_virt}}(to, i * \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a4a1376f40493299c9383e3c4a595ca65}{MLX5\_CMD\_MBOX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01063}01063 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01064}01064                 delta = min\_t(\textcolor{keywordtype}{size\_t}, size, \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a446a81d5adbbeff683a2e55a589349d5}{MLX5\_CMD\_DATA\_BLOCK\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01065}01065                 memcpy(block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_ac03617f4dd54fc019d0a708820f189ab}{data}}, from, delta);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01066}01066                 from = (\textcolor{keywordtype}{char} *)from + delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01067}01067                 size -\/= delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01068}01068         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01069}01069         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01070}01070 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01071}01071 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01072}\mbox{\hyperlink{mlx5__cmd_8c_a5c6d86f1a938f4eaaad350780cc26c85}{01072}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a5c6d86f1a938f4eaaad350780cc26c85}{mlx5\_copy\_from\_msg}}(\textcolor{keywordtype}{void} *to, \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *from, \textcolor{keywordtype}{int} size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01073}01073 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01074}01074         \textcolor{keywordtype}{size\_t} delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01075}01075         \textcolor{keywordtype}{size\_t} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01076}01076 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01077}01077         \textcolor{keywordflow}{if} (to == NULL || from == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01078}01078                 \textcolor{keywordflow}{return} (-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01079}01079 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01080}01080         delta = min\_t(\textcolor{keywordtype}{size\_t}, size, \textcolor{keyword}{sizeof}(from-\/>first.data));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01081}01081         memcpy(to, from-\/>first.data, delta);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01082}01082         to = (\textcolor{keywordtype}{char} *)to + delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01083}01083         size -\/= delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01084}01084 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01085}01085         \textcolor{keywordflow}{for} (i = 0; size != 0; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01086}01086                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__prot__block}{mlx5\_cmd\_prot\_block}} *block;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01087}01087 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01088}01088                 block = \mbox{\hyperlink{driver_8h_a9b7a9a99381a8f5793a5363f4c59ac06}{mlx5\_fwp\_get\_virt}}(from, i * \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a4a1376f40493299c9383e3c4a595ca65}{MLX5\_CMD\_MBOX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01089}01089 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01090}01090                 delta = min\_t(\textcolor{keywordtype}{size\_t}, size, \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a446a81d5adbbeff683a2e55a589349d5}{MLX5\_CMD\_DATA\_BLOCK\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01091}01091                 memcpy(to, block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_ac03617f4dd54fc019d0a708820f189ab}{data}}, delta);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01092}01092                 to = (\textcolor{keywordtype}{char} *)to + delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01093}01093                 size -\/= delta;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01094}01094         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01095}01095         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01096}01096 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01097}01097 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01098}01098 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01099}\mbox{\hyperlink{mlx5__cmd_8c_acc18975bdd3cc354472a30bcf92965bb}{01099}} \mbox{\hyperlink{mlx5__cmd_8c_acc18975bdd3cc354472a30bcf92965bb}{mlx5\_alloc\_cmd\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, gfp\_t flags, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01100}01100 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01101}01101         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01102}01102         \textcolor{keywordtype}{size\_t} blen;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01103}01103         \textcolor{keywordtype}{size\_t} n;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01104}01104         \textcolor{keywordtype}{size\_t} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01105}01105 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01106}01106         blen = size -\/ min\_t(\textcolor{keywordtype}{size\_t}, \textcolor{keyword}{sizeof}(msg-\/>first.data), size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01107}01107         n = howmany(blen, \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a446a81d5adbbeff683a2e55a589349d5}{MLX5\_CMD\_DATA\_BLOCK\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01108}01108 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01109}01109         msg = \mbox{\hyperlink{driver_8h_aba3a45299069d25866afbdb1ee5b4084}{mlx5\_fwp\_alloc}}(dev, flags, howmany(n, \mbox{\hyperlink{device_8h_ae1121d1be3d327f42b7e84432ddc6f97}{MLX5\_NUM\_CMDS\_IN\_ADAPTER\_PAGE}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01110}01110         \textcolor{keywordflow}{if} (msg == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01111}01111                 \textcolor{keywordflow}{return} (ERR\_PTR(-\/ENOMEM));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01112}01112 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01113}01113         \textcolor{keywordflow}{for} (i = 0; i != n; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01114}01114                 \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__prot__block}{mlx5\_cmd\_prot\_block}} *block;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01115}01115 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01116}01116                 block = \mbox{\hyperlink{driver_8h_a9b7a9a99381a8f5793a5363f4c59ac06}{mlx5\_fwp\_get\_virt}}(msg, i * \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a4a1376f40493299c9383e3c4a595ca65}{MLX5\_CMD\_MBOX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01117}01117 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01118}01118                 memset(block, 0, \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a4a1376f40493299c9383e3c4a595ca65}{MLX5\_CMD\_MBOX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01119}01119 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01120}01120                 \textcolor{keywordflow}{if} (i != (n -\/ 1)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01121}01121                         u64 dma = \mbox{\hyperlink{driver_8h_a88503190bbecdabfe8e3c4086418b450}{mlx5\_fwp\_get\_dma}}(msg, (i + 1) * \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57a4a1376f40493299c9383e3c4a595ca65}{MLX5\_CMD\_MBOX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01122}01122                         block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_a6b2295836ba3151f3818bc606e967631}{next}} = cpu\_to\_be64(dma);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01123}01123                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01124}01124                 block-\/>\mbox{\hyperlink{structmlx5__cmd__prot__block_a00c771575fb99a0e5f31e0ef3c04e3d2}{block\_num}} = cpu\_to\_be32(i);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01125}01125         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01126}01126 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01127}01127         \textcolor{comment}{/* make sure initial data is written to RAM */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01128}01128         \mbox{\hyperlink{driver_8h_aa68b621074745fa70058262b61654aca}{mlx5\_fwp\_flush}}(msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01129}01129 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01130}01130         \textcolor{keywordflow}{return} (msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01131}01131 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01132}01132 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01133}01133 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01134}\mbox{\hyperlink{mlx5__cmd_8c_a7105113b70ff1e22cf30ca6f622a94e5}{01134}} \mbox{\hyperlink{mlx5__cmd_8c_a7105113b70ff1e22cf30ca6f622a94e5}{mlx5\_free\_cmd\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01135}01135 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01136}01136 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01137}01137         \mbox{\hyperlink{driver_8h_a6ac682d99ce23bb3e151f1c7579f6762}{mlx5\_fwp\_free}}(msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01138}01138 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01139}01139 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01140}\mbox{\hyperlink{mlx5__cmd_8c_ab7fa3a7e2bee7e41f520f14dbd6d8c6c}{01140}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_ab7fa3a7e2bee7e41f520f14dbd6d8c6c}{clean\_debug\_files}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01141}01141 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01142}01142 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01143}01143 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01144}01144 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01145}\mbox{\hyperlink{mlx5__cmd_8c_acaf2d5088f3f3a8e24029c8d45e77d94}{01145}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_acaf2d5088f3f3a8e24029c8d45e77d94}{mlx5\_cmd\_change\_mod}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} mode)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01146}01146 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01147}01147         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01148}01148         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01149}01149 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01150}01150         \textcolor{keywordflow}{if} (cmd-\/>\mbox{\hyperlink{structmlx5__cmd_af2a362561b0fc7d2ba5c8cdc89b03a7d}{mode}} == \mbox{\hyperlink{structmlx5__cmd_af2a362561b0fc7d2ba5c8cdc89b03a7d}{mode}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01151}01151                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01152}01152 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01153}01153         \textcolor{keywordflow}{for} (i = 0; i < cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a17723a8554f95a9f7d146d15563f0e01}{max\_reg\_cmds}}; i++)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01154}01154                 down(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a28955ec05505ec6136e6c8f4f74ce5ca}{sem}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01155}01155 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01156}01156         down(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a5c5a2eab0664218b417807dc3dc9abf0}{pages\_sem}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01157}01157         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_af2a362561b0fc7d2ba5c8cdc89b03a7d}{mode}} = \mbox{\hyperlink{structmlx5__cmd_af2a362561b0fc7d2ba5c8cdc89b03a7d}{mode}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01158}01158 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01159}01159         up(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a5c5a2eab0664218b417807dc3dc9abf0}{pages\_sem}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01160}01160         \textcolor{keywordflow}{for} (i = 0; i < cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a17723a8554f95a9f7d146d15563f0e01}{max\_reg\_cmds}}; i++)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01161}01161                 up(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a28955ec05505ec6136e6c8f4f74ce5ca}{sem}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01162}01162 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01163}01163 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01164}\mbox{\hyperlink{driver_8h_a63eb78372399091391209a41536f51ad}{01164}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a63eb78372399091391209a41536f51ad}{mlx5\_cmd\_use\_events}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01165}01165 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01166}01166         \mbox{\hyperlink{mlx5__cmd_8c_acaf2d5088f3f3a8e24029c8d45e77d94}{mlx5\_cmd\_change\_mod}}(dev, \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa7cc9a077ee2d7a7fde1d1bc96d0a7a65}{MLX5\_CMD\_MODE\_EVENTS}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01167}01167 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01168}01168 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01169}\mbox{\hyperlink{driver_8h_a9dac63c7cbfa641e32f575e08f1ccf9d}{01169}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a9dac63c7cbfa641e32f575e08f1ccf9d}{mlx5\_cmd\_use\_polling}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01170}01170 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01171}01171         \mbox{\hyperlink{mlx5__cmd_8c_acaf2d5088f3f3a8e24029c8d45e77d94}{mlx5\_cmd\_change\_mod}}(dev, \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa77c7e41bd91dff9bc7cf2c617f4648d0}{MLX5\_CMD\_MODE\_POLLING}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01172}01172 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01173}01173 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01174}\mbox{\hyperlink{mlx5__cmd_8c_acb2b052e8e6fa2cf5097212d89a7f16d}{01174}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_acb2b052e8e6fa2cf5097212d89a7f16d}{free\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01175}01175 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01176}01176         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} flags;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01177}01177 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01178}01178         \textcolor{keywordflow}{if} (msg-\/>cache) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01179}01179                 spin\_lock\_irqsave(\&msg-\/>cache-\/>lock, flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01180}01180                 list\_add\_tail(\&msg-\/>list, \&msg-\/>cache-\/>head);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01181}01181                 spin\_unlock\_irqrestore(\&msg-\/>cache-\/>lock, flags);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01182}01182         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01183}01183                 \mbox{\hyperlink{mlx5__cmd_8c_a7105113b70ff1e22cf30ca6f622a94e5}{mlx5\_free\_cmd\_msg}}(dev, msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01184}01184         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01185}01185 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01186}01186 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01187}\mbox{\hyperlink{driver_8h_ac4e75e249e91ee80f08f41df4dadf793}{01187}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_ab63397a05dbcd2b70371f471d0392c2c}{mlx5\_cmd\_comp\_handler}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u64 vector\_flags,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01188}01188     \textcolor{keyword}{enum} \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbba}{mlx5\_cmd\_mode}} cmd\_mode)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01189}01189 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01190}01190         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01191}01191         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd__work__ent}{mlx5\_cmd\_work\_ent}} *ent;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01192}01192         \textcolor{keywordtype}{bool} triggered = (vector\_flags \& \mbox{\hyperlink{driver_8h_a9a3be2d66956bd67c0b66c32d8b30f17a9ee2c5468ae5360ae8ef4fa35a97e4d9}{MLX5\_TRIGGERED\_CMD\_COMP}}) ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01193}01193         u32 vector = vector\_flags; \textcolor{comment}{/* discard flags in the upper dword */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01194}01194         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01195}01195 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01196}01196         \textcolor{comment}{/* make sure data gets read from RAM */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01197}01197         \mbox{\hyperlink{driver_8h_ad8de159207913ce0414bef91baccbee1}{mlx5\_fwp\_invalidate}}(\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_aa8696fb359a5170f23ff4ab9f35fc6e5}{cmd\_page}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01198}01198 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01199}01199         \textcolor{keywordflow}{while} (vector != 0) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01200}01200                 i = ffs(vector) -\/ 1;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01201}01201                 vector \&= \string~(1U << i);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01202}01202                 \textcolor{comment}{/* check command mode */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01203}01203                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_aed9b022c92f963e4285c8be7143462b8}{ent\_mode}}[i] != cmd\_mode)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01204}01204                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01205}01205                 ent = \mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_aff4286b8b836aedcb13712cb8d6faa5c}{ent\_arr}}[i];}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01206}01206                 \textcolor{comment}{/* check if command was already handled */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01207}01207                 \textcolor{keywordflow}{if} (ent == NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01208}01208                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01209}01209                 \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a5cd47e90f76c0f58861b9621811325c2}{callback}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01210}01210                         cancel\_delayed\_work(\&ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a93fd168f31b7af55031122f1cda4dafe}{cb\_timeout\_work}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01211}01211                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab7cef9bda94545e353b90453df15c782}{ts2}} = ktime\_get\_ns();}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01212}01212                 memcpy(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}}-\/>first.data, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_ac48ad186ce626a53b073c7b53fe42466}{out}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01213}01213                        \textcolor{keyword}{sizeof}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_ac48ad186ce626a53b073c7b53fe42466}{out}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01214}01214                 \textcolor{comment}{/* make sure data gets read from RAM */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01215}01215                 \mbox{\hyperlink{driver_8h_ad8de159207913ce0414bef91baccbee1}{mlx5\_fwp\_invalidate}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a7608e4bb4ec68cafc1c9908bc28b18ad}{out}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01216}01216                 \mbox{\hyperlink{mlx5__cmd_8c_a7bc0bba6845fecefc6d5d5c22a6e3cf8}{dump\_command}}(dev, ent, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01217}01217                 \textcolor{keywordflow}{if} (!ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01218}01218                         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}-\/>\mbox{\hyperlink{structmlx5__cmd_ab026cdfd4c1a083703ad8984b9d21268}{checksum\_disabled}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01219}01219                                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}} = \mbox{\hyperlink{mlx5__cmd_8c_acfb74597355510f1e2c92ddd6473f88b}{verify\_signature}}(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01220}01220                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01221}01221                                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}} = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01222}01222 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01223}01223                         \textcolor{keywordflow}{if} (triggered)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01224}01224                                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}} = \mbox{\hyperlink{mlx5__cmd_8c_a098384b0034af0daa7c9c5c82b563567a08a3f25a0de0e515eadbe480ef6a3f28}{MLX5\_DRIVER\_STATUS\_ABORTED}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01225}01225                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01226}01226                                 ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}} = ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_af3b1386df3d56dea070a1cfe3bb2f50e}{lay}}-\/>\mbox{\hyperlink{structmlx5__cmd__layout_a3d61ca0eb6b8153438ee46ab7b779d15}{status\_own}} >> 1;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01227}01227 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01228}01228                         \mbox{\hyperlink{mlx5__core_8h_abecf5f90e845f80efc57b10bd4c67c2b}{mlx5\_core\_dbg}}(dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01229}01229                                       \textcolor{stringliteral}{"{}FW command ret 0x\%x, status \%s(0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01230}01230                                       ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_a88deda33a3997c1375913836be98b6d7}{ret}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01231}01231                                       \mbox{\hyperlink{mlx5__cmd_8c_a702062996bd403b41a1bb8ceb9947922}{deliv\_status\_to\_str}}(ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}}),}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01232}01232                                       ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01233}01233                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01234}01234                 \mbox{\hyperlink{mlx5__cmd_8c_ae729c4708c834a6c760b7c7d49a8aad2}{free\_ent}}(\mbox{\hyperlink{structmlx5__cmd__work__ent_aee3db15208e8f3fb3896f68de7b48a9e}{cmd}}, ent-\/>\mbox{\hyperlink{structmlx5__cmd__work__ent_ab9b3589603887eaab987a80ba8901d9c}{idx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01235}01235                 \mbox{\hyperlink{mlx5__cmd_8c_a1976434abf52a91bd6c42d9cb9e6405e}{complete\_command}}(ent);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01236}01236         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01237}01237 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01238}\mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{01238}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_ab63397a05dbcd2b70371f471d0392c2c}{mlx5\_cmd\_comp\_handler}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01239}01239 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01240}\mbox{\hyperlink{mlx5__cmd_8c_a1f09c874be9ec1b4a48028d5e6fdc3d9}{01240}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a1f09c874be9ec1b4a48028d5e6fdc3d9}{status\_to\_err}}(u8 \mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01241}01241 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01242}01242         \textcolor{keywordflow}{return} \mbox{\hyperlink{structmlx5__cmd__work__ent_aa89ef8f092349fd180dce7bce673220d}{status}} ? -\/EIO : 0; \textcolor{comment}{/* TBD more meaningful codes */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01243}01243 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01244}01244 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01245}\mbox{\hyperlink{mlx5__cmd_8c_a7f812ec160fd049c952f53f7508cef95}{01245}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *\mbox{\hyperlink{mlx5__cmd_8c_a7f812ec160fd049c952f53f7508cef95}{alloc\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} in\_size,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01246}01246                                       gfp\_t gfp)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01247}01247 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01248}01248         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg = ERR\_PTR(-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01249}01249         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01250}01250         \textcolor{keyword}{struct }\mbox{\hyperlink{structcache__ent}{cache\_ent}} *ent = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01251}01251 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01252}01252         \textcolor{keywordflow}{if} (in\_size > \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a224b9993c67b24b3c06e8dd98c0c0e34}{MED\_LIST\_SIZE}} \&\& in\_size <= \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1af9c490dec5c300441d5a0481dcde357a}{LONG\_LIST\_SIZE}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01253}01253                 ent = \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a7dcd636b429077faddcf5c6e1bbf882f}{large}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01254}01254         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (in\_size > 16 \&\& in\_size <= \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a224b9993c67b24b3c06e8dd98c0c0e34}{MED\_LIST\_SIZE}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01255}01255                 ent = \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a4bc9794f64617d5a457021a44c63ecee}{med}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01256}01256 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01257}01257         \textcolor{keywordflow}{if} (ent) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01258}01258                 spin\_lock\_irq(\&ent-\/>\mbox{\hyperlink{structcache__ent_ae7c5f9d9e1f39745fd32443ba70a0566}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01259}01259                 \textcolor{keywordflow}{if} (!list\_empty(\&ent-\/>\mbox{\hyperlink{structcache__ent_ab2a813c312ad0dd96ea1f12d83b10c9a}{head}})) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01260}01260                         msg = list\_entry(ent-\/>\mbox{\hyperlink{structcache__ent_ab2a813c312ad0dd96ea1f12d83b10c9a}{head}}.next, \textcolor{keyword}{struct} \mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01261}01261                                          list);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01262}01262                         list\_del(\&msg-\/>list);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01263}01263                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01264}01264                 spin\_unlock\_irq(\&ent-\/>\mbox{\hyperlink{structcache__ent_ae7c5f9d9e1f39745fd32443ba70a0566}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01265}01265         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01266}01266 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01267}01267         \textcolor{keywordflow}{if} (IS\_ERR(msg))}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01268}01268                 msg = \mbox{\hyperlink{mlx5__cmd_8c_acc18975bdd3cc354472a30bcf92965bb}{mlx5\_alloc\_cmd\_msg}}(dev, gfp, in\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01269}01269 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01270}01270         \textcolor{keywordflow}{return} msg;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01271}01271 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01272}01272 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01273}\mbox{\hyperlink{mlx5__cmd_8c_aae9dc094c83da033572cb81718339f98}{01273}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_aae9dc094c83da033572cb81718339f98}{is\_manage\_pages}}(\textcolor{keywordtype}{void} *in)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01274}01274 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01275}01275         \textcolor{keywordflow}{return} \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_in, in, opcode) == \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39aba28e67a911560d49746f4672dd3ee20}{MLX5\_CMD\_OP\_MANAGE\_PAGES}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01276}01276 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01277}01277 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01278}\mbox{\hyperlink{mlx5__cmd_8c_ac8580ce0d5847f54865534cf59511260}{01278}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_ac8580ce0d5847f54865534cf59511260}{cmd\_exec\_helper}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01279}01279                            \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{int} in\_size,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01280}01280                            \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01281}01281                            \mbox{\hyperlink{driver_8h_ac6c246dcbc31bef1fd1700ddd505dd46}{mlx5\_cmd\_cbk\_t}} callback, \textcolor{keywordtype}{void} *context,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01282}01282                            \textcolor{keywordtype}{bool} force\_polling)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01283}01283 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01284}01284         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *inb;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01285}01285         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *outb;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01286}01286         \textcolor{keywordtype}{int} pages\_queue;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01287}01287         \textcolor{keyword}{const} gfp\_t gfp = GFP\_KERNEL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01288}01288         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01289}01289         u8 status = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01290}01290         u32 drv\_synd;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01291}01291 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01292}01292         \textcolor{keywordflow}{if} (dev-\/>\mbox{\hyperlink{structmlx5__core__dev_aaee056f22d7ec1c4298ffb20189ec7e5}{state}} == \mbox{\hyperlink{driver_8h_aa42b19437cec785545106d8c76e3d9dda09cf6fffb12218a75a5f45b789ce5c62}{MLX5\_DEVICE\_STATE\_INTERNAL\_ERROR}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01293}01293                 u16 opcode = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mbox\_in, in, opcode);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01294}01294                 err = \mbox{\hyperlink{mlx5__cmd_8c_a263a0f90a54856c5a9018815c00024e0}{mlx5\_internal\_err\_ret\_value}}(dev, opcode, \&drv\_synd, \&status);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01295}01295                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mbox\_out, out, status, status);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01296}01296                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mbox\_out, out, syndrome, drv\_synd);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01297}01297                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01298}01298         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01299}01299 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01300}01300         pages\_queue = \mbox{\hyperlink{mlx5__cmd_8c_aae9dc094c83da033572cb81718339f98}{is\_manage\_pages}}(in);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01301}01301 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01302}01302         inb = \mbox{\hyperlink{mlx5__cmd_8c_a7f812ec160fd049c952f53f7508cef95}{alloc\_msg}}(dev, in\_size, gfp);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01303}01303         \textcolor{keywordflow}{if} (IS\_ERR(inb)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01304}01304                 err = PTR\_ERR(inb);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01305}01305                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01306}01306         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01307}01307 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01308}01308         err = \mbox{\hyperlink{mlx5__cmd_8c_accd9ef10f367cc3f30209a1338845846}{mlx5\_copy\_to\_msg}}(inb, in, in\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01309}01309         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01310}01310                 \mbox{\hyperlink{mlx5__core_8h_ac024f7b881a7d4965ecc662bc4be81ca}{mlx5\_core\_warn}}(dev, \textcolor{stringliteral}{"{}err \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01311}01311                 \textcolor{keywordflow}{goto} out\_in;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01312}01312         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01313}01313 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01314}01314         outb = \mbox{\hyperlink{mlx5__cmd_8c_acc18975bdd3cc354472a30bcf92965bb}{mlx5\_alloc\_cmd\_msg}}(dev, gfp, out\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01315}01315         \textcolor{keywordflow}{if} (IS\_ERR(outb)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01316}01316                 err = PTR\_ERR(outb);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01317}01317                 \textcolor{keywordflow}{goto} out\_in;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01318}01318         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01319}01319 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01320}01320         err = \mbox{\hyperlink{mlx5__cmd_8c_a2d86ab573d2d2f3a1f4c95122b3735c9}{mlx5\_cmd\_invoke}}(dev, inb, in\_size, outb, out, out\_size, callback,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01321}01321                               context, pages\_queue, \&status, force\_polling);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01322}01322         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01323}01323                 \textcolor{keywordflow}{if} (err == -\/ETIMEDOUT)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01324}01324                         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01325}01325                 \textcolor{keywordflow}{goto} out\_out;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01326}01326         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01327}01327 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01328}01328         \mbox{\hyperlink{mlx5__core_8h_abecf5f90e845f80efc57b10bd4c67c2b}{mlx5\_core\_dbg}}(dev, \textcolor{stringliteral}{"{}err \%d, status \%d\(\backslash\)n"{}}, err, status);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01329}01329         \textcolor{keywordflow}{if} (status) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01330}01330                 err = \mbox{\hyperlink{mlx5__cmd_8c_a1f09c874be9ec1b4a48028d5e6fdc3d9}{status\_to\_err}}(status);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01331}01331                 \textcolor{keywordflow}{goto} out\_out;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01332}01332         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01333}01333 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01334}01334         \textcolor{keywordflow}{if} (callback)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01335}01335                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01336}01336 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01337}01337         err = \mbox{\hyperlink{mlx5__cmd_8c_a5c6d86f1a938f4eaaad350780cc26c85}{mlx5\_copy\_from\_msg}}(out, outb, out\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01338}01338 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01339}01339 out\_out:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01340}01340         \mbox{\hyperlink{mlx5__cmd_8c_a7105113b70ff1e22cf30ca6f622a94e5}{mlx5\_free\_cmd\_msg}}(dev, outb);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01341}01341 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01342}01342 out\_in:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01343}01343         \mbox{\hyperlink{mlx5__cmd_8c_acb2b052e8e6fa2cf5097212d89a7f16d}{free\_msg}}(dev, inb);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01344}01344         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01345}01345 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01346}01346 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01347}\mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{01347}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{int} in\_size, \textcolor{keywordtype}{void} *out,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01348}01348                   \textcolor{keywordtype}{int} out\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01349}01349 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01350}01350         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01351}01351 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01352}01352         err = \mbox{\hyperlink{mlx5__cmd_8c_ac8580ce0d5847f54865534cf59511260}{cmd\_exec\_helper}}(dev, in, in\_size, out, out\_size, NULL, NULL, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01353}01353         \textcolor{keywordflow}{return} err ? : \mbox{\hyperlink{mlx5__cmd_8c_a0e2de27e06bbe4e019c78e74d5d7c8b9}{mlx5\_cmd\_check}}(dev, in, out);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01354}01354 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01355}\mbox{\hyperlink{mlx5__cmd_8c_a20ae3f3180c5daef9f3887b583208a4a}{01355}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01356}01356 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01357}\mbox{\hyperlink{driver_8h_a41bbf0e47162f91f5d40886211077941}{01357}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a41bbf0e47162f91f5d40886211077941}{mlx5\_cmd\_init\_async\_ctx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01358}01358                              \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__async__ctx}{mlx5\_async\_ctx}} *\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01359}01359 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01360}01360         \mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>dev = dev;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01361}01361         \textcolor{comment}{/* Starts at 1 to avoid doing wake\_up if we are not cleaning up */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01362}01362         atomic\_set(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>num\_inflight, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01363}01363         init\_waitqueue\_head(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>wait);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01364}01364 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01365}\mbox{\hyperlink{mlx5__cmd_8c_a0c1bef58aac8a52af62e1b0bf8e9a9b6}{01365}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a41bbf0e47162f91f5d40886211077941}{mlx5\_cmd\_init\_async\_ctx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01366}01366 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01375}\mbox{\hyperlink{driver_8h_a9484d1ea63ca4263ba7e61591ce03ae0}{01375}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a9484d1ea63ca4263ba7e61591ce03ae0}{mlx5\_cmd\_cleanup\_async\_ctx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__async__ctx}{mlx5\_async\_ctx}} *\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01376}01376 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01377}01377         atomic\_dec(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>num\_inflight);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01378}01378         wait\_event(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>wait, atomic\_read(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>num\_inflight) == 0);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01379}01379 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01380}\mbox{\hyperlink{mlx5__cmd_8c_a6af00b4c1dc331ff7e7707e2792ba4f2}{01380}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a9484d1ea63ca4263ba7e61591ce03ae0}{mlx5\_cmd\_cleanup\_async\_ctx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01381}01381 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01382}\mbox{\hyperlink{mlx5__cmd_8c_a77c91e1976108f5f1a58d9a90632f727}{01382}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a77c91e1976108f5f1a58d9a90632f727}{mlx5\_cmd\_exec\_cb\_handler}}(\textcolor{keywordtype}{int} status, \textcolor{keywordtype}{void} *\_work)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01383}01383 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01384}01384         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__async__work}{mlx5\_async\_work}} *\mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}} = \_work;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01385}01385         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__async__ctx}{mlx5\_async\_ctx}} *\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}} = \mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}}-\/>ctx;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01386}01386 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01387}01387         \mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}}-\/>user\_callback(status, \mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01388}01388         \textcolor{keywordflow}{if} (atomic\_dec\_and\_test(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>num\_inflight))}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01389}01389                 wake\_up(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>wait);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01390}01390 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01391}01391 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01392}\mbox{\hyperlink{driver_8h_a6d2246766967489ad01723ece03fc50b}{01392}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a6d2246766967489ad01723ece03fc50b}{mlx5\_cmd\_exec\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__async__ctx}{mlx5\_async\_ctx}} *\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}, \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{int} in\_size,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01393}01393                      \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size, \mbox{\hyperlink{driver_8h_aba176ecd1ee61fd20947b348ce9dca80}{mlx5\_async\_cbk\_t}} callback,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01394}01394                      \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__async__work}{mlx5\_async\_work}} *\mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01395}01395 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01396}01396         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01397}01397 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01398}01398         \mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}}-\/>ctx = \mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01399}01399         \mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}}-\/>user\_callback = callback;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01400}01400         \textcolor{keywordflow}{if} (WARN\_ON(!atomic\_inc\_not\_zero(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>num\_inflight)))}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01401}01401                 \textcolor{keywordflow}{return} -\/EIO;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01402}01402         ret = \mbox{\hyperlink{mlx5__cmd_8c_ac8580ce0d5847f54865534cf59511260}{cmd\_exec\_helper}}(\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>dev, in, in\_size, out, out\_size,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01403}01403                               \mbox{\hyperlink{mlx5__cmd_8c_a77c91e1976108f5f1a58d9a90632f727}{mlx5\_cmd\_exec\_cb\_handler}}, \mbox{\hyperlink{en__hw__tls_8h_a623997e11b94d7c467ce26627cc488a2}{work}}, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01404}01404         \textcolor{keywordflow}{if} (ret \&\& atomic\_dec\_and\_test(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>num\_inflight))}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01405}01405                 wake\_up(\&\mbox{\hyperlink{device_8h_a8d4d31e2784e411744d2776ed7a2fa32}{ctx}}-\/>wait);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01406}01406 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01407}01407         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01408}01408 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01409}\mbox{\hyperlink{mlx5__cmd_8c_a221046e1f992f81bc0e1f42748fe647a}{01409}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a6d2246766967489ad01723ece03fc50b}{mlx5\_cmd\_exec\_cb}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01410}01410 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01411}\mbox{\hyperlink{driver_8h_a8df5aa00f1c205031da9c037a78bd677}{01411}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a8df5aa00f1c205031da9c037a78bd677}{mlx5\_cmd\_exec\_polling}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *\mbox{\hyperlink{structmlx5__async__ctx_a8e34dac4f1126445e4494408fcc05e23}{dev}}, \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{int} in\_size,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01412}01412                           \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01413}01413 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01414}01414         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01415}01415 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01416}01416         err = \mbox{\hyperlink{mlx5__cmd_8c_ac8580ce0d5847f54865534cf59511260}{cmd\_exec\_helper}}(\mbox{\hyperlink{structmlx5__async__ctx_a8e34dac4f1126445e4494408fcc05e23}{dev}}, in, in\_size, out, out\_size, NULL, NULL, \textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01417}01417         \textcolor{keywordflow}{return} err ? : \mbox{\hyperlink{mlx5__cmd_8c_a0e2de27e06bbe4e019c78e74d5d7c8b9}{mlx5\_cmd\_check}}(\mbox{\hyperlink{structmlx5__async__ctx_a8e34dac4f1126445e4494408fcc05e23}{dev}}, in, out);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01418}01418 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01419}\mbox{\hyperlink{mlx5__cmd_8c_afbc99b7a02a70fa56c6aaf4f8d7dce1e}{01419}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a8df5aa00f1c205031da9c037a78bd677}{mlx5\_cmd\_exec\_polling}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01420}01420 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01421}\mbox{\hyperlink{mlx5__cmd_8c_afbb3605b8f82e8d479ed1c324fc3f6a9}{01421}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_afbb3605b8f82e8d479ed1c324fc3f6a9}{destroy\_msg\_cache}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *\mbox{\hyperlink{structmlx5__async__ctx_a8e34dac4f1126445e4494408fcc05e23}{dev}})}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01422}01422 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01423}01423         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01424}01424         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01425}01425         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *n;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01426}01426 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01427}01427         list\_for\_each\_entry\_safe(msg, n, \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a7dcd636b429077faddcf5c6e1bbf882f}{large}}.\mbox{\hyperlink{structcache__ent_ab2a813c312ad0dd96ea1f12d83b10c9a}{head}}, list) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01428}01428                 list\_del(\&msg-\/>list);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01429}01429                 \mbox{\hyperlink{mlx5__cmd_8c_a7105113b70ff1e22cf30ca6f622a94e5}{mlx5\_free\_cmd\_msg}}(dev, msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01430}01430         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01431}01431 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01432}01432         list\_for\_each\_entry\_safe(msg, n, \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a4bc9794f64617d5a457021a44c63ecee}{med}}.\mbox{\hyperlink{structcache__ent_ab2a813c312ad0dd96ea1f12d83b10c9a}{head}}, list) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01433}01433                 list\_del(\&msg-\/>list);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01434}01434                 \mbox{\hyperlink{mlx5__cmd_8c_a7105113b70ff1e22cf30ca6f622a94e5}{mlx5\_free\_cmd\_msg}}(dev, msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01435}01435         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01436}01436 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01437}01437 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01438}\mbox{\hyperlink{mlx5__cmd_8c_a1883c99ed7c69ae45e453fe4d898fab3}{01438}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a1883c99ed7c69ae45e453fe4d898fab3}{create\_msg\_cache}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01439}01439 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01440}01440         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01441}01441         \textcolor{keyword}{struct }\mbox{\hyperlink{driver_8h_a4b77fbcd5a6217e61a298cc8401ca5ff}{mlx5\_cmd\_msg}} *msg;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01442}01442         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01443}01443         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01444}01444 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01445}01445         spin\_lock\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a7dcd636b429077faddcf5c6e1bbf882f}{large}}.\mbox{\hyperlink{structcache__ent_ae7c5f9d9e1f39745fd32443ba70a0566}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01446}01446         INIT\_LIST\_HEAD(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a7dcd636b429077faddcf5c6e1bbf882f}{large}}.\mbox{\hyperlink{structcache__ent_ab2a813c312ad0dd96ea1f12d83b10c9a}{head}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01447}01447         spin\_lock\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a4bc9794f64617d5a457021a44c63ecee}{med}}.\mbox{\hyperlink{structcache__ent_ae7c5f9d9e1f39745fd32443ba70a0566}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01448}01448         INIT\_LIST\_HEAD(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a4bc9794f64617d5a457021a44c63ecee}{med}}.\mbox{\hyperlink{structcache__ent_ab2a813c312ad0dd96ea1f12d83b10c9a}{head}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01449}01449 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01450}01450         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a35367654f452528414c93acebe03341c}{NUM\_LONG\_LISTS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01451}01451                 msg = \mbox{\hyperlink{mlx5__cmd_8c_acc18975bdd3cc354472a30bcf92965bb}{mlx5\_alloc\_cmd\_msg}}(dev, GFP\_KERNEL, \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1af9c490dec5c300441d5a0481dcde357a}{LONG\_LIST\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01452}01452                 \textcolor{keywordflow}{if} (IS\_ERR(msg)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01453}01453                         err = PTR\_ERR(msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01454}01454                         \textcolor{keywordflow}{goto} ex\_err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01455}01455                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01456}01456                 msg-\/>cache = \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a7dcd636b429077faddcf5c6e1bbf882f}{large}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01457}01457                 list\_add\_tail(\&msg-\/>list, \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a7dcd636b429077faddcf5c6e1bbf882f}{large}}.\mbox{\hyperlink{structcache__ent_ab2a813c312ad0dd96ea1f12d83b10c9a}{head}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01458}01458         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01459}01459 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01460}01460         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a39dfe7963379a9f58c3202ab33105cef}{NUM\_MED\_LISTS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01461}01461                 msg = \mbox{\hyperlink{mlx5__cmd_8c_acc18975bdd3cc354472a30bcf92965bb}{mlx5\_alloc\_cmd\_msg}}(dev, GFP\_KERNEL, \mbox{\hyperlink{mlx5__cmd_8c_a29d44341ce767c5dfc737d622fc97ba1a224b9993c67b24b3c06e8dd98c0c0e34}{MED\_LIST\_SIZE}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01462}01462                 \textcolor{keywordflow}{if} (IS\_ERR(msg)) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01463}01463                         err = PTR\_ERR(msg);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01464}01464                         \textcolor{keywordflow}{goto} ex\_err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01465}01465                 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01466}01466                 msg-\/>cache = \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a4bc9794f64617d5a457021a44c63ecee}{med}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01467}01467                 list\_add\_tail(\&msg-\/>list, \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8f270b2948218a178627f0c2203edad2}{cache}}.\mbox{\hyperlink{structcmd__msg__cache_a4bc9794f64617d5a457021a44c63ecee}{med}}.\mbox{\hyperlink{structcache__ent_ab2a813c312ad0dd96ea1f12d83b10c9a}{head}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01468}01468         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01469}01469 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01470}01470         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01471}01471 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01472}01472 ex\_err:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01473}01473         \mbox{\hyperlink{mlx5__cmd_8c_afbb3605b8f82e8d479ed1c324fc3f6a9}{destroy\_msg\_cache}}(dev);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01474}01474         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01475}01475 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01476}01476 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01477}01477 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01478}\mbox{\hyperlink{mlx5__cmd_8c_ae8e0393af44919696670f48a9ac79825}{01478}} \mbox{\hyperlink{mlx5__cmd_8c_ae8e0393af44919696670f48a9ac79825}{alloc\_cmd\_page}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01479}01479 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01480}01480         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01481}01481 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01482}01482         sx\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8a33aee4164c7f19a8bc398bd9a7ebf4}{dma\_sx}}, \textcolor{stringliteral}{"{}MLX5-\/DMA-\/SX"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01483}01483         mtx\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_ab96e18bc2e7e1cad8cbd0c6636fb54ba}{dma\_mtx}}, \textcolor{stringliteral}{"{}MLX5-\/DMA-\/MTX"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01484}01484         cv\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a433d00bd96faad95ac84e0792d6dcea7}{dma\_cv}}, \textcolor{stringliteral}{"{}MLX5-\/DMA-\/CV"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01485}01485 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01486}01486         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01487}01487 \textcolor{comment}{         * Create global DMA descriptor tag for allocating}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01488}01488 \textcolor{comment}{         * 4K firmware pages:}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01489}01489 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01490}01490         err = -\/bus\_dma\_tag\_create(}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01491}01491             bus\_get\_dma\_tag(dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a0819dc9fa4983c9140507e1a02aa8313}{pdev}}-\/>dev.bsddev),}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01492}01492             \mbox{\hyperlink{device_8h_aae05225933a42f81e7c4a9fb286596f9aa5e1036a2088772037b27f5e8e0cd543}{MLX5\_ADAPTER\_PAGE\_SIZE}},       \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01493}01493             0,                          \textcolor{comment}{/* no boundary */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01494}01494             BUS\_SPACE\_MAXADDR,          \textcolor{comment}{/* lowaddr */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01495}01495             BUS\_SPACE\_MAXADDR,          \textcolor{comment}{/* highaddr */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01496}01496             NULL, NULL,                 \textcolor{comment}{/* filter, filterarg */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01497}01497             \mbox{\hyperlink{device_8h_aae05225933a42f81e7c4a9fb286596f9aa5e1036a2088772037b27f5e8e0cd543}{MLX5\_ADAPTER\_PAGE\_SIZE}},       \textcolor{comment}{/* maxsize */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01498}01498             1,                          \textcolor{comment}{/* nsegments */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01499}01499             \mbox{\hyperlink{device_8h_aae05225933a42f81e7c4a9fb286596f9aa5e1036a2088772037b27f5e8e0cd543}{MLX5\_ADAPTER\_PAGE\_SIZE}},       \textcolor{comment}{/* maxsegsize */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01500}01500             0,                          \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01501}01501             NULL, NULL,                 \textcolor{comment}{/* lockfunc, lockfuncarg */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01502}01502             \&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_ac692b7cd91efcadf4a24c304b79168df}{dma\_tag}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01503}01503         \textcolor{keywordflow}{if} (err != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01504}01504                 \textcolor{keywordflow}{goto} failure\_destroy\_sx;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01505}01505 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01506}01506         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_aa8696fb359a5170f23ff4ab9f35fc6e5}{cmd\_page}} = \mbox{\hyperlink{driver_8h_aba3a45299069d25866afbdb1ee5b4084}{mlx5\_fwp\_alloc}}(dev, GFP\_KERNEL, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01507}01507         \textcolor{keywordflow}{if} (cmd-\/>\mbox{\hyperlink{structmlx5__cmd_aa8696fb359a5170f23ff4ab9f35fc6e5}{cmd\_page}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01508}01508                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01509}01509                 \textcolor{keywordflow}{goto} failure\_alloc\_page;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01510}01510         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01511}01511         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a73ba37229e42fbdb461518b0e81ac504}{dma}} = \mbox{\hyperlink{driver_8h_a88503190bbecdabfe8e3c4086418b450}{mlx5\_fwp\_get\_dma}}(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_aa8696fb359a5170f23ff4ab9f35fc6e5}{cmd\_page}}, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01512}01512         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a632db1b3eefc8ed83e7f523b09d494e8}{cmd\_buf}} = \mbox{\hyperlink{driver_8h_a9b7a9a99381a8f5793a5363f4c59ac06}{mlx5\_fwp\_get\_virt}}(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_aa8696fb359a5170f23ff4ab9f35fc6e5}{cmd\_page}}, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01513}01513         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01514}01514 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01515}01515 failure\_alloc\_page:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01516}01516         bus\_dma\_tag\_destroy(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_ac692b7cd91efcadf4a24c304b79168df}{dma\_tag}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01517}01517 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01518}01518 failure\_destroy\_sx:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01519}01519         cv\_destroy(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a433d00bd96faad95ac84e0792d6dcea7}{dma\_cv}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01520}01520         mtx\_destroy(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_ab96e18bc2e7e1cad8cbd0c6636fb54ba}{dma\_mtx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01521}01521         sx\_destroy(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8a33aee4164c7f19a8bc398bd9a7ebf4}{dma\_sx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01522}01522         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01523}01523 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01524}01524 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01525}01525 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01526}\mbox{\hyperlink{mlx5__cmd_8c_a27300c72d7fb9b56dcef48baf03cf7d5}{01526}} \mbox{\hyperlink{mlx5__cmd_8c_a27300c72d7fb9b56dcef48baf03cf7d5}{free\_cmd\_page}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01527}01527 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01528}01528 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01529}01529         \mbox{\hyperlink{driver_8h_a6ac682d99ce23bb3e151f1c7579f6762}{mlx5\_fwp\_free}}(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_aa8696fb359a5170f23ff4ab9f35fc6e5}{cmd\_page}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01530}01530         bus\_dma\_tag\_destroy(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_ac692b7cd91efcadf4a24c304b79168df}{dma\_tag}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01531}01531         cv\_destroy(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a433d00bd96faad95ac84e0792d6dcea7}{dma\_cv}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01532}01532         mtx\_destroy(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_ab96e18bc2e7e1cad8cbd0c6636fb54ba}{dma\_mtx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01533}01533         sx\_destroy(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a8a33aee4164c7f19a8bc398bd9a7ebf4}{dma\_sx}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01534}01534 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01535}01535 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01536}\mbox{\hyperlink{driver_8h_a598c8a76daf602dd38aaa0368b085652}{01536}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a598c8a76daf602dd38aaa0368b085652}{mlx5\_cmd\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01537}01537 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01538}01538         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01539}01539         u32 cmd\_h, cmd\_l;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01540}01540         u16 cmd\_if\_rev;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01541}01541         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01542}01542         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01543}01543 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01544}01544         memset(cmd, 0, \textcolor{keyword}{sizeof}(*cmd));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01545}01545         cmd\_if\_rev = \mbox{\hyperlink{driver_8h_a0d31129753de82b3202aacf119d314a9}{cmdif\_rev\_get}}(dev);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01546}01546         \textcolor{keywordflow}{if} (cmd\_if\_rev != \mbox{\hyperlink{mlx5__cmd_8c_a7646ae03981912f97626c39dfe9318daabd273453f640ef7fe974b43f0b3a62c6}{CMD\_IF\_REV}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01547}01547                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01548}01548                     \textcolor{stringliteral}{"{}Driver cmdif rev(\%d) differs from firmware's(\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01549}01549                     \mbox{\hyperlink{mlx5__cmd_8c_a7646ae03981912f97626c39dfe9318daabd273453f640ef7fe974b43f0b3a62c6}{CMD\_IF\_REV}}, cmd\_if\_rev);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01550}01550                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01551}01551         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01552}01552 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01553}01553         err = \mbox{\hyperlink{mlx5__cmd_8c_ae8e0393af44919696670f48a9ac79825}{alloc\_cmd\_page}}(dev, cmd);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01554}01554         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01555}01555                 \textcolor{keywordflow}{goto} err\_free\_pool;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01556}01556 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01557}01557         cmd\_l = ioread32be(\&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_ac514aa4f9af277aed19346d52ec30073}{iseg}}-\/>\mbox{\hyperlink{structmlx5__init__seg_a8c35c24fece1cec005499105c85280a0}{cmdq\_addr\_l\_sz}}) \& 0xff;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01558}01558         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_acd571f746955adc3f0b8ed9329256f5a}{log\_sz}} = cmd\_l >> 4 \& 0xf;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01559}01559         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a69cba4436fee10bf5580e2e58b11e4dd}{log\_stride}} = cmd\_l \& 0xf;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01560}01560         \textcolor{keywordflow}{if} (1 << cmd-\/>\mbox{\hyperlink{structmlx5__cmd_acd571f746955adc3f0b8ed9329256f5a}{log\_sz}} > \mbox{\hyperlink{device_8h_ab04a0655cd1e3bcac5e8f48c18df1a57af952d4f5a4e4d304ec93ec02db80f128}{MLX5\_MAX\_COMMANDS}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01561}01561                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01562}01562                     \textcolor{stringliteral}{"{}firmware reports too many outstanding commands \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01563}01563                     1 << cmd-\/>\mbox{\hyperlink{structmlx5__cmd_acd571f746955adc3f0b8ed9329256f5a}{log\_sz}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01564}01564                 err = -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01565}01565                 \textcolor{keywordflow}{goto} err\_free\_page;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01566}01566         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01567}01567 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01568}01568         \textcolor{keywordflow}{if} (cmd-\/>\mbox{\hyperlink{structmlx5__cmd_acd571f746955adc3f0b8ed9329256f5a}{log\_sz}} + cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a69cba4436fee10bf5580e2e58b11e4dd}{log\_stride}} > \mbox{\hyperlink{device_8h_aae05225933a42f81e7c4a9fb286596f9aa4614720009368aaf55770e64acced36}{MLX5\_ADAPTER\_PAGE\_SHIFT}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01569}01569                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01570}01570                     \textcolor{stringliteral}{"{}command queue size overflow\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01571}01571                 err = -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01572}01572                 \textcolor{keywordflow}{goto} err\_free\_page;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01573}01573         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01574}01574 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01575}01575         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_ab026cdfd4c1a083703ad8984b9d21268}{checksum\_disabled}} = 1;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01576}01576         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a17723a8554f95a9f7d146d15563f0e01}{max\_reg\_cmds}} = (1 << cmd-\/>\mbox{\hyperlink{structmlx5__cmd_acd571f746955adc3f0b8ed9329256f5a}{log\_sz}}) -\/ 1;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01577}01577         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a96097dfffdddb66077547910297c09e4}{bitmask}} = (1 << cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a17723a8554f95a9f7d146d15563f0e01}{max\_reg\_cmds}}) -\/ 1;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01578}01578 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01579}01579         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a7d5f3ea46d45757c30fe491cec8d6384}{cmdif\_rev}} = ioread32be(\&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_ac514aa4f9af277aed19346d52ec30073}{iseg}}-\/>\mbox{\hyperlink{structmlx5__init__seg_acb326e4d44129191e5616eaa3c50949a}{cmdif\_rev\_fw\_sub}}) >> 16;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01580}01580         \textcolor{keywordflow}{if} (cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a7d5f3ea46d45757c30fe491cec8d6384}{cmdif\_rev}} > \mbox{\hyperlink{mlx5__cmd_8c_a7646ae03981912f97626c39dfe9318daabd273453f640ef7fe974b43f0b3a62c6}{CMD\_IF\_REV}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01581}01581                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01582}01582                     \textcolor{stringliteral}{"{}driver does not support command interface version. driver \%d, firmware \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01583}01583                     \mbox{\hyperlink{mlx5__cmd_8c_a7646ae03981912f97626c39dfe9318daabd273453f640ef7fe974b43f0b3a62c6}{CMD\_IF\_REV}}, cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a7d5f3ea46d45757c30fe491cec8d6384}{cmdif\_rev}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01584}01584                 err = -\/ENOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01585}01585                 \textcolor{keywordflow}{goto} err\_free\_page;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01586}01586         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01587}01587 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01588}01588         spin\_lock\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a897adc31400e41efaa87ba597d900b55}{alloc\_lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01589}01589         spin\_lock\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a077911ec9a0848dd85c0310f9bf6db01}{token\_lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01590}01590         \textcolor{keywordflow}{for} (i = 0; i < ARRAY\_SIZE(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_abfbac04246dfc0086dedea4873fb0f93}{stats}}); i++)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01591}01591                 spin\_lock\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_abfbac04246dfc0086dedea4873fb0f93}{stats}}[i].\mbox{\hyperlink{structmlx5__cmd__stats_a3d96afde059c5fa07be94f95476b14d6}{lock}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01592}01592 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01593}01593         sema\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a28955ec05505ec6136e6c8f4f74ce5ca}{sem}}, cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a17723a8554f95a9f7d146d15563f0e01}{max\_reg\_cmds}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01594}01594         sema\_init(\&cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a5c5a2eab0664218b417807dc3dc9abf0}{pages\_sem}}, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01595}01595 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01596}01596         cmd\_h = (u32)((u64)(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a73ba37229e42fbdb461518b0e81ac504}{dma}}) >> 32);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01597}01597         cmd\_l = (u32)(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a73ba37229e42fbdb461518b0e81ac504}{dma}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01598}01598         \textcolor{keywordflow}{if} (cmd\_l \& 0xfff) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01599}01599                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev, \textcolor{stringliteral}{"{}invalid command queue address\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01600}01600                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01601}01601                 \textcolor{keywordflow}{goto} err\_free\_page;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01602}01602         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01603}01603 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01604}01604         iowrite32be(cmd\_h, \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_ac514aa4f9af277aed19346d52ec30073}{iseg}}-\/>\mbox{\hyperlink{structmlx5__init__seg_a4e8f6033b8eadce9e515125bf78e8e55}{cmdq\_addr\_h}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01605}01605         iowrite32be(cmd\_l, \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_ac514aa4f9af277aed19346d52ec30073}{iseg}}-\/>\mbox{\hyperlink{structmlx5__init__seg_a8c35c24fece1cec005499105c85280a0}{cmdq\_addr\_l\_sz}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01606}01606 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01607}01607         \textcolor{comment}{/* Make sure firmware sees the complete address before we proceed */}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01608}01608         wmb();}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01609}01609 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01610}01610         \mbox{\hyperlink{mlx5__core_8h_abecf5f90e845f80efc57b10bd4c67c2b}{mlx5\_core\_dbg}}(dev, \textcolor{stringliteral}{"{}descriptor at dma 0x\%llx\(\backslash\)n"{}}, (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \textcolor{keywordtype}{long})(cmd-\/>\mbox{\hyperlink{structmlx5__cmd_a73ba37229e42fbdb461518b0e81ac504}{dma}}));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01611}01611 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01612}01612         cmd-\/>\mbox{\hyperlink{structmlx5__cmd_af2a362561b0fc7d2ba5c8cdc89b03a7d}{mode}} = \mbox{\hyperlink{driver_8h_ad014fa48a9a275224b12ac628757dbbaa77c7e41bd91dff9bc7cf2c617f4648d0}{MLX5\_CMD\_MODE\_POLLING}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01613}01613 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01614}01614         err = \mbox{\hyperlink{mlx5__cmd_8c_a1883c99ed7c69ae45e453fe4d898fab3}{create\_msg\_cache}}(dev);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01615}01615         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01616}01616                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev, \textcolor{stringliteral}{"{}failed to create command cache\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01617}01617                 \textcolor{keywordflow}{goto} err\_free\_page;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01618}01618         \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01619}01619         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01620}01620 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01621}01621 err\_free\_page:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01622}01622         \mbox{\hyperlink{mlx5__cmd_8c_a27300c72d7fb9b56dcef48baf03cf7d5}{free\_cmd\_page}}(dev, cmd);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01623}01623 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01624}01624 err\_free\_pool:}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01625}01625         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01626}01626 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01627}\mbox{\hyperlink{mlx5__cmd_8c_a6f2de661163b91fe8479c2be367d4832}{01627}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a598c8a76daf602dd38aaa0368b085652}{mlx5\_cmd\_init}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01628}01628 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01629}\mbox{\hyperlink{driver_8h_a0a0994afa4cdf022135d2225adb1a005}{01629}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__cmd_8c_a0a0994afa4cdf022135d2225adb1a005}{mlx5\_cmd\_cleanup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01630}01630 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01631}01631         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__cmd}{mlx5\_cmd}} *cmd = \&dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a050766fdae743cb5ba6952146bcaa436}{cmd}};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01632}01632 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01633}01633         \mbox{\hyperlink{mlx5__cmd_8c_ab7fa3a7e2bee7e41f520f14dbd6d8c6c}{clean\_debug\_files}}(dev);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01634}01634         flush\_workqueue(dev-\/>\mbox{\hyperlink{structmlx5__core__dev_a2642b287846069d077eec2d44e137703}{priv}}.\mbox{\hyperlink{structmlx5__priv_a56f7f55842c148cd02b5aa28703df66a}{health}}.\mbox{\hyperlink{structmlx5__core__health_aaafb4b00274478e67265067726291d8b}{wq\_cmd}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01635}01635         \mbox{\hyperlink{mlx5__cmd_8c_afbb3605b8f82e8d479ed1c324fc3f6a9}{destroy\_msg\_cache}}(dev);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01636}01636         \mbox{\hyperlink{mlx5__cmd_8c_a27300c72d7fb9b56dcef48baf03cf7d5}{free\_cmd\_page}}(dev, cmd);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01637}01637 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01638}\mbox{\hyperlink{mlx5__cmd_8c_a0a5a233a790819f76a101d29b1a1f8f2}{01638}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a0a0994afa4cdf022135d2225adb1a005}{mlx5\_cmd\_cleanup}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01639}01639 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01640}\mbox{\hyperlink{cmd_8h_a2e255068e243b2ef5e7ddf581fc5086b}{01640}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a2e255068e243b2ef5e7ddf581fc5086b}{mlx5\_cmd\_query\_cong\_counter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01641}01641                                 \textcolor{keywordtype}{bool} reset, \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01642}01642 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01643}01643         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_cong\_statistics\_in)] = \{ \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01644}01644 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01645}01645         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_statistics\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01646}01646                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a7e53ff99e9969af60b797174607b8808}{MLX5\_CMD\_OP\_QUERY\_CONG\_STATISTICS}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01647}01647         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_statistics\_in, in, clear, reset);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01648}01648         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__cmd_8c_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, out\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01649}01649 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01650}\mbox{\hyperlink{mlx5__cmd_8c_ac8b409d6335520ceee71919699c6f452}{01650}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a2e255068e243b2ef5e7ddf581fc5086b}{mlx5\_cmd\_query\_cong\_counter}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01651}01651 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01652}\mbox{\hyperlink{cmd_8h_af734fb6eb0458873104b95c86e9bc3c4}{01652}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_af734fb6eb0458873104b95c86e9bc3c4}{mlx5\_cmd\_query\_cong\_params}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} cong\_point,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01653}01653                                \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01654}01654 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01655}01655         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_cong\_params\_in)] = \{ \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01656}01656 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01657}01657         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_params\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01658}01658                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39af202c2cc7e24dc5536d056713f27df4a}{MLX5\_CMD\_OP\_QUERY\_CONG\_PARAMS}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01659}01659         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_params\_in, in, cong\_protocol, cong\_point);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01660}01660 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01661}01661         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__cmd_8c_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, out\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01662}01662 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01663}\mbox{\hyperlink{mlx5__cmd_8c_a8f42495eeeee17895feb83f0fee1162a}{01663}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_af734fb6eb0458873104b95c86e9bc3c4}{mlx5\_cmd\_query\_cong\_params}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01664}01664 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01665}\mbox{\hyperlink{cmd_8h_a103a910821caf79176e2450833929eba}{01665}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_aed64d625be00fd98239b32538cce4489}{mlx5\_cmd\_modify\_cong\_params}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01666}01666                                 \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{int} in\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01667}01667 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01668}01668         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(modify\_cong\_params\_out)] = \{ \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01669}01669 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01670}01670         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__cmd_8c_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, in\_size, out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01671}01671 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01672}\mbox{\hyperlink{mlx5__cmd_8c_a4421d01fa9afd01c74aae5281227e0f1}{01672}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_aed64d625be00fd98239b32538cce4489}{mlx5\_cmd\_modify\_cong\_params}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01673}01673 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01674}\mbox{\hyperlink{cmd_8h_a0421bf8053617fc662a7fb392902ded6}{01674}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a0421bf8053617fc662a7fb392902ded6}{mlx5\_cmd\_query\_cong\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} cong\_point,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01675}01675                                \textcolor{keywordtype}{int} prio, \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01676}01676 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01677}01677         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_cong\_status\_in)] = \{ \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01678}01678 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01679}01679         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_status\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01680}01680                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2d936010f51a9b59fc45f3bebc9ab493}{MLX5\_CMD\_OP\_QUERY\_CONG\_STATUS}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01681}01681         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_status\_in, in, priority, prio);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01682}01682         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_status\_in, in, cong\_protocol, cong\_point);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01683}01683 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01684}01684         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__cmd_8c_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, out\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01685}01685 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01686}\mbox{\hyperlink{mlx5__cmd_8c_a6f80b45fb02210c66ef1ca51b98b5e69}{01686}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a0421bf8053617fc662a7fb392902ded6}{mlx5\_cmd\_query\_cong\_status}});}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01687}01687 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01688}\mbox{\hyperlink{cmd_8h_a7ebfe1b73370cdd7f2e3e25227d385de}{01688}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__cmd_8c_a9728f65f95ee97ba8d53055ffcd3b23b}{mlx5\_cmd\_modify\_cong\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01689}01689                                 \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{int} in\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01690}01690 \{}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01691}01691         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(modify\_cong\_status\_out)] = \{ \};}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01692}01692 }
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01693}01693         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__cmd_8c_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, in\_size, out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01694}01694 \}}
\DoxyCodeLine{\Hypertarget{mlx5__cmd_8c_source_l01695}\mbox{\hyperlink{mlx5__cmd_8c_ac3a226e560fa78fda3dbbb66ac62b21d}{01695}} \mbox{\hyperlink{mlx5__cmd_8c_ab16558e530f5c45e8ea1145de1d0415e}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__cmd_8c_a9728f65f95ee97ba8d53055ffcd3b23b}{mlx5\_cmd\_modify\_cong\_status}});}

\end{DoxyCode}
