From patchwork Wed Feb 17 18:03:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "qipeng.zha" X-Patchwork-Id: 8335871 Return-Path: X-Original-To: patchwork-platform-driver-x86@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 500099F399 for ; Wed, 17 Feb 2016 09:58:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DAD15202AE for ; Wed, 17 Feb 2016 09:58:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBD61202EB for ; Wed, 17 Feb 2016 09:58:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933388AbcBQJ6m (ORCPT ); Wed, 17 Feb 2016 04:58:42 -0500 Received: from mga01.intel.com ([192.55.52.88]:56386 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933325AbcBQJ6k (ORCPT ); Wed, 17 Feb 2016 04:58:40 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 17 Feb 2016 01:58:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,459,1449561600"; d="scan'208";a="914060482" Received: from shbuild999.sh.intel.com ([10.239.146.206]) by orsmga002.jf.intel.com with ESMTP; 17 Feb 2016 01:58:39 -0800 From: Qipeng Zha To: platform-driver-x86@vger.kernel.org Cc: dvhart@infradead.org, andriy.shevchenko@linux.intel.com, qipeng.zha@intel.com, Ananth Krishna R , Bharath K Veera Subject: [PATCH 2/2] intel_pmc_ipc: avoid pending IPC1 command during legacy suspend Date: Thu, 18 Feb 2016 02:03:38 +0800 Message-Id: <1455732218-27283-2-git-send-email-qipeng.zha@intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1455732218-27283-1-git-send-email-qipeng.zha@intel.com> References: <1455732218-27283-1-git-send-email-qipeng.zha@intel.com> Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP During legacy suspend flow, IPC1 commands are being requested from opregion driver. But the PMC_IPC1 command will timeout as example: [ 281.444600] ipc_debug##: ipc_send_command: cmd=0x201ff, [ 281.444648] wbuf[0]=0x4ea6 [ 281.444668] wbuf[1]=0x0 [ 281.444674] wbuf[2]=0x0 [ 281.444676] wbuf[3]=0x0 [ 284.446467] pmc-ipc-plat INT34D2:00: IPC timed out, TS=0x4, CMD=0x200ff This is because before the opregion driver could send IPC1 commands, the PMC_IPC irq is already suspended. Which makes the IPC command to timeout. Solution: register pmc_ipc irq as IRQF_NO_SUSPEND Signed-off-by: Ananth Krishna R Signed-off-by: Bharath K Veera Signed-off-by: Qipeng Zha --- drivers/platform/x86/intel_pmc_ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c index abdf67c..140aa77 100644 --- a/drivers/platform/x86/intel_pmc_ipc.c +++ b/drivers/platform/x86/intel_pmc_ipc.c @@ -731,7 +731,8 @@ static int ipc_plat_probe(struct platform_device *pdev) goto err_device; } - if (request_irq(ipcdev.irq, ioc, 0, "intel_pmc_ipc", &ipcdev)) { + if (request_irq(ipcdev.irq, ioc, IRQF_NO_SUSPEND, + "intel_pmc_ipc", &ipcdev)) { dev_err(&pdev->dev, "Failed to request irq\n"); ret = -EBUSY; goto err_irq;