From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4143632ABC0 for ; Mon, 30 Mar 2026 14:59:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774882793; cv=none; b=Hc5vxqVLdiApPmPpc4Za1+IhLPmyBtmpnLx03hPy4yefm2AbagI063LRAEpGS8pZle1vqWGLMtcULwZ/lURgmi5xua/nLVVXzGIUV3jIkycwxxc5E6Y75CYSGMLzkkLd0JpZ30VtvFDLn2Ri0XlBYxq2O/d8Q5Oc2BNjT96Bx4g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774882793; c=relaxed/simple; bh=3yqYiQng4m8v5YKa4rUJigsrZ0PGZov19nOKLuZSoV4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=lY/Kv5BdgPoih64JvBoRB4Nw/HEtJLm24p1DsEjO3zkzvIveD2ltHKWsZQIr84YKa8uHutRhqmM+coTjtX+QumXmWORWUAtVJypEUrj7cOqsrSdZNQjPMv1eZGTkbDl8GthaONCdoXNWB0oVbdSluPwXXclo7UJkrnnE1K0ppHg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F8Ea2zKR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F8Ea2zKR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D94F6C4CEF7; Mon, 30 Mar 2026 14:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774882792; bh=3yqYiQng4m8v5YKa4rUJigsrZ0PGZov19nOKLuZSoV4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=F8Ea2zKRZtE1pfJkS5FtgdCqfdd9+QUha905fogbbJfPMYKQNtUYoIq5SpgU03qtP /Oz4/RZZdX5XtDqKOoIFFYTeDQ1J7iyQTn8gPA/+vPTvv+A989JeJzr7kYOMklmg2z +W2Ncn4cwHP8zYQNa8PtE2XEB12D8zFRQivgLsBV04bC4XzWpLaThLS19ZXiYkR0KN NLTQbnMYr0Kh/Xa/K90tksX7XMk/yeWPRRIR4lrYJp0O+Rw7MyO1Z2lflDVSpgulPD lKLh7eD+vbx0EQ6S/9y3F6PaAK+ZSDjEVZax0Bd5IQnLH0+fNBQFRGP7ii4P3u4UWo tLGti3rLO+zWg== From: Pratyush Yadav To: Miquel Raynal Cc: Pratyush Yadav , Eliav Farber , , , , , , Subject: Re: [PATCH v2 0/3] mtd: spi-nor: winbond: Fix protection handling In-Reply-To: <87pl4l9z3c.fsf@bootlin.com> (Miquel Raynal's message of "Mon, 30 Mar 2026 16:22:15 +0200") References: <20260218143523.17467-1-farbere@amazon.com> <2vxzcy0l1k7g.fsf@kernel.org> <87pl4l9z3c.fsf@bootlin.com> Date: Mon, 30 Mar 2026 14:59:49 +0000 Message-ID: <2vxzzf3picre.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Mar 30 2026, Miquel Raynal wrote: >>> The devices do not correctly describe their Status Register layout and >>> protection capabilities (locking flags, TB bit, BP bit configuration). >>> As a result, the spi-nor core rejects protection requests and locking >>> operations fail with -EINVAL, e.g.: >>> >>> flash_lock -l /dev/mtd29 >>> flash_lock: error!: could not lock device: /dev/mtd29 >>> error 22 (Invalid argument) >>> >>> Update the device flags to match the actual hardware behavior so that >>> locking and unlocking regions work correctly. >>> >>> All changes were validated using flash_lock on the affected devices. >> >> Applied patches 1 and 3 to spi-nor/next. Thanks! >> >> Skipped patch 2 since you say that you haven't got a device to test >> with. I don't have a very strong opinion on this, but I do think we >> should test patches on real hardware just to we get some sanity checking >> for the patch. > > Honestly, I am pretty convinced patch 2 cannot make more harm as the > block protection is already badly broken by not being described at > all. Furthermore, for similar chips I have, these bits are relevant, so > I would rather be in favour of going forward with patch 2, because at > most it will just not fix the behaviour as it pretends it does. > > My 2cts :) Hmm, okay, I'll apply that one too then. -- Regards, Pratyush Yadav