From: Lukas Wunner <lukas@wunner.de>
To: Ricky WU <ricky_wu@realtek.com>
Cc: "scott@spiteful.org" <scott@spiteful.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"kbusch@kernel.org" <kbusch@kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [bug report] nvme not re-recognize when changed M.2 SSD in S3 mode
Date: Wed, 29 May 2024 16:43:51 +0200 [thread overview]
Message-ID: <Zlc_J2386nAAhn1s@wunner.de> (raw)
In-Reply-To: <94918684e6a84122a6373ef45b3c117c@realtek.com>
On Wed, May 29, 2024 at 07:47:13AM +0000, Ricky WU wrote:
> We tried this patch as below situation:
> 1.keep the SDEX card enter S3 then resume ->PASS
> 2. on S3 mode insert the SDEX card then resume -> PASS
> 3.on S3 mode remove the SDEX card then resume -> PASS
> 4.replace card on S3 mode (different brand) ->PASS
> 5.replace card on S3 mode (same brand and same capacity) ->FAIL
> Can not see the msg "device replace during system sleep"
>
> Against 5 we found a issue, most card not declare capability
> "PCI_EXT_CAP_ID_DSN", even if there is the capability the config space
> value are 0, cause pci_get_dsn() return 0 normally.
> However these cards can show the SN on CrystalDiskInfo.
Thanks for testing. That's the expected behavior so I went ahead and
submitted the patch:
https://lore.kernel.org/all/a1afaa12f341d146ecbea27c1743661c71683833.1716992815.git.lukas@wunner.de/
If vendors neglect to populate the Device Serial Number in config space,
it's zero and we cannot use it to detect device replacement.
A DSN of "all zeroes" is a reserved value:
"The all-zeros EUI-48 value (00-00-00-00-00-00) and EUI-64 value
(00-00-00-00-00-00-00-00), though assigned to an organization,
have not been and will not be used by that assignee as an EUI.
(They can be considered as assigned to the IEEE Registration Authority.)"
https://standards-support.ieee.org/hc/en-us/articles/4888705676564-Guidelines-for-Use-of-Extended-Unique-Identifier-EUI-Organizationally-Unique-Identifier-OUI-and-Company-ID-CID
The serial numbers of block devices shown by lsblk are not PCI
serial numbers, but specific to the NVME or SCSI or ATA layer.
I'll look into adding a PCI helper which those layers can call
on resume if they detect a change in device identity, but that's
independent from the patch I just submitted.
Thanks,
Lukas
next prev parent reply other threads:[~2024-05-29 14:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 5:44 [bug report] nvme not re-recognize when changed M.2 SSD in S3 mode Ricky WU
2024-04-09 13:16 ` Bjorn Helgaas
2024-04-10 10:07 ` Lukas Wunner
2024-04-10 14:58 ` Lukas Wunner
2024-04-25 6:02 ` Ricky WU
2024-05-27 11:54 ` Lukas Wunner
2024-05-29 7:47 ` Ricky WU
2024-05-29 14:43 ` Lukas Wunner [this message]
2024-05-15 7:31 ` Ricky WU
2024-05-15 8:46 ` Lukas Wunner
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=Zlc_J2386nAAhn1s@wunner.de \
--to=lukas@wunner.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=ricky_wu@realtek.com \
--cc=scott@spiteful.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