From owner-svn-src-stable@freebsd.org Mon Sep 7 10:49:43 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C5293EE887; Mon, 7 Sep 2020 10:49:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BlQ5g3BLSz3y1y; Mon, 7 Sep 2020 10:49:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50D9E1DFEB; Mon, 7 Sep 2020 10:49:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 087Anhvd092720; Mon, 7 Sep 2020 10:49:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 087AngTP092718; Mon, 7 Sep 2020 10:49:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009071049.087AngTP092718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 7 Sep 2020 10:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r365410 - in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 365410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2020 10:49:43 -0000 Author: kib Date: Mon Sep 7 10:49:42 2020 New Revision: 365410 URL: https://svnweb.freebsd.org/changeset/base/365410 Log: MFC r364999: mlx5_core: Import PDDR register definitions Modified: stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h stable/11/sys/dev/mlx5/mlx5_ifc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Mon Sep 7 10:37:44 2020 (r365409) +++ stable/11/sys/dev/mlx5/driver.h Mon Sep 7 10:49:42 2020 (r365410) @@ -143,6 +143,7 @@ enum { MLX5_REG_PMPE = 0x5010, MLX5_REG_PMAOS = 0x5012, MLX5_REG_PPLM = 0x5023, + MLX5_REG_PDDR = 0x5031, MLX5_REG_PBSR = 0x5038, MLX5_REG_PCAM = 0x507f, MLX5_REG_NODE_DESC = 0x6001, Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Mon Sep 7 10:37:44 2020 (r365409) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Mon Sep 7 10:49:42 2020 (r365410) @@ -79,6 +79,35 @@ enum mlx5_semaphore_space_address { struct mlx5_core_dev; +enum mlx5_pddr_page_select { + MLX5_PDDR_OPERATIONAL_INFO_PAGE = 0x0, + MLX5_PDDR_TROUBLESHOOTING_INFO_PAGE = 0x1, + MLX5_PDDR_MODULE_INFO_PAGE = 0x3, +}; + +enum mlx5_pddr_monitor_opcodes { + MLX5_LINK_NO_ISSUE_OBSERVED = 0x0, + MLX5_LINK_PORT_CLOSED = 0x1, + MLX5_LINK_AN_FAILURE = 0x2, + MLX5_LINK_TRAINING_FAILURE = 0x5, + MLX5_LINK_LOGICAL_MISMATCH = 0x9, + MLX5_LINK_REMOTE_FAULT_INDICATION = 0xe, + MLX5_LINK_BAD_SIGNAL_INTEGRITY = 0xf, + MLX5_LINK_CABLE_COMPLIANCE_CODE_MISMATCH = 0x10, + MLX5_LINK_INTERNAL_ERR = 0x17, + MLX5_LINK_INFO_NOT_AVAIL = 0x3ff, + MLX5_LINK_CABLE_UNPLUGGED = 0x400, + MLX5_LINK_LONG_RANGE_FOR_NON_MLX_CABLE = 0x401, + MLX5_LINK_BUS_STUCK = 0x402, + MLX5_LINK_UNSUPP_EEPROM = 0x403, + MLX5_LINK_PART_NUM_LIST = 0x404, + MLX5_LINK_UNSUPP_CABLE = 0x405, + MLX5_LINK_MODULE_TEMP_SHUTDOWN = 0x406, + MLX5_LINK_SHORTED_CABLE = 0x407, + MLX5_LINK_POWER_BUDGET_EXCEEDED = 0x408, + MLX5_LINK_MNG_FORCED_DOWN = 0x409, +}; + int mlx5_query_hca_caps(struct mlx5_core_dev *dev); int mlx5_query_board_id(struct mlx5_core_dev *dev); int mlx5_query_qcam_reg(struct mlx5_core_dev *mdev, u32 *qcam, Modified: stable/11/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_ifc.h Mon Sep 7 10:37:44 2020 (r365409) +++ stable/11/sys/dev/mlx5/mlx5_ifc.h Mon Sep 7 10:49:42 2020 (r365410) @@ -848,23 +848,6 @@ struct mlx5_ifc_pddr_module_info_bits { u8 reserved_at_4c0[0x300]; }; -union mlx5_ifc_pddr_operation_info_page_pddr_phy_info_page_pddr_troubleshooting_page_pddr_module_info_auto_bits { - struct mlx5_ifc_pddr_module_info_bits pddr_module_info; - u8 reserved_at_0[0x7c0]; -}; - -struct mlx5_ifc_pddr_reg_bits { - u8 reserved_at_0[0x8]; - u8 local_port[0x8]; - u8 pnat[0x2]; - u8 reserved_at_12[0xe]; - - u8 reserved_at_20[0x18]; - u8 page_select[0x8]; - - union mlx5_ifc_pddr_operation_info_page_pddr_phy_info_page_pddr_troubleshooting_page_pddr_module_info_auto_bits page_data; -}; - struct mlx5_ifc_per_protocol_networking_offload_caps_bits { u8 csum_cap[0x1]; u8 vlan_cap[0x1]; @@ -8630,7 +8613,10 @@ struct mlx5_ifc_pcam_regs_5000_to_507f_bits { u8 port_access_reg_cap_mask_127_to_96[0x20]; u8 port_access_reg_cap_mask_95_to_64[0x20]; - u8 port_access_reg_cap_mask_63_to_36[0x1c]; + u8 reserved_at_40[0xe]; + u8 pddr[0x1]; + u8 reserved_at_4f[0xd]; + u8 pplm[0x1]; u8 port_access_reg_cap_mask_34_to_32[0x3]; @@ -10182,6 +10168,46 @@ struct mlx5_ifc_mpcnt_reg_ext_bits { u8 reserved_at_21[0x1f]; union mlx5_ifc_mpcnt_reg_counter_set_auto_ext_bits counter_set; +}; + +struct mlx5_ifc_monitor_opcodes_layout_bits { + u8 reserved_at_0[0x10]; + u8 monitor_opcode[0x10]; +}; + +union mlx5_ifc_pddr_status_opcode_bits { + struct mlx5_ifc_monitor_opcodes_layout_bits monitor_opcodes; + u8 reserved_at_0[0x20]; +}; + +struct mlx5_ifc_troubleshooting_info_page_layout_bits { + u8 reserved_at_0[0x10]; + u8 group_opcode[0x10]; + + union mlx5_ifc_pddr_status_opcode_bits status_opcode; + + u8 user_feedback_data[0x10]; + u8 user_feedback_index[0x10]; + + u8 status_message[0x760]; +}; + +union mlx5_ifc_pddr_page_data_bits { + struct mlx5_ifc_troubleshooting_info_page_layout_bits troubleshooting_info_page; + struct mlx5_ifc_pddr_module_info_bits pddr_module_info; + u8 reserved_at_0[0x7c0]; +}; + +struct mlx5_ifc_pddr_reg_bits { + u8 reserved_at_0[0x8]; + u8 local_port[0x8]; + u8 pnat[0x2]; + u8 reserved_at_12[0xe]; + + u8 reserved_at_20[0x18]; + u8 page_select[0x8]; + + union mlx5_ifc_pddr_page_data_bits page_data; }; enum {