Commit 2f67af8c authored by Tomer Tayar's avatar Tomer Tayar Committed by David S. Miller

qed: Pass src/dst sizes when interacting with MFW

The driver interaction with management firmware involves a union
of all the data-members relating to the commands the driver prepares.

Current interface assumes the caller always passes such a union -
but thats cumbersome as well as risky [chancing a stack corruption
in case caller accidentally passes a smaller member instead of union].

Change implementation so that caller could pass a pointer to any
of the members instead of the union.
Signed-off-by: default avatarTomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4ed1eea8
This diff is collapsed.
...@@ -516,8 +516,10 @@ struct qed_mcp_info { ...@@ -516,8 +516,10 @@ struct qed_mcp_info {
struct qed_mcp_mb_params { struct qed_mcp_mb_params {
u32 cmd; u32 cmd;
u32 param; u32 param;
union drv_union_data *p_data_src; void *p_data_src;
union drv_union_data *p_data_dst; u8 data_src_size;
void *p_data_dst;
u8 data_dst_size;
u32 mcp_resp; u32 mcp_resp;
u32 mcp_param; u32 mcp_param;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment