Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1114443pxf; Fri, 2 Apr 2021 01:21:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8uzGsm4c5+jk9iRs59M6a5x4zZxodzGWNoLN8ryQBPqBrA+JAz98rwlMxxPkrxhq9oKeZ X-Received: by 2002:a05:6e02:504:: with SMTP id d4mr10423221ils.125.1617351693229; Fri, 02 Apr 2021 01:21:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617351693; cv=none; d=google.com; s=arc-20160816; b=zTLb8RFCQQKrme5flFAM3PDinim/gd+aosTfslckYEEiWXERUE6WuvKvoSVhMDGSpK /p/gowKxHkCrym6NmQcWlT+M7A2qK495KYN4zgYsbujnY2P5cZLRsj9hK6mOzJCy/9g4 +i6XU711DukpfC3ctLDD3GmcBgv68+BCVYPt3S/Qbfe5Xt3E2iyTWzuQcmdsrpnKteIu ogE4grfonPTbwChA/WlbUudIUqDHjiEz2sgT3BfSZxyhwzp2LflDD1aBKOpJLTyqamGX eHp9WLTvp6SduwGSQ/UtRtXFyo+RAvbAw1iP/Qvz3xdDB8FgfYDzjvTFN/AnIyoX8ImW MX6A== 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 :ironport-sdr:dkim-signature; bh=RGad4EJcTjqVlx0t5v9xu0QVCivxJZ3+hZwEVhXDpnw=; b=CY0mYGUwlKCBucXGgI3/tq2emr8WOMu7b/79CEEZxBZJsJsbe2r+jqxJOTK190U9Qx YIrTJLHb2mP7/QSYrV9wD6ParfzlcN6PmqPQHyRTLrXQn3PrRnhsUH/n6LqKHs8482SQ Vu9zW80nQlstegJ/5iteZlhpduMGFglccAxYm5PoxJbTLCBfbuaQ2hy6Ea8seX7x2i9f B/vDnvcEiAa2j7C6oklrVl4DyO81RcVUNEiOp5Ms7ARrGzFQk0hqtBYVmHojZiHGbv2Y knlqKGU0iW3H6T1pgBzF3ioKU7PQstQdrsK7FrEgzMR2nBeJLif+TmkFdntk+cJMLxJP E1Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=GI7y+tAT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si7420834jaj.22.2021.04.02.01.21.19; Fri, 02 Apr 2021 01:21:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=GI7y+tAT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234327AbhDBIUm (ORCPT + 99 others); Fri, 2 Apr 2021 04:20:42 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:4607 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233718AbhDBIUl (ORCPT ); Fri, 2 Apr 2021 04:20:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1617351641; x=1648887641; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vRulU25IEAwnweYpFPXTeAAZj5ejlP9sZftk3ipphww=; b=GI7y+tATEVa5t4gmPuA04CxVs4ZZAUcj9DCDfW8ngt2noKSaw/DT9Wyk e94qAr9r70oHW2bGjzs+Xp+yZ7H477pu9M2IuVqq5MOWABg4d6XO48mFz eLnidalFYD1UNMI0ooUqr8h2AKfZxxAlchRoOa95PcsbAga76R3Nuvx3c O8sSnCWV20pRynHtn7CMC6OtpJQKKeDr1uieKc3tjRArgaiJF33DhVXkG 5B0Xt26TrsQJNfxEirKOj/fzJms2ZQR0iNfoNin5U7LjAgYSf9e1KwpRk uVsRwCdNYltWhINWj+Q6XjgQYY/HxDoicOcVN8t/rJpvOAFfbQgfsKbYk Q==; IronPort-SDR: Q64WanxaLYSwRju4Nu5qmC2uIW5OB7lVRYAwtpPi0djvMmyhnRUFwgvcNxMaPYUJCsSmZhrXr8 0eucLYAekymiWkfd5MIbZ9gT7S5n8DUJnu9gSeBTPUCki9O1DEvETO/E6yH/M27zpO78QOGG37 qI4rqkkyhLnkIEmGL7lFEYkngnBMvR9yPKGSNd6PPQ9+HV8s4Fj4mKX8O7CYMMjG9xjfJ1gXVk 61pwtklk96FEoSmO8GcoUzheruQUHqAg8KoY73fg0sM/cpDaPYukpZyArwamyZaPPr/bzbWuNj fM0= X-IronPort-AV: E=Sophos;i="5.81,299,1610434800"; d="scan'208";a="115094219" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 02 Apr 2021 01:20:40 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 2 Apr 2021 01:20:39 -0700 Received: from atudor-ThinkPad-T470p.amer.actel.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Fri, 2 Apr 2021 01:20:36 -0700 From: Tudor Ambarus To: , , , , , , CC: , , , , "Tudor Ambarus" , Subject: [PATCH 1/2] Revert "mtd: spi-nor: macronix: Add support for mx25l51245g" Date: Fri, 2 Apr 2021 11:20:30 +0300 Message-ID: <20210402082031.19055-2-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210402082031.19055-1-tudor.ambarus@microchip.com> References: <20210402082031.19055-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 04b8edad262eec0d153005973dfbdd83423c0dcb. mx25l51245g and mx66l51235l have the same flash ID. The flash detection returns the first entry in the flash_info array that matches the flash ID that was read, thus for the 0xc2201a ID, mx25l51245g was always hit, introducing a regression for mx66l51235l. If one wants to differentiate the flash names, a better fix would be to differentiate between the two at run-time, depending on SFDP, and choose the correct name from a list of flash names, depending on the SFDP differentiator. Fixes: 04b8edad262e ("mtd: spi-nor: macronix: Add support for mx25l51245g") Cc: stable@vger.kernel.org Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/macronix.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c index 6c2680b4cdad..42c2cf31702e 100644 --- a/drivers/mtd/spi-nor/macronix.c +++ b/drivers/mtd/spi-nor/macronix.c @@ -72,9 +72,6 @@ static const struct flash_info macronix_parts[] = { SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, - { "mx25l51245g", INFO(0xc2201a, 0, 64 * 1024, 1024, - SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | - SPI_NOR_4B_OPCODES) }, { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, -- 2.25.1