diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2026-01-30 16:03:58 -0800 |
|---|---|---|
| committer | Dave Jiang <dave.jiang@intel.com> | 2026-02-02 08:41:29 -0700 |
| commit | 86e756715db22cd79a9726c22644415c46b6b149 (patch) | |
| tree | a28545c063fdc66a4676226156edd97406d2bd95 /scripts | |
| parent | afa2bdba1ee28e21f30fe5391b0273b58b32e0d3 (diff) | |
cxl/port: Move decoder setup before dport creation
There are port setup actions that run on first dport arrival, and there are
setup actions that run per dport.
RAS register setup is a future additional setup action to run per-port
(once the first dport arrives), and each dport also has RAS registers to
map.
Before adding that, flip the order of "first dport" and "per-dport"
actions. This makes allocation symmetric with teardown, "first dport"
actions unwind after last dport removed. It also allows for using a devres
group to collect the unrelated decoder, RAS, and dport setup actions into
one group release action.
The new cxl_port_open_group() collects "first dport" and "per-dport" into
one group that can be released on any failure. This group's lifetime only
needs to span the short duration of cxl_port_add_dport() to cleanup all
potential damage from failing to add a dport. Contrast that to the "dport"
devres group that is called upon to destruct fully formed dport objects.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260131000403.2135324-5-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
