mirror of
git://nv-tegra.nvidia.com/kernel/nvethernetrm.git
synced 2025-12-22 09:12:10 +03:00
core: enable m2m_sync for primary and secondary interfaces
Issue: Ask is to enable Mac-to-Mac tsync on interface for primary and secondary interface. Fix: update default value. Bug 200733666 Change-Id: Ie00e3cf96d0deb75d7c623a63bc0d06ed637ca2c Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2628723 Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Krishna Thota <kthota@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: Sheetal Tigadoli <stigadoli@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
d190c203da
commit
a5c2423f63
@@ -195,6 +195,12 @@ nve32_t osi_init_core_ops(struct osi_core_priv_data *const osi_core)
|
||||
l_core->hw_init_successful = OSI_DISABLE;
|
||||
l_core->m2m_tsync = OSI_DISABLE;
|
||||
l_core->if_init_done = OSI_ENABLE;
|
||||
if ((osi_core->m2m_role == OSI_PTP_M2M_PRIMARY) ||
|
||||
(osi_core->m2m_role == OSI_PTP_M2M_SECONDARY)) {
|
||||
l_core->m2m_tsync = OSI_ENABLE;
|
||||
} else {
|
||||
l_core->m2m_tsync = OSI_DISABLE;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -229,36 +235,24 @@ nve32_t osi_hw_core_init(struct osi_core_priv_data *const osi_core,
|
||||
nveu32_t tx_fifo_size, nveu32_t rx_fifo_size)
|
||||
{
|
||||
struct core_local *l_core = (struct core_local *)osi_core;
|
||||
nve32_t ret;
|
||||
|
||||
if (validate_if_args(osi_core, l_core) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = l_core->if_ops_p->if_core_init(osi_core, tx_fifo_size,
|
||||
return l_core->if_ops_p->if_core_init(osi_core, tx_fifo_size,
|
||||
rx_fifo_size);
|
||||
if (ret == 0) {
|
||||
l_core->hw_init_successful = OSI_ENABLE;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
nve32_t osi_hw_core_deinit(struct osi_core_priv_data *const osi_core)
|
||||
{
|
||||
struct core_local *l_core = (struct core_local *)osi_core;
|
||||
nve32_t ret;
|
||||
|
||||
if (validate_if_args(osi_core, l_core) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = l_core->if_ops_p->if_core_deinit(osi_core);
|
||||
if (ret == 0) {
|
||||
l_core->hw_init_successful = OSI_DISABLE;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return l_core->if_ops_p->if_core_deinit(osi_core);
|
||||
}
|
||||
|
||||
nve32_t osi_handle_ioctl(struct osi_core_priv_data *osi_core,
|
||||
|
||||
@@ -234,6 +234,7 @@ nve32_t osi_hal_hw_core_init(struct osi_core_priv_data *const osi_core,
|
||||
nveu32_t tx_fifo_size, nveu32_t rx_fifo_size)
|
||||
{
|
||||
struct core_local *l_core = (struct core_local *)osi_core;
|
||||
nve32_t ret;
|
||||
|
||||
if (validate_args(osi_core, l_core) < 0) {
|
||||
return -1;
|
||||
@@ -244,7 +245,13 @@ nve32_t osi_hal_hw_core_init(struct osi_core_priv_data *const osi_core,
|
||||
/* Init FRP */
|
||||
init_frp(osi_core);
|
||||
|
||||
return l_core->ops_p->core_init(osi_core, tx_fifo_size, rx_fifo_size);
|
||||
ret = l_core->ops_p->core_init(osi_core, tx_fifo_size, rx_fifo_size);
|
||||
|
||||
if (ret == 0) {
|
||||
l_core->hw_init_successful = OSI_ENABLE;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
nve32_t osi_hal_hw_core_deinit(struct osi_core_priv_data *const osi_core)
|
||||
@@ -255,6 +262,7 @@ nve32_t osi_hal_hw_core_deinit(struct osi_core_priv_data *const osi_core)
|
||||
return -1;
|
||||
}
|
||||
|
||||
l_core->hw_init_successful = OSI_DISABLE;
|
||||
l_core->ops_p->core_deinit(osi_core);
|
||||
|
||||
/* FIXME: Should be fixed */
|
||||
@@ -1735,10 +1743,6 @@ nve32_t osi_hal_handle_ioctl(struct osi_core_priv_data *osi_core,
|
||||
#endif /* !OSI_STRIPPED_LIB */
|
||||
case OSI_CMD_POLL_FOR_MAC_RST:
|
||||
ret = ops_p->poll_for_swr(osi_core);
|
||||
/* For ethernet server */
|
||||
if (ret == 0) {
|
||||
l_core->hw_init_successful = OSI_ENABLE;
|
||||
}
|
||||
break;
|
||||
|
||||
case OSI_CMD_START_MAC:
|
||||
|
||||
Reference in New Issue
Block a user