Revert "dsp/ipc: check q6 state before calling gpr_snd_pkt"

This reverts commit a45c3be654.

Signed-off-by: V S Ganga VaraPrasad (VARA) Adabala <quic_vadabala@quicinc.com>
This commit is contained in:
V S Ganga VaraPrasad (VARA) Adabala
2023-09-21 19:06:31 +05:30
parent 11ddbf9891
commit ceefe7bc5d
2 changed files with 7 additions and 15 deletions

View File

@@ -95,12 +95,6 @@ int gpr_send_pkt(struct gpr_device *adev, struct gpr_pkt *pkt)
uint32_t pkt_size;
int ret;
if (gpr_get_q6_state() == GPR_SUBSYS_DOWN)
{
pr_err_ratelimited("%s: q6 state is down adev[%pK]\n", __func__, adev);
return -EINVAL;
}
if(!adev)
{
pr_err_ratelimited("%s: enter pointer adev[%pK] \n", __func__, adev);
@@ -124,12 +118,13 @@ int gpr_send_pkt(struct gpr_device *adev, struct gpr_pkt *pkt)
if ((adev->domain_id == GPR_DOMAIN_ADSP) &&
(gpr_get_q6_state() != GPR_SUBSYS_LOADED)) {
dev_err_ratelimited(gpr->dev, "%s: Still Dsp is not Up\n", __func__);
dev_err_ratelimited(gpr->dev, "%s: domain_id[%d], Still Dsp is not Up\n",
__func__, adev->domain_id);
return -ENETRESET;
} else if ((adev->domain_id == GPR_DOMAIN_MODEM) &&
} else if ((adev->domain_id == GPR_DOMAIN_MODEM) &&
(gpr_get_modem_state() == GPR_SUBSYS_DOWN)) {
dev_err_ratelimited(gpr->dev, "%s: Still Modem is not Up\n",
__func__);
dev_err_ratelimited(gpr->dev, "%s: domain_id[%d], Still Modem is not Up\n",
__func__, adev->domain_id );
return -ENETRESET;
}
@@ -143,6 +138,7 @@ int gpr_send_pkt(struct gpr_device *adev, struct gpr_pkt *pkt)
adev->svc_id, __func__, pkt_size);
ret = rpmsg_trysend(gpr->ch, pkt, pkt_size);
spin_unlock_irqrestore(&adev->lock, flags);
return ret ? ret : pkt_size;
}
EXPORT_SYMBOL_GPL(gpr_send_pkt);