aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHuy Nguyen <huyn@mellanox.com>2016-11-17 06:45:56 -0500
committerDavid S. Miller <davem@davemloft.net>2016-11-18 12:08:57 -0500
commit4ce3bf2fa8ba309b5ca19539fcc8671a0fc084f9 (patch)
treee82cb26885fc72f6cff076466d9f8b5bb85ecc5c /include/linux
parent0ac3ea70897fb9f84b620aeda074ecccf481629d (diff)
net/mlx5: Port module event hardware structures
Add hardware structures and constants definitions needed for module events support. Signed-off-by: Huy Nguyen <huyn@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mlx5/device.h11
-rw-r--r--include/linux/mlx5/mlx5_ifc.h3
-rw-r--r--include/linux/mlx5/port.h3
3 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index 58276144ba81..52b437431c6a 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -277,6 +277,7 @@ enum mlx5_event {
277 MLX5_EVENT_TYPE_INTERNAL_ERROR = 0x08, 277 MLX5_EVENT_TYPE_INTERNAL_ERROR = 0x08,
278 MLX5_EVENT_TYPE_PORT_CHANGE = 0x09, 278 MLX5_EVENT_TYPE_PORT_CHANGE = 0x09,
279 MLX5_EVENT_TYPE_GPIO_EVENT = 0x15, 279 MLX5_EVENT_TYPE_GPIO_EVENT = 0x15,
280 MLX5_EVENT_TYPE_PORT_MODULE_EVENT = 0x16,
280 MLX5_EVENT_TYPE_REMOTE_CONFIG = 0x19, 281 MLX5_EVENT_TYPE_REMOTE_CONFIG = 0x19,
281 282
282 MLX5_EVENT_TYPE_DB_BF_CONGESTION = 0x1a, 283 MLX5_EVENT_TYPE_DB_BF_CONGESTION = 0x1a,
@@ -552,6 +553,15 @@ struct mlx5_eqe_vport_change {
552 __be32 rsvd1[6]; 553 __be32 rsvd1[6];
553} __packed; 554} __packed;
554 555
556struct mlx5_eqe_port_module {
557 u8 reserved_at_0[1];
558 u8 module;
559 u8 reserved_at_2[1];
560 u8 module_status;
561 u8 reserved_at_4[2];
562 u8 error_type;
563} __packed;
564
555union ev_data { 565union ev_data {
556 __be32 raw[7]; 566 __be32 raw[7];
557 struct mlx5_eqe_cmd cmd; 567 struct mlx5_eqe_cmd cmd;
@@ -565,6 +575,7 @@ union ev_data {
565 struct mlx5_eqe_page_req req_pages; 575 struct mlx5_eqe_page_req req_pages;
566 struct mlx5_eqe_page_fault page_fault; 576 struct mlx5_eqe_page_fault page_fault;
567 struct mlx5_eqe_vport_change vport_change; 577 struct mlx5_eqe_vport_change vport_change;
578 struct mlx5_eqe_port_module port_module;
568} __packed; 579} __packed;
569 580
570struct mlx5_eqe { 581struct mlx5_eqe {
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 2632cb2caf10..cd1d530ca368 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -824,7 +824,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
824 u8 early_vf_enable[0x1]; 824 u8 early_vf_enable[0x1];
825 u8 reserved_at_1a9[0x2]; 825 u8 reserved_at_1a9[0x2];
826 u8 local_ca_ack_delay[0x5]; 826 u8 local_ca_ack_delay[0x5];
827 u8 reserved_at_1af[0x2]; 827 u8 port_module_event[0x1];
828 u8 reserved_at_1b0[0x1];
828 u8 ports_check[0x1]; 829 u8 ports_check[0x1];
829 u8 reserved_at_1b2[0x1]; 830 u8 reserved_at_1b2[0x1];
830 u8 disable_link_up[0x1]; 831 u8 disable_link_up[0x1];
diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h
index b3065acd20b4..dde8c7ec5ff1 100644
--- a/include/linux/mlx5/port.h
+++ b/include/linux/mlx5/port.h
@@ -94,6 +94,9 @@ enum mlx5e_link_mode {
94 94
95#define MLX5E_PROT_MASK(link_mode) (1 << link_mode) 95#define MLX5E_PROT_MASK(link_mode) (1 << link_mode)
96 96
97#define PORT_MODULE_EVENT_MODULE_STATUS_MASK 0xF
98#define PORT_MODULE_EVENT_ERROR_TYPE_MASK 0xF
99
97int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); 100int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps);
98int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, 101int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys,
99 int ptys_size, int proto_mask, u8 local_port); 102 int ptys_size, int proto_mask, u8 local_port);