Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1261408yba; Tue, 2 Apr 2019 05:47:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWUmg2R1E1paJDUo6cw42dc/fhsmDRKyFvp0VFH9mv+50y/6y66+xgfYGBaj17Kyib4tw8 X-Received: by 2002:a63:6786:: with SMTP id b128mr57169778pgc.318.1554209221450; Tue, 02 Apr 2019 05:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554209221; cv=none; d=google.com; s=arc-20160816; b=aLvIC4l0o7LucNySO3Kg3wTVoTeR6wsgG0snHTFPCFxGeXXuyeVE5S3exDJlDfq1X9 oTCGVa46DjrWNuekxSxAu1RWVrCMLcPqk8ZMq3eGqWe1QwWrwfDQqD0kuyw4XqHUveM0 B8A9leBIbIbngrL0rzF7dC5n18h1kdHStE5uuFuo3WhQJcsuTqaznlwH08aP2uF30XjT ueArXqmk0tn22r+IhyJ++DhC1CVlkM/vsbKmHG4BcXxf3xqWdUEo6TEQ21JPwc76gSWs OhegbcD4ypZ7JC8IGRU8OEOUktQnDNpHjXp0pFNPhSdUnKMo/ND7ejgzJ6bMBZ7c1KYb zJhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=1v23ZKkQHRk5YODMuye+vtoJV99Ye4sWjvxHGNvkmRk=; b=hpS4eeSWhnQtunuIoEa5aeaKqATQQbmeEdj0lPP160kecFvKMzOGiv+pyjjdzwxO8v uovDbhBU9Wtndul2OXR5n9Vibjk/fDoiUqK0K/t056XzMGdZm82TcFZMnB4jL/RwqRDc KzORm6OvNAR/F7EMk2Yq8HVVOBnJoVZ+OeEVJSMdWmVSXSytNO39OmRq9j4/CBFDbtcj VZp8N2lNm+dqcGgDz9tzTLLTlalDiMiBqCU63nRzsjTKdDEp7+Rr1NtGMwbCB0qgoLli xw2kdZxXTfyOCEMWmMgI3nbevqgy+H3X5tzGI8dFJxi6ljncZUc4Ka8EDpWhoN3d+0ni p4gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=Pa5Sdu+c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si11470615pfe.90.2019.04.02.05.46.45; Tue, 02 Apr 2019 05:47:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=Pa5Sdu+c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730624AbfDBMp5 (ORCPT + 99 others); Tue, 2 Apr 2019 08:45:57 -0400 Received: from mail-eopbgr80087.outbound.protection.outlook.com ([40.107.8.87]:24078 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729165AbfDBMp4 (ORCPT ); Tue, 2 Apr 2019 08:45:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1v23ZKkQHRk5YODMuye+vtoJV99Ye4sWjvxHGNvkmRk=; b=Pa5Sdu+cxk+SQZZAfg3kCVswrurkqm0kL8PDu8s9AbN/5Pe8hg6QYMExygrEWc5VXwpS2I/D0RoWA2l3WbHvgEtFulN31+Eq9mF1UwF5gK+b7jW+oXzgIesWhOw60Fgg2T252zy0oWuKR5iWp4LVHQ9vVZPrp8NOEQYb3B3amCA= Received: from AM6PR04MB5016.eurprd04.prod.outlook.com (20.177.34.88) by AM6PR04MB6405.eurprd04.prod.outlook.com (20.179.244.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.17; Tue, 2 Apr 2019 12:45:53 +0000 Received: from AM6PR04MB5016.eurprd04.prod.outlook.com ([fe80::b953:a9de:d0bf:7159]) by AM6PR04MB5016.eurprd04.prod.outlook.com ([fe80::b953:a9de:d0bf:7159%4]) with mapi id 15.20.1750.017; Tue, 2 Apr 2019 12:45:53 +0000 From: Clark Wang To: "broonie@kernel.org" CC: "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] spi: lpspi: add missing complete in abort func at dma mode Thread-Topic: [PATCH] spi: lpspi: add missing complete in abort func at dma mode Thread-Index: AQHU6VIBRlYUz7qkm0iTks1lZ+egJA== Date: Tue, 2 Apr 2019 12:45:53 +0000 Message-ID: <20190402124609.22157-1-xiaoning.wang@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SG2PR02CA0006.apcprd02.prod.outlook.com (2603:1096:3:17::18) To AM6PR04MB5016.eurprd04.prod.outlook.com (2603:10a6:20b:9::24) x-mailer: git-send-email 2.17.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=xiaoning.wang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9574e3b8-7359-4148-a2d1-08d6b769242c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:AM6PR04MB6405; x-ms-traffictypediagnostic: AM6PR04MB6405: x-microsoft-antispam-prvs: x-forefront-prvs: 0995196AA2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(346002)(136003)(396003)(366004)(376002)(189003)(199004)(53936002)(1076003)(102836004)(2351001)(3846002)(2501003)(71190400001)(6116002)(26005)(6506007)(386003)(2906002)(54906003)(81166006)(8936002)(1730700003)(5640700003)(6512007)(68736007)(478600001)(36756003)(6486002)(81156014)(52116002)(99286004)(50226002)(4326008)(8676002)(316002)(14454004)(25786009)(14444005)(256004)(6436002)(86362001)(71200400001)(106356001)(5660300002)(66066001)(4744005)(105586002)(6916009)(186003)(486006)(2616005)(305945005)(476003)(7736002)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB6405;H:AM6PR04MB5016.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 9uBgXwuHq+pkMm90XLIM7g7tNyMwdf1J3G4pELS9P6xHsUjUK+/lacI6k/MTsSlqoKS/lsfYOz1OllPvEQlDPdG9KwHG4WkBR7LTLPm+v7tiCviL+/8VI5WOzGeav/AT2M6qcBQgkcpaycns6hYmtxMiyJsNQXTEgbNT80Rrykh6t9jwRzZiDj2Lz46RR+zs5YMvoJ5wSR+a/7oZCAdK1sF/NrnzgkUAI8L3fD2KQ9riMIXh5EAWiePH9Fo766/yB24d1F+OhqHmLQHHjFps3Pa4uZ8lcEYlxI4ypmN8cQG8M4YTT4Rh1Mb55EFHRtOqFtGxorr/sNmaHUJt0+1UTbILQAXrAmpebi3RG+JKPxVWl9XUn7QSFM36v1YGwreZuAQsafBwOqE38bFa2IKkmexdpx28wFcCsoc37PzRpJw= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9574e3b8-7359-4148-a2d1-08d6b769242c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2019 12:45:53.0421 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6405 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing complete operations for dma_completion to fix the problem of blocking at the wait_for_completion_interruptible() function when use spi_slave_abort(). Signed-off-by: Clark Wang --- drivers/spi/spi-fsl-lpspi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 0252cae0b35b..33b6a8affd55 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -482,7 +482,13 @@ static int fsl_lpspi_slave_abort(struct spi_controller= *controller) spi_controller_get_devdata(controller); =20 fsl_lpspi->slave_aborted =3D true; - complete(&fsl_lpspi->xfer_done); + if (!fsl_lpspi->usedma) + complete(&fsl_lpspi->xfer_done); + else { + complete(&fsl_lpspi->dma_tx_completion); + complete(&fsl_lpspi->dma_rx_completion); + } + return 0; } =20 --=20 2.17.1