Skip to content

Commit 903e38b

Browse files
author
Muralidharan Karicheri
committed
Merge pull request torvalds#178 in PROCESSOR-SDK/processor-sdk-linux from plsdk-2753 to processor-sdk-linux-4.19.y
* commit 'e4d2539dc6149139c02223b99ff5412fd07707a4': net: ethernet: ti: ptp_bc: allow PTP sync enable when PTP BC is disabled
2 parents de53fb5 + e4d2539 commit 903e38b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/net/ethernet/ti/ptp_bc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ bool ptp_bc_clock_sync_enable(int clkid, int enable)
121121
unsigned long flags;
122122
bool allow = false;
123123

124+
if (!ptp_bc_initialized)
125+
return true;
126+
124127
if (clkid < 0 || clkid >= MAX_CLKS)
125128
return false;
126129

@@ -170,7 +173,7 @@ int ptp_bc_clock_register(int clocktype)
170173
int id = -1;
171174

172175
if (!ptp_bc_initialized) {
173-
pr_err("ptp_bc error: NOT initialized.\n");
176+
pr_debug("ptp_bc error: NOT initialized.\n");
174177
return -1;
175178
}
176179

@@ -204,6 +207,9 @@ EXPORT_SYMBOL_GPL(ptp_bc_clock_unregister);
204207
void ptp_bc_mux_ctrl_register(void *ctx, spinlock_t *lock,
205208
ptp_bc_mux_ctrl_handle_t handler)
206209
{
210+
if (!ptp_bc_initialized)
211+
return;
212+
207213
if (ctx && lock && handler) {
208214
bc_mux_ctrl_handler = handler;
209215
bc_mux_ctrl_ctx = ctx;

0 commit comments

Comments
 (0)