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: <OSZPR01MB701949307C9DFB0E064B74ACAAD19@OSZPR01MB7019.jpnprd01.prod.outlook.com>
Date:   Wed, 1 Feb 2023 20:39: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>,
        Manikanta Pubbisetty <quic_mpubbise@...cinc.com>,
        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 1/2] wifi: ath11k: Use platform_get_irq() to get the
 interrupt

Hi Douglas,

Thank you for the patch.

> 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"). ath11k seems to have been missed in this effort, though.
> 
> Without this change, WiFi wasn't coming up on my Qualcomm sc7280-based hardware. Specifically,
> "platform_get_resource(pdev, IORESOURCE_IRQ, i)" was failing even for i=0.
> 
> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
> 
> Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
> Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device")
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> Tested-by: Jun Yu <junyuu@...omium.org>
> ---
> 
> Changes in v2:
> - Update commit message and point to patch that broke us (Jonas)
> 
>  drivers/net/wireless/ath/ath11k/ahb.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>

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

Unrelated to this patch, I think you need to call dma_unamp_resource() in the error path?

Cheers,
Prabhakar
 
> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> index d34a4d6325b2..f70a119bb5c8 100644
> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> @@ -859,11 +859,11 @@ static int ath11k_ahb_setup_msi_resources(struct ath11k_base *ab)
>  	ab->pci.msi.ep_base_data = int_prop + 32;
> 
>  	for (i = 0; i < ab->pci.msi.config->total_vectors; i++) {
> -		res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
> -		if (!res)
> -			return -ENODEV;
> +		ret = platform_get_irq(pdev, i);
> +		if (ret < 0)
> +			return ret;
> 
> -		ab->pci.msi.irqs[i] = res->start;
> +		ab->pci.msi.irqs[i] = ret;
>  	}
> 
>  	set_bit(ATH11K_FLAG_MULTI_MSI_VECTORS, &ab->dev_flags);
> --
> 2.39.1.456.gfc5497dd1b-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ