Skip to content

Commit

Permalink
diag: Update hdlc mode for peripherals after mdlog exit
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Manoj Prabhu B committed Jul 29, 2019
1 parent af9de01 commit 6f8f44c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/char/diag/diagchar_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,11 @@ static void diag_close_logging_process(const int pid)
}
}
}
mutex_lock(&driver->hdlc_disable_mutex);
mutex_lock(&driver->md_session_lock);
diag_md_session_close(pid);
mutex_unlock(&driver->md_session_lock);
mutex_unlock(&driver->hdlc_disable_mutex);
diag_switch_logging(&params);
mutex_unlock(&driver->diagchar_mutex);
}
Expand Down Expand Up @@ -1436,6 +1438,8 @@ static void diag_md_session_close(int pid)
driver->md_session_map[proc][i] = NULL;
driver->md_session_mask[proc] &=
~session_info->peripheral_mask[proc];
driver->p_hdlc_disabled[i] =
driver->hdlc_disabled;
}
}
diag_log_mask_free(session_info->log_mask);
Expand Down

1 comment on commit 6f8f44c

@stefanhh0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already cherry-picked, see: ffadafd

Please sign in to comment.