summaryrefslogtreecommitdiffstats
path: root/include/linux/qed
diff options
context:
space:
mode:
authorIgor Russkikh <irusskikh@marvell.com>2020-08-23 14:19:26 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-24 18:01:32 -0700
commit755f982bb1ff469a181df3eaf8dd5d769267ab8e (patch)
treed8d9bc85ad55e9c2951bb84230794c1902d56c76 /include/linux/qed
parent52306dee5443d2a359c6c64649f8cd80024c542c (diff)
downloadlinux-755f982bb1ff469a181df3eaf8dd5d769267ab8e.tar.gz
linux-755f982bb1ff469a181df3eaf8dd5d769267ab8e.tar.bz2
linux-755f982bb1ff469a181df3eaf8dd5d769267ab8e.zip
qed/qede: make devlink survive recovery
Devlink instance lifecycle was linked to qed_dev object, that caused devlink to be recreated on each recovery. Changing it by making higher level driver (qede) responsible for its life. This way devlink now survives recoveries. qede now stores devlink structure pointer as a part of its device object, devlink private data contains a linkage structure, qed_devlink. Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: Alexander Lobakin <alobakin@marvell.com> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/qed')
-rw-r--r--include/linux/qed/qed_if.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index cd6a5c7e56eb..d8368e1770df 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -21,6 +21,7 @@
#include <linux/qed/common_hsi.h>
#include <linux/qed/qed_chain.h>
#include <linux/io-64-nonatomic-lo-hi.h>
+#include <net/devlink.h>
enum dcbx_protocol_type {
DCBX_PROTOCOL_ISCSI,
@@ -779,6 +780,10 @@ enum qed_nvm_flash_cmd {
QED_NVM_FLASH_CMD_NVM_MAX,
};
+struct qed_devlink {
+ struct qed_dev *cdev;
+};
+
struct qed_common_cb_ops {
void (*arfs_filter_op)(void *dev, void *fltr, u8 fw_rc);
void (*link_update)(void *dev, struct qed_link_output *link);
@@ -1137,6 +1142,10 @@ struct qed_common_ops {
*
*/
int (*set_grc_config)(struct qed_dev *cdev, u32 cfg_id, u32 val);
+
+ struct devlink* (*devlink_register)(struct qed_dev *cdev);
+
+ void (*devlink_unregister)(struct devlink *devlink);
};
#define MASK_FIELD(_name, _value) \