From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A360C43331 for ; Tue, 12 Nov 2019 15:51:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 616892067B for ; Tue, 12 Nov 2019 15:51:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RsE9lrNV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727097AbfKLPvl (ORCPT ); Tue, 12 Nov 2019 10:51:41 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:44174 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbfKLPvl (ORCPT ); Tue, 12 Nov 2019 10:51:41 -0500 Received: by mail-qt1-f193.google.com with SMTP id o11so20195010qtr.11; Tue, 12 Nov 2019 07:51:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LQBXaQZ8sYLX3FvyToEo9vTTZBjJQsr8E1LEgLzRPXs=; b=RsE9lrNVKHVIjj4mLDlw3H/mypAihdMOWqmZd+CTUbTTAjq0/uplgxGeoxMwaJtIU8 JSxXfXBrRZtwLtJQBpO/wtp+ER6o35mC+oW16bJleR6ygLAc0ps7Z7PYt0zU14i3wtF2 CUhXzZkHnbnUtfjy+gfeX2iL5kE1bErsZS0DSx5nck/gJ7OlhzV8zgP/IoNJGTxz+kd3 ib98Gio8uq13GOr1ylMTj0i6YxTDDaPpqUtMCpVqbW2KuwgT677J8zkoCZW/qieBgJNs K9xNmiY9uibdCWd+69izfCe4yNKpWjml7LQ7zUw4TNljpcqQOrsL2dNGI0Zq87SOlgsG /TCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LQBXaQZ8sYLX3FvyToEo9vTTZBjJQsr8E1LEgLzRPXs=; b=JZ0BbjV5+Wzi3o69GSQ2DCZKefoYNlskilEegjYI5MaqOjWIGIaJVJdRVOhlSHDYbj UrJzT3Im9tMHPkMlg+3eBSM2ZFNhTsFbGSeYOIwd4L1tZqt6BL4chvg0mQFeoKOlSIES uGEiBpGSonAujh8pYlZ1yEVU6tIhQ/ZmyinWWzhP418wMvc7FpxN3nIyllgdIvp3OcK4 dN0wKYxQzSMx7+zr6dnrbjVe6rVgIVpbMf5TJub7mpzsm1gRAWHbPyfTmuZ1FXnN6rmE q6Uc1ecloC4YreHH4XLPn1Ddq2V8A2Uf6EEVHmy88EtomPHLFzYckD0o3ZxZSU5igy4q BxqQ== X-Gm-Message-State: APjAAAV02XtIebtXpkrU2hn9en/gVpHW8ZFxrHz4WXOCFgiORdPFAkmY /43AfXUTOVQULSMJ8Q3WhEQKCnC7VcIJ+lvdJrMkyg== X-Google-Smtp-Source: APXvYqw2USUknyNH12Zul6mHL6lqDlsWSFY9lTdDbwPKg2Pz6XlR6gnfvP35zB3LnBBhMSCqM3nWOFtORufpMc4G9HU= X-Received: by 2002:ac8:293a:: with SMTP id y55mr32569355qty.118.1573573899944; Tue, 12 Nov 2019 07:51:39 -0800 (PST) MIME-Version: 1.0 References: <20191106231650.1580-1-jeffrey.l.hugo@gmail.com> <20191112084225.casuncbo7z54vu4g@netronome.com> In-Reply-To: <20191112084225.casuncbo7z54vu4g@netronome.com> From: Jeffrey Hugo Date: Tue, 12 Nov 2019 08:51:28 -0700 Message-ID: Subject: Re: [PATCH] ath10k: Fix qmi init error handling To: Simon Horman Cc: kvalo@codeaurora.org, davem@davemloft.net, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, MSM , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, Nov 12, 2019 at 1:42 AM Simon Horman wrote: > > On Wed, Nov 06, 2019 at 03:16:50PM -0800, Jeffrey Hugo wrote: > > When ath10k_qmi_init() fails, the error handling does not free the irq > > resources, which causes an issue if we EPROBE_DEFER as we'll attempt to > > (re-)register irqs which are already registered. > > > > Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client") > > Signed-off-by: Jeffrey Hugo > > --- > > drivers/net/wireless/ath/ath10k/snoc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c > > index fc15a0037f0e..f2a0b7aaad3b 100644 > > --- a/drivers/net/wireless/ath/ath10k/snoc.c > > +++ b/drivers/net/wireless/ath/ath10k/snoc.c > > @@ -1729,7 +1729,7 @@ static int ath10k_snoc_probe(struct platform_device *pdev) > > ret = ath10k_qmi_init(ar, msa_size); > > if (ret) { > > ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret); > > - goto err_core_destroy; > > + goto err_free_irq; > > } > > From a casual examination of the code this seems like a step in the right > direction. But does this error path also need to call ath10k_hw_power_off() ? It probably should. I don't see any fatal errors from the step being skipped, although it might silence some regulator warnings about being left on. Unlikely to be observed by most folks as I was initing the driver pretty early to debug some things. Looks like Kalle already picked up this patch though, so I guess your suggestion would need to be a follow up. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUYSD-0002a3-Li for ath10k@lists.infradead.org; Tue, 12 Nov 2019 15:51:43 +0000 Received: by mail-qt1-x841.google.com with SMTP id l24so20204663qtp.10 for ; Tue, 12 Nov 2019 07:51:40 -0800 (PST) MIME-Version: 1.0 References: <20191106231650.1580-1-jeffrey.l.hugo@gmail.com> <20191112084225.casuncbo7z54vu4g@netronome.com> In-Reply-To: <20191112084225.casuncbo7z54vu4g@netronome.com> From: Jeffrey Hugo Date: Tue, 12 Nov 2019 08:51:28 -0700 Message-ID: Subject: Re: [PATCH] ath10k: Fix qmi init error handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Simon Horman Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, lkml , ath10k@lists.infradead.org, MSM , davem@davemloft.net, kvalo@codeaurora.org On Tue, Nov 12, 2019 at 1:42 AM Simon Horman wrote: > > On Wed, Nov 06, 2019 at 03:16:50PM -0800, Jeffrey Hugo wrote: > > When ath10k_qmi_init() fails, the error handling does not free the irq > > resources, which causes an issue if we EPROBE_DEFER as we'll attempt to > > (re-)register irqs which are already registered. > > > > Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client") > > Signed-off-by: Jeffrey Hugo > > --- > > drivers/net/wireless/ath/ath10k/snoc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c > > index fc15a0037f0e..f2a0b7aaad3b 100644 > > --- a/drivers/net/wireless/ath/ath10k/snoc.c > > +++ b/drivers/net/wireless/ath/ath10k/snoc.c > > @@ -1729,7 +1729,7 @@ static int ath10k_snoc_probe(struct platform_device *pdev) > > ret = ath10k_qmi_init(ar, msa_size); > > if (ret) { > > ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret); > > - goto err_core_destroy; > > + goto err_free_irq; > > } > > From a casual examination of the code this seems like a step in the right > direction. But does this error path also need to call ath10k_hw_power_off() ? It probably should. I don't see any fatal errors from the step being skipped, although it might silence some regulator warnings about being left on. Unlikely to be observed by most folks as I was initing the driver pretty early to debug some things. Looks like Kalle already picked up this patch though, so I guess your suggestion would need to be a follow up. _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k