]> git.hungrycats.org Git - linux/commit
cxl/region: Fix state transitions after reset failure
authorDan Williams <dan.j.williams@intel.com>
Sat, 17 Jun 2023 01:24:39 +0000 (18:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jul 2023 17:39:50 +0000 (19:39 +0200)
commit127f9232b8e2bf3254a2a17e35c34f3b8cad6446
tree8fb19e828212ff995f03a4288d81dc4584418970
parent38665ad70c16dba796c9815f202ce39328d50243
cxl/region: Fix state transitions after reset failure

[ Upstream commit adfe19738b71a893da62cb2e30bd6bdb4299ea67 ]

Jonathan reports that failed attempts to reset a region (teardown its
HDM decoder configuration) mistakenly advance the state of the region
to "not committed". Revert to the previous state of the region on reset
failure so that the reset can be re-attempted.

Reported-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Closes: http://lore.kernel.org/r/20230316171441.0000205b@Huawei.com
Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/168696507968.3590522.14484000711718573626.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cxl/core/region.c