Browse Source

ipc: Remove adsp/modem up check in gpr_send_pkt

During SSR up, gpr-lite tries to register with audio_notifier during
gpr_probe, audio_notifier needs notifier_mutex during registration,
this mutex can also be held by audio_notifer callback. In some corner
cases, it was never getting unlocked from audio_notifier_callback,
because clk_enable/disable calls will call gpr_send_pkt, but as ADSP up
command is still not received by gpr-lite, it was returning back that
command with error code -ENETRESET. This creates a deadlock situation,
to avoid such corner cases, remove check from gpr_send_pkt. GPR clients
can ensure apm is up before sending the data.

Change-Id: I8893cc33de30883f17da2e4a11a036bcdfb69780
Signed-off-by: Ritu Sharma <[email protected]>
Ritu Sharma 4 years ago
parent
commit
2922723c6f
1 changed files with 0 additions and 12 deletions
  1. 0 12
      ipc/gpr-lite.c

+ 0 - 12
ipc/gpr-lite.c

@@ -105,18 +105,6 @@ int gpr_send_pkt(struct gpr_device *adev, struct gpr_pkt *pkt)
 
 	gpr = dev_get_drvdata(adev->dev.parent);
 
-	if ((adev->domain_id == GPR_DOMAIN_ADSP) &&
-	    (gpr_get_q6_state() != GPR_SUBSYS_LOADED)) {
-		dev_err(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) &&
-		   (gpr_get_modem_state() == GPR_SUBSYS_DOWN)) {
-		dev_err(gpr->dev, "%s: domain_id[%d], Still Modem is not Up\n",
-			__func__, adev->domain_id );
-		return -ENETRESET;
-	}
-
 	spin_lock_irqsave(&adev->lock, flags);
 
 	hdr = &pkt->hdr;