Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4458970ioa; Wed, 27 Apr 2022 04:27:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJZ3+5geu7AF8PQ2L6o96aLPLreyFGrlPm4d9glEv0lTGAeeM5mRZciQJURzNP4O4csuMb X-Received: by 2002:a63:e513:0:b0:3ab:a3fb:f100 with SMTP id r19-20020a63e513000000b003aba3fbf100mr4904242pgh.70.1651058873964; Wed, 27 Apr 2022 04:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651058873; cv=none; d=google.com; s=arc-20160816; b=kThfIME77QAXjSJKWSEzWUVM7pduaCEzinuDz2uqotIjEmw9sNp/1MWwPAylSxi5dJ eKxU5MuUScJ6ZcML/IJ/8PKRSDrVny4au1T4VxbmVEFLKCzwtm+7ASVoqjsKsPv/5drf laO/9O6QWg0+nPI1YvXgePYUfsn86GYYP+cYCsI7RPxKMrzhUOLODTeQJsIDW2h/gBwf LIPQD+cdmLuHV8bQX3uQzweBpWDoW3klzs/LO5b+OIMMIbxFNA5nM+wD8dD3pTtfH9vS zZq0EgBTqnkdAd2B6R036T/MHp7QsWWIoM/4nZ7z/9sScl6cUkAuN79JO/l1tsiRfGUb TflQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/JsFpmWyyIBVaFbOoYwRRqvXrsPjhVSVjKC+q6PG1vA=; b=m/snIKIHGgEvHCYX5AFsP44waD1OlkDnxqS6mb+bHv3Mb9hnSz5iSrDI6LPKKLo8p2 xQmxpl/IQZpc2qlGqFoVLGRvjzJm0d0VkY7Spz7pJUjVLOhK4yqKrTBP0F8sjuyOj8h/ s3xZ9S1APX3RZVXaybamB5+TFMWW8QhMAWxqpM2eJY/6Yn8pFKzdymQLDhXZQOxD8Few BR+pu7MK9Qhvmdbr1VGStdHgx2Us5kzdUH/UjZcKMwuPvuVpKfugThSQ5tUdFWyb+XsF W0VRohG6L6RBGUC/P1Qbb0otXPdWgd1FSGaJk93VnpucM3xwwIDILX9rsuf10wUgVIJb /QIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BtXaVlWb; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 2-20020a621502000000b0050d434ae30csi1065314pfv.217.2022.04.27.04.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:27:53 -0700 (PDT) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BtXaVlWb; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B0F54502F2; Wed, 27 Apr 2022 03:26:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232613AbiD0JDC (ORCPT + 99 others); Wed, 27 Apr 2022 05:03:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbiD0JC6 (ORCPT ); Wed, 27 Apr 2022 05:02:58 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A2D91EE8BD for ; Wed, 27 Apr 2022 01:59:43 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 23R8xRXh077668; Wed, 27 Apr 2022 03:59:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1651049967; bh=/JsFpmWyyIBVaFbOoYwRRqvXrsPjhVSVjKC+q6PG1vA=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=BtXaVlWbkMaAIOGrYeP2rLLGcbXDwZi1bNXRQyOU/Cw3LcZXW+/cxBzIyGd3R/8wK mK0GBPVVDDPfrvL6NoDiFxKLRUcThTSeluLC+f5wUvgfvwCDeNWHNdAowc4S8tx29t rA/0XtMYSp71XR2cNgRiO7fmgQSbBsUQ2LyOYA+4= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 23R8xROf025164 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 27 Apr 2022 03:59:27 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 27 Apr 2022 03:59:26 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Wed, 27 Apr 2022 03:59:26 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 23R8xPad030273; Wed, 27 Apr 2022 03:59:26 -0500 Date: Wed, 27 Apr 2022 14:29:25 +0530 From: Pratyush Yadav To: CC: , , , , , , Subject: Re: [RESEND PATCH] mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check() Message-ID: <20220427085925.wlmsnr7qgi5wteod@ti.com> References: <20220126073227.3401275-1-chentsung@chromium.org> <20220131171929.uk3z5sr453c3eefp@ti.com> <0e02112a-317c-e95b-e0d3-7ed2c74c3509@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 27/04/22 07:14AM, Tudor.Ambarus@microchip.com wrote: > On 4/27/22 10:11, Tudor Ambarus wrote: > > On 1/31/22 19:19, Pratyush Yadav wrote: > >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >> > >> On 26/01/22 03:32PM, Chen-Tsung Hsieh wrote: > >>> Read back Status Register 1 to ensure that the written byte match the > >>> received value and return -EIO if read back test failed. > >>> > >>> Without this patch, spi_nor_write_16bit_sr_and_check() only check the > >>> second half of the 16bit. It causes errors like spi_nor_sr_unlock() > >>> return success incorrectly when spi_nor_write_16bit_sr_and_check() > >>> doesn't write SR successfully. > >>> > > cc to stable please Since this has the Fixes tag, once the patch hits the MTD tree stable should pick it up right? > > >>> Fixes: 39d1e3340c73 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()") > >>> Signed-off-by: Chen-Tsung Hsieh > >> > >> I don't know much about this bit of code but this patch looks fine to me > >> from the surface. Would be nice to hear from Tudor about this too since > >> he added the function. > > > > Reviewed-by: Tudor Ambarus > >> > >> Acked-by: Pratyush Yadav > -- Regards, Pratyush Yadav Texas Instruments Inc.