aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qed/qed_mcp.h
diff options
context:
space:
mode:
authorTomer Tayar <Tomer.Tayar@cavium.com>2017-03-23 15:50:16 +0200
committerDavid S. Miller <davem@davemloft.net>2017-03-23 11:53:29 -0700
commit2f67af8c596e16760dc7e7d28ee0edd7ce59f2b4 (patch)
treea72f513e0ae4556203f86a3c9200fd0a8797904e /drivers/net/ethernet/qlogic/qed/qed_mcp.h
parentqed: Revise MFW command locking (diff)
downloadlinux-dev-2f67af8c596e16760dc7e7d28ee0edd7ce59f2b4.tar.xz
linux-dev-2f67af8c596e16760dc7e7d28ee0edd7ce59f2b4.zip
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: Tomer Tayar <Tomer.Tayar@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_mcp.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.h b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
index 0f7b26818acf..f63693d38934 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
@@ -516,8 +516,10 @@ struct qed_mcp_info {
struct qed_mcp_mb_params {
u32 cmd;
u32 param;
- union drv_union_data *p_data_src;
- union drv_union_data *p_data_dst;
+ void *p_data_src;
+ u8 data_src_size;
+ void *p_data_dst;
+ u8 data_dst_size;
u32 mcp_resp;
u32 mcp_param;
};