diff options
author | Daniel Axtens <dja@axtens.net> | 2015-08-14 17:41:23 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-08-14 21:32:07 +1000 |
commit | d76427b0d89524fdb623774a22a005ba5c400134 (patch) | |
tree | 5053cc9f7734153dfa48dadf091133327d6ff0a6 /drivers/scsi/jazz_esp.c | |
parent | c044c4154247372c86b468644de88a4e48f903e9 (diff) |
cxl: Refactor AFU init/teardown
As with an adapter, some aspects of initialisation are done only once
in the lifetime of an AFU: for example, allocating memory, or setting
up sysfs/debugfs files.
However, we may want to be able to do some parts of the initialisation
multiple times: for example, in error recovery we want to be able to
tear down and then re-map IO memory and IRQs.
Therefore, refactor AFU init/teardown as follows.
- Create two new functions: 'cxl_configure_afu', and its pair
'cxl_deconfigure_afu'. As with the adapter functions,
these (de)configure resources that do not need to last the entire
lifetime of the AFU.
- Allocating and releasing memory remain the task of 'cxl_alloc_afu'
and 'cxl_release_afu'.
- Once-only functions that do not involve allocating/releasing memory
stay in the overarching 'cxl_init_afu'/'cxl_remove_afu' pair.
However, the task of picking an AFU mode and activating it has been
broken out.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/scsi/jazz_esp.c')
0 files changed, 0 insertions, 0 deletions