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: 153035 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp10652224ljp; Thu, 6 Dec 2018 07:18:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/XFLkrXiYy6pYks8cZnRxgv5JCzldrRG3S8vc0csmirf+age3uZl9KljYpT8l8tG7V+KS2g X-Received: by 2002:a17:902:2:: with SMTP id 2mr29426949pla.228.1544109518571; Thu, 06 Dec 2018 07:18:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544109518; cv=none; d=google.com; s=arc-20160816; b=s2KFyscqX6ZaixYUmt7HUvhwwn+LW/w9sJGXjRoBXXCy1dwwArElLPaFVxHBrQEGIZ wVD2IT3yYbhVnfKQY9U7CAUYxmAckiJ4S6/gNNlJ6e35QRB9teOVaQaXdb/k+G6YaXs6 2IVg46JeMCfQYHFb+x1eJtMwz2mQhO4bNsb+PDIFSUb1XIXGTjFIR5Nc0W1P9bcjXuCK 09A3gXoraLEakLaJvFyLff4nG3jHATOS7jOUU1gpFQRGhGscftmuonRiJdxrSgM9DhHE iZ2Fs3YOPvHIncRhQNcCfx+iLEAUSE6WNn0BswS0r0eyO4ilRZW4tZmrJLbpeB19WuX9 5jBQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0kxcYZ5L42j1jO324rbmlL1PwuJ7eyUnUniDRBwVrQ8=; b=TZMoQB2vt0irLf7gRd2KOVswrbcJzuhaakwOFiqNeK8o6MxUxdBZqAPUr9FiIFZNV+ AalyJSHze1t9fEkjKuLa/aCpTiVD0PmVI4q/5a0Z/q2Y+ewLfepC5r1qPrFNdffBXfzr kdsWhdcr/Riz+pYVJ7WmNI9vAC+D07hRX05A5zRu4979mmMSgK6DTivWVHy2w52O9C/s cnQx9ub8FqqDNScM1WyeTjm7UZspYxJBFeZAz3+QlqFQpNDM/f3kW/jzdxQm+wu+sj3Q dZQF+jdnj3XUxkJADwQrhetOW1yApCZCRSUJXPsYxwpSQxjKypBozQU72lSK9hp4j8zj isvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=K5LNRQ48; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6si520259pfa.227.2018.12.06.07.18.38; Thu, 06 Dec 2018 07:18:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=K5LNRQ48; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725935AbeLFPSh (ORCPT + 5 others); 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-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 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(-) -- 2.19.2