From patchwork Wed Sep 14 17:54:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hotran X-Patchwork-Id: 9332211 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C18C66077A for ; Wed, 14 Sep 2016 17:55:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9AB32A264 for ; Wed, 14 Sep 2016 17:55:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD8622A268; Wed, 14 Sep 2016 17:55:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FF2F2A264 for ; Wed, 14 Sep 2016 17:55:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760398AbcINRzJ (ORCPT ); Wed, 14 Sep 2016 13:55:09 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35213 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757915AbcINRzI (ORCPT ); Wed, 14 Sep 2016 13:55:08 -0400 Received: by mail-pa0-f42.google.com with SMTP id oz2so3039820pac.2 for ; Wed, 14 Sep 2016 10:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id; bh=TTvAxI7a7agQDLTK/x35X/SN/OX/SsZvu6ljr2y8tv8=; b=LDZnXQY+lCwUP5hjArO4N7zJEXWXcWgKWJ9TxndlL4IbGYHR6O9e/KUR3GkKLVh51v WLIM/c//nkxzg5utq0Nt+i4GwV6GMXSoX3mL3DR1mxPfVzoFbz1BlkfnXFtXoTVF9tCn 9HHSi0Qve2T7YQgDpEYDRB6IScLsmuPh6f9Bs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TTvAxI7a7agQDLTK/x35X/SN/OX/SsZvu6ljr2y8tv8=; b=IvCDbkYdyUyopn0b0xvtto5nRtY9r+YXjJ5AGLvJszb315JoZslZO+Uz/8kyPqauHv M2xyPwW5HJey5fH1+IZ01esP9Sn5YTIyz1E4/B1pTsuA3KXz05/a9X+cCOn9OSBuLI9/ Ra6P+HRQ9km0cXts+Lyr+izuQfOJhCxl964bRMeaZSa66iphjzDWd8l075gXp+8A7Mcn 5kfo9q3LKTl6SyKn6pz3KcK+o/MbPbxbJAgKk+e27FvOY4f7/1tWQ1rA+NB7m9AIfBqI ME8onvp2DCsrWbxeT26WIjj4C0+MaKUJBaLUhksv2HEPpn6v3oN3rS0b4dVvFyKgOpDR urhg== X-Gm-Message-State: AE9vXwOkv/TKrEMW3C3ygM+1DLL+hp/tT0DfbS0RwOiUzwuRlDJf6Ql17WWRVbsJa+yIk9JG X-Received: by 10.66.222.169 with SMTP id qn9mr6689466pac.133.1473875707766; Wed, 14 Sep 2016 10:55:07 -0700 (PDT) Received: from hotran_localhost.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id b194sm39365759pfb.55.2016.09.14.10.55.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Sep 2016 10:55:07 -0700 (PDT) From: Hoan Tran To: "Rafael J. Wysocki" , Len Brown , pprakash@codeaurora.org, Ashwin Chaugule Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, lho@apm.com, Duc Dang , Hoan Tran Subject: [RESEND PATCH] ACPI: CPPC: Support PCC with interrupt flag Date: Wed, 14 Sep 2016 10:54:58 -0700 Message-Id: <1473875698-12402-1-git-send-email-hotran@apm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For PCC mailbox with interrupt flag, CPPC should call mbox_chan_txdone() function to notify the mailbox framework about TX completion. Signed-off-by: Hoan Tran Reviewed-by: Prashanth Prakash --- drivers/acpi/cppc_acpi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 3d1ae6d..d0d0504 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -311,7 +311,10 @@ static int send_pcc_cmd(u16 cmd) if (pcc_data.pcc_mrtt) last_cmd_cmpl_time = ktime_get(); - mbox_client_txdone(pcc_data.pcc_channel, ret); + if (pcc_data.pcc_channel->mbox->txdone_irq) + mbox_chan_txdone(pcc_data.pcc_channel, ret); + else + mbox_client_txdone(pcc_data.pcc_channel, ret); end: if (cmd == CMD_WRITE) {