Skip to content

Commit

Permalink
qed: Add support for debug data collection
Browse files Browse the repository at this point in the history
This patch adds the support for dumping and formatting the HW/FW debug data.

Signed-off-by: Tomer Tayar <Tomer.Tayar@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tomer Tayar authored and davem330 committed Sep 8, 2016
1 parent 936f060 commit c965db4
Show file tree
Hide file tree
Showing 8 changed files with 8,919 additions and 12 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/qed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ obj-$(CONFIG_QED) := qed.o

qed-y := qed_cxt.o qed_dev.o qed_hw.o qed_init_fw_funcs.o qed_init_ops.o \
qed_int.o qed_main.o qed_mcp.o qed_sp_commands.o qed_spq.o qed_l2.o \
qed_selftest.o qed_dcbx.o
qed_selftest.o qed_dcbx.o qed_debug.o
qed-$(CONFIG_QED_SRIOV) += qed_sriov.o qed_vf.o
20 changes: 20 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/zlib.h>
#include <linux/hashtable.h>
#include <linux/qed/qed_if.h>
#include "qed_debug.h"
#include "qed_hsi.h"

extern const struct qed_common_ops qed_common_ops_pass;
Expand Down Expand Up @@ -395,6 +396,8 @@ struct qed_hwfn {
/* Buffer for unzipping firmware data */
void *unzip_buf;

struct dbg_tools_data dbg_info;

struct qed_simd_fp_handler simd_proto_handler[64];

#ifdef CONFIG_QED_SRIOV
Expand Down Expand Up @@ -430,6 +433,19 @@ struct qed_int_params {
u8 fp_msix_cnt;
};

struct qed_dbg_feature {
struct dentry *dentry;
u8 *dump_buf;
u32 buf_size;
u32 dumped_dwords;
};

struct qed_dbg_params {
struct qed_dbg_feature features[DBG_FEATURE_NUM];
u8 engine_for_debug;
bool print_data;
};

struct qed_dev {
u32 dp_module;
u8 dp_level;
Expand All @@ -444,6 +460,8 @@ struct qed_dev {
CHIP_REV_IS_A0(dev))
#define QED_IS_BB_B0(dev) (QED_IS_BB(dev) && \
CHIP_REV_IS_B0(dev))
#define QED_IS_AH(dev) ((dev)->type == QED_DEV_TYPE_AH)
#define QED_IS_K2(dev) QED_IS_AH(dev)

#define QED_GET_TYPE(dev) (QED_IS_BB_A0(dev) ? CHIP_BB_A0 : \
QED_IS_BB_B0(dev) ? CHIP_BB_B0 : CHIP_K2)
Expand Down Expand Up @@ -544,6 +562,8 @@ struct qed_dev {
} protocol_ops;
void *ops_cookie;

struct qed_dbg_params dbg_params;

const struct firmware *firmware;
};

Expand Down
Loading

0 comments on commit c965db4

Please sign in to comment.