From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A18C736CE02 for ; Thu, 19 Mar 2026 09:11:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773911463; cv=none; b=Zs9WxvBIxv9HwkkB4mi4YnqzZw1cJ7G2n4DDCnW2hXIMYeE8aorH/8huY+vfBJyHtz+vJjv3W1qWShCgQ68BDVmNpxBbNUKOBGb4BPQ/NvmeK+5b98tGEitHxxQZuxw+7RelZ8goNm88WzJTuStaFpRZ871OZUayVS/YiQadDIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773911463; c=relaxed/simple; bh=dF22QmkS9HG7kdIqYGU7+bDp/hfB/sL+KMUVJbk1aBA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YJvXIj+rKjtpG66cbrqBcaGLoJHsmAXIXXbvbtwaRg9C4HKYNRz0X2pYZsCGRKAV4Fjr6/6Xv28xSFV2wpokB3MbM+IHFLP1Q6K1LvI6cgeuVS2th5s0utqf6var4VyMpM4b/xOhIwd3iy4eyYzrbBeRRW8KG6VzzIrXlQJnYBI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xZyJNRe+; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xZyJNRe+" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-482f454be5bso17584805e9.0 for ; Thu, 19 Mar 2026 02:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1773911460; x=1774516260; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=D0YrBdPtPd82EVcXQNlEOmZj6YWUSRUq9jn0jdHCTP4=; b=xZyJNRe+hKMhlf8XY31MvzBB6WgIziaSlBJhe1dBuAOjx+/lImvIEFEAcyaBl1E1/T g6cCvPt/G2scoOHVybvUPYWJQLcg7ZbbWn2+4g3JyPxmJ6bv0SBIg5QZTBaW5XuAAcS2 jRsjxQ9pNSGo0HyXl81rFDstoRmXO9nbUlZkEymcHYyhw2KMYq5h9MaXNY1IllqLJB9F yvjxc8PEhI3CeOp2uO001+rCm12f8+wuDmYw/MzkODYy1mLmR8VVEETD68aXck4JkYVX Mzmu/a+m449Kl0TIbGR7n6Kiu19wA8wIAlxsAHj+MIqp22pOjOXgpTJQIJFfHpa5cFgs AZXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773911460; x=1774516260; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D0YrBdPtPd82EVcXQNlEOmZj6YWUSRUq9jn0jdHCTP4=; b=p6Eh84K7qWTs899EPbJf6cDTg6NNd8I+Lb0BXeFF42o6xMWXGpNOhEWgGG9GNJ6pHj RpuL+iUO111j3ir4uhJbg+tKRkZj98cieE8Wpn9j4LJbYDVnQiXiZq0R+SK5kuoETKQZ 2Z8tr/uo4HcmH79qdXCSNarQu39Pl72l0ivy69NcRXxwboH2fAnxK2v41b8kbB+8sKS7 MQkorM9tc1/nS08JMenuTIZMDfYgRIpYg7DBZ9DLLTd2thHILA30+md4bAp/VEU5ijoI /bLU8laz+drlputLB+pSkEKQtqnm4jnHv3CYp4dOw1q8h1BgU5ZUYq7sfRel/4t34jlc 2wsQ== X-Forwarded-Encrypted: i=1; AJvYcCXijIHCvzApCkWI5sxnYb7nXovHsc/2+MYBtT8pUcLCB/IZAdg90pdunoDOzCuyZKE1tU8bpifC9mxwARk=@vger.kernel.org X-Gm-Message-State: AOJu0YzNrviFZxYleKqfqu1kCXsWM+v6HWhDAyb/JkrxJGHFlAJSiKGj K0l5XNtYgxtd25SEHcfZ4Q1ip4j7DVshPzlq4m1doXvRasAnWqmXLQW7ak+KQti9ANI= X-Gm-Gg: ATEYQzyz8L9FrZpP5tPOky5otLktM+YcTqxBLMOSu5ji5nA61CsFEIweR9eMv2o9Wa1 V2FuYFcQ9TdLBqKlwPORN/e1r7oR4bnU2Ia/x1UsB7L7y5pWf1YtJE8vAHGjXjrA02sV2Ob8jNq nZdL8aKrBhW7ezhooRuFdcE3sk3T6LdrGs7cVtZwl3uSij9ESYzcgxvQsmNH3g0NqgD/MsWyFIu nR+bqw1p+HMNPK9G+smD6iQGleqptuHNWrt5ggnEd6YLLJpucIVPkKMesHRKBUGG/yeQA79vXFV W0bcimE6ZMhX6dl3Sk4YT+nHPEif52c35xDMqhgOebcmC3ROV44Vqc/UZcKsMdNKJkiI8FZQFEG Wa1ElUd0bAnJZc88FFjzouRkru77SEoV5iYdRlQqIFZz09eMPgnt+thNMY+oWgpdr7UMTZJ98aB WdU6GBM43Wt5ugCrhVIXZ1CUIYc5W7LV4= X-Received: by 2002:a05:600c:8b31:b0:483:6d9e:e4f5 with SMTP id 5b1f17b1804b1-486f8b20188mr42015065e9.5.1773911459701; Thu, 19 Mar 2026 02:10:59 -0700 (PDT) Received: from [10.11.12.108] ([79.115.63.77]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486f45d8e3dsm39844985e9.0.2026.03.19.02.10.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Mar 2026 02:10:59 -0700 (PDT) Message-ID: <36e65648-707c-4b45-a429-1ea7f9f65f07@linaro.org> Date: Thu, 19 Mar 2026 11:10:56 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mtd: spi-nor: micron-st: fix FSR read fallback for controllers returning -ENOTSUPP To: Bean Huo , "Zailiang Zhang (zaizhang)" , "pratyush@kernel.org" , "mwalle@kernel.org" Cc: "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Bean Huo References: <20260318131857.2685004-1-beanhuo@iokpp.de> <639bd964-b499-4e9f-9035-0010fecfb17c@linaro.org> <3c94f0e1c5a8bf184d7a81f49b7beb999355dcd3.camel@iokpp.de> <4223576d9f55b2a3ae18cf148765a1a5487367df.camel@iokpp.de> Content-Language: en-US From: Tudor Ambarus In-Reply-To: <4223576d9f55b2a3ae18cf148765a1a5487367df.camel@iokpp.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 3/18/26 7:17 PM, Bean Huo wrote: > > > > > On Wed, 2026-03-18 at 17:04 +0000, Zailiang Zhang (zaizhang) wrote: >> Hi, >> >> Our platform is using Intel Raptorlake CPU, so it’s not our own spi master >> driver. >> The kernel version we are using is 6.6.21. >> I think when micron read fsr function calls spi_mem_exec_op(), it has >> following return: >>> if (!spi_mem_internal_supports_op(mem, op)) >>>     return -ENOTSUPP; >> Please correct me if I am wrong here. Also the latest upstream kernel may not >> use the same handling code. > > > Hi Zailiang, > > You are correct. the commit cff49d58f57e ("spi: Unify error codes by replacing - > ENOTSUPP with -EOPNOTSUPP"), merged upstream on November 29, 2023, which changed > spi_mem_exec_op() to return -EOPNOTSUPP instead of -ENOTSUPP when an operation > is not supported. Kernel 6.6.21 predates this fix, which is why you see -NOTSUPP > on your platform with Intel Raptor Lake. > > > Hi Tudor, >   Hi, > This changes the picture. The -ENOTSUPP Zailiang observed is coming directly > from spi_mem_exec_op() in kernel 6.6.21, before commit cff49d58f57e was in > place. That commit fixed the SPI mem framework itself, but it may not have been > backported to all stable trees. > > I would therefore argue that our micron-st.c fix is still worth keeping for the > the reason that it provides a safety net for stable kernels that did not receive > cff49d58f57e as a backport. > I advise against this, otherwise we'll carry dead weight on our shoulders. > That said, I am happy to follow your guidance on how to proceed.  I would backport the patch to the stable kernel if that fixes things for you. Then I would follow up with a patch and replace -ENOTSUPP/-EOPNOTSUPP in spi-mem and spi. Cheers, ta