From patchwork Tue May 9 08:27:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 98882 Delivered-To: patches@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1708383qge; Tue, 9 May 2017 01:27:36 -0700 (PDT) X-Received: by 10.28.84.67 with SMTP id p3mr6068797wmi.40.1494318456026; Tue, 09 May 2017 01:27:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494318456; cv=none; d=google.com; s=arc-20160816; b=n835m+QII+rEcepNT22ybG1UAw+B/d/wZuCNIGpCI01QQSt657rb/C9sBw++glPAaV KXFa1l00rdnp+clw8JHQ77Ly1F0j2+N39hvqmvCkJaE/dso4ekj24blN+hWyGGSZG46Q /ZcrtnCh6ZZnv6hsbMWGUFMbcOKVk4lCd6V2XxH3yumKR8hNW3fPhHSIUKie/24R4Xwx 56sTT6YI3cdI5342Pjxg7UPQAKBD652x0xwmUmI1TszdgRxb/HRjLddxRxRcJ203vbdv I5ZlBx5bNHFk+O7y54sW8Tg/kpbRusTdtoxiXUOSjC7kVg9Igf9BoijeYv4tqsp7yaCw uYew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=OwHzUgS2SX7KG7e3Vb/um4AdWFkN24ZsNlHZMuKaldY=; b=uZUCffUGFqqyyOMgNJgQINIyRXjuifi9ZD4JQR+tmSzxkKhTOKE1+QKoz9WAqUUjQ+ FY8qFiqGqK+HzUGkMRHoCQswMppx5tRZn+uKnkONaRr0MIPFMaN35Ch6KWLLgqKoB7EN Iln1tB5zZ23En7eQYlXFRWiNCWtwz2w9wRmWLnwtWlc0XUUqAWzciAhh/9+l3OkrMM1E j0K+m+z++0FDdYTWQPRZUetHupYrf/NlxSLLe0KJJm9x/0yGwqdgEhMJsRbacwGw0ZAL xMnmRNstLkMtg40rJQHLv5TfKoln6yxILuVzfOqicSP3grU6lQrV7BTQtLfT+Jyq/12T rhvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:400c:c09::22a as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com. [2a00:1450:400c:c09::22a]) by mx.google.com with ESMTPS id m38si17314676wrm.206.2017.05.09.01.27.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 01:27:35 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:400c:c09::22a as permitted sender) client-ip=2a00:1450:400c:c09::22a; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:400c:c09::22a as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-wm0-x22a.google.com with SMTP id u65so23239785wmu.1 for ; Tue, 09 May 2017 01:27:35 -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; bh=OwHzUgS2SX7KG7e3Vb/um4AdWFkN24ZsNlHZMuKaldY=; b=gQF4PFbFD+kv5vXmQJnwe3drBCd7OtkrV6vux6OYvr3yM5Y13/RBHqaaWZg5+k6N3x w5UN6ik8sWKrPc5wsutEp7aBcIvuJ1nzP5cr0TumZfY0TKn3G+N6eQs5AmF9G9kmtTEe /XSOkxJyrvg3S83JI0ns/bMMblHEyZoVBjWqM= 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=OwHzUgS2SX7KG7e3Vb/um4AdWFkN24ZsNlHZMuKaldY=; b=ANJ5GCjVy9UoXif0raljfHuz3boXnmWxAtbSVt64eiKEXEzwRIsI5bAFV9zf9ZJ9fp fJ1XBOq2iwN72SYXgJWDMM9kc042XUUCHII65DA+TK/MHQj48WEKX2bPYP3yBYp0wsIx sYd+nAVTE1hsXIQoMnF3sthLmWom3ClUWRjMOxhKDsXSqJA0WOoQP6BeKzCOES0+DeLb 6cOZVx6RPy8kKyTOPluFj/aZJ5oBxZxzTWLS1ofwapiU5fLlgsh4DjLWtLpnlu8Q/c5R NzlnsVfnS0o3l2EbgZUn9QqzDzqt2J/2nqEI94U1IRClRPA1k5IikMHSe7W/zk1b2LVf grfQ== X-Gm-Message-State: AODbwcBcdPceWqlW8Lpbxc0gGdyeB1tCN1Qn4LWtubPBUUEr9YP79tWT ubuzbIxkuvBaPrysc5c= X-Received: by 10.25.38.77 with SMTP id m74mr2008198lfm.12.1494318455565; Tue, 09 May 2017 01:27:35 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id o21sm3151108lfo.34.2017.05.09.01.27.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 May 2017 01:27:34 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Brian Norris , Shawn Lin , Doug Anderson Subject: [PATCH v3 0/5] mmc: Improve/fix support for SDIO IRQs Date: Tue, 9 May 2017 10:27:24 +0200 Message-Id: <1494318449-2591-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 Changes in v3: - Added Tested/Reviewed-by tags from Dough. (Dough, I used your chromium.org email, please tell if you want me to change). - Updated change logs. - Some other minor changes, described in each patch history. Changes in v2: - Folded in a new change, patch 1/5 to fix a race condition while processing SDIO IRQs. - Fixed review comments provided by Dough. - Updated change logs. - Small changes to how ->ack_sdio_irq() is being invoked, to simplify code. - Added a revert patch of the dw_mmc change for runtime PM issues, which was a quick fix for stable/fixes. Regressions for SDIO IRQs have been reported for dw_mmc, caused by enabling runtime PM support for it. This series extends and improves the SDIO IRQs support in the core, such that it also better suites the need for dw_mmc, particulary around runtime PM. To accomplish this a new method to process and signal SDIO IRQs are invented, based on a work/workqueue, but built upon the existing support for MMC_CAP2_SDIO_IRQ_NOTHREAD. Next steps after this series is to convert the SDIO IRQ polling mechanism from using the kthread to also use the work/workqueue method. Additonally we should also try to migrate all host drivers supporting SDIO IRQ to use the new method instead, which in the end would enable us to remove the old mmc_signal_sdio_irq() API along with the ktread. Ulf Hansson (5): mmc: core: Prevent processing SDIO IRQs when none is claimed mmc: sdio: Add API to manage SDIO IRQs from a workqueue mmc: dw_mmc: Convert to use MMC_CAP2_SDIO_IRQ_NOTHREAD for SDIO IRQs mmc: dw_mmc: Prevent runtime PM suspend when SDIO IRQs are enabled Revert "mmc: dw_mmc: Don't allow Runtime PM for SDIO cards" drivers/mmc/core/host.c | 2 ++ drivers/mmc/core/sdio_irq.c | 22 ++++++++++++++++++++-- drivers/mmc/core/sdio_ops.h | 2 ++ drivers/mmc/host/dw_mmc.c | 42 +++++++++++++++++++++++++++++++----------- include/linux/mmc/host.h | 3 +++ 5 files changed, 58 insertions(+), 13 deletions(-) -- 2.7.4