2 .\" Copyright (c) 2018 Mellanox Technologies
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd IOCTL interface to manage Connect-X 4/5 Mellanox network adapters
39 interface is provided for management of the Connect-X 4 and 5 network adapters
40 in the aspects not covered by the generic network configuration,
41 mostly related to the PCIe attachment and internal card working.
42 Interface consists of the commands, which are passed by means of
44 on the file descriptor, opened from the
48 The following commands are implemented:
49 .Bl -tag -width indent
50 .It Dv MLX5_FWDUMP_FORCE
51 Take the snapshot of the firmware registers state and store it in the
53 The buffer must be empty, in other words, no dumps should be written so
54 far, or existing dump cleared with the
56 command for the specified device.
57 The argument for the command should point to the
58 .Vt struct mlx5_fwdump_addr
59 structure, containing the PCIe bus address of the device.
61 struct mlx5_fwdump_addr {
68 .It Dv MLX5_FWDUMP_RESET
69 Clear the stored firmware dump, preparing the kernel buffer for
71 The argument for the command should point to the
72 .Vt struct mlx5_fwdump_addr
73 structure, containing the PCIe bus address of the device.
74 .It Dv MLX5_FWDUMP_GET
75 Fetch the stored firmware dump into the user memory.
76 The argument to the command should point to the input/output
77 .Vt struct mlx5_fwdump_get
81 field specifies the address of the device, the
83 fields points to the array of
84 .Vt struct mlx5_fwdump_reg
85 of records of the registers values, the size of the array is specified
90 struct mlx5_fwdump_get {
91 struct mlx5_fwdump_addr devaddr;
92 struct mlx5_fwdump_reg *buf;
94 size_t reg_filled; /* out */
98 On successfull return, the
100 field reports the number of the
102 array elements actually filled with the registers values.
107 pointer, no registers are filled, but
109 still contains the number of registers that should be passed for
113 .Vt struct mlx5_fwdump_reg
114 element contains the address of the register in the field
116 and its value in the field
119 struct mlx5_fwdump_reg {
129 node is used to pass commands to the driver.
131 If successful, the IOCTL returns zero.
132 Otherwise, -1 is returned and the global variable
134 is set to indicate the error.