Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp753173iog; Wed, 15 Jun 2022 11:29:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tVIR1M6S3BMO1MeATEF4kBBMd1BAmOZRsVgFaQ9lkI/B5zGj449dG0lBmuAbmcGAdH4YnZ X-Received: by 2002:a17:907:80c7:b0:711:cdee:8490 with SMTP id io7-20020a17090780c700b00711cdee8490mr963569ejc.611.1655317786521; Wed, 15 Jun 2022 11:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655317786; cv=none; d=google.com; s=arc-20160816; b=q2GK2RcLHNBHddKBRFUqO0zr7Ek9dKqpvtm+6MH+avoiG4GpSzZ1takvEDQWVY4u2d JrrUt4kZjAdmQOz+WSE2ZPPEHkPkOGnAF76irc+Iqqxw+5+z11ilTClix7HH+mqvc0cz V2txPBjL1KIpw+fNAVvuGddRyHbIqO5z53tmk3NAn2gOhUJi/h41pa9rC1UciYsjFziE +Zw2n7xiaQlfQUprTV3/ipWTrFStBUCMVMrL4HjFevh1j73VygXDlgw04L+V2QKBz/i4 HE3k//d83CUd3MSq0QbiecQoQ7NKh2kgI1NWdbTtT2n6Y9wjcJdfI7Xa30AUl95z0krt IGzw== 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 :message-id:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature; bh=TS3jYFS6YTAvU3pgkMvxRJI/YD6CxfyrTdrG5rg9tDU=; b=jvGNXuIHAiadsRXmaTsCc3oELhcYVN2e0cznxP9PfS/O0UL7+awSb7hQyw3UpImy7r +xiy3SPIKJCKjcdNInAvxKB4lBhx5jS3PssclC4pSETC+1BxK4YOZmaW+YNBHGHSbL7Z ZgRc3LoulopKZij1edZhip2aqdP5Qrq62QcEtgxXjwA9h6kn5Rp+bIsyhk8S2FL98VqA xkimHyayEkTpRaQlanROEAFuXpNhMhtxoxXMSjYoSI7HjB76l+D/ZnAxXUcJamZwtfgQ pb7YYR8rhBn+cC8I3QyPOHfS1s+M1jTn1110WuOCD+FRtURCn5ndERLN/9DIKNAMnAzV wU3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=OlchZqjI; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h18-20020a1709067cd200b006f4326c816bsi13868645ejp.357.2022.06.15.11.29.20; Wed, 15 Jun 2022 11:29:46 -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=@walle.cc header.s=mail2016061301 header.b=OlchZqjI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345410AbiFOSKe (ORCPT + 99 others); Wed, 15 Jun 2022 14:10:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231737AbiFOSKb (ORCPT ); Wed, 15 Jun 2022 14:10:31 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D85A84B403; Wed, 15 Jun 2022 11:10:30 -0700 (PDT) Received: from [127.0.0.1] (nyx.walle.cc [158.255.213.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 73E5B22249; Wed, 15 Jun 2022 20:10:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1655316627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TS3jYFS6YTAvU3pgkMvxRJI/YD6CxfyrTdrG5rg9tDU=; b=OlchZqjIeXpxF5LKa+OEpi2uZeC6CUN/XH0rxxwQ/x/J6nLbOgm5MbIm2Z9R9PJXpyqyWh ITd9PIHV0TBR+EcsaFzL0mjm/aMwRtzQ1p1ctjGfEYFVgvSbeoDaUZi2Gr+pYPueUu74xN GK5/IzzwgjecRTSUsCYOo2rolRVGf+4= Date: Wed, 15 Jun 2022 20:10:13 +0200 From: Michael Walle To: Mika Westerberg , "Oleksandr Ocheretnyi -X (oocheret - GLOBALLOGIC INC at Cisco)" CC: "tudor.ambarus@microchip.com" , "miquel.raynal@bootlin.com" , "p.yadav@ti.com" , "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 User-Agent: K-9 Mail for Android In-Reply-To: References: <20220610191548.3626218-1-oocheret@cisco.com> Message-ID: <6A852B9E-D84C-4F80-9C17-62BFBB98CC8A@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 Am 15=2E Juni 2022 11:49:22 OEZ schrieb Mika Westerberg : >Hi, > >On Tue, Jun 14, 2022 at 05:56:54PM +0000, Oleksandr Ocheretnyi -X (oocher= et - GLOBALLOGIC INC at Cisco) wrote: >> Hello Mika, >>=20 >> 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=2Ebootlin=2Ecom/linux/v5=2E19-rc2/source/drivers/= spi/spi-m >> em=2Ec#L326]=2E So I decided to provide the same errorcode to >> intel_spi_hw_cycle() method because older kernel versions throw the >> error there=2E It is fine to use -EOPNOTSUPP return value instead=2E >>=20 >> I suspect we need to cover both cases to check -ENOTSUPP as well as >> -EOPNOTSUPP to let the driver work properly=2E >>=20 >> if (ret =3D=3D -ENOTSUPP || ret =3D=3D -EOPNOTSUPP) > >I think we should follow the same in the Intel driver and return >-ENOTSUPP too=2E AFAIK ENOTSUPP is for nfs and shouldn't be used=2E -michael