Skip to content

Commit 6f8f44c

Browse files
author
Manoj Prabhu B
committed
diag: Update hdlc mode for peripherals after mdlog exit
Presently hdlc mode is not getting updated for a peripheral after multimode mdlog exit. Update the peripheral's hdlc mode while closing the mdlog session. Change-Id: I255db98b592648df00e779027232a55c4585de6a Signed-off-by: Manoj Prabhu B <[email protected]>
1 parent af9de01 commit 6f8f44c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/char/diag/diagchar_core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,11 @@ static void diag_close_logging_process(const int pid)
498498
}
499499
}
500500
}
501+
mutex_lock(&driver->hdlc_disable_mutex);
501502
mutex_lock(&driver->md_session_lock);
502503
diag_md_session_close(pid);
503504
mutex_unlock(&driver->md_session_lock);
505+
mutex_unlock(&driver->hdlc_disable_mutex);
504506
diag_switch_logging(&params);
505507
mutex_unlock(&driver->diagchar_mutex);
506508
}
@@ -1436,6 +1438,8 @@ static void diag_md_session_close(int pid)
14361438
driver->md_session_map[proc][i] = NULL;
14371439
driver->md_session_mask[proc] &=
14381440
~session_info->peripheral_mask[proc];
1441+
driver->p_hdlc_disabled[i] =
1442+
driver->hdlc_disabled;
14391443
}
14401444
}
14411445
diag_log_mask_free(session_info->log_mask);

0 commit comments

Comments
 (0)