Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1073655pxf; Fri, 2 Apr 2021 00:03:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysskz2dBbjZNz2hWpHHiaaAGNAN4aQ3Yq2N4dXhxUNdrT+ascYv0YoqAcfJhEdL05ycIDh X-Received: by 2002:a17:906:c099:: with SMTP id f25mr13003251ejz.141.1617346986476; Fri, 02 Apr 2021 00:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617346986; cv=none; d=google.com; s=arc-20160816; b=hw4a3n6inXM6e3zm4Oozh/35TUbyC93+rsIXVRe1FO2/ujkt4mzGtkHMUja4MKE6Kx 5sLA4HuHAP3ZCxktYAZmbeF4l1YP7PBhylFUgYJtrdbPAIDBYbx+UUlZ/2aR3nLy7CCb r6Bnq0quRYuJqwBfsuuwLGULekVBLiMljLFee4eurWro+HNf8w1TBUE9iIyBPB0UsXfS M8A2BMjr2/M/ccsnok6b7lVCCLq9jNYww3N9E1XKsY60+X5zFJ2iAId62cf3M2Q0+T52 VT6iVICsKE+wH85mzFVqdjtVwQtmFefIghHidKPtlhw0YN4K2tW7vqPPQ5K37MvXiM+h SykQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=/PmquSqlYbfx7DEsufC6Nqc204Yj4qGP6NGI1oHOMyg=; b=ql3VGZaAswGr+bknuwtOrxef3DVzXYLPZjGb3oN9j/9Ft/AzKFCIFi8DLUFamkFP63 Je5i83wYq2YZQJdgHmf+DGLMEJZNatr5JrGceZP+WwOjm7aZQCa3Q/dkmhaOylLEGLs/ qGg9KMb8Ei3b5Kzi123DsxS0R2FsGhkEBdFC2Z+6Tw+y1h2f8p3gWQ25zTZUqPg3DSX7 C8UjenFMYnQz/MpLSB7YvL/rW7erza0HMmx5hpbWXIm1Q9D9C6yX+u/mPF1xhOb1u0fS 4FRZg6Z5Jf3UIm9R1zLkVqjWZ0BTqNv+S/xcBFpXLdHYs0W6pwSbRfKe8ugRn+NuoP5W SfSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UVjHlw8D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si5918824edw.445.2021.04.02.00.02.43; Fri, 02 Apr 2021 00:03:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UVjHlw8D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229932AbhDBHBk (ORCPT + 99 others); Fri, 2 Apr 2021 03:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbhDBHBk (ORCPT ); Fri, 2 Apr 2021 03:01:40 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56C1DC0613E6; Fri, 2 Apr 2021 00:01:39 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id l4so6182622ejc.10; Fri, 02 Apr 2021 00:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=/PmquSqlYbfx7DEsufC6Nqc204Yj4qGP6NGI1oHOMyg=; b=UVjHlw8DD95PPamus6BQr8vsyW+BNeld1SU4q588DhE9lAcSSzszVHeAcwFw1HmEye X6vOUeYvquzjllcq4/RQ5+BqKWELIqLulXLQCN3yuziOYPiqoEkNNSFw+CIOSMwPJlvU YIjYfcQBVgj0pzkH1j9B8rN5erJRIY6JBs+nhlgURmLulkpuhab/BrWalR4KuHOps+ON VTQvm85ilQFcoYO5lTJrRjNnWg6LaLuhJGdolSq0WLWl+l6bUuF/C/E9LN1j+8KSz4P8 TrwQ+OSQLbSBGU2qoDSTcKqMr7z9ahMmBkhGkZViL6mdgJrH92tP0rMVGQAcfBe4mjN4 W9Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=/PmquSqlYbfx7DEsufC6Nqc204Yj4qGP6NGI1oHOMyg=; b=h3osP8x9UphixEivo2yZTVFngpay4zkBscE6Rr9OW0R7ymiE/w8sQzwhC9aYC63rVl bjSHCrTQpoR+lTqe2vx9sS8BDPPms6xdymgA4g86x/Ot8yN4tcxi6HPRD1OAOzfAQBX3 zsmSCr/xFRrZhlIBRlRuG/aVDoTDQ+qWEgQKFDuOWFw/7tXnXYQMR3yxTzmwPcSwnABm FsMr+YqtiXOnLmeAQHfDabOEFmlpfEF0r136cGDg2qp8O+PhlRPIM0IUH3OSk6X46v0+ eB30qbqRLdfvw3N/mjGvf4XsAYXzdM7NqiXMwSiz+jMEeXbZiutEJalz9ZAApLFRjqk4 xXvg== X-Gm-Message-State: AOAM531rVpJzy2tFZpObkJ8rKZE/0ffvkR23DY9YF5euFWSCttIdynIX mlVir+d9LDrROYRlelIFQbQ= X-Received: by 2002:a17:907:1119:: with SMTP id qu25mr12475081ejb.423.1617346898051; Fri, 02 Apr 2021 00:01:38 -0700 (PDT) Received: from ubuntu-laptop (ip5f5bec5d.dynamic.kabel-deutschland.de. [95.91.236.93]) by smtp.googlemail.com with ESMTPSA id r19sm4893699edp.52.2021.04.02.00.01.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 00:01:37 -0700 (PDT) Message-ID: <69debceaa1b653516a00993d579533383574c715.camel@gmail.com> Subject: Re: [PATCH v2 1/2] mmc: core: Let sanitize timeout readable/writable via sysfs From: Bean Huo To: Ulf Hansson Cc: "Shimoda, Yoshihiro" , Wolfram Sang , Adrian Hunter , linux-mmc , Linux Kernel Mailing List , Bean Huo Date: Fri, 02 Apr 2021 09:01:37 +0200 In-Reply-To: References: <20210401132853.105448-1-huobean@gmail.com> <20210401132853.105448-2-huobean@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-04-02 at 00:48 +0200, Ulf Hansson wrote: > On Thu, 1 Apr 2021 at 15:29, Bean Huo wrote: > > > From: Bean Huo > > As the density increases, the 4-minute timeout value for > > sanitize is no longer feasible. At the same time, devices > > of different densities have different timeout values, and it is > > difficult to obtain a unified standard timeout value. Therefore, > > it is better to let the user explicitly change sanitize timeout > > value according to the eMMC density on the board. > > > This makes sense. The current timeout in the mmc core isn't good > > enough. However, I think there is a better option than inventing a > > sysfs node to allow userspace to specify the timeout. > > > > First, we have the card quirks that the mmc core uses to allow us to > > modify a common behaviour (in this case timeouts values for sanitize > > operations). This can be used to enforce a specific timeout for the > > eMMC card. I think this should take precedence over anything else. > > > > Second, the ioctl command allows you to specify a specific command > > timeout in the struct mmc_ioc_cmd (.cmd_timeout_ms). If this is > > specified from user space we could forward it to mmc_santize() and > use > > that rather than the default MMC_SANITIZE_TIMEOUT_MS. > > > > Would this satisfy your needs? > Hi Ulf, Add card quirk is diffcult since different card with different timeout. I prefer to your second one. I will change this patch based on your comments. Thanks, Bean > > > Kind regards > > Uffe