lkml.org 
[lkml]   [2017]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] libata: Introduce ata_platform_shutdown_one()
On Mon, Jul 03, 2017 at 02:02:41PM -0400, Nate Watterson wrote:
> In similar fashion to how ata_platform_remove_one() is used, this
> newly introduced method can be used by platform ata drivers to get
> basic shutdown functionality (stopping host DMA and interrupts).
>
> Signed-off-by: Nate Watterson <nwatters@codeaurora.org>
> ---
> drivers/ata/libata-core.c | 20 ++++++++++++++++++++
> include/linux/libata.h | 1 +
> 2 files changed, 21 insertions(+)
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index e157a0e..537932e 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -6702,6 +6702,25 @@ int ata_platform_remove_one(struct platform_device *pdev)
> return 0;
> }
>
> +/**
> + * ata_platform_shutdown_one - Platform layer callback for device shutdown
> + * @pdev: Platform device being shutdown
> + *
> + * Platform layer indicates to libata via this hook that shutdown is
> + * in progress and the input device should be quiesced. Functionally this
^^^^^
> + * is equivalent to ata_platform_remove_one(), however devres_release_all()
> + * is not called on the shutdown path as it is for remove so releasing the
> + * resources associated with the device must instead be initiated directly.

I can't easily understand the above comment. Can you please try to
rephrase it so that it's clear why and when it's used?

Thanks.

--
tejun

\
 
 \ /
  Last update: 2017-07-05 16:51    [W:0.062 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site