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  linux-cve-announce  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]
Message-ID: <OSZPR01MB7019B1D2D0367354BF03F5D3AAD19@OSZPR01MB7019.jpnprd01.prod.outlook.com>
Date:   Wed, 1 Feb 2023 20:44:35 +0000
From:   Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>
To:     Douglas Anderson <dianders@...omium.org>,
        "ath11k@...ts.infradead.org" <ath11k@...ts.infradead.org>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC:     Kalle Valo <kvalo@...nel.org>,
        "junyuu@...omium.org" <junyuu@...omium.org>,
        Youghandhar Chintala <quic_youghand@...cinc.com>,
        Jiri Slaby <jirislaby@...nel.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Nick Kossifidis <mickflemm@...il.com>,
        Abhinav Kumar <quic_abhinavk@...cinc.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Marc Zyngier <maz@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
        Rob Herring <robh@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH v2 2/2] wifi: ath5k: Use platform_get_irq() to get the
 interrupt

Hi Douglas,

Thank you for the patch.

> Subject: [PATCH v2 2/2] wifi: ath5k: Use platform_get_irq() to get the interrupt
> 
> As of commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core"), we need to
> use platform_get_irq() instead of
> platform_get_resource() to get our IRQs because
> platform_get_resource() simply won't get them anymore.
> 
> This was already fixed in several other Atheros WiFi drivers, apparently in response to Zeal Robot
> reports. An example of another fix is commit 9503a1fc123d ("ath9k: Use platform_get_irq() to get the
> interrupt"). ath5k seems to have been missed in this effort, though.
> 
> Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> ---
> I'm not setup to actually test this, but I figured that I might as well go all the way and fix all the
> instances of the same pattern that I found in the ath drivers since the old call was actually breaking
> me in ath11k. I did at least confirm that the code compiles for me.
> 
> If folks would rather not land an untested patch like this, though, feel free to drop this and just
> land patch #1 as long as that one looks OK.
> 
> Changes in v2:
> - Update commit message and point to patch that broke us (Jonas)
> 
>  drivers/net/wireless/ath/ath5k/ahb.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 

Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>

Cheers,
Prabhakar

> diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c
> index 2c9cec8b53d9..28a1e5eff204 100644
> --- a/drivers/net/wireless/ath/ath5k/ahb.c
> +++ b/drivers/net/wireless/ath/ath5k/ahb.c
> @@ -113,15 +113,13 @@ static int ath_ahb_probe(struct platform_device *pdev)
>  		goto err_out;
>  	}
> 
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "no IRQ resource found\n");
> -		ret = -ENXIO;
> +	irq = platform_get_irq(pdev, 0);
> +	if (irq < 0) {
> +		dev_err(&pdev->dev, "no IRQ resource found: %d\n", irq);
> +		ret = irq;
>  		goto err_iounmap;
>  	}
> 
> -	irq = res->start;
> -
>  	hw = ieee80211_alloc_hw(sizeof(struct ath5k_hw), &ath5k_hw_ops);
>  	if (hw == NULL) {
>  		dev_err(&pdev->dev, "no memory for ieee80211_hw\n");
> --
> 2.39.1.456.gfc5497dd1b-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ