libata: cleanup device sleep capability detection
Move the code to retrieve the device sleep capability and timings out of ata_dev_configure() into the helper function ata_dev_config_devslp(). While at it, mark the device as supporting the device sleep capability only if the sata settings page was retrieved successfully to ensure that the timing information is correctly initialized. Signed-off-by:Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20210816014456.2191776-5-damien.lemoal@wdc.comSigned-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
Please register or sign in to comment