From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Tariq Toukan <tariqt@nvidia.com>,
netdev@vger.kernel.org, Moshe Tal <moshet@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next 11/14] net/mlx5: Add register layout to support extended link state
Date: Fri, 16 Apr 2021 11:54:27 -0700 [thread overview]
Message-ID: <20210416185430.62584-12-saeed@kernel.org> (raw)
In-Reply-To: <20210416185430.62584-1-saeed@kernel.org>
From: Moshe Tal <moshet@nvidia.com>
Add needed structure layouts and defines for pddr register
(Port Diagnostics Database Register) and the troublshooting page.
This will be used to get extended link state from the monitor opcode
bits.
Signed-off-by: Moshe Tal <moshet@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
include/linux/mlx5/driver.h | 1 +
include/linux/mlx5/mlx5_ifc.h | 50 +++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+)
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 2da953ad02ed..4e531c2aab52 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -127,6 +127,7 @@ enum {
MLX5_REG_PELC = 0x500e,
MLX5_REG_PVLC = 0x500f,
MLX5_REG_PCMR = 0x5041,
+ MLX5_REG_PDDR = 0x5031,
MLX5_REG_PMLP = 0x5002,
MLX5_REG_PPLM = 0x5023,
MLX5_REG_PCAM = 0x507f,
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 1599deee0456..f2c51d6833c6 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -9956,6 +9956,53 @@ struct mlx5_ifc_mirc_reg_bits {
u8 reserved_at_20[0x20];
};
+struct mlx5_ifc_pddr_monitor_opcode_bits {
+ u8 reserved_at_0[0x10];
+ u8 monitor_opcode[0x10];
+};
+
+union mlx5_ifc_pddr_troubleshooting_page_status_opcode_auto_bits {
+ struct mlx5_ifc_pddr_monitor_opcode_bits pddr_monitor_opcode;
+ u8 reserved_at_0[0x20];
+};
+
+enum {
+ /* Monitor opcodes */
+ MLX5_PDDR_REG_TRBLSH_GROUP_OPCODE_MONITOR = 0x0,
+};
+
+struct mlx5_ifc_pddr_troubleshooting_page_bits {
+ u8 reserved_at_0[0x10];
+ u8 group_opcode[0x10];
+
+ union mlx5_ifc_pddr_troubleshooting_page_status_opcode_auto_bits status_opcode;
+
+ u8 reserved_at_40[0x20];
+
+ u8 status_message[59][0x20];
+};
+
+union mlx5_ifc_pddr_reg_page_data_auto_bits {
+ struct mlx5_ifc_pddr_troubleshooting_page_bits pddr_troubleshooting_page;
+ u8 reserved_at_0[0x7c0];
+};
+
+enum {
+ MLX5_PDDR_REG_PAGE_SELECT_TROUBLESHOOTING_INFO_PAGE = 0x1,
+};
+
+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_reg_page_data_auto_bits page_data;
+};
+
union mlx5_ifc_ports_control_registers_document_bits {
struct mlx5_ifc_bufferx_reg_bits bufferx_reg;
struct mlx5_ifc_eth_2819_cntrs_grp_data_layout_bits eth_2819_cntrs_grp_data_layout;
@@ -9970,6 +10017,9 @@ union mlx5_ifc_ports_control_registers_document_bits {
struct mlx5_ifc_pamp_reg_bits pamp_reg;
struct mlx5_ifc_paos_reg_bits paos_reg;
struct mlx5_ifc_pcap_reg_bits pcap_reg;
+ struct mlx5_ifc_pddr_monitor_opcode_bits pddr_monitor_opcode;
+ struct mlx5_ifc_pddr_reg_bits pddr_reg;
+ struct mlx5_ifc_pddr_troubleshooting_page_bits pddr_troubleshooting_page;
struct mlx5_ifc_peir_reg_bits peir_reg;
struct mlx5_ifc_pelc_reg_bits pelc_reg;
struct mlx5_ifc_pfcc_reg_bits pfcc_reg;
--
2.30.2
next prev parent reply other threads:[~2021-04-16 18:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 18:54 [pull request][net-next 00/14] mlx5 updates 2021-04-16 Saeed Mahameed
2021-04-16 18:54 ` [net-next 01/14] net/mlx5e: Remove non-essential TLS SQ state bit Saeed Mahameed
2021-04-17 0:00 ` patchwork-bot+netdevbpf
2021-04-16 18:54 ` [net-next 02/14] net/mlx5e: Cleanup unused function parameter Saeed Mahameed
2021-04-16 18:54 ` [net-next 03/14] net/mlx5e: TX, Inline TLS skb check Saeed Mahameed
2021-04-16 18:54 ` [net-next 04/14] net/mlx5e: TX, Inline function mlx5e_tls_handle_tx_wqe() Saeed Mahameed
2021-04-16 18:54 ` [net-next 05/14] net/mlx5e: kTLS, Add resiliency to RX resync failures Saeed Mahameed
2021-04-16 18:54 ` [net-next 06/14] net/mlx5e: Allow mlx5e_safe_switch_channels to work with channels closed Saeed Mahameed
2021-04-16 18:54 ` [net-next 07/14] net/mlx5e: Use mlx5e_safe_switch_channels when channels are closed Saeed Mahameed
2021-04-16 18:54 ` [net-next 08/14] net/mlx5e: Refactor on-the-fly configuration changes Saeed Mahameed
2021-04-16 18:54 ` [net-next 09/14] net/mlx5e: Cleanup safe switch channels API by passing params Saeed Mahameed
2021-04-16 18:54 ` [net-next 10/14] net/mlx5: Allocate FC bulk structs with kvzalloc() instead of kzalloc() Saeed Mahameed
2021-04-16 18:54 ` Saeed Mahameed [this message]
2021-04-16 18:54 ` [net-next 12/14] net/mlx5e: Add ethtool extended link state Saeed Mahameed
2021-04-16 18:54 ` [net-next 13/14] net/mlx5: Add helper to initialize 1PPS Saeed Mahameed
2021-04-16 18:54 ` [net-next 14/14] net/mlx5: Enhance diagnostics info for TX/RX reporters Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210416185430.62584-12-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=moshet@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).