mirror of
git://nv-tegra.nvidia.com/kernel/nvethernetrm.git
synced 2025-12-24 02:22:16 +03:00
nvethernetrm: take arguments field out of union
ioctl_data as well as arguments required to support PTP IOCTL in ASIL path Bug 3868362 Change-Id: Id6d3cf7626b7426a8e44a086335501cf86f50d62 Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2807393 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
Bhadram Varka
parent
b661f52642
commit
a84c9dafe3
@@ -140,9 +140,10 @@ typedef struct ivc_msg_common {
|
|||||||
/** message count, used for debug */
|
/** message count, used for debug */
|
||||||
nveu32_t count;
|
nveu32_t count;
|
||||||
|
|
||||||
|
/** IVC argument structure */
|
||||||
|
ivc_args args;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
/** IVC argument structure */
|
|
||||||
ivc_args args;
|
|
||||||
/** avb algorithm structure */
|
/** avb algorithm structure */
|
||||||
struct osi_core_avb_algorithm avb_algo;
|
struct osi_core_avb_algorithm avb_algo;
|
||||||
/** OSI filter structure */
|
/** OSI filter structure */
|
||||||
|
|||||||
@@ -211,6 +211,8 @@
|
|||||||
#define OSI_NONE 0U
|
#define OSI_NONE 0U
|
||||||
#define OSI_NONE_SIGNED 0
|
#define OSI_NONE_SIGNED 0
|
||||||
#define OSI_DISABLE 0U
|
#define OSI_DISABLE 0U
|
||||||
|
#define OSI_H_DISABLE 0x10101010U
|
||||||
|
#define OSI_H_ENABLE (~OSI_H_DISABLE)
|
||||||
|
|
||||||
#define OSI_BIT(nr) ((nveu32_t)1 << (nr))
|
#define OSI_BIT(nr) ((nveu32_t)1 << (nr))
|
||||||
|
|
||||||
|
|||||||
@@ -149,10 +149,10 @@ static nve32_t ivc_write_phy_reg(struct osi_core_priv_data *const osi_core,
|
|||||||
osi_memset(&msg, 0, sizeof(msg));
|
osi_memset(&msg, 0, sizeof(msg));
|
||||||
|
|
||||||
msg.cmd = write_phy_reg;
|
msg.cmd = write_phy_reg;
|
||||||
msg.data.args.arguments[index++] = phyaddr;
|
msg.args.arguments[index++] = phyaddr;
|
||||||
msg.data.args.arguments[index++] = phyreg;
|
msg.args.arguments[index++] = phyreg;
|
||||||
msg.data.args.arguments[index++] = phydata;
|
msg.args.arguments[index++] = phydata;
|
||||||
msg.data.args.count = index;
|
msg.args.count = index;
|
||||||
|
|
||||||
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
||||||
}
|
}
|
||||||
@@ -180,9 +180,9 @@ static nve32_t ivc_read_phy_reg(struct osi_core_priv_data *const osi_core,
|
|||||||
osi_memset(&msg, 0, sizeof(msg));
|
osi_memset(&msg, 0, sizeof(msg));
|
||||||
|
|
||||||
msg.cmd = read_phy_reg;
|
msg.cmd = read_phy_reg;
|
||||||
msg.data.args.arguments[index++] = phyaddr;
|
msg.args.arguments[index++] = phyaddr;
|
||||||
msg.data.args.arguments[index++] = phyreg;
|
msg.args.arguments[index++] = phyreg;
|
||||||
msg.data.args.count = index;
|
msg.args.count = index;
|
||||||
|
|
||||||
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
||||||
}
|
}
|
||||||
@@ -386,9 +386,9 @@ static nve32_t ivc_macsec_enable(struct osi_core_priv_data *const osi_core,
|
|||||||
osi_memset(&msg, 0, sizeof(msg));
|
osi_memset(&msg, 0, sizeof(msg));
|
||||||
|
|
||||||
msg.cmd = en_macsec;
|
msg.cmd = en_macsec;
|
||||||
msg.data.args.arguments[index] = enable;
|
msg.args.arguments[index] = enable;
|
||||||
index++;
|
index++;
|
||||||
msg.data.args.count = index;
|
msg.args.count = index;
|
||||||
|
|
||||||
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
||||||
}
|
}
|
||||||
@@ -412,9 +412,9 @@ static nve32_t ivc_macsec_loopback_config(struct osi_core_priv_data *const osi_c
|
|||||||
osi_memset(&msg, 0, sizeof(msg));
|
osi_memset(&msg, 0, sizeof(msg));
|
||||||
|
|
||||||
msg.cmd = loopback_config_macsec;
|
msg.cmd = loopback_config_macsec;
|
||||||
msg.data.args.arguments[index] = enable;
|
msg.args.arguments[index] = enable;
|
||||||
index++;
|
index++;
|
||||||
msg.data.args.count = index;
|
msg.args.count = index;
|
||||||
|
|
||||||
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
||||||
}
|
}
|
||||||
@@ -473,9 +473,9 @@ static nve32_t ivc_macsec_cipher_config(struct osi_core_priv_data *const osi_cor
|
|||||||
osi_memset(&msg, 0, sizeof(msg));
|
osi_memset(&msg, 0, sizeof(msg));
|
||||||
|
|
||||||
msg.cmd = cipher_config;
|
msg.cmd = cipher_config;
|
||||||
msg.data.args.arguments[index] = cipher;
|
msg.args.arguments[index] = cipher;
|
||||||
index++;
|
index++;
|
||||||
msg.data.args.count = index;
|
msg.args.count = index;
|
||||||
|
|
||||||
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
||||||
}
|
}
|
||||||
@@ -564,9 +564,9 @@ static nve32_t ivc_macsec_init(struct osi_core_priv_data *const osi_core,
|
|||||||
osi_memset(&msg, 0, sizeof(msg));
|
osi_memset(&msg, 0, sizeof(msg));
|
||||||
|
|
||||||
msg.cmd = init_macsec;
|
msg.cmd = init_macsec;
|
||||||
msg.data.args.arguments[index] = mtu;
|
msg.args.arguments[index] = mtu;
|
||||||
index++;
|
index++;
|
||||||
msg.data.args.count = index;
|
msg.args.count = index;
|
||||||
|
|
||||||
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
return osi_core->osd_ops.ivc_send(osi_core, &msg, sizeof(msg));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user