Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp344776iog; Wed, 15 Jun 2022 03:31:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoajjqsE/YlQTEbRA4B9dxbSp37K8YYRLlPjnBwQmC13lyjPkFbP4fv3cxCMLXSvQGRrop X-Received: by 2002:a05:6a00:15d3:b0:51c:1a20:f8d8 with SMTP id o19-20020a056a0015d300b0051c1a20f8d8mr9315303pfu.57.1655289076643; Wed, 15 Jun 2022 03:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655289076; cv=none; d=google.com; s=arc-20160816; b=NM/AWAGJrGf3pVP2XM8D5UQscSqCpUUuqIBgnd+//E+8rs64GeWJi5ce9xqKK8UdkW k9qFW5N6SxzmQ2vZmtBYoQtcK8LyJMTx7chPMornjl3VjY/06dqyZfbtx8WcXMdY9qUi qTwFgCkt7A9I92LfY/MKQExyqcaWDD48ItvT2Jcvq2e1V8TH7hZwddKdkwIcypPYx2Vr 5/JwfWO7N8NFoy0WLEtHTUi7boT9mHqr4dRuvKZ6tcHsftSvHNpVK43DvG5Y870hJQsU fwymPVOHUHdkJ8mXEbmLsnW+440bILu5fyELjJs/qBVAY6fh90mnQeV0RsVHwqdnTP+t 546Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5uw7YT1IlLOmJksKcXq3couoILg8H6znV3vDqowageg=; b=dAwL3bsUIBYkGTiPRLUx+8uGjqRbrcXksA7uDR2mxtnqS7hL3rkKI96t/QcPZ5pGn0 axbdCcLmWIRG5nq+DnRk8gVZtYV2nkfvyoq+f/65kIwWtqkU52U99DC+pe085BR/Uj4m 4qnBw+i57MnEfpOyBksE1+j4i6uFTSRSJxYDnJVCokdDY0nu2Rx76n5euYv8hucwbLZs kvdGGygUsn/PMYKMSa9/DUZe07kJ/q8wb0Q4KOLjF9V3T6Fj5tOyXBmARtEF4MfK4h8w IrOVuiO7VMk3DLvs+8uRCGT2qBZaEPY2P0aYfH8g2lXc6kP0+I6vQqrG/QW0MVa2ezd6 131w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JocYUTMK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x7-20020a1709027c0700b00168d854ba05si10774573pll.18.2022.06.15.03.31.02; Wed, 15 Jun 2022 03:31:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JocYUTMK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345197AbiFOJte (ORCPT + 99 others); Wed, 15 Jun 2022 05:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347658AbiFOJtb (ORCPT ); Wed, 15 Jun 2022 05:49:31 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF8549695; Wed, 15 Jun 2022 02:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655286569; x=1686822569; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=fgoP/mzTE5gjuDZ8g87/11obiI4NZu5ZOraq//7+Q64=; b=JocYUTMKdwhiWynLO13suZIe9lUH5gs9DtMczfQOPoD6anOd1cw+xy6k NwPVZ/t0pI82uEO07/oR6gS9PJZosa5kXya7QKH4io2mhIKqECsIYjuyQ ZuTNk+oBF8mrUU/LWABE+vaV9Pq3Gv5wo8Cj1j+Ze9pDlTJ0xz0mhXOrs EnIpC+wBnix3KjVkF+ZghfbmhhTricdpda4MTq0AHV1SgD1f/ifRVQGFo uj+qrm+Y9pbawIabWFg1MSyZpkDO94yqZC7bW36qD1A1JWSUcZ9pdEylR jZFKK9keXMsXGF+3Ka3DqhIi1V3Lp4G03XwUObZA4Hp09L57R6mDMdu0E w==; X-IronPort-AV: E=McAfee;i="6400,9594,10378"; a="365250969" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="365250969" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2022 02:49:29 -0700 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="618386934" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.162]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2022 02:49:24 -0700 Received: by lahna (sSMTP sendmail emulation); Wed, 15 Jun 2022 12:49:22 +0300 Date: Wed, 15 Jun 2022 12:49:22 +0300 From: Mika Westerberg To: "Oleksandr Ocheretnyi -X (oocheret - GLOBALLOGIC INC at Cisco)" Cc: "tudor.ambarus@microchip.com" , "miquel.raynal@bootlin.com" , "p.yadav@ti.com" , "michael@walle.cc" , "richard@nod.at" , "vigneshr@ti.com" , "broonie@kernel.org" , "linux-mtd@lists.infradead.org" , "linux-spi@vger.kernel.org" , "mauro.lima@eclypsium.com" , "lee.jones@linaro.org" , "linux-kernel@vger.kernel.org" , "xe-linux-external(mailer list)" Subject: Re: [PATCH] mtd: spi-nor: handle unsupported FSR opcodes properly Message-ID: References: <20220610191548.3626218-1-oocheret@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi, On Tue, Jun 14, 2022 at 05:56:54PM +0000, Oleksandr Ocheretnyi -X (oocheret - GLOBALLOGIC INC at Cisco) wrote: > Hello Mika, > > in my case (I work with memory chip n25q128a13 for recent kernels) I'm > getting return value -ENOTSUPP from spi_mem_exec_op() call in the > micron_st_nor_read_fsr() method > [[1]https://elixir.bootlin.com/linux/v5.19-rc2/source/drivers/spi/spi-m > em.c#L326]. So I decided to provide the same errorcode to > intel_spi_hw_cycle() method because older kernel versions throw the > error there. It is fine to use -EOPNOTSUPP return value instead. > > I suspect we need to cover both cases to check -ENOTSUPP as well as > -EOPNOTSUPP to let the driver work properly. > > if (ret == -ENOTSUPP || ret == -EOPNOTSUPP) I think we should follow the same in the Intel driver and return -ENOTSUPP too.