lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 12 Sep 2020 21:47:59 -0500
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Alex Elder <elder@...aro.org>
Cc:     davem@...emloft.net, kuba@...nel.org, evgreen@...omium.org,
        subashab@...eaurora.org, cpratapa@...eaurora.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 6/7] net: ipa: enable wakeup on IPA interrupt

On Fri 11 Sep 19:45 CDT 2020, Alex Elder wrote:

> Now that we handle wakeup interrupts properly, arrange for the IPA
> interrupt to be treated as a wakeup interrupt.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>

> Signed-off-by: Alex Elder <elder@...aro.org>
> ---
>  drivers/net/ipa/ipa_interrupt.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ipa_interrupt.c
> index 90353987c45fc..cc1ea28f7bc2e 100644
> --- a/drivers/net/ipa/ipa_interrupt.c
> +++ b/drivers/net/ipa/ipa_interrupt.c
> @@ -237,8 +237,16 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa)
>  		goto err_kfree;
>  	}
>  
> +	ret = enable_irq_wake(irq);
> +	if (ret) {
> +		dev_err(dev, "error %d enabling wakeup for \"ipa\" IRQ\n", ret);
> +		goto err_free_irq;
> +	}
> +
>  	return interrupt;
>  
> +err_free_irq:
> +	free_irq(interrupt->irq, interrupt);
>  err_kfree:
>  	kfree(interrupt);
>  
> @@ -248,6 +256,12 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa)
>  /* Tear down the IPA interrupt framework */
>  void ipa_interrupt_teardown(struct ipa_interrupt *interrupt)
>  {
> +	struct device *dev = &interrupt->ipa->pdev->dev;
> +	int ret;
> +
> +	ret = disable_irq_wake(interrupt->irq);
> +	if (ret)
> +		dev_err(dev, "error %d disabling \"ipa\" IRQ wakeup\n", ret);
>  	free_irq(interrupt->irq, interrupt);
>  	kfree(interrupt);
>  }
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists