Re: [PATCH v4] mtd: spi-nor: Improve reporting for software reset failures

Michael Walle
2023-10-26T15:02:35Z

Am 26. Oktober 2023 16:39:54 OESZ schrieb Pratyush Yadav <pratyush@kernel.org>:
>On Thu, Oct 26 2023, AceLan Kao wrote:
>
>> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
>>
>> When the software reset command isn't supported, we now report it
>> as an informational message(dev_info) instead of a warning(dev_warn).
>> This adjustment helps avoid unnecessary alarm and confusion regarding
>> software reset capabilities.
>
>I still think the soft reset command deserves a warn, and not an info.
>Because it _is_ a bad thing if you need to soft reset and are unable to
>do so. Your bootloader (or linux if you rmmod and modprobe again) might
>not be able to detect the flash mode and operate it properly.

agreed.. but..

>I think we should just not unconditionally run this and instead only
>call it when the flash reset is not connected -- that is only call this
>under a check for SNOR_F_BROKEN_RESET, like we do for 4-byte addressing
>mode.

.. keep in mind that this is a restriction of the flash controller. the Intel one seems to be the only affected one (for now) and it's doing a reset (according to mika) on its own.

snor_broken_reset is a property of the flash.

>I don't have a strong opposition to this patch but I do think it is
>fixing the problem in the wrong place.

if the flash controller doesn't let you issue a soft reset (or does so on its own), what's the fix?

-michael