Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6253973rwd; Mon, 19 Jun 2023 04:53:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ798wVxeNjiwQm5M+9lcXt6Ab5OcDbq6wlk/U2uOA7LRmE8OAYyOM0IbvMEo2IriU7vkCCu X-Received: by 2002:a92:d28a:0:b0:340:985e:997e with SMTP id p10-20020a92d28a000000b00340985e997emr5767899ilp.19.1687175603928; Mon, 19 Jun 2023 04:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687175603; cv=none; d=google.com; s=arc-20160816; b=LQRSYU+T3/OCsTzVMDqAuwOi2IwUDWmkRxRzGBFhKMPws5FnKwgy///QWikj4sRbBi twdsbk9Hq8rwrtyxIDD7jPwLHDFhXfPTV6uEoaNqu8ZiNptYdCHNEWZ2m8PT3ibhjYQi IjOo2u5V7c6d/DBawpbu8Mxnh9dPc7RSVGgcHfppYybDkwatYtE1pz8sqRAjZXQO3OfU hL/P4xeMy4kA00fBrYZjZK2WDXKT8TtuCGR9NGDXfXV7+o3LcfnNvw1RLE15aGnEtwyT pofmDO3r3qK88mA2vdiXL2BOwNUFVwGrIB7PrtEMUryhg/YSWDwWIRlojEOObSTkWAcU umYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=D6pgkQ/5PXRzxsuylEdJsCT9j/BHNO7E/gSHcNIn62E=; b=JvMTsz6bSXNEAYgABHW0z8UN65BOzeGuAG20Ck/E+C2QIqETG2Ru3gwY8prfMemXiF CHrhDU1lViP+67ZDlDBErVzAo2xlkURwd0vb0HqmDJTN5do3etSD8ymNjsvPi1TEi6Of eVVb8/n/eDYQz55T+nzFi8BNYYDXsVnMd00cv+gIfrUK/fAiKwJS2jVHsHiBG6DOxGiN qN7uycnr//EvV4gT8jZvA/iZ9cS6/P8+onVSQrq0lvuCI7CqITO6k0VHgWjaZJnvjL1b GyxGRqaJP4R8nqHs5enLvJGeWJ1XPr09Y46ibKX7YI9CuiABQn98bE3nFG40ESuf+uDD +iPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ea5Y8qHZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l189-20020a6388c6000000b0055382f1e985si6376163pgd.333.2023.06.19.04.53.11; Mon, 19 Jun 2023 04:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ea5Y8qHZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231389AbjFSLn6 (ORCPT + 99 others); Mon, 19 Jun 2023 07:43:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230452AbjFSLny (ORCPT ); Mon, 19 Jun 2023 07:43:54 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEFC5DA for ; Mon, 19 Jun 2023 04:43:53 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-bc4651e3838so3501687276.2 for ; Mon, 19 Jun 2023 04:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687175033; x=1689767033; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=D6pgkQ/5PXRzxsuylEdJsCT9j/BHNO7E/gSHcNIn62E=; b=Ea5Y8qHZ+nfPwjAWkAYWcVkjXNEZR7CQOu9DWVoygkp96GrkCA1ynrqYV8ArDnEEY4 sfOXsGkICTpQahzunIs6P80Oa2ZDIIfkldz23sYi/jlCiNKhqN4z0mDGdr7q0lE/qayC 8fdu4kp2XNNrh8XLDJ31czxjb/wrIblHnlSJ8m2349IH29ws7zCZ4pHCfZCZ6X2TVmsx e10LW/OTKACjf5KWmSf2xvQLvaF2Yx1LRa2RBQ+MKQ4kqUldw8Msy10z+y3BeKx128Rb BYM4lynQqCvD3JBOJIKASaKP+D+1sOqfada0FoDF3FUHX8B7guJi79YJNHSlaEP1842y LvDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687175033; x=1689767033; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D6pgkQ/5PXRzxsuylEdJsCT9j/BHNO7E/gSHcNIn62E=; b=BDh34KZexSgCXMBdw6oiBWELlHjwgIlmtDhSW305u9+MpRpEoV7vQUE9y5PYOr9X5k xpew5q4XiZXSbMVN9/7Vs+fzK+N98O2Fs/A4tWWPnjfjeAx5K+v4dDaL8o/m6PBCeODL GFZsJQusiNYUSC5aP2DnERSs5S1OoiMeP2p2XgW1kjyvcFmakzIKn4VIS3DY/c+udSxf fllKB2OyZHNnXbgVtWZQtkYepcs8pHx9cEiMTYPYTjtgqtdok6iTJtXYbPbwqTrfLZ1O QRT6KUMlqn74+yxLRI4Y+bsU3WBsOQ5lLp2f5u2S6JO6G2XIQw/nDEfA41bCNxcOZ5mD sulA== X-Gm-Message-State: AC+VfDyaDgM8e8aH7UHaZGF+2PCJj+QbfV1HT2/yeq9T3+YhRJlCvmkg AljHmSEjLa+y8VGKTnc4kfhcT9t8gAHqA86QeMDKtg== X-Received: by 2002:a25:824d:0:b0:ba8:6643:81e2 with SMTP id d13-20020a25824d000000b00ba8664381e2mr5817247ybn.54.1687175033013; Mon, 19 Jun 2023 04:43:53 -0700 (PDT) MIME-Version: 1.0 References: <20230530213259.1776512-1-robimarko@gmail.com> In-Reply-To: From: Ulf Hansson Date: Mon, 19 Jun 2023 13:43:17 +0200 Message-ID: Subject: Re: [PATCH] mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M To: Robert Marko Cc: "Luca Porzio (lporzio)" , windhl@126.com, avri.altman@wdc.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Jun 2023 at 00:18, Ulf Hansson wrote: > > + Luca (Bean was added by Avri in another thread) > > On Tue, 30 May 2023 at 23:33, Robert Marko wrote: > > > > It seems that Micron MTFC4GACAJCN-1M despite advertising TRIM support does > > not work when the core is trying to use REQ_OP_WRITE_ZEROES. > > > > We are seeing the following errors in OpenWrt under 6.1 on Qnap Qhora 301W > > that we did not previously have and tracked it down to REQ_OP_WRITE_ZEROES: > > [ 18.085950] I/O error, dev loop0, sector 596 op 0x9:(WRITE_ZEROES) flags 0x800 phys_seg 0 prio class 2 > > > > Disabling TRIM makes the error go away, so lets add a quirk for this eMMC > > to disable TRIM. > > Let's leave this another week or so, to allow Micron folkz to confirm > before applying. > > > > > Signed-off-by: Robert Marko Applied for next and by adding a stable tag, thanks! Kind regards Uffe > > > --- > > drivers/mmc/core/quirks.h | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h > > index 29b9497936df..77caa0c903f8 100644 > > --- a/drivers/mmc/core/quirks.h > > +++ b/drivers/mmc/core/quirks.h > > @@ -100,6 +100,13 @@ static const struct mmc_fixup __maybe_unused mmc_blk_fixups[] = { > > MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc, > > MMC_QUIRK_TRIM_BROKEN), > > > > + /* > > + * Micron MTFC4GACAJCN-1M advertises TRIM but it does not seems to > > + * support being used to offload WRITE_ZEROES. > > + */ > > + MMC_FIXUP("Q2J54A", CID_MANFID_MICRON, 0x014e, add_quirk_mmc, > > + MMC_QUIRK_TRIM_BROKEN), > > + > > /* > > * Some SD cards reports discard support while they don't > > */ > > -- > > 2.40.1 > >