From nobody Fri Dec 19 19:00:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C3D4C83F1A for ; Thu, 31 Aug 2023 01:14:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345512AbjHaBOS (ORCPT ); Wed, 30 Aug 2023 21:14:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345476AbjHaBOQ (ORCPT ); Wed, 30 Aug 2023 21:14:16 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25BD4CE6 for ; Wed, 30 Aug 2023 18:14:09 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1bdbf10333bso2080935ad.1 for ; Wed, 30 Aug 2023 18:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1693444448; x=1694049248; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Yi6iDn2wgjxe+kNysUVpTjdo2oBFvbwTmlzECQzPgK4=; b=SSBvqxLqzTclllT8Qi74+ZrY7KHUP0okB5bi8PZDIi49wbN8LGeqCPEy0i9ObHyr16 BwRjeWZLDCASnZQ/8KV6lOCL51Fv1aJkE6JALvWqe2zcoGFmyooezpqqpgO7hU1BWSD2 uYnxsA44DiM+46/hYDCZ6kzDRVAp5e35f2d/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693444448; x=1694049248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Yi6iDn2wgjxe+kNysUVpTjdo2oBFvbwTmlzECQzPgK4=; b=kYm1pV6ycs4yVc3Wg9yH5PA21c2aTYXhcnHRV/QY159Bi6NDJbqp0n+K+v81a8Khs0 stFMvn2u6Cvha6mzPn9nTVrN8EWh4RbviB2pC89HHE2EToZ2w0OH58vnv9JGVu0DBcsj oSsDaqF1FZC3CfsXI7BN3IwhuS4WwPeIyVzgikpZdC5tUhUxqatX55S2uoUIlz65DrvA sBvjJcsAA1E11QtH709FNwelEw8Co7mvfML6n0KbSCoSsNHJbRFTRGWtT7l4hrvR+HDp tGPn+bQuHmOFJMWtrTPBE2hFTPJGoPUVioZ73N7BZJpv6SG5oevmOiGzmX5/vTHupS+c iuyg== X-Gm-Message-State: AOJu0YwMPD+vIrBx5YXK89xCdf0FPu9FddkqHU3SgdVJi4oE6mkCQolA UGiZkyglZ0mzA7zPO7tqJ5lCDrOLvznsFHW93/g= X-Google-Smtp-Source: AGHT+IHew80vJT+8xJZut5mz37IpFi9RdN3+DaIDAboblAp+7f8qYSDoSaiqwxvec94o5LPnr5OQKA== X-Received: by 2002:a17:902:8e89:b0:1c0:b7f4:5b86 with SMTP id bg9-20020a1709028e8900b001c0b7f45b86mr3639342plb.65.1693444448598; Wed, 30 Aug 2023 18:14:08 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:11a:201:248f:d364:b451:2bc0]) by smtp.gmail.com with ESMTPSA id im23-20020a170902bb1700b001bbb7af4963sm132604plb.68.2023.08.30.18.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Aug 2023 18:14:08 -0700 (PDT) From: Stephen Boyd To: Mika Westerberg , Hans de Goede , Mark Gross Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, platform-driver-x86@vger.kernel.org, Andy Shevchenko , Kuppuswamy Sathyanarayanan , Prashant Malani Subject: [PATCH 1/3] platform/x86: intel_scu_ipc: Check status after timeouts in busy_loop() Date: Wed, 30 Aug 2023 18:14:01 -0700 Message-ID: <20230831011405.3246849-2-swboyd@chromium.org> X-Mailer: git-send-email 2.42.0.rc2.253.gd59a3bf2b4-goog In-Reply-To: <20230831011405.3246849-1-swboyd@chromium.org> References: <20230831011405.3246849-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" It's possible for the polling loop in busy_loop() to get scheduled away for a long time. status =3D ipc_read_status(scu); if (!(status & IPC_STATUS_BUSY)) If this happens, then the status bit could change and this function would never test it again after checking the jiffies against the timeout limit. Polling code should check the condition one more time after the timeout in case this happens. The read_poll_timeout() helper implements this logic, and is shorter, so simply use that helper here. Cc: Prashant Malani Cc: Andy Shevchenko Fixes: e7b7ab3847c9 ("platform/x86: intel_scu_ipc: Sleeping is fine when po= lling") Signed-off-by: Stephen Boyd Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/platform/x86/intel_scu_ipc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/in= tel_scu_ipc.c index 6851d10d6582..5a37becc65aa 100644 --- a/drivers/platform/x86/intel_scu_ipc.c +++ b/drivers/platform/x86/intel_scu_ipc.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include =20 @@ -231,19 +232,15 @@ static inline u32 ipc_data_readl(struct intel_scu_ipc= _dev *scu, u32 offset) /* Wait till scu status is busy */ static inline int busy_loop(struct intel_scu_ipc_dev *scu) { - unsigned long end =3D jiffies + IPC_TIMEOUT; - - do { - u32 status; - - status =3D ipc_read_status(scu); - if (!(status & IPC_STATUS_BUSY)) - return (status & IPC_STATUS_ERR) ? -EIO : 0; + u8 status; + int err; =20 - usleep_range(50, 100); - } while (time_before(jiffies, end)); + err =3D read_poll_timeout(ipc_read_status, status, !(status & IPC_STATUS_= BUSY), + 100, jiffies_to_usecs(IPC_TIMEOUT), false, scu); + if (err) + return err; =20 - return -ETIMEDOUT; + return (status & IPC_STATUS_ERR) ? -EIO : 0; } =20 /* Wait till ipc ioc interrupt is received or timeout in 10 HZ */ --=20 https://chromeos.dev From nobody Fri Dec 19 19:00:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E87FFC83F14 for ; Thu, 31 Aug 2023 01:14:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345522AbjHaBOU (ORCPT ); Wed, 30 Aug 2023 21:14:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345504AbjHaBOR (ORCPT ); Wed, 30 Aug 2023 21:14:17 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A893CE8 for ; Wed, 30 Aug 2023 18:14:10 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1c0c6d4d650so2177535ad.0 for ; Wed, 30 Aug 2023 18:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1693444450; x=1694049250; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Evb7/BN7ItVli8O1MCLcSe5YscQaq6FblNFUqza6B98=; b=XRUgTPyN2NE22JnmgQAaVgbzPgd0oJ2+K5S26+wWwAlMgA9PNGZFbGFy1ucyV36ENm 1dVCwOgf7TutnTKhf2XFcADN3lCVWcLA4DC3ZovtJqFq+DENxAq+q5aHoFCz+UQpECw9 rlUVgS3/9X2p04C8YAZKp3+lMZzatbRyxx7aE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693444450; x=1694049250; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Evb7/BN7ItVli8O1MCLcSe5YscQaq6FblNFUqza6B98=; b=U/kqijmI9w3cqIp1aMTpEq3HfQ+HTXGwvMiHT/HwDWMumV4RkqOfAE4r1mmJ0e0uXq VpIs7xsAjuvtK2vtJDyfF1goZMwrj6eScPI4hrNCnlRhi4fZrQiLEOR0OLxfQ8RnJHHs c0lxquvZmop4eVmGdmYI3cwJrs3SlS1nAi3pve0FdG/k9FuCs5G69kf21hZbOpPUxSGN IVoCY0R+CLkmWWftkLrqQwsU2uEKwJcABH+BVud8HjLTcbrUpKRlnmXucgmtSTOalO6n Xqym3Xy1Ovd1CDatH6u3zY8reTiSPnV36n+qfO0ufcBcfRPVLbxb86E707uwAhbksXH/ hYDQ== X-Gm-Message-State: AOJu0Yz78AObmha/IYi3TzTeAZgEc6csoOlGN7jBYc727aiPuuiGUHR4 o7wHqzcSFsQXC77mSP7pRaSB1Q== X-Google-Smtp-Source: AGHT+IFYusCNVLK7C29ZkzYj1eGJCKZt8+lyPCyvbxdXZnw6xYC4O8RV0ZX9Jg5wTDXLG27eEM/K/Q== X-Received: by 2002:a17:902:db0c:b0:1b9:e81f:fb08 with SMTP id m12-20020a170902db0c00b001b9e81ffb08mr4163642plx.55.1693444449861; Wed, 30 Aug 2023 18:14:09 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:11a:201:248f:d364:b451:2bc0]) by smtp.gmail.com with ESMTPSA id im23-20020a170902bb1700b001bbb7af4963sm132604plb.68.2023.08.30.18.14.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Aug 2023 18:14:09 -0700 (PDT) From: Stephen Boyd To: Mika Westerberg , Hans de Goede , Mark Gross Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, platform-driver-x86@vger.kernel.org, Andy Shevchenko , Kuppuswamy Sathyanarayanan , Prashant Malani Subject: [PATCH 2/3] platform/x86: intel_scu_ipc: Check status upon timeout in ipc_wait_for_interrupt() Date: Wed, 30 Aug 2023 18:14:02 -0700 Message-ID: <20230831011405.3246849-3-swboyd@chromium.org> X-Mailer: git-send-email 2.42.0.rc2.253.gd59a3bf2b4-goog In-Reply-To: <20230831011405.3246849-1-swboyd@chromium.org> References: <20230831011405.3246849-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" It's possible for the completion in ipc_wait_for_interrupt() to timeout, simply because the interrupt was delayed in being processed. A timeout in itself is not an error. This driver should check the status register upon a timeout to ensure that scheduling or interrupt processing delays don't affect the outcome of the IPC return value. CPU0 SCU ---- --- ipc_wait_for_interrupt() wait_for_completion_timeout(&scu->cmd_complete) [TIMEOUT] status[IPC_BUSY]=3D0 Fix this problem by reading the status bit in all cases, regardless of the timeout. If the completion times out, we'll assume the problem was that the IPC_BUSY bit was still set, but if the status bit is cleared in the meantime we know that we hit some scheduling delay and we should just check the error bit. Cc: Prashant Malani Cc: Kuppuswamy Sathyanarayanan Fixes: ed12f295bfd5 ("ipc: Added support for IPC interrupt mode") Signed-off-by: Stephen Boyd Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Mika Westerberg --- drivers/platform/x86/intel_scu_ipc.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/in= tel_scu_ipc.c index 5a37becc65aa..2a21153e3bf3 100644 --- a/drivers/platform/x86/intel_scu_ipc.c +++ b/drivers/platform/x86/intel_scu_ipc.c @@ -246,16 +246,19 @@ static inline int busy_loop(struct intel_scu_ipc_dev = *scu) /* Wait till ipc ioc interrupt is received or timeout in 10 HZ */ static inline int ipc_wait_for_interrupt(struct intel_scu_ipc_dev *scu) { - int status; + unsigned long time_left; + u8 status; + int err =3D 0; =20 - if (!wait_for_completion_timeout(&scu->cmd_complete, IPC_TIMEOUT)) - return -ETIMEDOUT; + time_left =3D wait_for_completion_timeout(&scu->cmd_complete, IPC_TIMEOUT= ); + if (!time_left) + err =3D -ETIMEDOUT; =20 status =3D ipc_read_status(scu); - if (status & IPC_STATUS_ERR) - return -EIO; + if (!(status & IPC_STATUS_BUSY)) + err =3D (status & IPC_STATUS_ERR) ? -EIO : 0; =20 - return 0; + return err; } =20 static int intel_scu_ipc_check_status(struct intel_scu_ipc_dev *scu) --=20 https://chromeos.dev From nobody Fri Dec 19 19:00:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1920C83F16 for ; Thu, 31 Aug 2023 01:14:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345526AbjHaBOV (ORCPT ); Wed, 30 Aug 2023 21:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345514AbjHaBOT (ORCPT ); Wed, 30 Aug 2023 21:14:19 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 894E3CF4 for ; Wed, 30 Aug 2023 18:14:11 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1bd9b4f8e0eso1833775ad.1 for ; Wed, 30 Aug 2023 18:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1693444451; x=1694049251; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mEJrJjFBjmTqZTkw0c+MWJuIIZBtJEhPZv34AHJkSns=; b=e9jK+OWpu67aLOcXzPA0EqK8nAUsV2jYZppTtpy/Me6rCuHGKc9Qv4y6Loa+pKnu2O Iah/kH/DA4ODhUPLFfbWNmJFR6l2zaG89WOIMRYXG6O9f31e71oyXfmdCxojj/gbJpd0 DDAPYyPUGAhiQp8AiPaqKpa93PMHCYpfeCAaM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693444451; x=1694049251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mEJrJjFBjmTqZTkw0c+MWJuIIZBtJEhPZv34AHJkSns=; b=b7KsLKSENe7xpdMZlfrR2Cb63jOrJj/8wPq3w2fHmLAxYBj6d1L88xtLJY1jELyr1Z 0c5QLkh6eDX7Pt805JQ0mGZcOqbKZ1r6UD/qWs0LKWQyfSSII7Hj7MF1ExmJAyFPOyM8 ISs9T+bf5IWnkEG2dAonPwygIJFgxLrsMxFJ+hcwklKEwebxprsESkKn6SQoCTaMzCNP ahi6CZBOZFHW7WL1lRT0U26kiwh2V7FWSjcFqHdykQ0RHoMjMGDeJWUD7LCiNcSkCaqd twnjsnNiNWFMsECCxtb6UR8VXn+GKwvXjprtFV5EShmEADDiFiQjWzGlo5OA+WnMNi8V 1EAQ== X-Gm-Message-State: AOJu0YzbwHXeNLkTPA/mktqXkNQ6IH0s91wRkuLXK1v0Q6PblaKttdz5 2A1stluecGTGVIvpOOwFTuuNyA== X-Google-Smtp-Source: AGHT+IGHRduua6XQHeyDpp5hHrYBbEi8NumNCWTxbmxfFd2rZUkD/waUAals2TVmFzvmYy5Ipr4rAA== X-Received: by 2002:a17:902:6b47:b0:1c0:ec0a:316a with SMTP id g7-20020a1709026b4700b001c0ec0a316amr3353964plt.36.1693444451091; Wed, 30 Aug 2023 18:14:11 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:11a:201:248f:d364:b451:2bc0]) by smtp.gmail.com with ESMTPSA id im23-20020a170902bb1700b001bbb7af4963sm132604plb.68.2023.08.30.18.14.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Aug 2023 18:14:10 -0700 (PDT) From: Stephen Boyd To: Mika Westerberg , Hans de Goede , Mark Gross Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, platform-driver-x86@vger.kernel.org, Andy Shevchenko , Kuppuswamy Sathyanarayanan , Prashant Malani Subject: [PATCH 3/3] platform/x86: intel_scu_ipc: Fail IPC send if still busy Date: Wed, 30 Aug 2023 18:14:03 -0700 Message-ID: <20230831011405.3246849-4-swboyd@chromium.org> X-Mailer: git-send-email 2.42.0.rc2.253.gd59a3bf2b4-goog In-Reply-To: <20230831011405.3246849-1-swboyd@chromium.org> References: <20230831011405.3246849-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" It's possible for interrupts to get significantly delayed to the point that callers of intel_scu_ipc_dev_command() and friends can call the function once, hit a timeout, and call it again while the interrupt still hasn't been processed. This driver will get seriously confused if the interrupt is finally processed after the second IPC has been sent with ipc_command(). It won't know which IPC has been completed. This could be quite disastrous if calling code assumes something has happened upon return from intel_scu_ipc_dev_simple_command() when it actually hasn't. Let's avoid this scenario by simply returning -EBUSY in this case. Hopefully higher layers will know to back off or fail gracefully when this happens. It's all highly unlikely anyway, but it's better to be correct here as we have no way to know which IPC the status register is telling us about if we send a second IPC while the previous IPC is still processing. Cc: Prashant Malani Cc: Kuppuswamy Sathyanarayanan Fixes: ed12f295bfd5 ("ipc: Added support for IPC interrupt mode") Signed-off-by: Stephen Boyd --- drivers/platform/x86/intel_scu_ipc.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/in= tel_scu_ipc.c index 2a21153e3bf3..5a56be319f0e 100644 --- a/drivers/platform/x86/intel_scu_ipc.c +++ b/drivers/platform/x86/intel_scu_ipc.c @@ -266,6 +266,19 @@ static int intel_scu_ipc_check_status(struct intel_scu= _ipc_dev *scu) return scu->irq > 0 ? ipc_wait_for_interrupt(scu) : busy_loop(scu); } =20 +static bool intel_scu_ipc_busy(struct intel_scu_ipc_dev *scu) +{ + u8 status; + + status =3D ipc_read_status(scu); + if (status & IPC_STATUS_BUSY) { + dev_err(&scu->dev, "device is busy\n"); + return true; + } + + return false; +} + /* Read/Write power control(PMIC in Langwell, MSIC in PenWell) registers */ static int pwr_reg_rdwr(struct intel_scu_ipc_dev *scu, u16 *addr, u8 *data, u32 count, u32 op, u32 id) @@ -285,6 +298,10 @@ static int pwr_reg_rdwr(struct intel_scu_ipc_dev *scu,= u16 *addr, u8 *data, mutex_unlock(&ipclock); return -ENODEV; } + if (intel_scu_ipc_busy(scu)) { + mutex_unlock(&ipclock); + return -EBUSY; + } =20 for (nc =3D 0; nc < count; nc++, offset +=3D 2) { cbuf[offset] =3D addr[nc]; @@ -445,6 +462,10 @@ int intel_scu_ipc_dev_simple_command(struct intel_scu_= ipc_dev *scu, int cmd, return -ENODEV; } scu =3D ipcdev; + if (intel_scu_ipc_busy(scu)) { + mutex_unlock(&ipclock); + return -EBUSY; + } cmdval =3D sub << 12 | cmd; ipc_command(scu, cmdval); err =3D intel_scu_ipc_check_status(scu); @@ -490,6 +511,10 @@ int intel_scu_ipc_dev_command_with_size(struct intel_s= cu_ipc_dev *scu, int cmd, mutex_unlock(&ipclock); return -ENODEV; } + if (intel_scu_ipc_busy(scu)) { + mutex_unlock(&ipclock); + return -EBUSY; + } =20 memcpy(inbuf, in, inlen); for (i =3D 0; i < inbuflen; i++) --=20 https://chromeos.dev