Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1157416pxb; Fri, 21 Jan 2022 11:04:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIaBZITVofgQsXG7PF4moy9WnOw8Spif0ZmtBHR9Y26+8D1Lm6XOX6xABg9aIkWKYOPpqr X-Received: by 2002:aa7:90d4:0:b0:4bd:b258:e872 with SMTP id k20-20020aa790d4000000b004bdb258e872mr4737906pfk.46.1642791869048; Fri, 21 Jan 2022 11:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642791869; cv=none; d=google.com; s=arc-20160816; b=NaAiA+Y4MHUqEbYY0xhepDYtOPb20o93TjrlfUKcbXDAU9YCpyJ9lojOM6bNIJkyfL bSL4vDnCO1gfWJw3Llu1c4DbOPvfSPvQA/stpMgo2MhaDMOxmDWxJTUthwePWzWba6BN epFjPDbeEJK9Iy9P+TxSDecMDxQi98gFn6aAcEyu78eCVkS5ReHQPmy9xdqn51I8MjaB plAZegMz6aybm7JMGVK8ImYM2zHsylDgA+ihU/6t61qZesMInjIAYcgk/YeTVCbiTMbd SVAPqEHX1kgh6o4rv2YSNH+M8jqWQ6+674tjrkXTg3daRYeLLxCuPzdEKZK2FATLt89+ SVlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=3JTEWyPeqLIaXuVDYvD2xAgJ6YgnmhHQ+UqwvW9RC0k=; b=NUtB0Yc9RXVW8emm5MX6kAc1mfbTKCjOK44xMJoi+4urUF0shMkstbNpUvOzGR+TFH 8vAV0DnpWrccrL7cJDN/zI6zlqponXCSEJcm1CilmuOHlceQQcauhu7tWMRNHpPNyfR6 oUc0fBcypkqTzR48xntmlra3Kya64yibqSjR4Pd1Ogo3txgw499hWboLRKPKGAgu7NPa AdhL646XohxjlLuSkcj9hwhQYii1YE+Cjte7UiqF6jP99ZP+o7AHNgPyf1jy+YM6f4ra leu3z+MF/+N/VMa47X7rJwAai+hW9Oe3AxXtbbceiGuzY8SgR+REDJH1Pzrzc+p/kGJu BW8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=OE3lGJth; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mq16si7611385pjb.12.2022.01.21.11.04.20; Fri, 21 Jan 2022 11:04:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=OE3lGJth; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352693AbiASJT6 (ORCPT + 70 others); Wed, 19 Jan 2022 04:19:58 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:9736 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353054AbiASJTs (ORCPT ); Wed, 19 Jan 2022 04:19:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1642583988; x=1674119988; h=from:to:cc:subject:date:message-id:mime-version; bh=3JTEWyPeqLIaXuVDYvD2xAgJ6YgnmhHQ+UqwvW9RC0k=; b=OE3lGJthtkJFubhQKkmBy9n1+ppYCiovTOWrraNYJ7byqw4suxfzvNRc Rtnjxl3X+uX1dVrbFFneKpk6Cdv+2TsSy1rJi+gIFWcK7eW+eyUnhxP6t +t0vuKXoXtieDwigD9VCTFgi50bc7lv0t5BMmqVlfYYFLRmgkfOTtNu+U E=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 19 Jan 2022 01:19:48 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2022 01:19:47 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Wed, 19 Jan 2022 01:19:46 -0800 Received: from vnaralas-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Wed, 19 Jan 2022 01:19:44 -0800 From: Venkateswara Naralasetty To: CC: , Venkateswara Naralasetty Subject: [PATCH] ath11k: fix kernel panic during unload/load ath11k modules Date: Wed, 19 Jan 2022 14:49:33 +0530 Message-ID: <1642583973-21599-1-git-send-email-quic_vnaralas@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Call netif_napi_del() from ath11k_ahb_free_ext_irq() to fix the following kernel panic when unload/load ath11k modules for few iterations. [ 971.201365] Unable to handle kernel paging request at virtual address 6d97a208 [ 971.204227] pgd = 594c2919 [ 971.211478] [6d97a208] *pgd=00000000 [ 971.214120] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 971.412024] CPU: 2 PID: 4435 Comm: insmod Not tainted 5.4.89 #0 [ 971.434256] Hardware name: Generic DT based system [ 971.440165] PC is at napi_by_id+0x10/0x40 [ 971.445019] LR is at netif_napi_add+0x160/0x1dc [ 971.743127] (napi_by_id) from [<807d89a0>] (netif_napi_add+0x160/0x1dc) [ 971.751295] (netif_napi_add) from [<7f1209ac>] (ath11k_ahb_config_irq+0xf8/0x414 [ath11k_ahb]) [ 971.759164] (ath11k_ahb_config_irq [ath11k_ahb]) from [<7f12135c>] (ath11k_ahb_probe+0x40c/0x51c [ath11k_ahb]) [ 971.768567] (ath11k_ahb_probe [ath11k_ahb]) from [<80666864>] (platform_drv_probe+0x48/0x94) [ 971.779670] (platform_drv_probe) from [<80664718>] (really_probe+0x1c8/0x450) [ 971.789389] (really_probe) from [<80664cc4>] (driver_probe_device+0x15c/0x1b8) [ 971.797547] (driver_probe_device) from [<80664f60>] (device_driver_attach+0x44/0x60) [ 971.805795] (device_driver_attach) from [<806650a0>] (__driver_attach+0x124/0x140) [ 971.814822] (__driver_attach) from [<80662adc>] (bus_for_each_dev+0x58/0xa4) [ 971.823328] (bus_for_each_dev) from [<80663a2c>] (bus_add_driver+0xf0/0x1e8) [ 971.831662] (bus_add_driver) from [<806658a4>] (driver_register+0xa8/0xf0) [ 971.839822] (driver_register) from [<8030269c>] (do_one_initcall+0x78/0x1ac) [ 971.847638] (do_one_initcall) from [<80392524>] (do_init_module+0x54/0x200) [ 971.855968] (do_init_module) from [<803945b0>] (load_module+0x1e30/0x1ffc) [ 971.864126] (load_module) from [<803948b0>] (sys_init_module+0x134/0x17c) [ 971.871852] (sys_init_module) from [<80301000>] (ret_fast_syscall+0x0/0x50) Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.6.0.1-00760-QCAHKSWPL_SILICONZ-1 Signed-off-by: Venkateswara Naralasetty --- drivers/net/wireless/ath/ath11k/ahb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 3fcec42..f407d4a 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -391,6 +391,8 @@ static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab) for (j = 0; j < irq_grp->num_irq; j++) free_irq(ab->irq_num[irq_grp->irqs[j]], irq_grp); + + netif_napi_del(&irq_grp->napi); } } -- 2.7.4