diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2024-09-05 03:51:19 +0200 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2024-09-07 03:16:55 +0200 |
commit | 5f8319c4b3ec4e8fdc7f7bf61f47f985e1a6f074 (patch) | |
tree | b7577c2ff9a457b2203cfa3979c3fc006dde3d64 /drivers/ata/libata.h | |
parent | ata: libata: Move sector_buf from struct ata_port to struct ata_device (diff) | |
download | linux-5f8319c4b3ec4e8fdc7f7bf61f47f985e1a6f074.tar.xz linux-5f8319c4b3ec4e8fdc7f7bf61f47f985e1a6f074.zip |
ata: libata: Introduce ata_dev_free_resources
Introduce the function ata_dev_free_resources() to free the resources
allocated to support a device features. For now, this function is
reduced to calling zpodd_exit() for devices that have this feature
enabled.
ata_dev_free_resources() is called from ata_eh_dev_disable() as this
function is always called for all devices attached to a port that is
being detached and for devices that are being disabled due to being
removed (detached) from the system or due to errors.
With this change, the call to zpodd_exit() done in ata_port_detach()
and ata_scsi_handle_link_detach() are removed as these functions
remove all devices attached to the link or port using libata EH, thus
resulting in ata_eh_dev_disable() being called and the zpodd_exit()
function being executed.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r-- | drivers/ata/libata.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 2a9d1bbf2482..927d77bde7ef 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -71,6 +71,7 @@ extern bool ata_dev_power_init_tf(struct ata_device *dev, struct ata_taskfile *tf, bool set_active); extern void ata_dev_power_set_standby(struct ata_device *dev); extern void ata_dev_power_set_active(struct ata_device *dev); +void ata_dev_free_resources(struct ata_device *dev); extern int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel); extern unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action); |