From 9e54ba7c3752f27456ca691acc3f154e2597478c Mon Sep 17 00:00:00 2001 From: Sudarsana Reddy Kalluru Date: Wed, 11 Sep 2019 04:42:50 -0700 Subject: qed*: Fix size of config attribute dump. Driver currently returns max-buf-size as size of the config attribute. This patch incorporates changes to read this value from MFW (if available) and provide it to the user. Also did a trivial clean up in this path. Fixes: d44a3ced7023 ("qede: Add support for reading the config id attributes.") Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller --- include/linux/qed/qed_if.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/linux/qed') diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h index e35463860c84..b5db1ee96d78 100644 --- a/include/linux/qed/qed_if.h +++ b/include/linux/qed/qed_if.h @@ -1143,6 +1143,14 @@ struct qed_common_ops { */ int (*read_nvm_cfg)(struct qed_dev *cdev, u8 **buf, u32 cmd, u32 entity_id); +/** + * @brief read_nvm_cfg - Read NVM config attribute value. + * @param cdev + * @param cmd - NVM CFG command id + * + * @return config id length, 0 on error. + */ + int (*read_nvm_cfg_len)(struct qed_dev *cdev, u32 cmd); /** * @brief set_grc_config - Configure value for grc config id. -- cgit v1.2.3