From patchwork Fri Nov 9 16:56:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 995660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SevYixMg"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="xJs5ho/u"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="jW6TgRQR"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42s5tW64dwz9sBk for ; Sat, 10 Nov 2018 03:57:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=eELnFkAYVE600fZEUgwEKCIS3jprVRQHlgcEbxTIZ6c=; b=SevYixMgLG4gDu RMmSK7sQkXaY0q6XOwdPFiqimIvwESOU2URPr3fz6BOrA7p4jsPmgv+oIhRcj8PgO7M+lB2Huj7iw wATQ8BUfiC+SuQ2BN82wzVa4KUIqbYxYjVjnbfLP0rJVkeTBKmbjaSCdxX3LyDQ1X0iDaN4C6XQVI e4OAtKfOIPMwm6y9Y+5pA70hbTNzETQRFgx0JeGhiaFgW1Sq7cCT0IdXlTuwC7wnvJMxFPWcCMgmc SZN/+JADUrOZhctmmjWfP89uNYtbwNIQ23f74c5P94nj7rQXGw5u1JDF0JE1VEbtkH7siTFFBW13W /B8DdwoQaW4hi+c2qrkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLA6A-0005Ib-2s; Fri, 09 Nov 2018 16:57:34 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLA5l-00055e-4u for linux-mtd@bombadil.infradead.org; Fri, 09 Nov 2018 16:57:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uH/5FVAL6My3DN7fkCwRGU6DLFYmDLDbOwxsSD5NUPw=; b=xJs5ho/uVtq4cZMwe0eQT1CIMX rp9Jsgzvty1tAvf8Jnluy9Wu8kXshMeXIB0S94oK8d8LRdLYKPjt8Jr0qppF3+69n5syGPs6m8FYh KqYqZhpAUyYscUCmbOqcilGvkBCD61tvpFBRJR/3ajxlQQbmesbYlMlXg1Alb3OlzLW1qqDPfhAlt 07inxn9yIrREwMJp+IhkALW/M1O6KR/bjyIIdvnPHHAvf4Ye64NimQA079LA6rnZ5ZTDyDomFwA+t OlxTFs+pJeIHKZyDx4Jnk31KbZlGJhNBBzdMsrvfid2qFq2EHZi6+aj7DuoxMNM5MwoZcYguC/wP8 p5gKr2JQ==; Received: from esa6.microchip.iphmx.com ([216.71.154.253]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLA5i-00064B-66 for linux-mtd@lists.infradead.org; Fri, 09 Nov 2018 16:57:07 +0000 X-IronPort-AV: E=Sophos;i="5.54,483,1534834800"; d="scan'208";a="20177804" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Nov 2018 09:56:50 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.105) with Microsoft SMTP Server (TLS) id 14.3.352.0; Fri, 9 Nov 2018 09:56:49 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uH/5FVAL6My3DN7fkCwRGU6DLFYmDLDbOwxsSD5NUPw=; b=jW6TgRQRpcO2sAeFH5QdL8bnKvs8ZJpBy2ptfLEidEFLlC+USPqP/F9rh/sE9ip3kjip7M5gAc2zKuaXIVeZx/555vdHbUv7VOcgP/4JEbLMbKUHbHzd6UHGrgTEib0YSehmfztPLL6n6ws7IbqJ7myIxaGpv+SX4sqRYZLvlBU= Received: from BN6PR11MB1842.namprd11.prod.outlook.com (10.175.99.146) by BN6PR11MB1905.namprd11.prod.outlook.com (10.175.100.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Fri, 9 Nov 2018 16:56:47 +0000 Received: from BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::11b7:21db:803a:7cfa]) by BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::11b7:21db:803a:7cfa%5]) with mapi id 15.20.1294.034; Fri, 9 Nov 2018 16:56:47 +0000 From: To: , , , , Subject: [PATCH v2 0/5] mtd: spi-nor: fixes found when debugging smpt Thread-Topic: [PATCH v2 0/5] mtd: spi-nor: fixes found when debugging smpt Thread-Index: AQHUeE0zK2ltj9Ul4UG1UmImfkI3+Q== Date: Fri, 9 Nov 2018 16:56:46 +0000 Message-ID: <20181109165644.30534-1-tudor.ambarus@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR07CA0231.eurprd07.prod.outlook.com (2603:10a6:802:58::34) To BN6PR11MB1842.namprd11.prod.outlook.com (2603:10b6:404:103::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tudor.Ambarus@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BN6PR11MB1905; 6:g2YTX+TfrM5Mk9/yP2C67eAnOh4zpnDBtY4KGEX24BWC2HKuNpsdCkRi5Am1cXWOR4BL8E6Sd+DefxpVy4vT2cKujhUzsMoPz5e3AZre6NzYwG4bcg2L89Eg86G2Poi0piHL3tYgqBlT+Y2CMxq3J2W4TcC/gsWZk7PZrrTQYWxRYbol3Gd5L6Z8Xgti+j7LM+GTrY4IOkmZn1rwLGisYMsqthUByAJgzZsVvFH34obettjkp0Ch5yJ2SCjFt70O+YHSt2odP8mNvTGRIzv2cNcja04/UFlpLerN1r3411HYqlVjjK8lOUEZbac9o5C3v8cU7cAARcCI3iKeyyCmolvFUfoL1+071OgET66ykCW114rq27BPXHwhZC3/00p8kCKtC1RcCcTZ4Q14ZbfXdGUt6Q0dc+hrO56YsyN9Bh4j3votCgcj4F04cp9fXtlntlehHswvGm2X5AeiKtCtLg==; 5:rfIvZhJtFqa8qgInR4WdNBadvLnR3Gv8eijluilWkwL+t7NH+7LW7ovQJ5xCr1QNeQdyHaLfU0UimIEz9ZqbMw6wtGZSOUWLi01BsT01F5h1Kj2TW+qgoaXUwGHccvOcOqCMo2pl/AMlC640BzFa5/urAwmkDAYPVItUtJrzG2k=; 7:c5GsSNz42bf7iMUVHfsd2oa2U6qA+lQMjPMJGfF1OHI5IdqRCP74WPRoRSnFDKHwjA7S07zuhHbfyHRnZy6VQYjwaKLPIgBuMsMZkirt7h6AOlSaNg63M+KvY9fASwj9iHsYL2tVQouU6f19XoUziA== x-ms-office365-filtering-correlation-id: 4cb08ba8-8078-463a-0373-08d64664552f x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:BN6PR11MB1905; x-ms-traffictypediagnostic: BN6PR11MB1905: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231382)(944501410)(52105095)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:BN6PR11MB1905; BCL:0; PCL:0; RULEID:; SRVR:BN6PR11MB1905; x-forefront-prvs: 08512C5403 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(376002)(39860400002)(346002)(136003)(189003)(199004)(6486002)(8936002)(68736007)(3846002)(81156014)(486006)(8676002)(316002)(71190400001)(2616005)(110136005)(6116002)(14444005)(256004)(86362001)(66066001)(2201001)(39060400002)(186003)(102836004)(54906003)(71200400001)(7736002)(305945005)(14454004)(81166006)(6436002)(5660300001)(2501003)(97736004)(26005)(2906002)(1076002)(476003)(72206003)(4326008)(99286004)(6512007)(52116002)(478600001)(386003)(2900100001)(105586002)(25786009)(106356001)(107886003)(6506007)(53936002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR11MB1905; H:BN6PR11MB1842.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: x3zn8JthoV9Xl+gvlYvN+oZQOIKgVFE9KsWNoue15/73+uToA59fHJ6flZzFKkihXiG4eW+cyEGvmVHBwOsUdgVR73NJ+UIcZu456kZWp7t+68Lzv2e1q2BijcbS9OXeE7qRfuD2GB552Iji90E8iHa7NrVpcl6bKEwEQ9FGSuwK3ZzZSynvib0i7lG/m9zF3hFVVnbzcxUsdn8gW+zaDCuD3NCOUe4/kh3P/RYWMFr0PLlJXFQMOZPTYVNsyddr8Zb+a8G8yrNJgD7XmLfh/0EyKaBaaNaLnGDLvTp9Ha+i3wcUHYf8GZVZD0yDe9+KlCgQH0/z66FJy9yxFEcFq8Y3UmsS8hEeyP/ZD5+OA6Y= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4cb08ba8-8078-463a-0373-08d64664552f X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2018 16:56:46.8259 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1905 X-OriginatorOrg: microchip.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181109_115706_490847_73A31EFE X-CRM114-Status: UNSURE ( 8.38 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.71.154.253 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yogeshnarayan.gaur@nxp.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Tudor.Ambarus@microchip.com, cyrille.pitchen@wedev4u.fr Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Bunch of fixes that we found while debugging the roll back to SPINOR_OP_READ_1_1_4_4B in case smpt parser fails. Boris, Yogesh, Now I'm looking for a fix in case the smpt detection commands define variable address length and dummy bytes. Will follow. v2: - drop patches 3 and 6 - update fixes tag for the first patch - add fixes tags for other patches - typo, blank line, rename variable, add comment Tudor Ambarus (5): mtd: spi-nor: don't drop sfdp data if optional parsers fail mtd: spi-nor: fix iteration over smpt array mtd: spi-nor: don't overwrite errno in spi_nor_get_map_in_use() mtd: spi_nor: pass DMA-able buffer to spi_nor_read_raw() mtd: spi-nor: remove unneeded smpt zeroization drivers/mtd/spi-nor/spi-nor.c | 85 ++++++++++++++++++++++++++++++++----------- 1 file changed, 63 insertions(+), 22 deletions(-)