]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme-pci: clean up CMBMSC when registering CMB fails
authorIcenowy Zheng <uwu@icenowy.me>
Wed, 12 Feb 2025 17:04:43 +0000 (01:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:37:36 +0000 (14:37 +0200)
commita74dad107e52bebfb30f496530b7cd5091f02e9b
tree018c67f057f8d7441bd748edb1d02f26edabb9e3
parent9ca8c6f6a22724d00eaa829e78857a1e322c0cb7
nvme-pci: clean up CMBMSC when registering CMB fails

[ Upstream commit 6a3572e10f740acd48e2713ef37e92186a3ce5e8 ]

CMB decoding should get disabled when the CMB block isn't successfully
registered to P2P DMA subsystem.

Clean up the CMBMSC register in this error handling codepath to disable
CMB decoding (and CMBLOC/CMBSZ registers).

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/pci.c