Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3529637pxp; Tue, 8 Mar 2022 16:43:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJww93IkSrLBv5ebZtYJ3C7JtunZHVcLil/PNsCawf0RY0md3F1HSBaBsN4wxSai4LOXOeLU X-Received: by 2002:a17:903:110c:b0:14d:8859:5c8 with SMTP id n12-20020a170903110c00b0014d885905c8mr20328878plh.156.1646786616319; Tue, 08 Mar 2022 16:43:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646786616; cv=none; d=google.com; s=arc-20160816; b=SecMC1sYqPyx//zcYvfhv1PbKhqu+WF+L716un2BLg1ARNfgXoAgo1HUq85qDvgdtP hIg/l0sKDQ34SXDaI+xKdyILn/JDHBzYGBSHp0/CUBK7/PJPjlWpU1U0HT7dKMpn7D9O si+m3xMzUe09mzxZo1fJ8+bmLHo/xmbPSXdf8roWe+F9VsdDFgNP1PSJOz3r2Gxf7jI+ awSSkLiEyB3RCrIsqt0n33TTj3kloNhPdqrwctn+QyPXWVovLOb6vuFGlQjTTEqEhE/I v390TO3P0cRsmjOfnJuTg/0f76EW/NQUUk70ObOgqO4hrbgfGw940tYKbiShi7UoHS/1 jNXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=h0gZYhRsHd86IA+XDk/SO96afQMWEjdg760CRNa7YbM=; b=G8ZZTRDKQ60hGkc82YzNP4BzR0x4LzPIR+w0Tx8f7Q+scXG8TFbDg3/KxH/ucLvmNI yvWSB4kDFkbDDaEHegNfOPwWwyXpivyCuz+GZMhwlDUAnYEK4k7hhM2ahrnGTSVkyvWU rrkLFZ/sk0L09T4lVs2EK9HZcrCSkvGmYLDLl3nWLHBNcZQFErJdB0HG1GEQYQwQl2kl tjtNpS4n4jSgiuSPZGjqUhSqVEpom+wah1S859BV7JB7kS85IHLIZjcYc0rj25x3vYZH yDS9q/zLkZnHr/vNinhgR//+zDpjGuATqjr1b54SEY6OjnXpNvGByRdd851LdEv5920n 8XCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j191-20020a6380c8000000b00380a1d779ecsi357758pgd.824.2022.03.08.16.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 16:43:36 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ABAFF138593; Tue, 8 Mar 2022 15:58:19 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348332AbiCHQY4 (ORCPT + 99 others); Tue, 8 Mar 2022 11:24:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240888AbiCHQYy (ORCPT ); Tue, 8 Mar 2022 11:24:54 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A7994888D for ; Tue, 8 Mar 2022 08:23:58 -0800 (PST) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nRccf-0008Qz-VH; Tue, 08 Mar 2022 17:23:41 +0100 Message-ID: <48ad0f65-a12e-e3b0-8c56-3197464c0b59@pengutronix.de> Date: Tue, 8 Mar 2022 17:23:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [BUG] mtd: cfi_cmdset_0002: write regression since v4.17-rc1 Content-Language: en-US To: Tokunori Ikegami , Thorsten Leemhuis , linux-mtd@lists.infradead.org, Joakim.Tjernlund@infinera.com, miquel.raynal@bootlin.com, vigneshr@ti.com, richard@nod.at, "regressions@lists.linux.dev" Cc: Chris Packham , Brian Norris , David Woodhouse , marek.vasut@gmail.com, cyrille.pitchen@wedev4u.fr, "linux-kernel@vger.kernel.org" , Pengutronix Kernel Team , linuxppc-dev@lists.ozlabs.org References: <3dbbcee5-81fc-cdf5-9f8b-b6ccb95beddc@pengutronix.de> <0f2cfcac-83ca-51a9-f92c-ff6495dca1d7@gmail.com> <66ee55d9-4f20-6722-6097-e53c2108ea07@gmail.com> <579eab10-594c-d6b2-0ddb-ea6ab8e02856@pengutronix.de> <117facba-ba33-349d-1085-25315cc1ae92@gmail.com> <9621c512-06f2-17b2-5c68-943b1f0981eb@gmail.com> <510adc50-79aa-3ed2-ab6f-9f9711d9bb23@gmail.com> From: Ahmad Fatoum In-Reply-To: <510adc50-79aa-3ed2-ab6f-9f9711d9bb23@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello Tokunori-san, On 08.03.22 17:13, Tokunori Ikegami wrote: > Hi Ahmad-san, > > On 2022/03/08 18:44, Ahmad Fatoum wrote: >> Hello Tokunori, >> >> On 06.03.22 16:49, Tokunori Ikegami wrote: >>> Hi, >>> >>> On 2022/03/04 20:11, Ahmad Fatoum wrote: >>>> Hello Tokunori-san, >>>> >>>> On 20.02.22 13:22, Tokunori Ikegami wrote: >>>>> Hi Ahmad-san, >>>>> >>>>> Could you please try the version 2 patch attached for the error case? >>>>> This version is to check the DQ true data 0xFF by chip_good(). >>>> I had a similar patch locally as well at first. I just tested yours >>>> and I can't reproduce the issue. >>> Thanks for your support. >>> Sorry if possible could you please retest the attached the patch again since this fixed the version 1 patch maintainer review comments? >> Works good. >> >> Tested-by: Ahmad Fatoum > Thank you so much for your test. >> >>>>> But I am not sure if this works or not since the error is possible to be caused by Hi-Z 0xff on floating bus or etc. >>>> That it works for me could be because of Hi-Z 0xff, which is why >>>> decided against it. >>> I see. >>>>>>>>> What seems to work for me is checking if chip_good or chip_ready >>>>>>>>> and map_word is equal to 0xFF. I can't justify why this is ok though. >>>>>>>>> (Worst case bus is floating at this point of time and Hi-Z is read >>>>>>>>> as 0xff on CPU data lines...) >>>>>>>> Sorry I am not sure about this. >>>>>>>> I thought the chip_ready() itself is correct as implemented as the data sheet in the past. >>>>>>>> But it did not work correctly so changed to use chip_good() instead as it is also correct. >>>>>>> What exactly in the datasheet makes you believe chip_good is not appropriate? >>>>>> I just mentioned about the actual issue behaviors as not worked chip_good() on S29GL964N and not worked chip_ready() on MX29GL512FHT2I-11G before etc. >>>>>> Anyway let me recheck the data sheet details as just checked it again quickly but needed more investigation to understand. >>>>> As far as I checked still both chip_good() and chip_ready() seem correct but still the root cause is unknown. >>>>> If as you mentioned the issue was cased by the DQ true data 0xFF I am not sure why the read work without any error after the write operation. >>>>> Also if the error was caused by the Hi-Z 0xff on floating bus as mentioned I am not sure why the read work without any error after the write operation with chip_ready(). >>>>> Sorry anyway the root cause is also unknown when the write operation was changed to use chip_good() instead of chip_ready(). >>>> I've be ok with v1 then. Restores working behavior for me and shouldn't break others. >>> Noted but still I am thinking the version 2 patch to check 0xff seems better than to use chip_ready() so let me consider this again later. >> The original version has less room for surprise as it restores previously >> working behavior. Assuming 0xFF to be good without backing from documentation >> is more risky IMO. > The change to check 0xFF can be limited for the S29GL064N chip do you have any comment about this? I see that, but I am not sure it's the correct thing to do on the S29GL064N, even if it seems to work. In absence of definitive information from the vendor, I'd prefer we just restore behavior as it was before, i.e. using chip_ready instead of chip_good for S29GL064N. This is the way of least surprise. > Just attached the patch changed as so and thinking to send the patch as version 3 to the maintainer if you are okay. > > Regards, > Ikegami > >> >> Thanks for your continued support, >> Ahmad >> >>> Regards, >>> Ikegami >>> >>>> Cheers and thanks again, >>>> Ahmad >>>> >>>>> Regards, >>>>> Ikegami >>>>> >>>>>> Regards, >>>>>> Ikegami >>>>>> >>>>>>> Cheers, >>>>>>> Ahmad >>>>>>> >>>>>>> >> -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |