coresight: byte-cnter: Add ETR status check in bypass notifier
when usb_bypass_notify is called by ush_qdss_close(), no need to response to USB_QDSS_DISCONNECT event. so add etr status check to avoid exception. Change-Id: I4ab5d7f4ba054b0d1ecc7026b5662ddc1c8b5ca1 Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
This commit is contained in:
parent
f1dda4158d
commit
922ca3d4c9
1 changed files with 7 additions and 3 deletions
|
@ -546,10 +546,9 @@ void usb_bypass_notifier(void *priv, unsigned int event,
|
|||
if (!drvdata)
|
||||
return;
|
||||
|
||||
if (tmcdrvdata->out_mode != TMC_ETR_OUT_MODE_USB
|
||||
|| tmcdrvdata->mode == CS_MODE_DISABLED) {
|
||||
if (tmcdrvdata->out_mode != TMC_ETR_OUT_MODE_USB) {
|
||||
dev_err(&tmcdrvdata->csdev->dev,
|
||||
"%s: ETR is not USB mode, or ETR is disabled.\n", __func__);
|
||||
"%s: ETR is not USB mode\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -564,6 +563,11 @@ void usb_bypass_notifier(void *priv, unsigned int event,
|
|||
break;
|
||||
|
||||
case USB_QDSS_DISCONNECT:
|
||||
if (tmcdrvdata->mode == CS_MODE_DISABLED) {
|
||||
dev_err(&tmcdrvdata->csdev->dev,
|
||||
"%s: ETR is disabled.\n", __func__);
|
||||
return;
|
||||
}
|
||||
usb_bypass_stop(drvdata);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue