]> www.infradead.org Git - nvme.git/commit
nvmet: pci-epf: cleanup link state management nvme-6.15-2025-04-17
authorDamien Le Moal <dlemoal@kernel.org>
Fri, 11 Apr 2025 01:42:11 +0000 (10:42 +0900)
committerChristoph Hellwig <hch@lst.de>
Wed, 16 Apr 2025 05:37:37 +0000 (07:37 +0200)
commitad91308d3bdeb9d90ef4a400f379ce461f0fb6a7
treeb1b463c990e8f7e80fae53c15b7bdf19b5935c62
parentf8e01fa93f3e4fc255d240cfa0c045ce0b5c97ea
nvmet: pci-epf: cleanup link state management

Since the link_up boolean field of struct nvmet_pci_epf_ctrl is always
set to true when nvmet_pci_epf_start_ctrl() is called, assign true to
this field in nvmet_pci_epf_start_ctrl(). Conversely, since this field
is set to false when nvmet_pci_epf_stop_ctrl() is called, set this field
to false directly inside that function.

While at it, also add information messages to notify the user of the PCI
link state changes to help troubleshoot any link stability issues
without needing to enable debug messages.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/pci-epf.c