From patchwork Wed Sep 9 00:21:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 249394 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp5014988ilg; Tue, 8 Sep 2020 17:22:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdcJ5QD/Hh2Vp0bwpwog74vmAaF+uwgHAozHhbjJzWtPnL7NGNSFvOTaktKrlcaIz6NfOq X-Received: by 2002:a17:906:63c9:: with SMTP id u9mr1062337ejk.82.1599610921452; Tue, 08 Sep 2020 17:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599610921; cv=none; d=google.com; s=arc-20160816; b=EdDgeJMEIYF4yp2EjLPtybV8zfglU+RtoG3oWseKJzXCw34tEY0xkHgIg5eMv/R4+x eFBfJdfSKptHvS14K24MKp0yhXWjSedBefnhKEIy5ozHD0C5kgLRxXSR3uY3rLIMw76+ +O51OxEKZh3AgZDsrnSyxzwLj7JQkMHmzym2fkqXpyOY+TZ1lGU3tCpYOBjxfOKZ6Jqc q71/smtPXgMVY7qNzLeTL8sVXGBEeiNA1b8BXovOBl0qLaYrhn6k1WwFfMahIrjTml0C pgB7BEmkRECTCO0a+JOKaCNLQAfvbLG6jN8SDkuwKzxH1ONBBihvmOz0MgqsV5zCih6p bGaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C+4RJZne7XWnSNpMScCQkiPgvon7cqSHe4LlitFTkv0=; b=vMeM/hslDkcU5v9FXICqIrww4w3IBdM10R5M5nHBiDdoWJ02SlIAZWwbjXqZW/IIx/ /xypglVGf6LYpugkMtPEg/snPXnxy1h4hm84u0vCahUe/AIzWEot5XEwK8CydP9VgylK x/LVDyhMDtbuyIDMr4biGU1fQm7IE5eqZr4XgUXR/ibYircE6e7hIDPEki3PKi38cFy3 iQJCrzbDqyH/MYMrhtVGsnvK+7cjGiv7l6jWEKblgd3TyBnbBGuiJoZ04108L+B5dYlw 7GkPYZkOwa6yQTOn5g1BI/sqA+XGYrNkbxxQcLjlmfI30x6D0WbglmhgPVEAha0K+ReO 2Gig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GtxiWvZy; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rh24si419953ejb.283.2020.09.08.17.22.01; Tue, 08 Sep 2020 17:22:01 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GtxiWvZy; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729779AbgIIAVz (ORCPT + 9 others); Tue, 8 Sep 2020 20:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728971AbgIIAVl (ORCPT ); Tue, 8 Sep 2020 20:21:41 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1947C061798 for ; Tue, 8 Sep 2020 17:21:37 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id q6so641666ild.12 for ; Tue, 08 Sep 2020 17:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C+4RJZne7XWnSNpMScCQkiPgvon7cqSHe4LlitFTkv0=; b=GtxiWvZyyPJXhAnEqPmFRyB1Iwm/yOJg+CcAcbtkzQyjJlbWzaEyhnOQjzqBwXKo3D 9JQyr17zUT2RnvfiYlhhg3oFOt7Ogs/pthIq4Jxc0vPVcajwml3Ip/jlx14KcCPydm4O JYB143HO5vjRwfNMfCVFSpFU7oJmHFoVbV/b2CaOVhksmyiM/8WYLTfiQuq45Nl30hRr l7PdGLTfb8XG17Fo1zl2RODD1wxEPrqzK8Pf/Oq7xbUWViY87GPdn2Wl72j02Te8ayT4 R06fi0wDnpGU879RpFlzPmpmyDbjXusF9id9XZHmuRMO4Gf8WbAUpRENTeOMxVVFDmDT EjaA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=C+4RJZne7XWnSNpMScCQkiPgvon7cqSHe4LlitFTkv0=; b=jZJNB6CVUE7jRWH52hJlsBfjD7wb3NQchOiKhae5QhhALbT0MCVG/nrVh68cTeQ6zf hUZhQlrU3/YQ+vrzK2rKErcwUg2HBOo72YmDucMd0p571f5TwPkwa0K3e9ik3r5eqMlX N38CfRDyNuE4oBHVS0uHHFsqqO77ZEUEp1RKwrSVCg2ZNvpahFjvmXsOvyn+q0QWE556 4+DwbIBItsy46eGuRIa4zhfZibiwFiO2qm0xjtxLSOq4H3I0/2MOXtXb7bmhpJSUnHt+ W6wyvfgueDV6WeU2hcW+VEI77iEyVeMHeTK7QE5rp9uBHadVhQZo3D9LR15mYDuYMuBT S6mQ== X-Gm-Message-State: AOAM533Gkm3T9vLiUWOMZ9+CK3smIw+qmAoGOgOC5SH0nyvQ8dAZBZYn str4nCRgUkg6qySgjOS/oSLhJA== X-Received: by 2002:a05:6e02:1205:: with SMTP id a5mr1440543ilq.167.1599610896416; Tue, 08 Sep 2020 17:21:36 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id f21sm457739ioh.1.2020.09.08.17.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 17:21:35 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 4/5] net: ipa: enable wakeup on IPA interrupt Date: Tue, 8 Sep 2020 19:21:26 -0500 Message-Id: <20200909002127.21089-5-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200909002127.21089-1-elder@linaro.org> References: <20200909002127.21089-1-elder@linaro.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Now that we handle wakeup interrupts properly, arrange for the IPA interrupt to be treated as a wakeup interrupt. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_interrupt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.20.1 diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ipa_interrupt.c index 90353987c45fc..cc1ea28f7bc2e 100644 --- a/drivers/net/ipa/ipa_interrupt.c +++ b/drivers/net/ipa/ipa_interrupt.c @@ -237,8 +237,16 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa) goto err_kfree; } + ret = enable_irq_wake(irq); + if (ret) { + dev_err(dev, "error %d enabling wakeup for \"ipa\" IRQ\n", ret); + goto err_free_irq; + } + return interrupt; +err_free_irq: + free_irq(interrupt->irq, interrupt); err_kfree: kfree(interrupt); @@ -248,6 +256,12 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa) /* Tear down the IPA interrupt framework */ void ipa_interrupt_teardown(struct ipa_interrupt *interrupt) { + struct device *dev = &interrupt->ipa->pdev->dev; + int ret; + + ret = disable_irq_wake(interrupt->irq); + if (ret) + dev_err(dev, "error %d disabling \"ipa\" IRQ wakeup\n", ret); free_irq(interrupt->irq, interrupt); kfree(interrupt); }