Merge "diag: Flush control workqueue immediately on channel close"

This commit is contained in:
Linux Build Service Account 2017-07-28 00:21:12 -07:00 committed by Gerrit - the friendly Code Review server
commit 8233df121f
2 changed files with 3 additions and 1 deletions

View file

@ -67,7 +67,6 @@ void diag_cntl_channel_close(struct diagfwd_info *p_info)
driver->feature[peripheral].sent_feature_mask = 0;
driver->feature[peripheral].rcvd_feature_mask = 0;
flush_workqueue(driver->cntl_wq);
reg_dirty |= PERIPHERAL_MASK(peripheral);
diag_cmd_remove_reg_by_proc(peripheral);
driver->feature[peripheral].stm_support = DISABLE_STM;

View file

@ -1285,6 +1285,9 @@ int diagfwd_channel_close(struct diagfwd_info *fwd_info)
if (!fwd_info)
return -EIO;
if (fwd_info->type == TYPE_CNTL)
flush_workqueue(driver->cntl_wq);
mutex_lock(&driver->diagfwd_channel_mutex[fwd_info->peripheral]);
fwd_info->ch_open = 0;
if (fwd_info && fwd_info->c_ops && fwd_info->c_ops->close)