\hypertarget{mlx5__port_8c_source}{}\doxysection{mlx5\+\_\+port.\+c}
\label{mlx5__port_8c_source}\index{dev/mlx5/mlx5\_core/mlx5\_port.c@{dev/mlx5/mlx5\_core/mlx5\_port.c}}
\mbox{\hyperlink{mlx5__port_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2013-\/2018, Mellanox Technologies, Ltd.  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00004}00004 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00005}00005 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00006}00006 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00007}00007 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00008}00008 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00009}00009 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00011}00011 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00013}00013 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00014}00014 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00015}00015 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00016}00016 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00017}00017 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00018}00018 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00019}00019 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00020}00020 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00021}00021 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00022}00022 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00023}00023 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00024}00024 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00025}00025 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}opt\_rss.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}opt\_ratelimit.h"{}}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <linux/module.h>}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{port_8h}{dev/mlx5/port.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{mlx5__core_8h}{dev/mlx5/mlx5\_core/mlx5\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00035}\mbox{\hyperlink{driver_8h_a588ab969bb7070e2dc60df62da38c8fa}{00035}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{void} *data\_in,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00036}00036                          \textcolor{keywordtype}{int} size\_in, \textcolor{keywordtype}{void} *data\_out, \textcolor{keywordtype}{int} size\_out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00037}00037                          u16 reg\_num, \textcolor{keywordtype}{int} arg, \textcolor{keywordtype}{int} write)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00038}00038 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00039}00039         \textcolor{keywordtype}{int} outlen = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(access\_register\_out) + size\_out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00040}00040         \textcolor{keywordtype}{int} inlen = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(access\_register\_in) + size\_in;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00041}00041         \textcolor{keywordtype}{int} err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00042}00042         u32 *out = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00043}00043         u32 *in = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00044}00044         \textcolor{keywordtype}{void} *\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00045}00045 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00046}00046         in = \mbox{\hyperlink{driver_8h_af928b1985830513c1c81b095b31ad8a7}{mlx5\_vzalloc}}(inlen);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00047}00047         out = \mbox{\hyperlink{driver_8h_af928b1985830513c1c81b095b31ad8a7}{mlx5\_vzalloc}}(outlen);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00048}00048         \textcolor{keywordflow}{if} (!in || !out)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00049}00049                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00051}00051         \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}} = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(access\_register\_in, in, register\_data);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00052}00052         memcpy(\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}, data\_in, size\_in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00054}00054         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(access\_register\_in, in, opcode, \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a616069805f3723d24a4f2de066470148}{MLX5\_CMD\_OP\_ACCESS\_REG}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00055}00055         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(access\_register\_in, in, op\_mod, !write);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00056}00056         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(access\_register\_in, in, argument, arg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00057}00057         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(access\_register\_in, in, register\_id, reg\_num);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00059}00059         err = \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, inlen, out, outlen);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00060}00060         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00061}00061                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00062}00062         \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}} = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(access\_register\_out, out, register\_data);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00063}00063         memcpy(data\_out, \mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}, size\_out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00065}00065 out:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00066}00066         kvfree(out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00067}00067         kvfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00068}00068         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00069}00069 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00070}\mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{00070}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00072}\mbox{\hyperlink{mlx5__core_8h_a50b8ade218817982630735ac3d7c9dfc}{00072}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a50b8ade218817982630735ac3d7c9dfc}{mlx5\_query\_qcam\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u32 *qcam,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00073}00073                         u8 feature\_group, u8 access\_reg\_group)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00074}00074 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00075}00075         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qcam\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00076}00076         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(qcam\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00077}00077 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00078}00078         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qcam\_reg, in, feature\_group, feature\_group);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00079}00079         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qcam\_reg, in, access\_reg\_group, access\_reg\_group);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00081}00081         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, qcam, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda661baad6d0c23ebe57310330c31de50c}{MLX5\_REG\_QCAM}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00082}00082 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00083}\mbox{\hyperlink{mlx5__port_8c_a57df5a07ba0e2fcda6d695f3901205a6}{00083}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a50b8ade218817982630735ac3d7c9dfc}{mlx5\_query\_qcam\_reg}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00085}\mbox{\hyperlink{mlx5__core_8h_af2112cbf5091b075f972dc74a44ea1f7}{00085}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_af2112cbf5091b075f972dc74a44ea1f7}{mlx5\_query\_pcam\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u32 *pcam, u8 feature\_group,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00086}00086                         u8 access\_reg\_group)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00087}00087 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00088}00088         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pcam\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00089}00089         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pcam\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00091}00091         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pcam\_reg, in, feature\_group, feature\_group);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00092}00092         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pcam\_reg, in, access\_reg\_group, access\_reg\_group);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00094}00094         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, sz, pcam, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda4fc59d542dd2046747518606abffdfa3}{MLX5\_REG\_PCAM}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00095}00095 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00097}\mbox{\hyperlink{mlx5__core_8h_ab6e3ce703a11238d0b81e9b16e33fcbf}{00097}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a09eec2500cd72587529a1063460d07da}{mlx5\_query\_mcam\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u32 *mcam, u8 feature\_group,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00098}00098                         u8 access\_reg\_group)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00099}00099 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00100}00100         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(mcam\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00101}00101         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(mcam\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00103}00103         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mcam\_reg, in, feature\_group, feature\_group);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00104}00104         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mcam\_reg, in, access\_reg\_group, access\_reg\_group);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00106}00106         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, sz, mcam, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda11627a4c0cb8adaa4a4c61434eac3b34}{MLX5\_REG\_MCAM}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00107}00107 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00108}00108 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00109}\mbox{\hyperlink{structmlx5__reg__pcap}{00109}} \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__reg__pcap}{mlx5\_reg\_pcap}} \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00110}\mbox{\hyperlink{structmlx5__reg__pcap_a41b00b1ffcc3e817de2dd98ff044f871}{00110}}         u8                      \mbox{\hyperlink{structmlx5__reg__pcap_a41b00b1ffcc3e817de2dd98ff044f871}{rsvd0}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00111}\mbox{\hyperlink{structmlx5__reg__pcap_ad6779346b82d6be85801008db81ef701}{00111}}         u8                      \mbox{\hyperlink{structmlx5__reg__pcap_ad6779346b82d6be85801008db81ef701}{port\_num}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00112}\mbox{\hyperlink{structmlx5__reg__pcap_a02c3ab2dc3d506a19d0b03cdbdbf2ba9}{00112}}         u8                      \mbox{\hyperlink{structmlx5__reg__pcap_a02c3ab2dc3d506a19d0b03cdbdbf2ba9}{rsvd1}}[2];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00113}\mbox{\hyperlink{structmlx5__reg__pcap_add7c7f8820696cec843a195ccb7d4906}{00113}}         \_\_be32                  \mbox{\hyperlink{structmlx5__reg__pcap_add7c7f8820696cec843a195ccb7d4906}{caps\_127\_96}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00114}\mbox{\hyperlink{structmlx5__reg__pcap_a417e2d63e1e8700500e42a87b8885829}{00114}}         \_\_be32                  \mbox{\hyperlink{structmlx5__reg__pcap_a417e2d63e1e8700500e42a87b8885829}{caps\_95\_64}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00115}\mbox{\hyperlink{structmlx5__reg__pcap_a0631db9e9bcc591f55d34c2801828ee1}{00115}}         \_\_be32                  \mbox{\hyperlink{structmlx5__reg__pcap_a0631db9e9bcc591f55d34c2801828ee1}{caps\_63\_32}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00116}\mbox{\hyperlink{structmlx5__reg__pcap_abaf5d6c921a6fb8a03e1a1a3e588d758}{00116}}         \_\_be32                  \mbox{\hyperlink{structmlx5__reg__pcap_abaf5d6c921a6fb8a03e1a1a3e588d758}{caps\_31\_0}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00117}00117 \};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00119}00119 \textcolor{comment}{/* This function should be used after setting a port register only */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00120}\mbox{\hyperlink{driver_8h_ab3a7e9f68df8c7aaf1d9e25c13de644c}{00120}} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__port_8c_ab3a7e9f68df8c7aaf1d9e25c13de644c}{mlx5\_toggle\_port\_link}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00121}00121 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00122}00122         \textcolor{keyword}{enum} \mbox{\hyperlink{driver_8h_abbd4adaee2907713cb84574e971dbbbd}{mlx5\_port\_status}} ps;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00124}00124         \mbox{\hyperlink{mlx5__port_8c_ab0a0f0a0d6683482c1072fab351f72fc}{mlx5\_query\_port\_admin\_status}}(dev, \&ps);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00125}00125         \mbox{\hyperlink{mlx5__port_8c_af420caf0db7e1b8cbf69651fbe3d98d7}{mlx5\_set\_port\_status}}(dev, \mbox{\hyperlink{driver_8h_abbd4adaee2907713cb84574e971dbbbdad24a1b8170c333524f13d66b1e4560b5}{MLX5\_PORT\_DOWN}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00126}00126         \textcolor{keywordflow}{if} (ps == \mbox{\hyperlink{driver_8h_abbd4adaee2907713cb84574e971dbbbdaa0c48ce5457a008571fdac68671d5771}{MLX5\_PORT\_UP}})}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00127}00127                 \mbox{\hyperlink{mlx5__port_8c_af420caf0db7e1b8cbf69651fbe3d98d7}{mlx5\_set\_port\_status}}(dev, \mbox{\hyperlink{driver_8h_abbd4adaee2907713cb84574e971dbbbdaa0c48ce5457a008571fdac68671d5771}{MLX5\_PORT\_UP}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00128}00128 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00129}\mbox{\hyperlink{mlx5__port_8c_a1cbf406c5503d80b13ae321d03020a0b}{00129}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_ab3a7e9f68df8c7aaf1d9e25c13de644c}{mlx5\_toggle\_port\_link}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00131}\mbox{\hyperlink{mlx5__port_8c_aedb5a503f9312b510754fe363a99c27e}{00131}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_aedb5a503f9312b510754fe363a99c27e}{mlx5\_set\_port\_caps}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u8 port\_num, u32 caps)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00132}00132 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00133}00133         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__reg__pcap}{mlx5\_reg\_pcap}} in;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00134}00134         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5__reg__pcap}{mlx5\_reg\_pcap}} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00135}00135         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00137}00137         memset(\&in, 0, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00138}00138         in.\mbox{\hyperlink{structmlx5__reg__pcap_add7c7f8820696cec843a195ccb7d4906}{caps\_127\_96}} = cpu\_to\_be32(caps);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00139}00139         in.\mbox{\hyperlink{structmlx5__reg__pcap_ad6779346b82d6be85801008db81ef701}{port\_num}} = \mbox{\hyperlink{structmlx5__reg__pcap_ad6779346b82d6be85801008db81ef701}{port\_num}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00141}00141         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, \&in, \textcolor{keyword}{sizeof}(in), \&out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00142}00142                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdae6c0366fcccf76cfec22335c04000326}{MLX5\_REG\_PCAP}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00143}00143 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00144}00144         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00145}00145 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00146}\mbox{\hyperlink{mlx5__port_8c_a29c527ab4376d451ef80d46b7a72efa9}{00146}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_aedb5a503f9312b510754fe363a99c27e}{mlx5\_set\_port\_caps}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00148}\mbox{\hyperlink{mlx5__port_8c_a8f0cbf29a10097b179dd9e3a4df0b873}{00148}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a8f0cbf29a10097b179dd9e3a4df0b873}{mlx5\_query\_port\_ptys}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u32 *ptys,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00149}00149                          \textcolor{keywordtype}{int} ptys\_size, \textcolor{keywordtype}{int} proto\_mask, u8 local\_port)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00150}00150 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00151}00151         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00152}00152         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00154}00154         memset(in, 0, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00155}00155         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, local\_port, local\_port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00156}00156         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, proto\_mask, proto\_mask);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00158}00158         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), ptys,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00159}00159                                    ptys\_size, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdaf8ba1230df90ba7d06bfbfd81ac51b13}{MLX5\_REG\_PTYS}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00161}00161         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00162}00162 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00163}\mbox{\hyperlink{mlx5__port_8c_a894f7a5861f51fc78914c34b2158489c}{00163}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a8f0cbf29a10097b179dd9e3a4df0b873}{mlx5\_query\_port\_ptys}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00165}\mbox{\hyperlink{mlx5__port_8c_ad9607ac18934ee28ea596856e72b8895}{00165}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ad9607ac18934ee28ea596856e72b8895}{mlx5\_query\_port\_proto\_cap}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00166}00166                               u32 *proto\_cap, \textcolor{keywordtype}{int} proto\_mask)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00167}00167 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00168}00168         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00169}00169         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00171}00171         err = \mbox{\hyperlink{mlx5__port_8c_a8f0cbf29a10097b179dd9e3a4df0b873}{mlx5\_query\_port\_ptys}}(dev, out, \textcolor{keyword}{sizeof}(out), proto\_mask, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00172}00172         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00173}00173                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00175}00175         \textcolor{keywordflow}{if} (proto\_mask == \mbox{\hyperlink{driver_8h_aad393aa3e173d7f081ab4bbc6ba5027da33ce80cf37a3f11b79424cb8a8a7bc56}{MLX5\_PTYS\_EN}})}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00176}00176                 *proto\_cap = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, eth\_proto\_capability);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00177}00177         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00178}00178                 *proto\_cap = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, ib\_proto\_capability);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00180}00180         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00181}00181 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00182}\mbox{\hyperlink{mlx5__port_8c_a845e0a281b7d098eaefed396b8f6f09f}{00182}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_ad9607ac18934ee28ea596856e72b8895}{mlx5\_query\_port\_proto\_cap}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00184}\mbox{\hyperlink{mlx5__port_8c_abd68757fec6c356f065d94a476c28c65}{00184}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_abd68757fec6c356f065d94a476c28c65}{mlx5\_query\_port\_autoneg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} proto\_mask,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00185}00185                             u8 *an\_disable\_cap, u8 *an\_disable\_status)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00186}00186 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00187}00187         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00188}00188         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00190}00190         err = \mbox{\hyperlink{mlx5__port_8c_a8f0cbf29a10097b179dd9e3a4df0b873}{mlx5\_query\_port\_ptys}}(dev, out, \textcolor{keyword}{sizeof}(out), proto\_mask, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00191}00191         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00192}00192                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00194}00194         *an\_disable\_status = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, an\_disable\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00195}00195         *an\_disable\_cap = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, an\_disable\_cap);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00197}00197         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00198}00198 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00199}\mbox{\hyperlink{mlx5__port_8c_a14872591322b992e83074f4420d4a3c3}{00199}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_abd68757fec6c356f065d94a476c28c65}{mlx5\_query\_port\_autoneg}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00201}\mbox{\hyperlink{mlx5__port_8c_af40ba1470375da922437a2d42ec10701}{00201}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_af40ba1470375da922437a2d42ec10701}{mlx5\_set\_port\_autoneg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{bool} disable,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00202}00202                           u32 eth\_proto\_admin, \textcolor{keywordtype}{int} proto\_mask)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00203}00203 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00204}00204         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00205}00205         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00206}00206         u8 an\_disable\_cap;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00207}00207         u8 an\_disable\_status;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00208}00208         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00209}00209 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00210}00210         err = \mbox{\hyperlink{mlx5__port_8c_abd68757fec6c356f065d94a476c28c65}{mlx5\_query\_port\_autoneg}}(dev, proto\_mask, \&an\_disable\_cap,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00211}00211                                       \&an\_disable\_status);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00212}00212         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00213}00213                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00214}00214         \textcolor{keywordflow}{if} (!an\_disable\_cap)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00215}00215                 \textcolor{keywordflow}{return} -\/EPERM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00217}00217         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00218}00218         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, an\_disable\_admin, disable);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00219}00219         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, proto\_mask, proto\_mask);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00220}00220         \textcolor{keywordflow}{if} (proto\_mask == \mbox{\hyperlink{driver_8h_aad393aa3e173d7f081ab4bbc6ba5027da33ce80cf37a3f11b79424cb8a8a7bc56}{MLX5\_PTYS\_EN}})}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00221}00221                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, eth\_proto\_admin, eth\_proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00223}00223         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00224}00224                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdaf8ba1230df90ba7d06bfbfd81ac51b13}{MLX5\_REG\_PTYS}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00225}00225         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00226}00226 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00227}\mbox{\hyperlink{mlx5__port_8c_a4c6fe1a7fc3a46bcaa05d2b1ebb541d4}{00227}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_af40ba1470375da922437a2d42ec10701}{mlx5\_set\_port\_autoneg}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00229}\mbox{\hyperlink{mlx5__port_8c_aced7454cbd10f56a2415f76633bd9a47}{00229}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_aced7454cbd10f56a2415f76633bd9a47}{mlx5\_query\_port\_proto\_admin}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00230}00230                                 u32 *proto\_admin, \textcolor{keywordtype}{int} proto\_mask)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00231}00231 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00232}00232         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00233}00233         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00235}00235         err = \mbox{\hyperlink{mlx5__port_8c_a8f0cbf29a10097b179dd9e3a4df0b873}{mlx5\_query\_port\_ptys}}(dev, out, \textcolor{keyword}{sizeof}(out), proto\_mask, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00236}00236         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00237}00237                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00239}00239         \textcolor{keywordflow}{if} (proto\_mask == \mbox{\hyperlink{driver_8h_aad393aa3e173d7f081ab4bbc6ba5027da33ce80cf37a3f11b79424cb8a8a7bc56}{MLX5\_PTYS\_EN}})}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00240}00240                 *proto\_admin = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, eth\_proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00241}00241         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00242}00242                 *proto\_admin = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, ib\_proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00243}00243 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00244}00244         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00245}00245 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00246}\mbox{\hyperlink{mlx5__port_8c_a2e2c3282548354790be9fd3eaace0e83}{00246}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_aced7454cbd10f56a2415f76633bd9a47}{mlx5\_query\_port\_proto\_admin}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00248}\mbox{\hyperlink{mlx5__port_8c_ac03a740d947a2d92b1b677fe0830f8d4}{00248}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ac03a740d947a2d92b1b677fe0830f8d4}{mlx5\_query\_port\_eth\_proto\_oper}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00249}00249                                    u32 *proto\_oper, u8 local\_port)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00250}00250 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00251}00251         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00252}00252         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00254}00254         err = \mbox{\hyperlink{mlx5__port_8c_a8f0cbf29a10097b179dd9e3a4df0b873}{mlx5\_query\_port\_ptys}}(dev, out, \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_aad393aa3e173d7f081ab4bbc6ba5027da33ce80cf37a3f11b79424cb8a8a7bc56}{MLX5\_PTYS\_EN}},}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00255}00255                                    local\_port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00256}00256         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00257}00257                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00259}00259         *proto\_oper = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, eth\_proto\_oper);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00261}00261         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00262}00262 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00263}\mbox{\hyperlink{mlx5__port_8c_a3c2af679fa0271f4a969ecfa1495401c}{00263}} \mbox{\hyperlink{mlx5__port_8c_a3c2af679fa0271f4a969ecfa1495401c}{EXPORT\_SYMBOL}}(\mbox{\hyperlink{mlx5__port_8c_ac03a740d947a2d92b1b677fe0830f8d4}{mlx5\_query\_port\_eth\_proto\_oper}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00264}00264 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00265}\mbox{\hyperlink{mlx5__port_8c_a8e61837d509b7d0f854f031e69002249}{00265}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a8e61837d509b7d0f854f031e69002249}{mlx5\_set\_port\_proto}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u32 proto\_admin,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00266}00266                         \textcolor{keywordtype}{int} proto\_mask, \textcolor{keywordtype}{bool} ext)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00267}00267 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00268}00268         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00269}00269         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00270}00270         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00271}00271 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00272}00272         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00273}00273         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, proto\_mask, proto\_mask);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00274}00274         \textcolor{keywordflow}{if} (proto\_mask == \mbox{\hyperlink{driver_8h_aad393aa3e173d7f081ab4bbc6ba5027da33ce80cf37a3f11b79424cb8a8a7bc56}{MLX5\_PTYS\_EN}}) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00275}00275                 \textcolor{keywordflow}{if} (ext)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00276}00276                         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, ext\_eth\_proto\_admin, proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00277}00277                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00278}00278                         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, eth\_proto\_admin, proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00279}00279         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00280}00280                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, ib\_proto\_admin, proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00281}00281         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00282}00282 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00283}00283         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00284}00284                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdaf8ba1230df90ba7d06bfbfd81ac51b13}{MLX5\_REG\_PTYS}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00285}00285         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00286}00286 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00287}\mbox{\hyperlink{mlx5__port_8c_a71c1f1c071b174f74914a00a0a6219e4}{00287}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a8e61837d509b7d0f854f031e69002249}{mlx5\_set\_port\_proto}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00289}\mbox{\hyperlink{mlx5__port_8c_af420caf0db7e1b8cbf69651fbe3d98d7}{00289}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_af420caf0db7e1b8cbf69651fbe3d98d7}{mlx5\_set\_port\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00290}00290                          \textcolor{keyword}{enum} \mbox{\hyperlink{driver_8h_abbd4adaee2907713cb84574e971dbbbd}{mlx5\_port\_status}} status)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00291}00291 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00292}00292         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(paos\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00293}00293         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(paos\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00294}00294         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00295}00295 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00296}00296         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(paos\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00298}00298         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(paos\_reg, in, admin\_status, status);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00299}00299         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(paos\_reg, in, ase, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00301}00301         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00302}00302                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdae0c5385dd4a129f62c16c8996c30b709}{MLX5\_REG\_PAOS}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00303}00303         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00304}00304 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00306}\mbox{\hyperlink{mlx5__port_8c_a5a527984e12e519f8e4a436f3d4f0a7d}{00306}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a5a527984e12e519f8e4a436f3d4f0a7d}{mlx5\_query\_port\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u8 *status)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00307}00307 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00308}00308         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(paos\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00309}00309         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(paos\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00310}00310         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00311}00311 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00312}00312         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(paos\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00313}00313 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00314}00314         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00315}00315                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdae0c5385dd4a129f62c16c8996c30b709}{MLX5\_REG\_PAOS}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00316}00316         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00317}00317                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00318}00318 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00319}00319         *status = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(paos\_reg, out, oper\_status);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00320}00320         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00321}00321 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00323}\mbox{\hyperlink{mlx5__port_8c_ab0a0f0a0d6683482c1072fab351f72fc}{00323}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ab0a0f0a0d6683482c1072fab351f72fc}{mlx5\_query\_port\_admin\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00324}00324                                  \textcolor{keyword}{enum} \mbox{\hyperlink{driver_8h_abbd4adaee2907713cb84574e971dbbbd}{mlx5\_port\_status}} *status)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00325}00325 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00326}00326         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(paos\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00327}00327         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(paos\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00328}00328         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00329}00329 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00330}00330         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(paos\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00331}00331         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00332}00332                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdae0c5385dd4a129f62c16c8996c30b709}{MLX5\_REG\_PAOS}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00333}00333         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00334}00334                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00335}00335         *status = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(paos\_reg, out, admin\_status);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00336}00336         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00337}00337 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00338}\mbox{\hyperlink{mlx5__port_8c_a80e8d753bebdebfa23e1ca2bae9ea901}{00338}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_ab0a0f0a0d6683482c1072fab351f72fc}{mlx5\_query\_port\_admin\_status}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00340}\mbox{\hyperlink{mlx5__port_8c_ae001db5373f3c87a69c2e3c102549a50}{00340}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ae001db5373f3c87a69c2e3c102549a50}{mlx5\_query\_port\_mtu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00341}00341                                \textcolor{keywordtype}{int} *admin\_mtu, \textcolor{keywordtype}{int} *max\_mtu, \textcolor{keywordtype}{int} *oper\_mtu)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00342}00342 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00343}00343         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pmtu\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00344}00344         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pmtu\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00345}00345         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00347}00347         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pmtu\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00349}00349         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00350}00350                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdadbb91b1219d50ec106e716c8e380838e}{MLX5\_REG\_PMTU}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00351}00351         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00352}00352                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00353}00353 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00354}00354         \textcolor{keywordflow}{if} (max\_mtu)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00355}00355                 *max\_mtu  = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pmtu\_reg, out, max\_mtu);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00356}00356         \textcolor{keywordflow}{if} (oper\_mtu)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00357}00357                 *oper\_mtu = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pmtu\_reg, out, oper\_mtu);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00358}00358         \textcolor{keywordflow}{if} (admin\_mtu)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00359}00359                 *admin\_mtu = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pmtu\_reg, out, admin\_mtu);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00360}00360 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00361}00361         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00362}00362 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00363}00363 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00364}\mbox{\hyperlink{mlx5__port_8c_a678235a0bf7e8e0cb35e0ce8ee96c5c9}{00364}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a678235a0bf7e8e0cb35e0ce8ee96c5c9}{mlx5\_set\_port\_mtu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} mtu)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00365}00365 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00366}00366         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pmtu\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00367}00367         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pmtu\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00368}00368 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00369}00369         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pmtu\_reg, in, admin\_mtu, mtu);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00370}00370         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pmtu\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00372}00372         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00373}00373                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdadbb91b1219d50ec106e716c8e380838e}{MLX5\_REG\_PMTU}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00374}00374 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00375}\mbox{\hyperlink{mlx5__port_8c_aa8cbaf4331729a5fa1a988d5896dce69}{00375}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a678235a0bf7e8e0cb35e0ce8ee96c5c9}{mlx5\_set\_port\_mtu}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00377}\mbox{\hyperlink{mlx5__port_8c_a621c7ea77766c5fea50a28224084966a}{00377}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a621c7ea77766c5fea50a28224084966a}{mlx5\_query\_port\_max\_mtu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} *max\_mtu)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00378}00378 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00379}00379         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_ae001db5373f3c87a69c2e3c102549a50}{mlx5\_query\_port\_mtu}}(dev, NULL, max\_mtu, NULL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00380}00380 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00381}\mbox{\hyperlink{mlx5__port_8c_a7ee3185d525cdb6bdf0a50d97e96a97f}{00381}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a621c7ea77766c5fea50a28224084966a}{mlx5\_query\_port\_max\_mtu}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00382}00382 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00383}\mbox{\hyperlink{mlx5__port_8c_ae8bafa77713ec40473235db0e29b230f}{00383}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ae8bafa77713ec40473235db0e29b230f}{mlx5\_set\_port\_pause\_and\_pfc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u32 port,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00384}00384                                 u8 rx\_pause, u8 tx\_pause,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00385}00385                                 u8 pfc\_en\_rx, u8 pfc\_en\_tx)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00386}00386 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00387}00387         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pfcc\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00388}00388         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pfcc\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00390}00390         \textcolor{keywordflow}{if} (pfc\_en\_rx || pfc\_en\_tx) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00391}00391                 \textcolor{comment}{/* PFC and global pauseframes are incompatible features */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00392}00392                 \textcolor{keywordflow}{if} (tx\_pause || rx\_pause)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00393}00393                         \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00394}00394         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00395}00395 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00396}00396         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, local\_port, port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00397}00397         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, pptx, tx\_pause);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00398}00398         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, pprx, rx\_pause);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00399}00399         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, pfctx, pfc\_en\_tx);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00400}00400         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, pfcrx, pfc\_en\_rx);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00401}00401         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, prio\_mask\_tx, pfc\_en\_tx);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00402}00402         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, prio\_mask\_rx, pfc\_en\_rx);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00404}00404         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00405}00405                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda2e1387908de1ff141d4afe2e97835ac4}{MLX5\_REG\_PFCC}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00406}00406 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00408}\mbox{\hyperlink{mlx5__port_8c_a81bd9d53a4b98130eb63d2c5c357d1ea}{00408}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a81bd9d53a4b98130eb63d2c5c357d1ea}{mlx5\_query\_port\_pause}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u32 port,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00409}00409                           u32 *rx\_pause, u32 *tx\_pause)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00410}00410 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00411}00411         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pfcc\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00412}00412         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pfcc\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00413}00413         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00414}00414 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00415}00415         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, local\_port, port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00417}00417         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00418}00418                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda2e1387908de1ff141d4afe2e97835ac4}{MLX5\_REG\_PFCC}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00419}00419         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00420}00420                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00421}00421 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00422}00422         *rx\_pause = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pfcc\_reg, out, pprx);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00423}00423         *tx\_pause = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pfcc\_reg, out, pptx);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00425}00425         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00426}00426 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00427}00427 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00428}\mbox{\hyperlink{mlx5__port_8c_afda73217c985de0c61c6c3e32b1b3b06}{00428}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_afda73217c985de0c61c6c3e32b1b3b06}{mlx5\_query\_port\_pfc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u8 *pfc\_en\_tx, u8 *pfc\_en\_rx)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00429}00429 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00430}00430         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pfcc\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00431}00431         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pfcc\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00432}00432         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00433}00433 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00434}00434         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pfcc\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00435}00435         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00436}00436                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda2e1387908de1ff141d4afe2e97835ac4}{MLX5\_REG\_PFCC}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00437}00437         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00438}00438                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00440}00440         \textcolor{keywordflow}{if} (pfc\_en\_tx != NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00441}00441                 *pfc\_en\_tx = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pfcc\_reg, out, pfctx);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00442}00442         \textcolor{keywordflow}{if} (pfc\_en\_rx != NULL)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00443}00443                 *pfc\_en\_rx = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pfcc\_reg, out, pfcrx);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00444}00444         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00445}00445 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00446}\mbox{\hyperlink{mlx5__port_8c_a52cfb04b8a94c5b47582168b449e3640}{00446}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_afda73217c985de0c61c6c3e32b1b3b06}{mlx5\_query\_port\_pfc}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00447}00447 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00448}\mbox{\hyperlink{mlx5__port_8c_abac20c4d9ef517252456717d991413b0}{00448}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_abac20c4d9ef517252456717d991413b0}{mlx5\_query\_port\_oper\_mtu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} *oper\_mtu)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00449}00449 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00450}00450         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_ae001db5373f3c87a69c2e3c102549a50}{mlx5\_query\_port\_mtu}}(dev, NULL, NULL, oper\_mtu);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00451}00451 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00452}\mbox{\hyperlink{mlx5__port_8c_a32b81ebceda60cff60d4a7370362ffe9}{00452}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_abac20c4d9ef517252456717d991413b0}{mlx5\_query\_port\_oper\_mtu}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00454}\mbox{\hyperlink{driver_8h_aa5769fc35d48240bd4da4be66fbeace0}{00454}} u8 \mbox{\hyperlink{mlx5__port_8c_aa5769fc35d48240bd4da4be66fbeace0}{mlx5\_is\_wol\_supported}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00455}00455 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00456}00456         u8 wol\_supported = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00457}00457 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00458}00458         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(dev, wol\_s))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00459}00459                 wol\_supported |= \mbox{\hyperlink{driver_8h_ae33c78feb670de33d2abf21ec0624531a75a44f820af62581eda761444e4f54ee}{MLX5\_WOL\_SECURED\_MAGIC}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00460}00460         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(dev, wol\_g))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00461}00461                 wol\_supported |= \mbox{\hyperlink{driver_8h_ae33c78feb670de33d2abf21ec0624531a4d2c7c9d2e26cd7c8ab7794d22bd9a18}{MLX5\_WOL\_MAGIC}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00462}00462         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(dev, wol\_a))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00463}00463                 wol\_supported |= \mbox{\hyperlink{driver_8h_ae33c78feb670de33d2abf21ec0624531a844c4dcc14982a8dbeb7bae067f7b5a7}{MLX5\_WOL\_ARP}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00464}00464         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(dev, wol\_b))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00465}00465                 wol\_supported |= \mbox{\hyperlink{driver_8h_ae33c78feb670de33d2abf21ec0624531a14030806e373ec11f294fc0c16491156}{MLX5\_WOL\_BROADCAST}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00466}00466         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(dev, wol\_m))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00467}00467                 wol\_supported |= \mbox{\hyperlink{driver_8h_ae33c78feb670de33d2abf21ec0624531add000f62d31ac75ab34ceb0712c09c18}{MLX5\_WOL\_MULTICAST}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00468}00468         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(dev, wol\_u))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00469}00469                 wol\_supported |= \mbox{\hyperlink{driver_8h_ae33c78feb670de33d2abf21ec0624531af31485a09a7d8461593657755a19c250}{MLX5\_WOL\_UNICAST}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00470}00470         \textcolor{keywordflow}{if} (\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(dev, wol\_p))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00471}00471                 wol\_supported |= \mbox{\hyperlink{driver_8h_ae33c78feb670de33d2abf21ec0624531a1367a4e23c924b2aa8fa5c0574c1f182}{MLX5\_WOL\_PHY\_ACTIVITY}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00473}00473         \textcolor{keywordflow}{return} wol\_supported;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00474}00474 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00475}\mbox{\hyperlink{mlx5__port_8c_a06e57a5eec1fcf1cc6b87ac52f75349d}{00475}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_aa5769fc35d48240bd4da4be66fbeace0}{mlx5\_is\_wol\_supported}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00476}00476 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00477}\mbox{\hyperlink{driver_8h_a0500c03124e21491718637c608ed5b47}{00477}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a0500c03124e21491718637c608ed5b47}{mlx5\_set\_wol}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u8 wol\_mode)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00478}00478 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00479}00479         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(set\_wol\_rol\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00480}00480         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(set\_wol\_rol\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00481}00481 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00482}00482         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(set\_wol\_rol\_in, in, opcode, \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a31bddebe1293274184f329219169f467}{MLX5\_CMD\_OP\_SET\_WOL\_ROL}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00483}00483         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(set\_wol\_rol\_in, in, wol\_mode\_valid, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00484}00484         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(set\_wol\_rol\_in, in, wol\_mode, wol\_mode);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00486}00486         \textcolor{keywordflow}{return} \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00487}00487 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00488}\mbox{\hyperlink{mlx5__port_8c_af191ec23e963bf8b95575d72ff4b8081}{00488}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a0500c03124e21491718637c608ed5b47}{mlx5\_set\_wol}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00489}00489 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00490}\mbox{\hyperlink{driver_8h_a24093f581ec0a964e6de46ac48d15caf}{00490}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a24093f581ec0a964e6de46ac48d15caf}{mlx5\_query\_dropless\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u16 *timeout)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00491}00491 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00492}00492         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_delay\_drop\_params\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00493}00493         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_delay\_drop\_params\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00494}00494         \textcolor{keywordtype}{int} err = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00495}00495 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00496}00496         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_delay\_drop\_params\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00497}00497                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a0adbc3e6a941bf8fc91accdd8fc959b8}{MLX5\_CMD\_OP\_QUERY\_DELAY\_DROP\_PARAMS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00498}00498 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00499}00499         err = \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00500}00500         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00501}00501                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00502}00502 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00503}00503         *timeout = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(query\_delay\_drop\_params\_out, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00504}00504                             delay\_drop\_timeout);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00506}00506         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00507}00507 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00508}\mbox{\hyperlink{mlx5__port_8c_adc2c0d304ce61541e3f6680e8484118f}{00508}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a24093f581ec0a964e6de46ac48d15caf}{mlx5\_query\_dropless\_mode}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00509}00509 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00510}\mbox{\hyperlink{driver_8h_a3eaec1b2228fe89521a73833c77d7f81}{00510}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a3eaec1b2228fe89521a73833c77d7f81}{mlx5\_set\_dropless\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u16 timeout)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00511}00511 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00512}00512         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(set\_delay\_drop\_params\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00513}00513         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(set\_delay\_drop\_params\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00514}00514 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00515}00515         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(set\_delay\_drop\_params\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00516}00516                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39af54d04c8c70d410e547db3d6c5ed463d}{MLX5\_CMD\_OP\_SET\_DELAY\_DROP\_PARAMS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00517}00517         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(set\_delay\_drop\_params\_in, in, delay\_drop\_timeout, timeout);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00518}00518 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00519}00519         \textcolor{keywordflow}{return} \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00520}00520 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00521}\mbox{\hyperlink{mlx5__port_8c_ab6f378c260c5aef4bf778505c8308506}{00521}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a3eaec1b2228fe89521a73833c77d7f81}{mlx5\_set\_dropless\_mode}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00522}00522 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00523}\mbox{\hyperlink{driver_8h_afdde4fabcf6d4cb43114de9b198b341d}{00523}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_afdde4fabcf6d4cb43114de9b198b341d}{mlx5\_core\_access\_pvlc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00524}00524                           \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__pvlc__reg}{mlx5\_pvlc\_reg}} *pvlc, \textcolor{keywordtype}{int} write)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00525}00525 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00526}00526         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pvlc\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00527}00527         u8 in[\mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pvlc\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00528}00528         u8 out[\mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pvlc\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00529}00529         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00531}00531         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pvlc\_reg, in, local\_port, pvlc-\/>\mbox{\hyperlink{structmlx5__pvlc__reg_a1071705e7b08b8bd8aeeaf02689bee15}{local\_port}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00532}00532         \textcolor{keywordflow}{if} (write)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00533}00533                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pvlc\_reg, in, vl\_admin, pvlc-\/>\mbox{\hyperlink{structmlx5__pvlc__reg_af9dca0f109a8b19ba9ddab90c11222d8}{vl\_admin}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00534}00534 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00535}00535         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda66edb2967a4d84eed4044f169f9e0067}{MLX5\_REG\_PVLC}}, 0,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00536}00536                                    !!write);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00537}00537         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00538}00538                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00540}00540         \textcolor{keywordflow}{if} (!write) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00541}00541                 pvlc-\/>\mbox{\hyperlink{structmlx5__pvlc__reg_a1071705e7b08b8bd8aeeaf02689bee15}{local\_port}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pvlc\_reg, out, local\_port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00542}00542                 pvlc-\/>\mbox{\hyperlink{structmlx5__pvlc__reg_abf5b0f43f1e6f04ff3487a2a68c4493c}{vl\_hw\_cap}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pvlc\_reg, out, vl\_hw\_cap);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00543}00543                 pvlc-\/>\mbox{\hyperlink{structmlx5__pvlc__reg_af9dca0f109a8b19ba9ddab90c11222d8}{vl\_admin}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pvlc\_reg, out, vl\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00544}00544                 pvlc-\/>\mbox{\hyperlink{structmlx5__pvlc__reg_a13be1f815b9419444b7c480ca05d9ff0}{vl\_operational}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pvlc\_reg, out, vl\_operational);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00545}00545         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00546}00546 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00547}00547         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00548}00548 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00549}\mbox{\hyperlink{mlx5__port_8c_ad63c95a432c5a4de41f5e07df0d8dfa3}{00549}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_afdde4fabcf6d4cb43114de9b198b341d}{mlx5\_core\_access\_pvlc}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00550}00550 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00551}\mbox{\hyperlink{driver_8h_aaf6341e9edb4b643a9dc3a78347bae73}{00551}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_aaf6341e9edb4b643a9dc3a78347bae73}{mlx5\_core\_access\_ptys}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00552}00552                           \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__ptys__reg}{mlx5\_ptys\_reg}} *ptys, \textcolor{keywordtype}{int} write)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00553}00553 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00554}00554         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(ptys\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00555}00555         \textcolor{keywordtype}{void} *out = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00556}00556         \textcolor{keywordtype}{void} *in = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00557}00557         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00558}00558 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00559}00559         in = \mbox{\hyperlink{driver_8h_af928b1985830513c1c81b095b31ad8a7}{mlx5\_vzalloc}}(sz);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00560}00560         \textcolor{keywordflow}{if} (!in)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00561}00561                 \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00562}00562 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00563}00563         out = \mbox{\hyperlink{driver_8h_af928b1985830513c1c81b095b31ad8a7}{mlx5\_vzalloc}}(sz);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00564}00564         \textcolor{keywordflow}{if} (!out) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00565}00565                 kfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00566}00566                 \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00567}00567         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00569}00569         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, local\_port, ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_afcc131e3565366339a1ec11f338dbab3}{local\_port}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00570}00570         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, proto\_mask, ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_a390b0fa01561bf62a80d7d7ef0eef799}{proto\_mask}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00571}00571         \textcolor{keywordflow}{if} (write) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00572}00572                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, eth\_proto\_capability,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00573}00573                          ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_ae0934890392ea463cc230624c91c1125}{eth\_proto\_cap}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00574}00574                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, ib\_link\_width\_capability,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00575}00575                          ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_aac156f3cad762763264276c693105946}{ib\_link\_width\_cap}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00576}00576                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, ib\_proto\_capability,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00577}00577                          ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_a8628e4e068bdf58e4ddd5d33475bbf9d}{ib\_proto\_cap}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00578}00578                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, eth\_proto\_admin, ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_a608388b68a38e2adfc17f2922d718373}{eth\_proto\_admin}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00579}00579                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, ib\_link\_width\_admin,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00580}00580                          ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_ad9dc462fdbe7a765784fea0353fecee7}{ib\_link\_width\_admin}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00581}00581                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, ib\_proto\_admin, ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_ab07443b7508c8eb21fa3653f31ecdbfe}{ib\_proto\_admin}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00582}00582                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, eth\_proto\_oper, ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_adc262eb455c1c6cfdbb4085922f00d93}{eth\_proto\_oper}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00583}00583                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, ib\_link\_width\_oper,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00584}00584                          ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_adba5b107fbae64cf3bbc0be550e38665}{ib\_link\_width\_oper}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00585}00585                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, ib\_proto\_oper, ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_a7578dcc02a36d8c60f06d68c3da2114d}{ib\_proto\_oper}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00586}00586                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ptys\_reg, in, eth\_proto\_lp\_advertise,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00587}00587                          ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_aa384d618f3b031d8cde935e48340582a}{eth\_proto\_lp\_advertise}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00588}00588         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00589}00589 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00590}00590         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdaf8ba1230df90ba7d06bfbfd81ac51b13}{MLX5\_REG\_PTYS}}, 0,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00591}00591                                    !!write);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00592}00592         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00593}00593                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00595}00595         \textcolor{keywordflow}{if} (!write) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00596}00596                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_afcc131e3565366339a1ec11f338dbab3}{local\_port}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, local\_port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00597}00597                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_a390b0fa01561bf62a80d7d7ef0eef799}{proto\_mask}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, proto\_mask);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00598}00598                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_ae0934890392ea463cc230624c91c1125}{eth\_proto\_cap}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00599}00599                                                eth\_proto\_capability);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00600}00600                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_aac156f3cad762763264276c693105946}{ib\_link\_width\_cap}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00601}00601                                            ib\_link\_width\_capability);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00602}00602                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_a8628e4e068bdf58e4ddd5d33475bbf9d}{ib\_proto\_cap}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00603}00603                                               ib\_proto\_capability);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00604}00604                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_a608388b68a38e2adfc17f2922d718373}{eth\_proto\_admin}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00605}00605                                                  eth\_proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00606}00606                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_ad9dc462fdbe7a765784fea0353fecee7}{ib\_link\_width\_admin}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00607}00607                                                      ib\_link\_width\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00608}00608                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_ab07443b7508c8eb21fa3653f31ecdbfe}{ib\_proto\_admin}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, ib\_proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00609}00609                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_adc262eb455c1c6cfdbb4085922f00d93}{eth\_proto\_oper}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, eth\_proto\_oper);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00610}00610                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_adba5b107fbae64cf3bbc0be550e38665}{ib\_link\_width\_oper}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00611}00611                                                     ib\_link\_width\_oper);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00612}00612                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_a7578dcc02a36d8c60f06d68c3da2114d}{ib\_proto\_oper}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out, ib\_proto\_oper);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00613}00613                 ptys-\/>\mbox{\hyperlink{structmlx5__ptys__reg_aa384d618f3b031d8cde935e48340582a}{eth\_proto\_lp\_advertise}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ptys\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00614}00614                                                         eth\_proto\_lp\_advertise);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00615}00615         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00616}00616 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00617}00617 out:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00618}00618         kvfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00619}00619         kvfree(out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00620}00620         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00621}00621 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00622}\mbox{\hyperlink{mlx5__port_8c_ae37be8d50dfc00c77b302d7c3e646bdf}{00622}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_aaf6341e9edb4b643a9dc3a78347bae73}{mlx5\_core\_access\_ptys}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00623}00623 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00624}\mbox{\hyperlink{mlx5__port_8c_a5d734690900cf84024e1f35c7973d405}{00624}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a5d734690900cf84024e1f35c7973d405}{mtu\_to\_ib\_mtu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} mtu)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00625}00625 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00626}00626         \textcolor{keywordflow}{switch} (mtu) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00627}00627         \textcolor{keywordflow}{case} 256: \textcolor{keywordflow}{return} 1;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00628}00628         \textcolor{keywordflow}{case} 512: \textcolor{keywordflow}{return} 2;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00629}00629         \textcolor{keywordflow}{case} 1024: \textcolor{keywordflow}{return} 3;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00630}00630         \textcolor{keywordflow}{case} 2048: \textcolor{keywordflow}{return} 4;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00631}00631         \textcolor{keywordflow}{case} 4096: \textcolor{keywordflow}{return} 5;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00632}00632         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00633}00633                 \mbox{\hyperlink{mlx5__core_8h_ac024f7b881a7d4965ecc662bc4be81ca}{mlx5\_core\_warn}}(dev, \textcolor{stringliteral}{"{}invalid mtu\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00634}00634                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00635}00635         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00636}00636 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00637}00637 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00638}\mbox{\hyperlink{driver_8h_a0caa23cc00d4e168071ff6341ae49604}{00638}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a0caa23cc00d4e168071ff6341ae49604}{mlx5\_core\_access\_pmtu}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00639}00639                           \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__pmtu__reg}{mlx5\_pmtu\_reg}} *pmtu, \textcolor{keywordtype}{int} write)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00640}00640 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00641}00641         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pmtu\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00642}00642         \textcolor{keywordtype}{void} *out = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00643}00643         \textcolor{keywordtype}{void} *in = NULL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00644}00644         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00646}00646         in = \mbox{\hyperlink{driver_8h_af928b1985830513c1c81b095b31ad8a7}{mlx5\_vzalloc}}(sz);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00647}00647         \textcolor{keywordflow}{if} (!in)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00648}00648                 \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00649}00649 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00650}00650         out = \mbox{\hyperlink{driver_8h_af928b1985830513c1c81b095b31ad8a7}{mlx5\_vzalloc}}(sz);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00651}00651         \textcolor{keywordflow}{if} (!out) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00652}00652                 kfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00653}00653                 \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00654}00654         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00655}00655 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00656}00656         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pmtu\_reg, in, local\_port, pmtu-\/>\mbox{\hyperlink{structmlx5__pmtu__reg_a3780cd6f9c89d2acfad75ee5821d1bff}{local\_port}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00657}00657         \textcolor{keywordflow}{if} (write)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00658}00658                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pmtu\_reg, in, admin\_mtu, pmtu-\/>\mbox{\hyperlink{structmlx5__pmtu__reg_a52b9e26e1388308ed7a940f85d282562}{admin\_mtu}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00659}00659 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00660}00660         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdadbb91b1219d50ec106e716c8e380838e}{MLX5\_REG\_PMTU}}, 0,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00661}00661                                    !!write);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00662}00662         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00663}00663                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00664}00664 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00665}00665         \textcolor{keywordflow}{if} (!write) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00666}00666                 pmtu-\/>\mbox{\hyperlink{structmlx5__pmtu__reg_a3780cd6f9c89d2acfad75ee5821d1bff}{local\_port}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pmtu\_reg, out, local\_port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00667}00667                 pmtu-\/>\mbox{\hyperlink{structmlx5__pmtu__reg_a42fbfa0b4f093d690347b2e6920edc3d}{max\_mtu}} = \mbox{\hyperlink{mlx5__port_8c_a5d734690900cf84024e1f35c7973d405}{mtu\_to\_ib\_mtu}}(dev, \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pmtu\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00668}00668                                                        max\_mtu));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00669}00669                 pmtu-\/>\mbox{\hyperlink{structmlx5__pmtu__reg_a52b9e26e1388308ed7a940f85d282562}{admin\_mtu}} = \mbox{\hyperlink{mlx5__port_8c_a5d734690900cf84024e1f35c7973d405}{mtu\_to\_ib\_mtu}}(dev, \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pmtu\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00670}00670                                                          admin\_mtu));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00671}00671                 pmtu-\/>\mbox{\hyperlink{structmlx5__pmtu__reg_a5adeb749f23d0a959c38354de8525d53}{oper\_mtu}} = \mbox{\hyperlink{mlx5__port_8c_a5d734690900cf84024e1f35c7973d405}{mtu\_to\_ib\_mtu}}(dev, \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pmtu\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00672}00672                                                         oper\_mtu));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00673}00673         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00674}00674 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00675}00675 out:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00676}00676         kvfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00677}00677         kvfree(out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00678}00678         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00679}00679 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00680}\mbox{\hyperlink{mlx5__port_8c_a610ac90d45c8b649b2f43860b75c0e98}{00680}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a0caa23cc00d4e168071ff6341ae49604}{mlx5\_core\_access\_pmtu}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00681}00681 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00682}\mbox{\hyperlink{mlx5__port_8c_a79915817bf848b70fa91e71a4890a669}{00682}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a79915817bf848b70fa91e71a4890a669}{mlx5\_query\_module\_num}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, \textcolor{keywordtype}{int} *module\_num)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00683}00683 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00684}00684         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pmlp\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00685}00685         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pmlp\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00686}00686         \textcolor{keywordtype}{int} lane = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00687}00687         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00688}00688 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00689}00689         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pmlp\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00690}00690 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00691}00691         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00692}00692                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda392cfb8a0cf05211bfd5bd47a5725566}{MLX5\_REG\_PMLP}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00693}00693         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00694}00694                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00695}00695 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00696}00696         lane = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pmlp\_reg, out, lane0\_module\_mapping);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00697}00697         *module\_num = lane \& \mbox{\hyperlink{port_8h_a3edc193814e752262519230aad591114}{MLX5\_EEPROM\_IDENTIFIER\_BYTE\_MASK}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00698}00698 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00699}00699         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00700}00700 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00701}\mbox{\hyperlink{mlx5__port_8c_a06878aab4baf79c85dff25a15615735e}{00701}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a79915817bf848b70fa91e71a4890a669}{mlx5\_query\_module\_num}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00702}00702 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00703}\mbox{\hyperlink{mlx5__port_8c_a68b553361f112504e6c7e0b875e2feff}{00703}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a68b553361f112504e6c7e0b875e2feff}{mlx5\_query\_eeprom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00704}00704                       \textcolor{keywordtype}{int} i2c\_addr, \textcolor{keywordtype}{int} page\_num, \textcolor{keywordtype}{int} device\_addr,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00705}00705                       \textcolor{keywordtype}{int} size, \textcolor{keywordtype}{int} module\_num, u32 *\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}, \textcolor{keywordtype}{int} *size\_read)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00706}00706 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00707}00707         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(mcia\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00708}00708         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(mcia\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00709}00709         u32 *ptr = (u32 *)\mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(mcia\_reg, out, dword\_0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00710}00710         \textcolor{keywordtype}{int} status;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00711}00711         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00712}00712 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00713}00713         size = min\_t(\textcolor{keywordtype}{int}, size, \mbox{\hyperlink{port_8h_a4213659d88d030b66859ba2233ca5e5b}{MLX5\_EEPROM\_MAX\_BYTES}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00714}00714 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00715}00715         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mcia\_reg, in, l, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00716}00716         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mcia\_reg, in, module, module\_num);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00717}00717         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mcia\_reg, in, i2c\_device\_address, i2c\_addr);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00718}00718         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mcia\_reg, in, page\_number, page\_num);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00719}00719         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mcia\_reg, in, device\_address, device\_addr);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00720}00720         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mcia\_reg, in, size, size);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00721}00721 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00722}00722         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(dev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00723}00723                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda142e4cf28d200c7de7679b5d278a66f0}{MLX5\_REG\_MCIA}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00724}00724         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00725}00725                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00726}00726 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00727}00727         status = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mcia\_reg, out, status);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00728}00728         \textcolor{keywordflow}{if} (status)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00729}00729                 \textcolor{keywordflow}{return} status;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00730}00730 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00731}00731         memcpy(\mbox{\hyperlink{mlx5__en__tx_8c_af943c26117683b64b9cd6943e2c496e5}{data}}, ptr, size);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00732}00732         *size\_read = size;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00733}00733         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00734}00734 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00735}\mbox{\hyperlink{mlx5__port_8c_ae3e768515c385b65edb9253dde88b815}{00735}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a68b553361f112504e6c7e0b875e2feff}{mlx5\_query\_eeprom}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00736}00736 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00737}\mbox{\hyperlink{driver_8h_abe0618b565e0309fb16f8cda19739702}{00737}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_abe0618b565e0309fb16f8cda19739702}{mlx5\_vxlan\_udp\_port\_add}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u16 port)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00738}00738 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00739}00739         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(add\_vxlan\_udp\_dport\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00740}00740         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(add\_vxlan\_udp\_dport\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00741}00741         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00742}00742 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00743}00743         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(add\_vxlan\_udp\_dport\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00744}00744                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a95d00a01f678391b19bb4b4b0aaff31b}{MLX5\_CMD\_OP\_ADD\_VXLAN\_UDP\_DPORT}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00745}00745         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(add\_vxlan\_udp\_dport\_in, in, vxlan\_udp\_port, port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00746}00746 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00747}00747         err = \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00748}00748         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00749}00749                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev, \textcolor{stringliteral}{"{}Failed \%s, port \%u, err -\/ \%d"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00750}00750                               \mbox{\hyperlink{driver_8h_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(\mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a95d00a01f678391b19bb4b4b0aaff31b}{MLX5\_CMD\_OP\_ADD\_VXLAN\_UDP\_DPORT}}),}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00751}00751                               port, err);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00752}00752         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00753}00753 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00754}00754         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00755}00755 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00756}00756 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00757}\mbox{\hyperlink{driver_8h_a937bee6341de9d04883f260ad7e8709d}{00757}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a937bee6341de9d04883f260ad7e8709d}{mlx5\_vxlan\_udp\_port\_delete}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u16 port)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00758}00758 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00759}00759         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(delete\_vxlan\_udp\_dport\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00760}00760         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(delete\_vxlan\_udp\_dport\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00761}00761         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00763}00763         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(delete\_vxlan\_udp\_dport\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00764}00764                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1a646c18cfb9e382cdcf849dadb1a96f}{MLX5\_CMD\_OP\_DELETE\_VXLAN\_UDP\_DPORT}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00765}00765         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(delete\_vxlan\_udp\_dport\_in, in, vxlan\_udp\_port, port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00766}00766 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00767}00767         err = \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00768}00768         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00769}00769                 \mbox{\hyperlink{mlx5__core_8h_aeead4611cdbd6dbc272371c77201a6a5}{mlx5\_core\_err}}(dev, \textcolor{stringliteral}{"{}Failed \%s, port \%u, err -\/ \%d"{}},}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00770}00770                               \mbox{\hyperlink{driver_8h_adabffbb2b458257640a76aa8cfd265cd}{mlx5\_command\_str}}(\mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a1a646c18cfb9e382cdcf849dadb1a96f}{MLX5\_CMD\_OP\_DELETE\_VXLAN\_UDP\_DPORT}}),}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00771}00771                               port, err);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00772}00772         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00773}00773 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00774}00774         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00775}00775 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00776}00776 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00777}\mbox{\hyperlink{driver_8h_ab8d4516670a06390dce7f05f84146ee7}{00777}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ab8d4516670a06390dce7f05f84146ee7}{mlx5\_query\_wol}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u8 *wol\_mode)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00778}00778 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00779}00779         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_wol\_rol\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00780}00780         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_wol\_rol\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00781}00781         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00782}00782 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00783}00783         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_wol\_rol\_in, in, opcode, \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a3083c09ff7dbcc4b019bbeca9f930959}{MLX5\_CMD\_OP\_QUERY\_WOL\_ROL}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00784}00784 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00785}00785         err = \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(dev, in, \textcolor{keyword}{sizeof}(in), out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00786}00786 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00787}00787         \textcolor{keywordflow}{if} (!err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00788}00788                 *wol\_mode = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(query\_wol\_rol\_out, out, wol\_mode);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00789}00789 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00790}00790         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00791}00791 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00792}\mbox{\hyperlink{mlx5__port_8c_a3210e5b3945f45ce5cf9db4d9d980222}{00792}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_ab8d4516670a06390dce7f05f84146ee7}{mlx5\_query\_wol}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00793}00793 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00794}\mbox{\hyperlink{driver_8h_a42b776e2ece7d18b07f73c05ce2ceb95}{00794}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a42b776e2ece7d18b07f73c05ce2ceb95}{mlx5\_query\_port\_cong\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keywordtype}{int} protocol,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00795}00795                                 \textcolor{keywordtype}{int} priority, \textcolor{keywordtype}{int} *is\_enable)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00796}00796 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00797}00797         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_cong\_status\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00798}00798         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_cong\_status\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00799}00799         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00800}00800 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00801}00801         *is\_enable = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00802}00802 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00803}00803         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_status\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00804}00804                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a2d936010f51a9b59fc45f3bebc9ab493}{MLX5\_CMD\_OP\_QUERY\_CONG\_STATUS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00805}00805         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_status\_in, in, cong\_protocol, protocol);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00806}00806         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_status\_in, in, priority, priority);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00807}00807 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00808}00808         err = \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(mdev, in, \textcolor{keyword}{sizeof}(in), out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00809}00809         \textcolor{keywordflow}{if} (!err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00810}00810                 *is\_enable = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(query\_cong\_status\_out, out, enable);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00811}00811         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00812}00812 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00813}00813 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00814}\mbox{\hyperlink{driver_8h_a2c748bbc61f9e1c2a16e1217ffba1d54}{00814}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a2c748bbc61f9e1c2a16e1217ffba1d54}{mlx5\_modify\_port\_cong\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keywordtype}{int} protocol,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00815}00815                                  \textcolor{keywordtype}{int} priority, \textcolor{keywordtype}{int} enable)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00816}00816 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00817}00817         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(modify\_cong\_status\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00818}00818         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(modify\_cong\_status\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00819}00819 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00820}00820         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(modify\_cong\_status\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00821}00821                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ab5f275ca129c733bccd688818f611304}{MLX5\_CMD\_OP\_MODIFY\_CONG\_STATUS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00822}00822         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(modify\_cong\_status\_in, in, cong\_protocol, protocol);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00823}00823         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(modify\_cong\_status\_in, in, priority, priority);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00824}00824         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(modify\_cong\_status\_in, in, enable, enable);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00826}00826         \textcolor{keywordflow}{return} \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(mdev, in, \textcolor{keyword}{sizeof}(in), out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00827}00827 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00828}00828 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00829}\mbox{\hyperlink{driver_8h_a57cfdc485d1761b3978dce749a4a7582}{00829}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a57cfdc485d1761b3978dce749a4a7582}{mlx5\_query\_port\_cong\_params}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keywordtype}{int} protocol,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00830}00830                                 \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00831}00831 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00832}00832         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_cong\_params\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00833}00833 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00834}00834         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_params\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00835}00835                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39af202c2cc7e24dc5536d056713f27df4a}{MLX5\_CMD\_OP\_QUERY\_CONG\_PARAMS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00836}00836         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_params\_in, in, cong\_protocol, protocol);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00837}00837 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00838}00838         \textcolor{keywordflow}{return} \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(mdev, in, \textcolor{keyword}{sizeof}(in), out, out\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00839}00839 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00840}00840 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00841}\mbox{\hyperlink{mlx5__port_8c_a6498db7a28bbd7104621f5432599d0af}{00841}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a6498db7a28bbd7104621f5432599d0af}{mlx5\_query\_port\_qetcr\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u32 *out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00842}00842                                      \textcolor{keywordtype}{int} outlen)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00843}00843 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00844}00844         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qetc\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00845}00845 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00846}00846         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, ets))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00847}00847                 \textcolor{keywordflow}{return} -\/ENOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00848}00848 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00849}00849         memset(in, 0, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00850}00850         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in), out, outlen,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00851}00851                                     \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda4b592a8b785c6f68e9150b65e6d7dd9c}{MLX5\_REG\_QETCR}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00852}00852 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00853}00853 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00854}\mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{00854}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00855}00855 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00856}00856         u8 num\_tc = \mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, max\_tc) ? : 8;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00857}00857 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00858}00858         \textcolor{keywordflow}{return} num\_tc -\/ 1;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00859}00859 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00860}\mbox{\hyperlink{mlx5__port_8c_ae0f27213f69f186770d614fe7d964d04}{00860}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00862}\mbox{\hyperlink{mlx5__port_8c_a4fd7b9a42b17ccb08ed6c0d29bc2c0de}{00862}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a4fd7b9a42b17ccb08ed6c0d29bc2c0de}{mlx5\_set\_port\_qetcr\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u32 *in,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00863}00863                                    \textcolor{keywordtype}{int} inlen)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00864}00864 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00865}00865         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qetc\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00866}00866 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00867}00867         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_ab4698570d3992612e8c6ccf9fde798c3}{MLX5\_CAP\_GEN}}(mdev, ets))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00868}00868                 \textcolor{keywordflow}{return} -\/ENOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00869}00869 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00870}00870         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, inlen, out, \textcolor{keyword}{sizeof}(out),}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00871}00871                                     \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda4b592a8b785c6f68e9150b65e6d7dd9c}{MLX5\_REG\_QETCR}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00872}00872 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00873}00873 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00874}\mbox{\hyperlink{mlx5__port_8c_a1e9dd0d7320c408a211ca9040488a41d}{00874}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a1e9dd0d7320c408a211ca9040488a41d}{mlx5\_query\_port\_tc\_rate\_limit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00875}00875                                    u8 *max\_bw\_value,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00876}00876                                    u8 *max\_bw\_units)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00877}00877 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00878}00878         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qetc\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00879}00879         \textcolor{keywordtype}{void} *ets\_tcn\_conf;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00880}00880         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00881}00881         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00882}00882 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00883}00883         err = \mbox{\hyperlink{mlx5__port_8c_a6498db7a28bbd7104621f5432599d0af}{mlx5\_query\_port\_qetcr\_reg}}(mdev, out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00884}00884         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00885}00885                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00886}00886 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00887}00887         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00888}00888                 ets\_tcn\_conf = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(qetc\_reg, out, tc\_configuration[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00889}00889 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00890}00890                 max\_bw\_value[i] = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ets\_tcn\_config\_reg, ets\_tcn\_conf,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00891}00891                                            max\_bw\_value);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00892}00892                 max\_bw\_units[i] = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ets\_tcn\_config\_reg, ets\_tcn\_conf,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00893}00893                                            max\_bw\_units);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00894}00894         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00895}00895 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00896}00896         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00897}00897 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00898}\mbox{\hyperlink{mlx5__port_8c_a94391c44c7679a813e0c4a1c05b51ba6}{00898}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a1e9dd0d7320c408a211ca9040488a41d}{mlx5\_query\_port\_tc\_rate\_limit}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00899}00899 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00900}\mbox{\hyperlink{mlx5__port_8c_aec4e85f531e077cf816101a0026ad225}{00900}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_aec4e85f531e077cf816101a0026ad225}{mlx5\_modify\_port\_tc\_rate\_limit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00901}00901                                    \textcolor{keyword}{const} u8 *max\_bw\_value,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00902}00902                                    \textcolor{keyword}{const} u8 *max\_bw\_units)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00903}00903 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00904}00904         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qetc\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00905}00905         \textcolor{keywordtype}{void} *ets\_tcn\_conf;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00906}00906         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00907}00907 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00908}00908         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qetc\_reg, in, port\_number, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00909}00909 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00910}00910         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00911}00911                 ets\_tcn\_conf = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(qetc\_reg, in, tc\_configuration[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00912}00912 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00913}00913                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ets\_tcn\_config\_reg, ets\_tcn\_conf, r, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00914}00914                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ets\_tcn\_config\_reg, ets\_tcn\_conf, max\_bw\_units,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00915}00915                          max\_bw\_units[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00916}00916                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(ets\_tcn\_config\_reg, ets\_tcn\_conf, max\_bw\_value,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00917}00917                          max\_bw\_value[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00918}00918         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00919}00919 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00920}00920         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a4fd7b9a42b17ccb08ed6c0d29bc2c0de}{mlx5\_set\_port\_qetcr\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00921}00921 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00922}\mbox{\hyperlink{mlx5__port_8c_a264c8c45705883b0da2a172efb6d576b}{00922}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_aec4e85f531e077cf816101a0026ad225}{mlx5\_modify\_port\_tc\_rate\_limit}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00923}00923 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00924}\mbox{\hyperlink{mlx5__port_8c_ae0dd290d698ec73c31e72788ac917eec}{00924}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ae0dd290d698ec73c31e72788ac917eec}{mlx5\_query\_port\_prio\_tc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00925}00925                             u8 prio, u8 *\mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}})}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00926}00926 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00927}00927         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qtct\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00928}00928         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qtct\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00929}00929         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00930}00930 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00931}00931         memset(in, 0, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00932}00932         memset(out, 0, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00933}00933 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00934}00934         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qtct\_reg, in, port\_number, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00935}00935         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qtct\_reg, in, prio, prio);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00936}00936 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00937}00937         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00938}00938                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdacc38ed0172603bb0a270d3b4a2e65fcd}{MLX5\_REG\_QTCT}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00939}00939         \textcolor{keywordflow}{if} (!err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00940}00940                 *\mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}} = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(qtct\_reg, out, tclass);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00941}00941 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00942}00942         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00943}00943 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00944}\mbox{\hyperlink{mlx5__port_8c_a9d357f6b75398a6aa3a64bd7ca0cd231}{00944}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_ae0dd290d698ec73c31e72788ac917eec}{mlx5\_query\_port\_prio\_tc}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00945}00945 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00946}\mbox{\hyperlink{mlx5__port_8c_a0a52893d89d21c33052292f05e2d3618}{00946}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a0a52893d89d21c33052292f05e2d3618}{mlx5\_set\_port\_prio\_tc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keywordtype}{int} prio\_index,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00947}00947                           \textcolor{keyword}{const} u8 prio\_tc)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00948}00948 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00949}00949         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qtct\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00950}00950         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qtct\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00951}00951         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00952}00952 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00953}00953         \textcolor{keywordflow}{if} (prio\_tc > \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00954}00954                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00955}00955 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00956}00956         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qtct\_reg, in, prio, prio\_index);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00957}00957         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qtct\_reg, in, tclass, prio\_tc);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00958}00958 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00959}00959         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00960}00960                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdacc38ed0172603bb0a270d3b4a2e65fcd}{MLX5\_REG\_QTCT}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00962}00962         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00963}00963 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00964}\mbox{\hyperlink{mlx5__port_8c_a7dd8f8aa711c9560c3646d910d073d3d}{00964}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a0a52893d89d21c33052292f05e2d3618}{mlx5\_set\_port\_prio\_tc}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00965}00965 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00966}\mbox{\hyperlink{mlx5__port_8c_a1824b2318af707b6146d7c431e305694}{00966}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a1824b2318af707b6146d7c431e305694}{mlx5\_set\_port\_tc\_group}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keyword}{const} u8 *tc\_group)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00967}00967 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00968}00968         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qetc\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00969}00969         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00971}00971         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00972}00972                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qetc\_reg, in, tc\_configuration[i].g, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00973}00973                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qetc\_reg, in, tc\_configuration[i].group, tc\_group[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00974}00974         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00975}00975 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00976}00976         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a4fd7b9a42b17ccb08ed6c0d29bc2c0de}{mlx5\_set\_port\_qetcr\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00977}00977 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00978}\mbox{\hyperlink{mlx5__port_8c_a2fe382987d98ce7c2796d7c7f61c3c85}{00978}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a1824b2318af707b6146d7c431e305694}{mlx5\_set\_port\_tc\_group}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00979}00979 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00980}\mbox{\hyperlink{mlx5__port_8c_a5bc1d6be45b568bf44747236844b8959}{00980}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a5bc1d6be45b568bf44747236844b8959}{mlx5\_query\_port\_tc\_group}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00981}00981                              u8 \mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}}, u8 *tc\_group)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00982}00982 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00983}00983         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qetc\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00984}00984         \textcolor{keywordtype}{void} *ets\_tcn\_conf;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00985}00985         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00986}00986 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00987}00987         err = \mbox{\hyperlink{mlx5__port_8c_a6498db7a28bbd7104621f5432599d0af}{mlx5\_query\_port\_qetcr\_reg}}(mdev, out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00988}00988         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00989}00989                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00990}00990 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00991}00991         ets\_tcn\_conf = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(qetc\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00992}00992                                     tc\_configuration[\mbox{\hyperlink{en_8h_a0cea5104d05c6d3949115ddd0eed432e}{tc}}]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00993}00993 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00994}00994         *tc\_group = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ets\_tcn\_config\_reg, ets\_tcn\_conf,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00995}00995                              group);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00996}00996 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00997}00997         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00998}00998 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l00999}\mbox{\hyperlink{mlx5__port_8c_a960c657f0f0d319c14b3a99fe2886684}{00999}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a5bc1d6be45b568bf44747236844b8959}{mlx5\_query\_port\_tc\_group}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01000}01000 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01001}\mbox{\hyperlink{mlx5__port_8c_a1f21911cbbc6a806d4f165efd6711de1}{01001}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a1f21911cbbc6a806d4f165efd6711de1}{mlx5\_set\_port\_tc\_bw\_alloc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keyword}{const} u8 *tc\_bw)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01002}01002 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01003}01003         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qetc\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01004}01004         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01005}01005 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01006}01006         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01007}01007                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qetc\_reg, in, tc\_configuration[i].b, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01008}01008                 \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qetc\_reg, in, tc\_configuration[i].bw\_allocation, tc\_bw[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01009}01009         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01010}01010 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01011}01011         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a4fd7b9a42b17ccb08ed6c0d29bc2c0de}{mlx5\_set\_port\_qetcr\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01012}01012 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01013}\mbox{\hyperlink{mlx5__port_8c_a70d6edcde3dac71eb985b06ec53955f4}{01013}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a1f21911cbbc6a806d4f165efd6711de1}{mlx5\_set\_port\_tc\_bw\_alloc}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01014}01014 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01015}\mbox{\hyperlink{mlx5__port_8c_a3bff739bb1d26721baac627ba595236e}{01015}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a3bff739bb1d26721baac627ba595236e}{mlx5\_query\_port\_tc\_bw\_alloc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 *bw\_pct)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01016}01016 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01017}01017         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qetc\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01018}01018         \textcolor{keywordtype}{void} *ets\_tcn\_conf;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01019}01019         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01020}01020         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01021}01021 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01022}01022         err = \mbox{\hyperlink{mlx5__port_8c_a6498db7a28bbd7104621f5432599d0af}{mlx5\_query\_port\_qetcr\_reg}}(mdev, out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01023}01023         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01024}01024                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01025}01025 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01026}01026         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{mlx5__port_8c_a8eea1a4b68e68fda00f586588c09f045}{mlx5\_max\_tc}}(mdev); i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01027}01027                 ets\_tcn\_conf = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(qetc\_reg, out, tc\_configuration[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01028}01028                 bw\_pct[i] = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(ets\_tcn\_config\_reg, ets\_tcn\_conf, bw\_allocation);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01029}01029         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01030}01030         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01031}01031 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01032}\mbox{\hyperlink{mlx5__port_8c_a1cc7816636612018bc1d987c4ca3939e}{01032}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a3bff739bb1d26721baac627ba595236e}{mlx5\_query\_port\_tc\_bw\_alloc}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01033}01033 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01034}\mbox{\hyperlink{driver_8h_a7fd9708647bfc0a48bc12ce79baf2ef4}{01034}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a7fd9708647bfc0a48bc12ce79baf2ef4}{mlx5\_modify\_port\_cong\_params}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01035}01035                                  \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{int} in\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01036}01036 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01037}01037         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(modify\_cong\_params\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01038}01038 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01039}01039         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(modify\_cong\_params\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01040}01040                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ac4ca2e5fe0225094cdaa033cb0c2cc33}{MLX5\_CMD\_OP\_MODIFY\_CONG\_PARAMS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01041}01041 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01042}01042         \textcolor{keywordflow}{return} \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(mdev, in, in\_size, out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01043}01043 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01044}01044 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01045}\mbox{\hyperlink{driver_8h_a8a26b14a2aefedd2dc70cf5d0f30feb9}{01045}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a8a26b14a2aefedd2dc70cf5d0f30feb9}{mlx5\_query\_port\_cong\_statistics}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keywordtype}{int} clear,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01046}01046                                     \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01047}01047 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01048}01048         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_cong\_statistics\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01049}01049 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01050}01050         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_statistics\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01051}01051                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a7e53ff99e9969af60b797174607b8808}{MLX5\_CMD\_OP\_QUERY\_CONG\_STATISTICS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01052}01052         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_cong\_statistics\_in, in, clear, clear);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01054}01054         \textcolor{keywordflow}{return} \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(mdev, in, \textcolor{keyword}{sizeof}(in), out, out\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01055}01055 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01056}01056 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01057}\mbox{\hyperlink{driver_8h_a9c524c6d3bce42c90eb4ff2d4297455b}{01057}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a9c524c6d3bce42c90eb4ff2d4297455b}{mlx5\_set\_diagnostic\_params}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keywordtype}{void} *in,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01058}01058                                \textcolor{keywordtype}{int} in\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01059}01059 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01060}01060         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(set\_diagnostic\_params\_out)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01061}01061 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01062}01062         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(set\_diagnostic\_params\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01063}01063                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39a42f93e32d74baa5a2239d956210e3dd9}{MLX5\_CMD\_OP\_SET\_DIAGNOSTICS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01064}01064 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01065}01065         \textcolor{keywordflow}{return} \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(mdev, in, in\_size, out, \textcolor{keyword}{sizeof}(out));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01066}01066 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01067}01067 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01068}\mbox{\hyperlink{driver_8h_a0e73dc5444d1ef37219430959be09460}{01068}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a0e73dc5444d1ef37219430959be09460}{mlx5\_query\_diagnostic\_counters}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01069}01069                                    u8 num\_of\_samples, u16 sample\_index,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01070}01070                                    \textcolor{keywordtype}{void} *out, \textcolor{keywordtype}{int} out\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01071}01071 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01072}01072         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(query\_diagnostic\_counters\_in)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01073}01073 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01074}01074         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_diagnostic\_counters\_in, in, opcode,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01075}01075                  \mbox{\hyperlink{mlx5__ifc_8h_a871a83db4e53fc6c6872b5ac7cc94f39ad566074f82663c7ce0f2d840915a3529}{MLX5\_CMD\_OP\_QUERY\_DIAGNOSTICS}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01076}01076         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_diagnostic\_counters\_in, in, num\_of\_samples,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01077}01077                  num\_of\_samples);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01078}01078         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(query\_diagnostic\_counters\_in, in, sample\_index, sample\_index);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01079}01079 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01080}01080         \textcolor{keywordflow}{return} \mbox{\hyperlink{driver_8h_ad7393e74938540251a0c894eb1eae135}{mlx5\_cmd\_exec}}(mdev, in, \textcolor{keyword}{sizeof}(in), out, out\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01081}01081 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01082}01082 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01083}\mbox{\hyperlink{mlx5__port_8c_a7c22c110dca7d84adcdaade920784192}{01083}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a7c22c110dca7d84adcdaade920784192}{mlx5\_set\_trust\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 trust\_state)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01084}01084 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01085}01085         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qpts\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01086}01086         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qpts\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01087}01087         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01088}01088 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01089}01089         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpts\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01090}01090         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpts\_reg, in, trust\_state, trust\_state);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01091}01091 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01092}01092         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01093}01093                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdabeee61300af17ed08c30e5c5f67e4591}{MLX5\_REG\_QPTS}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01094}01094         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01095}01095 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01096}01096 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01097}\mbox{\hyperlink{mlx5__port_8c_afcaee87f88eaa778d725f66812f561ba}{01097}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_afcaee87f88eaa778d725f66812f561ba}{mlx5\_query\_trust\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 *trust\_state)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01098}01098 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01099}01099         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qpts\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01100}01100         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(qpts\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01101}01101         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01102}01102 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01103}01103         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpts\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01104}01104 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01105}01105         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in), out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01106}01106                                    \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdabeee61300af17ed08c30e5c5f67e4591}{MLX5\_REG\_QPTS}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01107}01107         \textcolor{keywordflow}{if} (!err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01108}01108                 *trust\_state = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(qpts\_reg, out, trust\_state);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01109}01109 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01110}01110         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01111}01111 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01112}01112 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01113}\mbox{\hyperlink{mlx5__port_8c_a97c245e50598b16dcb43cb32cbc37423}{01113}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a97c245e50598b16dcb43cb32cbc37423}{mlx5\_set\_dscp2prio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keyword}{const} u8 *dscp2prio)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01114}01114 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01115}01115         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(qpdpm\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01116}01116         \textcolor{keywordtype}{void} *qpdpm\_dscp;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01117}01117         \textcolor{keywordtype}{void} *out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01118}01118         \textcolor{keywordtype}{void} *in;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01119}01119         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01120}01120         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01121}01121 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01122}01122         in = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01123}01123         out = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01124}01124         \textcolor{keywordflow}{if} (!in || !out) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01125}01125                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01126}01126                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01127}01127         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01128}01128 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01129}01129         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpdpm\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01130}01130         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdaa921cf077cbf27fea4000754f0a1b9e0}{MLX5\_REG\_QPDPM}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01131}01131         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01132}01132                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01133}01133 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01134}01134         memcpy(in, out, sz);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01135}01135         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpdpm\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01136}01136 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01137}01137         \textcolor{comment}{/* Update the corresponding dscp entry */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01138}01138         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{port_8h_a9d7d601613ffc05172f7291dad601a60}{MLX5\_MAX\_SUPPORTED\_DSCP}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01139}01139                 qpdpm\_dscp = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(qpdpm\_reg, in, dscp[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01140}01140                 \mbox{\hyperlink{device_8h_adb32c3e00b9d0daa833c349a91768d1f}{MLX5\_SET16}}(qpdpm\_dscp\_reg, qpdpm\_dscp, prio, dscp2prio[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01141}01141                 \mbox{\hyperlink{device_8h_adb32c3e00b9d0daa833c349a91768d1f}{MLX5\_SET16}}(qpdpm\_dscp\_reg, qpdpm\_dscp, e, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01142}01142         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01143}01143         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdaa921cf077cbf27fea4000754f0a1b9e0}{MLX5\_REG\_QPDPM}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01144}01144 out:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01145}01145         kfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01146}01146         kfree(out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01147}01147         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01148}01148 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01149}01149 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01150}\mbox{\hyperlink{mlx5__port_8c_aa003c31ff5f5f6dae8728880dd8392db}{01150}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_aa003c31ff5f5f6dae8728880dd8392db}{mlx5\_query\_dscp2prio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 *dscp2prio)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01151}01151 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01152}01152         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(qpdpm\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01153}01153         \textcolor{keywordtype}{void} *qpdpm\_dscp;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01154}01154         \textcolor{keywordtype}{void} *out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01155}01155         \textcolor{keywordtype}{void} *in;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01156}01156         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01157}01157         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01158}01158 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01159}01159         in = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01160}01160         out = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01161}01161         \textcolor{keywordflow}{if} (!in || !out) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01162}01162                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01163}01163                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01164}01164         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01165}01165 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01166}01166         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(qpdpm\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01167}01167         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdaa921cf077cbf27fea4000754f0a1b9e0}{MLX5\_REG\_QPDPM}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01168}01168         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01169}01169                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01170}01170 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01171}01171         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{port_8h_a9d7d601613ffc05172f7291dad601a60}{MLX5\_MAX\_SUPPORTED\_DSCP}}; i++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01172}01172                 qpdpm\_dscp = \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(qpdpm\_reg, out, dscp[i]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01173}01173                 dscp2prio[i] = \mbox{\hyperlink{device_8h_a86528506d806dedc18e89302fc90dcd1}{MLX5\_GET16}}(qpdpm\_dscp\_reg, qpdpm\_dscp, prio);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01174}01174         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01175}01175 out:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01176}01176         kfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01177}01177         kfree(out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01178}01178         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01179}01179 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01180}01180 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01181}\mbox{\hyperlink{mlx5__port_8c_a906eb4aeb43db4d5385183f0d1a0e7df}{01181}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a906eb4aeb43db4d5385183f0d1a0e7df}{mlx5\_query\_pddr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01182}01182     u8 local\_port, \textcolor{keywordtype}{int} page\_select, u32 *out, \textcolor{keywordtype}{int} outlen)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01183}01183 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01184}01184         u32 in[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pddr\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01185}01185 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01186}01186         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{device_8h_a3e22556a526eba8cc07df7bcee127a6f}{MLX5\_CAP\_PCAM\_REG}}(mdev, pddr))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01187}01187                 \textcolor{keywordflow}{return} -\/EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01188}01188 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01189}01189         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pddr\_reg, in, local\_port, local\_port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01190}01190         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pddr\_reg, in, page\_select, page\_select);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01191}01191 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01192}01192         \textcolor{keywordflow}{return} \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, \textcolor{keyword}{sizeof}(in), out, outlen, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdaa94814c10a98d0f4e786eb6912261f8f}{MLX5\_REG\_PDDR}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01193}01193 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01194}01194 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01195}\mbox{\hyperlink{mlx5__port_8c_ac7afe3e33144e7a3e096599ce95c5e36}{01195}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ac7afe3e33144e7a3e096599ce95c5e36}{mlx5\_query\_pddr\_range\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 local\_port, u8 *is\_er\_type)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01196}01196 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01197}01197         u32 pddr\_reg[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pddr\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01198}01198         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01199}01199         u8 ecc;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01200}01200         u8 ci;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01201}01201 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01202}01202         error = \mbox{\hyperlink{mlx5__port_8c_a906eb4aeb43db4d5385183f0d1a0e7df}{mlx5\_query\_pddr}}(mdev, local\_port, \mbox{\hyperlink{mlx5__core_8h_a628e9dc9dd22627b578c55a6c8ac5a60ac771f44b220a84b6e58f67054495f2a5}{MLX5\_PDDR\_MODULE\_INFO\_PAGE}},}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01203}01203             pddr\_reg, \textcolor{keyword}{sizeof}(pddr\_reg));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01204}01204         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01205}01205                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01206}01206 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01207}01207         ecc = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pddr\_reg, pddr\_reg, page\_data.pddr\_module\_info.ethernet\_compliance\_code);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01208}01208         ci = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pddr\_reg, pddr\_reg, page\_data.pddr\_module\_info.cable\_identifier);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01209}01209 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01210}01210         \textcolor{keywordflow}{switch} (ci) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01211}01211         \textcolor{keywordflow}{case} 0: \textcolor{comment}{/* QSFP28 */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01212}01212         \textcolor{keywordflow}{case} 1: \textcolor{comment}{/* QSFP+ */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01213}01213                 *is\_er\_type = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01214}01214                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01215}01215         \textcolor{keywordflow}{case} 2: \textcolor{comment}{/* SFP28/SFP+ */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01216}01216         \textcolor{keywordflow}{case} 3: \textcolor{comment}{/* QSA (QSFP-\/>SFP) */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01217}01217                 *is\_er\_type = ((ecc \& (1 << 7)) != 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01218}01218                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01219}01219         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01220}01220                 *is\_er\_type = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01221}01221                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01222}01222         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01223}01223         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01224}01224 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01225}\mbox{\hyperlink{mlx5__port_8c_ac9f36a244a9dc5e5dc0c5c0a49bc12ac}{01225}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_ac7afe3e33144e7a3e096599ce95c5e36}{mlx5\_query\_pddr\_range\_info}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01226}01226 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01227}\mbox{\hyperlink{mlx5__port_8c_a7c89eb44382a69714c0d74ef5fe56b20}{01227}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a7c89eb44382a69714c0d74ef5fe56b20}{mlx5\_query\_pddr\_cable\_type}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 local\_port, u8 *cable\_type)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01228}01228 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01229}01229         u32 pddr\_reg[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pddr\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01230}01230         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01231}01231 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01232}01232         error = \mbox{\hyperlink{mlx5__port_8c_a906eb4aeb43db4d5385183f0d1a0e7df}{mlx5\_query\_pddr}}(mdev, local\_port, \mbox{\hyperlink{mlx5__core_8h_a628e9dc9dd22627b578c55a6c8ac5a60ac771f44b220a84b6e58f67054495f2a5}{MLX5\_PDDR\_MODULE\_INFO\_PAGE}},}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01233}01233             pddr\_reg, \textcolor{keyword}{sizeof}(pddr\_reg));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01234}01234         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01235}01235                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01236}01236 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01237}01237         *cable\_type = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pddr\_reg, pddr\_reg, page\_data.pddr\_module\_info.cable\_type);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01238}01238         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01239}01239 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01240}\mbox{\hyperlink{mlx5__port_8c_a78e872d1b68c765d3c03b208d156f552}{01240}} \mbox{\hyperlink{mlx5__port_8c_aadc19873e04a11376d4d81b8dcb465c2}{EXPORT\_SYMBOL\_GPL}}(\mbox{\hyperlink{mlx5__port_8c_a7c89eb44382a69714c0d74ef5fe56b20}{mlx5\_query\_pddr\_cable\_type}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01241}01241 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01242}\mbox{\hyperlink{mlx5__core_8h_a88b95de65bb94f09336a96244b52f69e}{01242}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a88b95de65bb94f09336a96244b52f69e}{mlx5\_query\_pddr\_troubleshooting\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01243}01243     u16 *monitor\_opcode, u8 *status\_message, \textcolor{keywordtype}{size\_t} sm\_len)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01244}01244 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01245}01245         \textcolor{keywordtype}{int} outlen = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pddr\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01246}01246         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(pddr\_reg)] = \{0\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01247}01247         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01248}01248 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01249}01249         err = \mbox{\hyperlink{mlx5__port_8c_a906eb4aeb43db4d5385183f0d1a0e7df}{mlx5\_query\_pddr}}(mdev, \mbox{\hyperlink{mlx5__core_8h_a628e9dc9dd22627b578c55a6c8ac5a60a3fa8ad0154ac248d89d54610e0d54f84}{MLX5\_PDDR\_TROUBLESHOOTING\_INFO\_PAGE}}, 1,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01250}01250             out, outlen);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01251}01251         \textcolor{keywordflow}{if} (err != 0)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01252}01252                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01253}01253         \textcolor{keywordflow}{if} (monitor\_opcode != NULL) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01254}01254                 *monitor\_opcode = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pddr\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01255}01255                     page\_data.troubleshooting\_info\_page.status\_opcode.}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01256}01256                     monitor\_opcodes);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01257}01257         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01258}01258         \textcolor{keywordflow}{if} (status\_message != NULL) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01259}01259                 strlcpy(status\_message,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01260}01260                     \mbox{\hyperlink{device_8h_ad5cad9c2e464873013bfb7b9761d25a1}{MLX5\_ADDR\_OF}}(pddr\_reg, out,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01261}01261                     page\_data.troubleshooting\_info\_page.status\_message),}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01262}01262                     sm\_len);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01263}01263         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01264}01264         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01265}01265 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01266}01266 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01267}01267 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01268}\mbox{\hyperlink{mlx5__core_8h_a5a6024f486716265b7dc536a8beeb84a}{01268}} \mbox{\hyperlink{mlx5__port_8c_a5a6024f486716265b7dc536a8beeb84a}{mlx5\_query\_mfrl\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 *reset\_level)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01269}01269 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01270}01270         u32 mfrl[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(mfrl\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01271}01271         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(mfrl\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01272}01272         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01273}01273 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01274}01274         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, mfrl, sz, mfrl, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdad4dae7e82e898fb6393e0b90b9fe9c27}{MLX5\_REG\_MFRL}},}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01275}01275             0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01276}01276         \textcolor{keywordflow}{if} (err == 0)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01277}01277                 *reset\_level = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(mfrl\_reg, mfrl, reset\_level);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01278}01278         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01279}01279 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01280}01280 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01281}01281 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01282}\mbox{\hyperlink{mlx5__core_8h_a025afaa148364d99d8e430346505c001}{01282}} \mbox{\hyperlink{mlx5__port_8c_a025afaa148364d99d8e430346505c001}{mlx5\_set\_mfrl\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 reset\_level)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01283}01283 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01284}01284         u32 mfrl[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(mfrl\_reg)] = \{\};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01285}01285         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(mfrl\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01286}01286 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01287}01287         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(mfrl\_reg, mfrl, reset\_level, reset\_level);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01288}01288 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01289}01289         \textcolor{keywordflow}{return} (\mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, mfrl, sz, mfrl, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdad4dae7e82e898fb6393e0b90b9fe9c27}{MLX5\_REG\_MFRL}},}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01290}01290             0, 1));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01291}01291 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01292}01292 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01293}01293 \textcolor{comment}{/* speed in units of 1Mb */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01294}\mbox{\hyperlink{mlx5__port_8c_a2153f714da5c6a862ebdeda15fc864a6}{01294}} \textcolor{keyword}{static} \textcolor{keyword}{const} u32 \mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0c}{mlx5e\_link\_speed}}[\textcolor{comment}{/*MLX5E\_LINK\_MODES\_NUMBER*/}] = \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01295}01295         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0cadd33645d9d63c095940ecca7a61df2fc}{MLX5E\_1000BASE\_CX\_SGMII}}] = 1000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01296}01296         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca56f83eb6dc60afe29daeec61eefd26d7}{MLX5E\_1000BASE\_KX}}]       = 1000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01297}01297         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca149967e98e14c7fe394e6b31207b8456}{MLX5E\_10GBASE\_CX4}}]       = 10000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01298}01298         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0caa58cb6e2baa8d99dad115b11af19d8c3}{MLX5E\_10GBASE\_KX4}}]       = 10000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01299}01299         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca2c7ed84ac39a6242dbaf94187b6b4035}{MLX5E\_10GBASE\_KR}}]        = 10000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01300}01300         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca1745f732898d4e1373757463c3825658}{MLX5E\_20GBASE\_KR2}}]       = 20000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01301}01301         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca994767f942a4a6ad4a354d4dcf805f80}{MLX5E\_40GBASE\_CR4}}]       = 40000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01302}01302         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca1da0bf9167e893acafb772650a294842}{MLX5E\_40GBASE\_KR4}}]       = 40000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01303}01303         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca96281473b8488f5d47c7d400b9a9e640}{MLX5E\_56GBASE\_R4}}]        = 56000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01304}01304         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca9314d331ca5f14ba1c6ca06f3dec4fa6}{MLX5E\_10GBASE\_CR}}]        = 10000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01305}01305         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca326cb730005116bd960b715a4baf4f65}{MLX5E\_10GBASE\_SR}}]        = 10000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01306}01306         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0caf73cc49bc638af091768a537dd551f45}{MLX5E\_10GBASE\_ER\_LR}}]     = 10000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01307}01307         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca37f4d01c6d147b656d3614e5063868b8}{MLX5E\_40GBASE\_SR4}}]       = 40000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01308}01308         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca0561ed42006a3f4804e6086a9f6f5aec}{MLX5E\_40GBASE\_LR4\_ER4}}]   = 40000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01309}01309         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca426cb42b0a3b549e4df1da12b6e21a1d}{MLX5E\_50GBASE\_SR2}}]       = 50000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01310}01310         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca61da27c6adb650d9b781c3afe1a76636}{MLX5E\_100GBASE\_CR4}}]      = 100000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01311}01311         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0caacc0a83680715de778c173aab6fb49ee}{MLX5E\_100GBASE\_SR4}}]      = 100000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01312}01312         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0cae03738e558b5677d1f19708f82442066}{MLX5E\_100GBASE\_KR4}}]      = 100000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01313}01313         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0cad4389791d6d3a25859f4023d54dc980b}{MLX5E\_100GBASE\_LR4}}]      = 100000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01314}01314         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0cad8ae1f3ce5e7e56d9fb1fb591ce40ab3}{MLX5E\_100BASE\_TX}}]        = 100,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01315}01315         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca2bfa83bc32f73d31c1fa4dc1407e7cc3}{MLX5E\_1000BASE\_T}}]        = 1000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01316}01316         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca5297715e850d318659b5e194673f7a98}{MLX5E\_10GBASE\_T}}]         = 10000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01317}01317         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca1b3320308e873872a54d6834d128be5a}{MLX5E\_25GBASE\_CR}}]        = 25000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01318}01318         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0caa1733b52080d3e344383a8d38a41937c}{MLX5E\_25GBASE\_KR}}]        = 25000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01319}01319         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0cacf9f710b06c1a897111343451beb5ea9}{MLX5E\_25GBASE\_SR}}]        = 25000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01320}01320         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0cac1f46552570b21ca59ea0d61a3af46a3}{MLX5E\_50GBASE\_CR2}}]       = 50000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01321}01321         [\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0ca795618752f8e6c3901919800fb07ba98}{MLX5E\_50GBASE\_KR2}}]       = 50000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01322}01322 \};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01323}01323 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01324}\mbox{\hyperlink{mlx5__port_8c_af6272fec04d4a106971b9360f7cbaba2}{01324}} \textcolor{keyword}{static} \textcolor{keyword}{const} u32 \mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbe}{mlx5e\_ext\_link\_speed}}[\textcolor{comment}{/*MLX5E\_EXT\_LINK\_MODES\_NUMBER*/}] = \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01325}01325         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbeaa083e5ca4dec07e3d8d5ac0c8cdc48b3}{MLX5E\_SGMII\_100M}}]                      = 100,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01326}01326         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbeacecfbdca7afd6f54af470682f6fcdc1b}{MLX5E\_1000BASE\_X\_SGMII}}]          = 1000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01327}01327         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbea3cc2fbf5e9fbf492c8cb3de3d32cdca7}{MLX5E\_5GBASE\_R}}]                  = 5000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01328}01328         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbeabd71966566b88761e02e0e9021bc0749}{MLX5E\_10GBASE\_XFI\_XAUI\_1}}]              = 10000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01329}01329         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbea4c01f8c56f0a85f7cd1d6b33c0da429c}{MLX5E\_40GBASE\_XLAUI\_4\_XLPPI\_4}}]            = 40000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01330}01330         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbea8d16be8e488c56eef804b6d948d98226}{MLX5E\_25GAUI\_1\_25GBASE\_CR\_KR}}]              = 25000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01331}01331         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbeac8fa27a61436723b9a1ac3cd7227700a}{MLX5E\_50GAUI\_2\_LAUI\_2\_50GBASE\_CR2\_KR2}}]    = 50000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01332}01332         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbea3b704517c8e08ad15947ca20966882b9}{MLX5E\_50GAUI\_1\_LAUI\_1\_50GBASE\_CR\_KR}}]        = 50000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01333}01333         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbeaf35d65a2f8f239f6df455e35d69830d7}{MLX5E\_CAUI\_4\_100GBASE\_CR4\_KR4}}]            = 100000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01334}01334         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbea8a464d6c429ca6a12b980481506ede94}{MLX5E\_200GAUI\_4\_200GBASE\_CR4\_KR4}}]      = 200000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01335}01335         [\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbea6ef5b39f4f95c93016157760b4c41c57}{MLX5E\_400GAUI\_8}}]                        = 400000,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01336}01336 \};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01337}01337 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01338}\mbox{\hyperlink{mlx5__port_8c_a91b098dccbe2383e732840af5076b9ff}{01338}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{mlx5__port_8c_a91b098dccbe2383e732840af5076b9ff}{mlx5e\_port\_get\_speed\_arr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01339}01339                                      \textcolor{keyword}{const} u32 **arr, u32 *size)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01340}01340 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01341}01341         \textcolor{keywordtype}{bool} ext = \mbox{\hyperlink{device_8h_a808d96f6813ca6f91ec28ca3e439be6c}{MLX5\_CAP\_PCAM\_FEATURE}}(mdev, ptys\_extended\_ethernet);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01342}01342 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01343}01343         *size = ext ? ARRAY\_SIZE(\mbox{\hyperlink{port_8h_a54f19ab7e76fe68cab0372236681bdbe}{mlx5e\_ext\_link\_speed}}) :}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01344}01344                       ARRAY\_SIZE(\mbox{\hyperlink{port_8h_a7dfcb3631fc98516e9d7d48497ddae0c}{mlx5e\_link\_speed}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01345}01345         *arr  = ext ? \mbox{\hyperlink{mlx5__port_8c_af6272fec04d4a106971b9360f7cbaba2}{mlx5e\_ext\_link\_speed}} : \mbox{\hyperlink{mlx5__port_8c_a2153f714da5c6a862ebdeda15fc864a6}{mlx5e\_link\_speed}};}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01346}01346 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01347}01347 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01348}\mbox{\hyperlink{mlx5__port_8c_a9aa2cea85e96ba55f84c53b193a3d546}{01348}} u32 \mbox{\hyperlink{mlx5__port_8c_a9aa2cea85e96ba55f84c53b193a3d546}{mlx5e\_port\_ptys2speed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u32 eth\_proto\_oper)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01349}01349 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01350}01350         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} temp = eth\_proto\_oper;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01351}01351         \textcolor{keyword}{const} u32 *table;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01352}01352         u32 speed = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01353}01353         u32 max\_size;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01354}01354         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01355}01355 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01356}01356         \mbox{\hyperlink{mlx5__port_8c_a91b098dccbe2383e732840af5076b9ff}{mlx5e\_port\_get\_speed\_arr}}(mdev, \&table, \&max\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01357}01357         i = find\_first\_bit(\&temp, max\_size);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01358}01358         \textcolor{keywordflow}{if} (i < max\_size)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01359}01359                 speed = table[i];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01360}01360         \textcolor{keywordflow}{return} speed;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01361}01361 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01362}01362 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01363}\mbox{\hyperlink{mlx5__port_8c_abc3477405acfbb95183852d9c779374f}{01363}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_abc3477405acfbb95183852d9c779374f}{mlx5\_port\_query\_eth\_proto}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *dev, u8 port, \textcolor{keywordtype}{bool} ext,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01364}01364                               \textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5e__port__eth__proto}{mlx5e\_port\_eth\_proto}} *eproto)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01365}01365 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01366}01366         u32 out[\mbox{\hyperlink{device_8h_a2bdfa104f3d7c0635b984382d1562741}{MLX5\_ST\_SZ\_DW}}(ptys\_reg)];}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01367}01367         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01368}01368 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01369}01369         \textcolor{keywordflow}{if} (!eproto)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01370}01370                 \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01371}01371 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01372}01372         err = \mbox{\hyperlink{mlx5__port_8c_a8f0cbf29a10097b179dd9e3a4df0b873}{mlx5\_query\_port\_ptys}}(dev, out, \textcolor{keyword}{sizeof}(out), \mbox{\hyperlink{driver_8h_aad393aa3e173d7f081ab4bbc6ba5027da33ce80cf37a3f11b79424cb8a8a7bc56}{MLX5\_PTYS\_EN}}, port);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01373}01373         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01374}01374                 \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01375}01375 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01376}01376         eproto-\/>\mbox{\hyperlink{structmlx5e__port__eth__proto_a9d3313cfced88b4c433c7cf42f97ea78}{cap}}   = \mbox{\hyperlink{port_8h_a85ea9be21638b172b3e363994ca8fa17}{MLX5\_GET\_ETH\_PROTO}}(ptys\_reg, out, ext,}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01377}01377                                            eth\_proto\_capability);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01378}01378         eproto-\/>\mbox{\hyperlink{structmlx5e__port__eth__proto_a32bcaac630d10076156a5b5f77dd3f80}{admin}} = \mbox{\hyperlink{port_8h_a85ea9be21638b172b3e363994ca8fa17}{MLX5\_GET\_ETH\_PROTO}}(ptys\_reg, out, ext, eth\_proto\_admin);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01379}01379         eproto-\/>\mbox{\hyperlink{structmlx5e__port__eth__proto_a3f488c4de49578a99eae20586b7440cb}{oper}}  = \mbox{\hyperlink{port_8h_a85ea9be21638b172b3e363994ca8fa17}{MLX5\_GET\_ETH\_PROTO}}(ptys\_reg, out, ext, eth\_proto\_oper);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01380}01380         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01381}01381 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01382}01382 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01383}\mbox{\hyperlink{mlx5__port_8c_aa748929af17fa9534b61812f2878a6f8}{01383}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_aa748929af17fa9534b61812f2878a6f8}{mlx5e\_port\_linkspeed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u32 *speed)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01384}01384 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01385}01385         \textcolor{keyword}{struct }\mbox{\hyperlink{structmlx5e__port__eth__proto}{mlx5e\_port\_eth\_proto}} eproto;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01386}01386         \textcolor{keywordtype}{bool} ext;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01387}01387         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01388}01388 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01389}01389         ext = \mbox{\hyperlink{device_8h_a808d96f6813ca6f91ec28ca3e439be6c}{MLX5\_CAP\_PCAM\_FEATURE}}(mdev, ptys\_extended\_ethernet);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01390}01390         err = \mbox{\hyperlink{mlx5__port_8c_abc3477405acfbb95183852d9c779374f}{mlx5\_port\_query\_eth\_proto}}(mdev, 1, ext, \&eproto);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01391}01391         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01392}01392                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01393}01393 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01394}01394         *speed = \mbox{\hyperlink{mlx5__port_8c_a9aa2cea85e96ba55f84c53b193a3d546}{mlx5e\_port\_ptys2speed}}(mdev, eproto.\mbox{\hyperlink{structmlx5e__port__eth__proto_a3f488c4de49578a99eae20586b7440cb}{oper}});}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01395}01395         \textcolor{keywordflow}{if} (!(*speed))}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01396}01396                 err = -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01397}01397 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01398}01398 out:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01399}01399         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01400}01400 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01401}01401 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01402}\mbox{\hyperlink{mlx5__port_8c_ad84aea8b1a6c4167ae5dbc0ce01b203e}{01402}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ad84aea8b1a6c4167ae5dbc0ce01b203e}{mlx5e\_port\_query\_pbmc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keywordtype}{void} *out)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01403}01403 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01404}01404         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pbmc\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01405}01405         \textcolor{keywordtype}{void} *in;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01406}01406         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01407}01407 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01408}01408         in = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01409}01409         \textcolor{keywordflow}{if} (!in)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01410}01410                 \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01411}01411 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01412}01412         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pbmc\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01413}01413         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda4279742dcbc88ab514c22831c79ab185}{MLX5\_REG\_PBMC}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01414}01414 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01415}01415         kfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01416}01416         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01417}01417 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01418}01418 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01419}\mbox{\hyperlink{mlx5__port_8c_ae185a737aa1d8a65c1bc231c7a379d71}{01419}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_ae185a737aa1d8a65c1bc231c7a379d71}{mlx5e\_port\_set\_pbmc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, \textcolor{keywordtype}{void} *in)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01420}01420 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01421}01421         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pbmc\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01422}01422         \textcolor{keywordtype}{void} *out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01423}01423         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01424}01424 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01425}01425         out = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01426}01426         \textcolor{keywordflow}{if} (!out)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01427}01427                 \textcolor{keywordflow}{return} -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01428}01428 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01429}01429         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pbmc\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01430}01430         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbda4279742dcbc88ab514c22831c79ab185}{MLX5\_REG\_PBMC}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01431}01431 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01432}01432         kfree(out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01433}01433         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01434}01434 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01435}01435 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01436}01436 \textcolor{comment}{/* buffer[i]: buffer that priority i mapped to */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01437}\mbox{\hyperlink{mlx5__port_8c_a3deead3af97d84e34bffc1065fa4263f}{01437}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a3deead3af97d84e34bffc1065fa4263f}{mlx5e\_port\_query\_priority2buffer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 *buffer)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01438}01438 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01439}01439         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pptb\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01440}01440         u32 prio\_x\_buff;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01441}01441         \textcolor{keywordtype}{void} *out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01442}01442         \textcolor{keywordtype}{void} *in;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01443}01443         \textcolor{keywordtype}{int} prio;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01444}01444         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01445}01445 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01446}01446         in = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01447}01447         out = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01448}01448         \textcolor{keywordflow}{if} (!in || !out) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01449}01449                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01450}01450                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01451}01451         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01452}01452 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01453}01453         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pptb\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01454}01454         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdad980606d1194a085d09903a82478f611}{MLX5\_REG\_PPTB}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01455}01455         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01456}01456                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01457}01457 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01458}01458         prio\_x\_buff = \mbox{\hyperlink{device_8h_a12a03f8a456490fce8c791c7f2922f97}{MLX5\_GET}}(pptb\_reg, out, prio\_x\_buff);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01459}01459         \textcolor{keywordflow}{for} (prio = 0; prio < 8; prio++) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01460}01460                 buffer[prio] = (u8)(prio\_x\_buff >> (4 * prio)) \& 0xF;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01461}01461                 \mbox{\hyperlink{mlx5__core_8h_abecf5f90e845f80efc57b10bd4c67c2b}{mlx5\_core\_dbg}}(mdev, \textcolor{stringliteral}{"{}prio \%d, buffer \%d\(\backslash\)n"{}}, prio, buffer[prio]);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01462}01462         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01463}01463 out:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01464}01464         kfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01465}01465         kfree(out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01466}01466         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01467}01467 \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01468}01468 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01469}\mbox{\hyperlink{mlx5__port_8c_a24b3d47fcb69f1d6ba0237a1891e0657}{01469}} \textcolor{keywordtype}{int} \mbox{\hyperlink{mlx5__port_8c_a24b3d47fcb69f1d6ba0237a1891e0657}{mlx5e\_port\_set\_priority2buffer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmlx5__core__dev}{mlx5\_core\_dev}} *mdev, u8 *buffer)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01470}01470 \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01471}01471         \textcolor{keywordtype}{int} sz = \mbox{\hyperlink{device_8h_a459f4e51a5d10dfb6fed7cafff215cb4}{MLX5\_ST\_SZ\_BYTES}}(pptb\_reg);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01472}01472         u32 prio\_x\_buff;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01473}01473         \textcolor{keywordtype}{void} *out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01474}01474         \textcolor{keywordtype}{void} *in;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01475}01475         \textcolor{keywordtype}{int} prio;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01476}01476         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01477}01477 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01478}01478         in = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01479}01479         out = kzalloc(sz, GFP\_KERNEL);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01480}01480         \textcolor{keywordflow}{if} (!in || !out) \{}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01481}01481                 err = -\/ENOMEM;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01482}01482                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01483}01483         \}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01484}01484 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01485}01485         \textcolor{comment}{/* First query the pptb register */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01486}01486         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pptb\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01487}01487         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdad980606d1194a085d09903a82478f611}{MLX5\_REG\_PPTB}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01488}01488         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01489}01489                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01490}01490 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01491}01491         memcpy(in, out, sz);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01492}01492         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pptb\_reg, in, local\_port, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01493}01493 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01494}01494         \textcolor{comment}{/* Update the pm and prio\_x\_buff */}}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01495}01495         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pptb\_reg, in, pm, 0xFF);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01496}01496 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01497}01497         prio\_x\_buff = 0;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01498}01498         \textcolor{keywordflow}{for} (prio = 0; prio < 8; prio++)}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01499}01499                 prio\_x\_buff |= (buffer[prio] << (4 * prio));}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01500}01500         \mbox{\hyperlink{device_8h_a78623a3e69c7911bd715d06c32daa626}{MLX5\_SET}}(pptb\_reg, in, prio\_x\_buff, prio\_x\_buff);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01501}01501 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01502}01502         err = \mbox{\hyperlink{mlx5__port_8c_a588ab969bb7070e2dc60df62da38c8fa}{mlx5\_core\_access\_reg}}(mdev, in, sz, out, sz, \mbox{\hyperlink{driver_8h_a3babbf89cae9b856a12864a41506efbdad980606d1194a085d09903a82478f611}{MLX5\_REG\_PPTB}}, 0, 1);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01503}01503 }
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01504}01504 out:}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01505}01505         kfree(in);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01506}01506         kfree(out);}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01507}01507         \textcolor{keywordflow}{return} err;}
\DoxyCodeLine{\Hypertarget{mlx5__port_8c_source_l01508}01508 \}}

\end{DoxyCode}
