Re: [PATCH] mmc: update sdio_claim_irq documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 January 2018 at 23:57, Cunningham, Joel
<Joel.Cunningham@xxxxxxxxxx> wrote:
> I have a 3rd party driver which calls sdio_claim_host (and sdio_release_host) in its IRQ handler, the comment documentation for sdio_claim_irq() caused confusion about whether this was allowed, even though the implementation supports recursive claims and the driver is functioning without issue.
>
> If the intention is that recursive claims are supported, the below patch (based on mmc-next) updates the documentation to demote the "must not" to a "does not need to"

Recursive claims are supported, however internally in the mmc core we
have moved towards of removing all occurrences of them (to make the
locking more slim).

Therefore, I wouldn't mind keeping the doc as is, even if isn't a
problem in practice to have nested claim/release of the sdio host.

Kind regards
Uffe

>
> Joel
>
> From: Joel Cunningham <joel.cunningham@xxxxxxxxxx>
>
> Update documentation for sdio_claim_irq to relax the wording which
> describes whether or not its safe to call sdio_claim/release_host in
> an IRQ handler registered via sdio_claim_irq. The sdio_claim_host
> implementation has support (via __mmc_claim_host) to be recursively
> claimed
>
> Signed-off-by: Joel Cunningham <joel.cunningham@xxxxxxxxxx>
> ---
>  drivers/mmc/core/sdio_irq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
> index 7a2eaf8410a3..37a1a4bcb778 100644
> --- a/drivers/mmc/core/sdio_irq.c
> +++ b/drivers/mmc/core/sdio_irq.c
> @@ -277,8 +277,8 @@ static void sdio_single_irq_set(struct mmc_card *card)
>   *
>   *     Claim and activate the IRQ for the given SDIO function. The provided
>   *     handler will be called when that IRQ is asserted.  The host is always
> - *     claimed already when the handler is called so the handler must not
> - *     call sdio_claim_host() nor sdio_release_host().
> + *     claimed already when the handler is called so the handler does not
> + *     need to call sdio_claim_host() or sdio_release_host().
>   */
>  int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler)
>  {
> --
> 2.14.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux