From nobody Wed May 1 03:59:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1519208808776960.3961059215211; Wed, 21 Feb 2018 02:26:48 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8C12B20954CAB; Wed, 21 Feb 2018 02:13:28 -0800 (PST) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 251E7223C1783 for ; Wed, 21 Feb 2018 02:13:26 -0800 (PST) Received: by mail-wr0-x241.google.com with SMTP id o76so2877163wrb.7 for ; Wed, 21 Feb 2018 02:19:26 -0800 (PST) Received: from localhost.localdomain ([105.149.187.179]) by smtp.gmail.com with ESMTPSA id k13sm24243042wrd.61.2018.02.21.02.19.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 02:19:23 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=sW3/F5zNw9LkfhnXXPWGmeNJyisl0bN0jMO1lVQhTK8=; b=Ovq7TPxWiRoKYUjUVVoytSv8bSzGqBzw7w7X6Z8SJI9ZkgpnSN1KBmtB0INOJ0YXAm KuFj0wIgzOqPoNRxCAveGfgcz8R0M3xmsBddjTE0nAhj+XVZNZvnUW2Izv4pIEcLOWxv MvdKSh6gs6ZtJUbdS94JuzEZxWBTJ8fWfN9Tg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sW3/F5zNw9LkfhnXXPWGmeNJyisl0bN0jMO1lVQhTK8=; b=d0LKctl7Sew/7PXQBODo2yG4ueRkJYIQHXPdl7DO0PNLhKO/z9roLDsFp0/nncHq+/ QcnCxZ1u6hpdOAHLXjIBuzOD3pw1jV9FX67x1WB2OEPbQe2hyAA6qwgfrpDFxFGFE8TS B2oT8S6GR+/PGEPyPRbtFp9w+Fva/FdLHvyzVwbR3qYIPwe7KZsNr1pxdcl7LkO5D8kM +5TS6ZWu6Gd4fXiOB2MLVB7SQaxWA4rsOoB7Kqb/ATgeTBFzpbIgZkZLOVHA+lXuDyaQ kQ5Myt3EP7aGTOPMmIyDdSx0kQ252fZTJE1AzE1BlhjgWugaoNymUhzyk13RHyqIV0NZ +SYw== X-Gm-Message-State: APf1xPACypQ3gFgED7DDdZ+QcQD+amC7hPkpau9bSWT+X0D4MEjhSsLX wDA15RN02NxvPxW5KfydwF3KaTHYA4Q= X-Google-Smtp-Source: AH8x224tfgW5jOfww43Cyr4sLhiMLGNloxAKpeYi6aPTVHg2LVaHfE2QxwJWdfCmlIzYH7FlNRYUbg== X-Received: by 10.28.11.70 with SMTP id 67mr1527861wml.158.1519208364115; Wed, 21 Feb 2018 02:19:24 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 21 Feb 2018 10:19:18 +0000 Message-Id: <20180221101918.16088-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH edk2-platforms] Silicon/Socionext/SynQuacerI2cDxe: fix TPL handling bug X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Currently, SynQuacerI2cStartRequest() increases the TPL to TPL_HIGH_LEVEL while accessing the I2C controller hardware, but fails to restore the TPL to the original level if the call to SynQuacerI2cMasterStart() fails, and returns right away. Given the TPL_HIGH_LEVEL implies that interrupts are disabled, this results in a complete system hang. So instead, break out of the loop, so that the TPL restore will occur before leaving the function. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c | 2 = +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI= 2cDxe.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cD= xe.c index 46c512a20151..b2318a6f5a8c 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c +++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c @@ -324,7 +324,7 @@ SynQuacerI2cStartRequest ( =20 Status =3D SynQuacerI2cMasterStart (I2c, SlaveAddress, Op); if (EFI_ERROR (Status)) { - return Status; + break; } =20 Status =3D WaitForInterrupt (I2c); --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel