Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3506210pxp; Tue, 8 Mar 2022 16:11:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzja2sw4/oiepytBvRcP/wX8iZv/dlTkt5x3/gIcNxJs4St7j5wITBslBEyPJPW9FANIJJV X-Received: by 2002:a17:902:e84b:b0:151:ca71:7d3d with SMTP id t11-20020a170902e84b00b00151ca717d3dmr20050181plg.26.1646784663191; Tue, 08 Mar 2022 16:11:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646784663; cv=none; d=google.com; s=arc-20160816; b=nVppHvcocRBJipjFNpvkPMz8fqSZ8TX3N76tSfhFKyHc1VgGIudLjN2Dh6uVcl5u2K yGUIzTTVnsqV1ojtDvhN0rNg1WNuQU/9IALtCrsW/xbUSkxMasNqQviR7p+VZHL0UnCK TtUktis8ZeKcXRfFTvfRL4Sv2yye9fftZaaJ5T59XiSEj6PDjGC5OWrDtYsKUzQ/8W7O uefA3X7kwGMQTLXKtS895cQ2iQYzgU0XP13LP6VjlPbEba65K77BIX83sJ//VZU5mYWu ObgLC+EadgNnNAkuy/wSXgzOtLmNKoYOZvUchUZS/tjwAzWeigQP6XQP0Fl/ETbLOJNa R/Ug== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b43QLvOOi8QJdd2AlOo1x4KoFsoL41yi9blLOVSjbiY=; b=WZlsaI4ztlxvn4VE3GH4lkO46BPR2P1stoYGW2qE+0qaQbyXKTCKQhcjDRkY29pUwI ugNYCvTQi75XodubteSmMzG6u2U4d4Vs7wc1luILyk9wWOVmOfdljGEvMP6kJudxx8gm eWeYsuUmZTYDO4DPnN6XbWZd7Wu452rh+Rp4WqYZxvtMrW55MmRt6su3Dw/oVXSb97GH HEKAtB98bfT1NH8i22CqHpQN4WcEUHc1d5/LzVSCwExFOsIZC8qkoHCOhxKFCoIEdPmO LB2G59Zejja8ks0MBI54xJu9Cp/4vNVVS+JEeUngy78aj/KZ5AwX9Ngn0kh9FK0scZRE U38w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Sc8ogQyq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 21-20020a630215000000b00380189b79e2si300475pgc.660.2022.03.08.16.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 16:11:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Sc8ogQyq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1644EDF21; Tue, 8 Mar 2022 15:40:45 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347896AbiCHPmr (ORCPT + 99 others); Tue, 8 Mar 2022 10:42:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344551AbiCHPml (ORCPT ); Tue, 8 Mar 2022 10:42:41 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A66F74ECE7; Tue, 8 Mar 2022 07:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646754105; x=1678290105; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Svmpa5a1Mig8SFByV7N48trL4Ve70J5aZwb03ZhVga0=; b=Sc8ogQyqxZLE5JOeoHTCNw4rFa0E8bXasPDNCSHjmaeRo5boAKHoelbI IRotkW+xxX7PavfJtd0gigQUtg41FnUjV6AwZkGQbBgpQIMJXTW6jRstu 9lpBVf1INWKQM9UVxFnJefcllvpX2goDPeFebavRbARFRUouNkAry8wqY 5zeZcaFSBgQFOVPpO/+i3495zjt6x3NprYZ0cX032g3sF1hwbhLacC6zc uS4rbEYu/uFjK9t1sqgFWnPihUO5ekIk5xpRXzgVgTmzT8V8SgWo9NAux 2eIp1/0rKM8uxXrzX0IPcq8eZxj+H471RVhEEH9rTkXsQoEo2WDRP50FU A==; X-IronPort-AV: E=Sophos;i="5.90,165,1643698800"; d="scan'208";a="164948817" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Mar 2022 08:41:45 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 8 Mar 2022 08:41:44 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 8 Mar 2022 08:41:42 -0700 From: Tudor Ambarus To: Tudor Ambarus , , CC: , , , , , , Subject: Re: [PATCH] mtd: spi-nor: Skip erase logic when SPI_NOR_NO_ERASE is set Date: Tue, 8 Mar 2022 17:41:39 +0200 Message-ID: <164675405078.4788.10976712851332781674.b4-ty@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220228163334.277730-1-tudor.ambarus@microchip.com> References: <20220228163334.277730-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 On Mon, 28 Feb 2022 18:33:34 +0200, Tudor Ambarus wrote: > Even if SPI_NOR_NO_ERASE was set, one could still send erase opcodes > to the flash. It is not recommended to send unsupported opcodes to > flashes. Fix the logic and do not set mtd->_erase when SPI_NOR_NO_ERASE > is specified. With this users will not be able to issue erase opcodes to > flashes and instead they will recive an -ENOTSUPP error. Applied to spi-nor/next, thanks! [1/1] mtd: spi-nor: Skip erase logic when SPI_NOR_NO_ERASE is set https://git.kernel.org/mtd/c/151c6b49d679 Best regards, -- Tudor Ambarus