From patchwork Thu Dec 6 15:18:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10716141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B691B14E2 for ; Thu, 6 Dec 2018 15:18:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AC892E08A for ; Thu, 6 Dec 2018 15:18:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 695342EC2C; Thu, 6 Dec 2018 15:18:39 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 95FDB2E08A for ; Thu, 6 Dec 2018 15:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725935AbeLFPSh (ORCPT ); Thu, 6 Dec 2018 10:18:37 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42137 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725921AbeLFPSh (ORCPT ); Thu, 6 Dec 2018 10:18:37 -0500 Received: by mail-wr1-f66.google.com with SMTP id q18so838891wrx.9 for ; Thu, 06 Dec 2018 07:18:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0kxcYZ5L42j1jO324rbmlL1PwuJ7eyUnUniDRBwVrQ8=; b=K5LNRQ48nxsm8TNpfFObhraZlNiaal9mG/dOUMgnwy1V1b0i1AsZU8BHZJi5yCzKwF VfGjxv9Ou7KEDaVHic1wqxVHwuPdBaK/qNXDAboM/J25qxuHLJNWWPYHG0YFMYJKh5fz AZqBG7SnFBAsk3chjySj1OrrXq+2pJmIsvjwsbAeb4zlqST4yqSRdJd8Js0BRW9KfehK RC8odlWu39Z4IlJzGevJecbUqS69eYMxg5hgJZoXRisc7sI0nuWzos6+4WTJ88aFM+lY VT0qyLWVlbLp71O8cKGAhSphmk7MOgHPnx9Ih58oG7ItleJ5L8Xj8iU4lMk8+R+0+BI0 SDoA== 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:mime-version :content-transfer-encoding; bh=0kxcYZ5L42j1jO324rbmlL1PwuJ7eyUnUniDRBwVrQ8=; b=B8RYptH6lMNv3D/OPq6L+v//MrzDs6FpHb1sGdSYWbDnNydiV52W0nnWwEft96NT1a 5R5UmBiMGKaES0btagfzA47v25y4/YuVtDkvvHH+ohBBAgzzqE2GxJFYFXfJEhMWiXYn +dWF5+0duUnKx6KbrvIn6nQHJXJtK637KPLrbrhnn3KvBYFRDilBlqqA1E9zoC3z3J17 6WchvqZgI+jGGizzTR5ovkUXYHPZ5ILevaspDGiEP/0bZIW8Qe9ua0UeqANM8lsNjFSU FXilcBISZ1gWP30feZDDzYOO+zaegIA3LvEcKM+RPlO7haVa8DBouN2FxyjlVwMxEVlK DOCw== X-Gm-Message-State: AA+aEWb8BlIfkTIxAX564NXyoRgAcvRMj9Q9VxkgdWqiI4IW8w+yNny0 451BmLqYR7KwTo31RnLS9jk3+A== X-Google-Smtp-Source: AFSGD/WXgD9EMDbWVRhpui4eQTBX20TrL6Kx7h59E0LnRduCTChVh5v8N3zP1LQdeWBAiYbJ7qdLTA== X-Received: by 2002:adf:8b4d:: with SMTP id v13mr24836376wra.282.1544109515959; Thu, 06 Dec 2018 07:18:35 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id j33sm939652wre.91.2018.12.06.07.18.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Dec 2018 07:18:35 -0800 (PST) From: Jerome Brunet To: Ulf Hansson , Carlo Caione , Kevin Hilman Cc: Jerome Brunet , linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] mmc: meson-gx: chained descriptor fixup and improvements Date: Thu, 6 Dec 2018 16:18:24 +0100 Message-Id: <20181206151828.24417-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The goal of the patchset was mainly to address the following warning: WARNING: CPU: 0 PID: 0 at /usr/src/kernel/drivers/mmc/host/meson-gx-mmc.c:1025 meson_mmc_irq+0xc0/0x1e0 Modules linked in: crc32_ce crct10dif_ce ipv6 overlay CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 4.19.1 #1 Hardware name: Some A113 Board (DT) pstate: 40000085 (nZcv daIf -PAN -UAO) pc : meson_mmc_irq+0xc0/0x1e0 lr : __handle_irq_event_percpu+0x70/0x180 sp : ffff000008003980 x29: ffff000008003980 x28: 0000000000000000 [...] x1 : ffff80001a71bd40 x0 : 0000000000000000 Call trace: meson_mmc_irq+0xc0/0x1e0 __handle_irq_event_percpu+0x70/0x180 handle_irq_event_percpu+0x34/0x88 handle_irq_event+0x48/0x78 handle_fasteoi_irq+0xa0/0x180 generic_handle_irq+0x24/0x38 __handle_domain_irq+0x5c/0xb8 gic_handle_irq+0x58/0xa8 This happens when using the chained descriptor mode. If there is an error, we call mmc_request_done(), loosing any reference to the cmd. It turns out that the chained descriptor does really stops when we do so, at least not completly. Most of the time, it can be seen with this harmless warning because the descriptor will raise another unexpected IRQ. On rare occasion, it will completly break the MMC. This is mostly adressed by patch #1. With this fixed, I took (yet) another look at the ultra-high speed modes and the tuning. I came up with new settings in patch 3 and 4. I've tested them on eMMC, sdcard and sdio on the following platforms: * gxbb p200 * gxl p230, libretech (eMMC only), kvim. * axg s400 So far, these new settings seems to be working great but I think it would be nice if others could test this and provide their feedback. This why patch 3 and 4 are RFT tagged. Jerome Brunet (4): mmc: meson-gx: make sure the descriptor is stopped on errors mmc: meson-gx: remove useless lock mmc: meson-gx: align default phase on soc vendor tree mmc: meson-gx: add signal resampling drivers/mmc/host/meson-gx-mmc.c | 100 ++++++++++++++++++++++++-------- 1 file changed, 75 insertions(+), 25 deletions(-)