Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3031140ybc; Thu, 14 Nov 2019 02:58:34 -0800 (PST) X-Google-Smtp-Source: APXvYqx/MnRm4u8duwjjstgc6vN4qp6TPxq+BMXOERua/eR0Gdc8KT3DicrepEfNTXhZf7P5inRP X-Received: by 2002:a50:a146:: with SMTP id 64mr414816edj.199.1573729113965; Thu, 14 Nov 2019 02:58:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573729113; cv=none; d=google.com; s=arc-20160816; b=c98z5mZEg3io4FhQClTUuuCnDU5dpe2wCZU5ThlB9J0tjclgm3KEdUSq8itFdNDtMi rPjGh9wHAf7mr5Gtf/VevA7ymus2H3B0Z5Y/kekFZdX6a2g3GYQMYPm76imyLlqJgOdJ J2M5n1kzJTKS7pslh+B7wu2iWNFm6n7uENAgj/S23bhI0aXWF4fdaiO1RBsUtDqGo56B cooa1D6SzWiUd0SB4Zr2v9oS4LWZurEB//+o3gHbCQFh5ABAmyHyAGmDEESDoSr7hK09 IpfN32UixQ2GWag5XnMnn+26RGndAYlfZjWwpPWdOxT31fx82XyxJhaPzrQGcJZAGbmS +erQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WeEnAyy7qQpCSp7RUf5vRqqgRBjs74WC3kZmLk7/Ets=; b=UMN/PtaqSXjskypqxsFlHs+EMfnRZ4OLXHW8r6nR69HH1+arlq1RdiLk1sLKAZ5Uvo xUtgLaNUUAUn/fXkJuvt3oKQRE1P2oorxki8X5pUeN6vfRJwE7XoEXEbdwTctxt4xLY+ o5YRnamFVYLXrJLRNfemp0gTzBfv4wh8/WqoU8iWbSYcHvgyWlTmcIHsRnUqM7yDMlH5 xTZnAKpAF1h4hytBdypzJMU13M02SiR12fpIE7UL62qOBhlab8iRqyp1sKEwvGRYBPgk rVpn7iUQtzljOEe275377jpuQxaTnIUDU3BTo0CEwAUyCGe3W3XwqXwotguv3j1A5H5p pwrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hoeZrow+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si3024837eja.141.2019.11.14.02.58.09; Thu, 14 Nov 2019 02:58:33 -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; dkim=pass header.i=@linaro.org header.s=google header.b=hoeZrow+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726378AbfKNK5C (ORCPT + 99 others); Thu, 14 Nov 2019 05:57:02 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:40705 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbfKNK5C (ORCPT ); Thu, 14 Nov 2019 05:57:02 -0500 Received: by mail-vs1-f66.google.com with SMTP id m9so3559019vsq.7 for ; Thu, 14 Nov 2019 02:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WeEnAyy7qQpCSp7RUf5vRqqgRBjs74WC3kZmLk7/Ets=; b=hoeZrow+SCevu622cFh3TszkhCUOxa3lUQgjfUCIWC4BX/gNASmzS9cGhMXa4zNzKo +PERA2StHl/qsusa2pLHZSgkZPwoiECiBZcmKTTXMhJvLVnFBrIDWJxyv3t/BeGkiO0+ tvEsYEmPc2swbb5vv+8SZQ7EK/BazbhLRQiOdBduH6DOYm/JOKqt18MH4D6VPtraUvku YLxxdMMG2HzwW9+302wLEGbodoqDcZA709B/SebE9PM2kwaTMSqK2lLJGxB2lnf7Y9bV 970SL3Q3RFGvV2mfFl3M3E6iqr5Wj75p2WkXF+xehF2JxAhKe3Ewn7DGz7XF0XUVNtVu zZuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WeEnAyy7qQpCSp7RUf5vRqqgRBjs74WC3kZmLk7/Ets=; b=Bj76E12d8FKZHRt1a+YANjCYsM5tBpf/nny42eeE9z87HeeMoUSXFReunEuwNXNrWY Khgd6JMjJjd9DsAnnhUrONck+fj6CaWNjIh8Wr5xN8cYcZ42DLmg5DKwjywrfnTE5YSk waOqFAi+ilMXI3Ee1mlD993CBf8QJvEIuvWPE7CK+FWkXgwQ3gnPyETwM+N1Ylzu8Mup wc1XMxEQlVygK3S1MmPm0jCHSRTf2+8xZGJQxQRknW5NHdyMwT4wOS+Qk1lScRVm1v/H PQet01HNiHlbMxoiH9AX38HLGoiiWzpAz2QKdsQpd9bbmN3BGr8+uew9qV2CA7If6ByF iPJA== X-Gm-Message-State: APjAAAWayeyEr4FY6HbscwgJOshYFJux6oN1919oDkEePOGwGBfaHANL noz7PsVjfT/0VqXKtBi2164fT04gbcOHHpKJKHXi2A== X-Received: by 2002:a67:fc04:: with SMTP id o4mr4992340vsq.35.1573729019802; Thu, 14 Nov 2019 02:56:59 -0800 (PST) MIME-Version: 1.0 References: <20191112134808.23546-1-erosca@de.adit-jv.com> <20191112204952.GA2976@kunai> In-Reply-To: <20191112204952.GA2976@kunai> From: Ulf Hansson Date: Thu, 14 Nov 2019 11:56:23 +0100 Message-ID: Subject: Re: [PATCH] mmc: renesas_sdhi_internal_dmac: Add MMC_CAP_ERASE to Gen3 SoCs To: Wolfram Sang Cc: Eugeniu Rosca , Wolfram Sang , Yoshihiro Shimoda , =?UTF-8?Q?Niklas_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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Once that is fixed for all, we can drop CAP_ERASE. Kind regards Uffe