net/mlx5: Set driver version infrastructure
authorSaeed Mahameed <saeedm@mellanox.com>
Thu, 17 Nov 2016 11:45:59 +0000 (13:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Nov 2016 17:08:57 +0000 (12:08 -0500)
Add driver_version capability bit is enabled, and set driver
version command in mlx5_ifc firmware header.  The only purpose
of this command is to store a driver version/OS string in FW
to be reported and displayed in various management systems,
such as IPMI/BMC.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mlx5/mlx5_ifc.h

index cd1d530ca368fb0e88b983b3eb3e121efa4c8ff9..f08a06247fbac0b8ee94385809dbde11aa022387 100644 (file)
@@ -83,6 +83,7 @@ enum {
        MLX5_CMD_OP_SET_HCA_CAP                   = 0x109,
        MLX5_CMD_OP_QUERY_ISSI                    = 0x10a,
        MLX5_CMD_OP_SET_ISSI                      = 0x10b,
+       MLX5_CMD_OP_SET_DRIVER_VERSION            = 0x10d,
        MLX5_CMD_OP_CREATE_MKEY                   = 0x200,
        MLX5_CMD_OP_QUERY_MKEY                    = 0x201,
        MLX5_CMD_OP_DESTROY_MKEY                  = 0x202,
@@ -909,7 +910,7 @@ struct mlx5_ifc_cmd_hca_cap_bits {
        u8         log_pg_sz[0x8];
 
        u8         bf[0x1];
-       u8         reserved_at_261[0x1];
+       u8         driver_version[0x1];
        u8         pad_tx_eth_packet[0x1];
        u8         reserved_at_263[0x8];
        u8         log_bf_reg_size[0x5];
@@ -4005,6 +4006,25 @@ struct mlx5_ifc_query_issi_in_bits {
        u8         reserved_at_40[0x40];
 };
 
+struct mlx5_ifc_set_driver_version_out_bits {
+       u8         status[0x8];
+       u8         reserved_0[0x18];
+
+       u8         syndrome[0x20];
+       u8         reserved_1[0x40];
+};
+
+struct mlx5_ifc_set_driver_version_in_bits {
+       u8         opcode[0x10];
+       u8         reserved_0[0x10];
+
+       u8         reserved_1[0x10];
+       u8         op_mod[0x10];
+
+       u8         reserved_2[0x40];
+       u8         driver_version[64][0x8];
+};
+
 struct mlx5_ifc_query_hca_vport_pkey_out_bits {
        u8         status[0x8];
        u8         reserved_at_8[0x18];