Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3075565ybc; Thu, 14 Nov 2019 03:39:04 -0800 (PST) X-Google-Smtp-Source: APXvYqyEzDefg6a63BNmPxrV6hZaVPLa6VunN2e1/SGYXrkZ1rMcKsarj5h75MuZptZGV6hqbwwc X-Received: by 2002:a17:906:9458:: with SMTP id z24mr7777144ejx.289.1573731544358; Thu, 14 Nov 2019 03:39:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573731544; cv=none; d=google.com; s=arc-20160816; b=Q8H7L3BTDUs1KcAWwZT3lv1MnT9it7N0s8UzoOYwQK0OFoJGO9NPxy7hay2HThl0wf pSzc8VtsMA2gtXnSaroB6eLjrcQ4RpwSRGR/c5/t1HmdytlvvrpPkSxuRT5jo30HzcVp HxnFRYLG2l9NIEsHzHvOSlFaat7ZSKtZnEJRcoSnX634ux4OfI297Hvk+tikpJK40n0H khxMyKQlN/IBdGgdBS2pjCecPpJpDSit3p5Qan6pa2EJVBdtlYdfh6yurphd+V4lPr4J 3U5qtOOWpOLIVGUY0QllwDzHAocPDz4sdkKHEoQJgUj4GmnqVmIcuugMWPd9E/fRfwJf YnQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iwkHJSXVNEmIS+9Y30T4VMwoJKtV28zBrd8JBL5VFHg=; b=j5OtMdtr6+aL+cOvE+CCp4Tud+JPuHhwACh6cVPr8OlxPLoi4WkTFwy8f5U1ud7khk 00QPKKD++VABMe5tF2Y8LSg/n6hxn1lkO1K8QN48qx8QYoOhgNqLy8Wv+WRgvb6mJ9v5 sl0pklgQT498EESqcreb9USlOTUVrDdN6vB8o2JFSeWJx7NwvWDdu+HTO0jSonTar5f3 HjVP8YvnEqMi4DEUPFODZt/n2yfjzcW0E5zIupZvo+MwEOVfoA1SEs5iidjTKnLjkMs1 i31PP+AcLnxXHbLjhCfQijV8TU2uGZnLNt5nR7bbWjaMj2NxDpD2kdUVtbPmuczJtTtX MbfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 d13si3910224edb.362.2019.11.14.03.38.40; Thu, 14 Nov 2019 03:39:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726190AbfKNLh6 (ORCPT + 99 others); Thu, 14 Nov 2019 06:37:58 -0500 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:55076 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbfKNLh5 (ORCPT ); Thu, 14 Nov 2019 06:37:57 -0500 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id C1A7A3C04C0; Thu, 14 Nov 2019 12:37:53 +0100 (CET) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kfw6ztwQwdUg; Thu, 14 Nov 2019 12:37:48 +0100 (CET) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 367E73C009C; Thu, 14 Nov 2019 12:37:48 +0100 (CET) Received: from vmlxhi-102.adit-jv.com (10.72.93.184) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Thu, 14 Nov 2019 12:37:47 +0100 Date: Thu, 14 Nov 2019 12:37:43 +0100 From: Eugeniu Rosca To: Ulf Hansson CC: Wolfram Sang , Eugeniu Rosca , Wolfram Sang , Yoshihiro Shimoda , Niklas =?utf-8?Q?S=C3=B6derlund?= , Geert Uytterhoeven , Simon Horman , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Linux-Renesas , Eugeniu Rosca , Harish Jenny K N , Andrew Gabbasov Subject: Re: [PATCH] mmc: renesas_sdhi_internal_dmac: Add MMC_CAP_ERASE to Gen3 SoCs Message-ID: <20191114113743.GA19656@vmlxhi-102.adit-jv.com> References: <20191112134808.23546-1-erosca@de.adit-jv.com> <20191112204952.GA2976@kunai> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1+40 (7f8642d4ee82) (2019-06-28) X-Originating-IP: [10.72.93.184] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everyone, On Thu, Nov 14, 2019 at 11:56:23AM +0100, Ulf Hansson wrote: > On Tue, 12 Nov 2019 at 21:49, Wolfram Sang wrote: > > > > On Tue, Nov 12, 2019 at 02:48:08PM +0100, Eugeniu Rosca wrote: > > > From: Harish Jenny K N > > > > > > Enable MMC_CAP_ERASE capability in the driver to allow > > > erase/discard/trim requests. > > > > > > Suggested-by: Andrew Gabbasov > > > Signed-off-by: Harish Jenny K N > > > [erosca: Forward-port and test on v5.4-rc7 using H3ULCB-KF: > > > "blkdiscard /dev/mmcblk0" passes with this patch applied > > > and complains otherwise: > > > "BLKDISCARD ioctl failed: Operation not supported"] > > > Signed-off-by: Eugeniu Rosca > > > > Looks good to me. Just a generic question, probably more for Ulf: > > > > Why does this CAP_ERASE exist? As I understand, the driver only needs to > > set the flag and no further handling is required. Why would a driver not > > set this flag and not support erase/trim commands? > > I am working on removing the cap, altogether. Step by step, this is > getting closer now. > > The main problem has been about busy detect timeouts, as an erase > command may have a very long busy timeout. On the host side, they > typically need to respect the cmd->busy_timeout for the request, and > if it can't because of some HW limitation, it needs to set > mmc->max_busy_timeout. FWIW we've discussed such concerns internally, based on past commits which either disable [1-2] busy timeouts or increase their value [3]. To get a feeling if this is relevant for R-Car3, I've run blkdiscard on a 64 GiB eMMC without noticing any issues on v5.4-rc7. Hopefully this is sufficient as testing? > > Once that is fixed for all, we can drop CAP_ERASE. > > Kind regards > Uffe [1] 93caf8e69eac76 ("omap_hsmmc: add erase capability") [2] b13d1f0f9ad64b ("mmc: omap: Add erase capability") [3] ec30f11e821f2d ("mmc: rtsx_usb: Use the provided busy timeout from the mmc core") -- Best Regards, Eugeniu