mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Todd Brandt <todd.e.brandt@linux.intel.com>
To: miquel.raynal@bootlin.com, pratyush@kernel.org, tudor.ambarus@linaro.org
Cc: linux-kernel@vger.kernel.org
Subject: MTD: Patch to spi-nor hangs Lenovo ThinkPad X1 on suspend, sleep, and shutdown.
Date: Tue, 16 May 2023 12:12:06 -0700	[thread overview]
Message-ID: <51293660791f4a5fbcf4d86abe548c11fc91722f.camel@linux.intel.com> (raw)

This is the kernel bugzilla: 
https://bugzilla.kernel.org/show_bug.cgi?id=217448

This is the system I'm having troubles with:

os-version              : Ubuntu 20.04.2 LTS
baseboard-manufacturer  : LENOVO
baseboard-product-name  : 20QA000FUS
baseboard-serial-number : W1KS11R111D
baseboard-version       : SDK0J40697 WIN
bios-release-date       : 05/20/2021
bios-vendor             : LENOVO
bios-version            : N2MET49W (1.14 )
chassis-manufacturer    : LENOVO
chassis-serial-number   : R911Q4MM
chassis-version         : None
processor-manufacturer  : Intel(R) Corporation
processor-version       : 11th Gen Intel(R) Core(TM) i7-1160G7 @
1.20GHz
system-manufacturer     : LENOVO
system-product-name     : 20QA000FUS
system-serial-number    : R911Q4MM
system-version          : ThinkPad X1 Titanium Gen 1
cpucount                : 8
memtotal                : 15939728 kB
memfree                 : 8428028 kB

Ever since 6.4-rc1 this system has hung on every S3/S2idle suspend and
shutdown during reboot. I've bisected it to a patch to the MTD: SPI-NOR 
subsystem about introducing the "concept of a bank"

9d6c5d64f0288a814d4435b7da39e360a4c39e40 is the first bad commit
commit 9d6c5d64f0288a814d4435b7da39e360a4c39e40
Author: Miquel Raynal <miquel.raynal@bootlin.com>
Date:   Tue Mar 28 17:40:58 2023 +0200

    mtd: spi-nor: Introduce the concept of bank

    SPI NOR chips are made of pages, which gathered in small groups
make
    (erase) sectors. Sectors, gathered together, make banks inside the
    chip. Until now, there was only one bank per device supported, but
we
    are about to introduce support for new chips featuring several
banks (up
    to 4 so far) where different operations may happen in parallel.

    Let's allow describing these additional bank parameters, and let's
do
    this independently of any other value (like the number of sectors)
with
    an absolute value.

    By default we consider that all chips have a single bank.

    Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
    Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
    Link: 
https://lore.kernel.org/r/20230328154105.448540-2-miquel.raynal@bootlin.com
    Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>

 drivers/mtd/spi-nor/core.c   |  1 +
 drivers/mtd/spi-nor/core.h   | 16 +++++++++++-----
 drivers/mtd/spi-nor/xilinx.c |  1 +
 3 files changed, 13 insertions(+), 5 deletions(-)

Basically something about the new code is improperly handling the
memory size on this machine. It's not complex but I haven't dug any
deeper since I want it posted as quickly as possible. To reproduce, run
any of these 3 commands and the system will hang:

echo freeze > /sys/power/state
echo mem > /sys/power/state
sudo reboot


             reply	other threads:[~2023-05-16 19:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 19:12 Todd Brandt [this message]
2023-05-16 22:57 ` Todd Brandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51293660791f4a5fbcf4d86abe548c11fc91722f.camel@linux.intel.com \
    --to=todd.e.brandt@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=tudor.ambarus@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome