Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7595018rwd; Tue, 20 Jun 2023 03:38:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5zUVejsJwFniqA2KN8O4pME7Z9elpmk+wFt14JwjuRXG5fdwWhAcMLhE/XEvStPGGYVA9m X-Received: by 2002:a05:6a21:3386:b0:121:574a:ac6f with SMTP id yy6-20020a056a21338600b00121574aac6fmr8789015pzb.1.1687257516691; Tue, 20 Jun 2023 03:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687257516; cv=none; d=google.com; s=arc-20160816; b=veo0WB9jA1JvpElzsNwqXWqfPwDMePqZEphgSU9mzPZC6CRDYrTyQBX88dCimwGAGX UAk4PojOWjV4GeWHYXuHBEt0dxQnP2RsYo2uL7ZXPP/7h7rvWIfuOeRDUrgljiA7ECdH ETUZzSZIff3AQ+YqbvnZEqEofmbdlPcN3r/7tQh4BW4yii6zzkUMz48UbyRR8zKSo/QZ 9EwKtW/wXbSk6gV7NFSfiQeAeJWBx1tunmjiKCoHqr+Bunwip57bMu67mRXoakYSJcaq 2nOc5ljsjhenGMRr2Ng+QW0G+1iSzIDKO96g30syC3F2+2TCy1WAVwI7tY/0JB9uO3ww ke8A== 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=vOsoVhAS5zcveo7bpV9oedUbfz6CmPMgIriAPmX3UMM=; b=DUVP2ezb503uo8KPtuvLqIP6Z9dvbA5X3iYjjvl+b6A5av8uc+OWYWHfERpxABFHOD M00faNn/0nPabvE17nh74/cLcC14BSpR3oj3REod74Wsr1KsDxgpIJg6iE4l9UfbQ39L GWH1vRgn0jtOJRlfhsM2QvtABUczFlX3gfvRS1fxbobD8TlG/Fy3pQJFCNdf+Y6jpoIJ uzYojzgv0G6fl9FrH+/qWpClVJYl3CWlV5rvzC3MeI0gkR8+hBj1GgB5llemvf50kTle u9CFxEA31ZUL7p/8MKxBBhUkg5gnRHVH+3XHNNEMzHekKlmM9XrFKYa8NgVyfVG6YsRT 7E8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dqSZd1k0; 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 e30-20020a63371e000000b0055337ca9ce9si1351703pga.248.2023.06.20.03.38.23; Tue, 20 Jun 2023 03:38:36 -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=dqSZd1k0; 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 S231857AbjFTKPD (ORCPT + 99 others); Tue, 20 Jun 2023 06:15:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231710AbjFTKOm (ORCPT ); Tue, 20 Jun 2023 06:14:42 -0400 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE08DE58 for ; Tue, 20 Jun 2023 03:14:39 -0700 (PDT) Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-3fdec2ed972so20986581cf.1 for ; Tue, 20 Jun 2023 03:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687256079; x=1689848079; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vOsoVhAS5zcveo7bpV9oedUbfz6CmPMgIriAPmX3UMM=; b=dqSZd1k0m2oMqHAG5Kzcyhv59o5mUYzUHTdE4QROXsi6T3LMjk/EkEpWxKM7TOuoC9 0TuLHd8mRSE5jN4Dvq/8N1lm84uzlLdY9u1NpyqZsc1hRInuc/FuAf6Utl9+7KUq3jLz /nd3jZOrXQUqyht2rFwePB26kXkCAbaCBx2G5Y/NYc+Izt6yASDdyY/Z1Yp7qwVWjQSo RAaeNhYX1E8PVlxLsdCZuc/yX6Ee7f/iY4etJUQXgGHap8929IHDYrv/c/YGBX6uXfOb Tc7u5U94N+3TGbTLVxx08kvc8XE3+ZfEHET9796DPQUeNHMJwgRAuOguB9teGjj37QCU txIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687256079; x=1689848079; 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=vOsoVhAS5zcveo7bpV9oedUbfz6CmPMgIriAPmX3UMM=; b=U7OKKtgdKASYtE8oSU9HxAE42bGrR42Pj0PIe9vSiHhGHWz3lID/1l3GvQi1WyLZoc LheYfwBIltCBhqsYc0XtEZKQchiwQvStuXXboPb2jVDA4rnXGuvWhuEJIvEKiu725vWh TsRtdrUsNGIObbTK7EdoJAiHZ5V3uYTbQskib7cpsaycBRP+jDrY5QXs6vQFoVZEZMxV lkX5SevkqDkCxJ0fxQ+tQ4R4ILTB7vip4s5zf4TpRVITlS6bco22KqZ1MTpIIPDNPwPa 0SkKWBPTtgsQZU0fXu9Hs9wVORfh4THVZZMJ+gQMBkdOnxsaeWyermdIIMhEZJciVDrM w7yw== X-Gm-Message-State: AC+VfDxj+HfpROiFnQQRckKhIaBawDs91uIEnSTgtL8JU8Av8Gbjg6hb EGFPSm7ySI0hHHLGNYIgKpDMHh94OMK+gq7rCmCVGQ== X-Received: by 2002:a05:622a:d5:b0:3f6:af57:e707 with SMTP id p21-20020a05622a00d500b003f6af57e707mr15370974qtw.51.1687256079058; Tue, 20 Jun 2023 03:14:39 -0700 (PDT) MIME-Version: 1.0 References: <20230619193621.437358-1-robimarko@gmail.com> In-Reply-To: <20230619193621.437358-1-robimarko@gmail.com> From: Ulf Hansson Date: Tue, 20 Jun 2023 12:14:03 +0200 Message-ID: Subject: Re: [PATCH] mmc: core: disable TRIM on Kingston EMMC04G-M627 To: Robert Marko Cc: 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,URIBL_BLOCKED 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 Mon, 19 Jun 2023 at 21:36, Robert Marko wrote: > > It seems that Kingston EMMC04G-M627 despite advertising TRIM support does > not work when the core is trying to use REQ_OP_WRITE_ZEROES. > > We are seeing I/O errors in OpenWrt under 6.1 on Zyxel NBG7815 that we did > not previously have and tracked it down to REQ_OP_WRITE_ZEROES. > > Trying to use fstrim seems to also throw errors like: > [93010.835112] I/O error, dev loop0, sector 16902 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 2 > > Disabling TRIM makes the error go away, so lets add a quirk for this eMMC > to disable TRIM. > > 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 77caa0c903f8..8decb788a3db 100644 > --- a/drivers/mmc/core/quirks.h > +++ b/drivers/mmc/core/quirks.h > @@ -107,6 +107,13 @@ static const struct mmc_fixup __maybe_unused mmc_blk_fixups[] = { > MMC_FIXUP("Q2J54A", CID_MANFID_MICRON, 0x014e, add_quirk_mmc, > MMC_QUIRK_TRIM_BROKEN), > > + /* > + * Kingston EMMC04G-M627 advertises TRIM but it does not seems to > + * support being used to offload WRITE_ZEROES. > + */ > + MMC_FIXUP("M62704", CID_MANFID_KINGSTON, 0x0100, add_quirk_mmc, > + MMC_QUIRK_TRIM_BROKEN), > + > /* > * Some SD cards reports discard support while they don't > */ > -- > 2.41.0 >