History

Merge tag 'mlx5-updates-2019-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says: ==================== mlx5-updates-2019-06-13 Mlx5 devlink health fw reporters and sw reset support This series provides mlx5 firmware reset support and firmware devlink health reporters. 1) Add initial mlx5 kernel documentation and include devlink health reporters 2) Add CR-Space access and FW Crdump snapshot support via devlink region_snapshot 3) Issue software reset upon FW asserts 4) Add fw and fw_fatal devlink heath reporters to follow fw errors indication by dump and recover procedures and enable trigger these functionality by user. 4.1) fw reporter: The fw reporter implements diagnose and dump callbacks. It follows symptoms of fw error such as fw syndrome by triggering fw core dump and storing it and any other fw trace into the dump buffer. The fw reporter diagnose command can be triggered any time by the user to check current fw status. 4.2) fw_fatal repoter: The fw_fatal reporter implements dump and recover callbacks. It follows fatal errors indications by CR-space dump and recover flow. The CR-space dump uses vsc interface which is valid even if the FW command interface is not functional, which is the case in most FW fatal errors. The CR-space dump is stored as a memory region snapshot to ease read by address. The recover function runs recover flow which reloads the driver and triggers fw reset if needed. ====================

David S. Miller committed 7 years ago

Commit b4a6d9a2 parents 363887a 06efeb519 files · +1516 −144Browse files

Showing the changes to include/linux (2 of 19 files). Show all

Unified · Split

2 files
  1. include/linux/mlx5/device.h +9 −1
  2. include/linux/mlx5/driver.h +10 −3
include/linux/mlx5/device.h+9−1
@@ -510,6 +510,10 @@ struct mlx5_cmd_layout { · 509 unmodified lines
510510 u8 status_own;
511511 };
512512
513+enum mlx5_fatal_assert_bit_offsets {
514+ MLX5_RFR_OFFSET = 31,
515+};
516+
513517 struct health_buffer {
514518 __be32 assert_var[5];
515519 __be32 rsvd0[3];
@@ -518,12 +522,16 @@ struct health_buffer { · 2 unmodified lines
518522 __be32 rsvd1[2];
519523 __be32 fw_ver;
520524 __be32 hw_id;
521− __be32 rsvd2;
525+ __be32 rfr;
522526 u8 irisc_index;
523527 u8 synd;
524528 __be16 ext_synd;
525529 };
526530
531+enum mlx5_initializing_bit_offsets {
532+ MLX5_FW_RESET_SUPPORTED_OFFSET = 30,
533+};
534+
527535 enum mlx5_cmd_addr_l_sz_offset {
528536 MLX5_NIC_IFC_OFFSET = 8,
529537 };
include/linux/mlx5/driver.h+10−3
@@ -53,6 +53,7 @@ · 52 unmodified lines
5353 #include <linux/mlx5/eq.h>
5454 #include <linux/timecounter.h>
5555 #include <linux/ptp_clock_kernel.h>
56+#include <net/devlink.h>
5657
5758 enum {
5859 MLX5_BOARD_ID_LEN = 64,
@@ -434,13 +435,18 @@ struct mlx5_core_health { · 375 unmodified lines
434435 struct timer_list timer;
435436 u32 prev;
436437 int miss_counter;
437− bool sick;
438+ u8 synd;
439+ u32 fatal_error;
440+ u32 crdump_size;
438441 /* wq spinlock to synchronize draining */
439442 spinlock_t wq_lock;
440443 struct workqueue_struct *wq;
441444 unsigned long flags;
442− struct work_struct work;
445+ struct work_struct fatal_report_work;
446+ struct work_struct report_work;
443447 struct delayed_work recover_work;
448+ struct devlink_health_reporter *fw_reporter;
449+ struct devlink_health_reporter *fw_fatal_reporter;
444450 };
445451
446452 struct mlx5_qp_table {
@@ -581,6 +587,7 @@ struct mlx5_priv { · 134 unmodified lines
581587 };
582588
583589 enum mlx5_device_state {
590+ MLX5_DEVICE_STATE_UNINITIALIZED,
584591 MLX5_DEVICE_STATE_UP,
585592 MLX5_DEVICE_STATE_INTERNAL_ERROR,
586593 };
@@ -693,6 +700,7 @@ struct mlx5_core_dev { · 106 unmodified lines
693700 struct mlx5_clock clock;
694701 struct mlx5_ib_clock_info *clock_info;
695702 struct mlx5_fw_tracer *tracer;
703+ u32 vsc_addr;
696704 };
697705
698706 struct mlx5_db {
@@ -904,7 +912,6 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev); · 205 unmodified lines
904912 void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health);
905913 void mlx5_drain_health_wq(struct mlx5_core_dev *dev);
906914 void mlx5_trigger_health_work(struct mlx5_core_dev *dev);
907−void mlx5_drain_health_recovery(struct mlx5_core_dev *dev);
908915 int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size,
909916 struct mlx5_frag_buf *buf, int node);
910917 int mlx5_buf_alloc(struct mlx5_core_dev *dev,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t