Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7080490ybi; Thu, 1 Aug 2019 02:55:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqz81onfKhRl5N+ZII3P+e7Uh8cbJY4/JqcWFLCTGVLMLk1dFsY4qRJDvdIS9hm8csiLNmmr X-Received: by 2002:a62:770e:: with SMTP id s14mr50664868pfc.150.1564653352566; Thu, 01 Aug 2019 02:55:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564653352; cv=none; d=google.com; s=arc-20160816; b=NEmCsEkQ0cIsdlfL1jP8h6AJMQa1/rM9cl/+W2FgAiFWqgzQ+tqmmDwVFuV/GfHFgr Wnmm+4bfNVPH8rkmA8XTEntBPtc+Qct1wJbUrbxCUN895cbJ3B1ZfT/oOTltWNJ73Ge/ kAgNJw6S1YFX3G0R1uohtUUeg8iqRoqyyAFRkDuVK8llF2+lsUVjE4tqA9apJ5mv9gdL M5YhP3D4yjopLZ22QAbFtpml9drVb6cgr7mazBRMioWCUDejPyMf7TgM1bhFC7RrmoqN xzl6BAxIfk1t9Nzh1dATiiKlOuiNF0YSWPRj7y4Jppbdo7uiXQGm/ysIjguK+nnzyrDx BTiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=y2llkvZ2HJqkT5yX7fUbMdD7GjjZQJzdP2qIlG1qk7M=; b=xFVyPqgGMuTrlw5QWc3A1l5KLyCNR4b+1cgyENrP7tFSiq8AsKmV8YlhwcvDWkQd4c W4eZ36qqhOQgCHqfTpk0clY9E5aFiMuoyTJn3AwfzquET/HgVxjXRAvy89FNpSHHi/A9 tMWRLU6iCBlmu7AL+5PS2yDl2AXAdwGxmryFEaGjQvFpfwipl+Q+zYAcGZgIC1H94jVF s53vSPdXhw1KXUY0H3mBIdhpyvDFmcfZDKI3QjSMZbJGQDo/p6KNBVDnd7ICNd+2Sj4U TQjDtOJmsmJrvhI80uFBLnIl0e1D552mw1Yjp9TNKtQ8NMoQ23i+E68CC/lQMFmDJLWW 8Qew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v45si33365173pgn.10.2019.08.01.02.55.26; Thu, 01 Aug 2019 02:55:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730410AbfHAJVv convert rfc822-to-8bit (ORCPT + 99 others); Thu, 1 Aug 2019 05:21:51 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:41819 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbfHAJVv (ORCPT ); Thu, 1 Aug 2019 05:21:51 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x719LgBr018940, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCAS11.realtek.com.tw[172.21.6.12]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x719LgBr018940 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 1 Aug 2019 17:21:42 +0800 Received: from RTITMBSVM04.realtek.com.tw ([fe80::e404:880:2ef1:1aa1]) by RTITCAS11.realtek.com.tw ([fe80::7c6d:ced5:c4ff:8297%15]) with mapi id 14.03.0439.000; Thu, 1 Aug 2019 17:21:42 +0800 From: Tony Chuang To: Brian Norris CC: "kvalo@codeaurora.org" , "linux-wireless@vger.kernel.org" , "jano.vesely@gmail.com" Subject: RE: [PATCH] rtw88: pci: enable MSI interrupt Thread-Topic: [PATCH] rtw88: pci: enable MSI interrupt Thread-Index: AQHVRsz7S+hWGWZ+/EW68pA5j53xh6bjDjWAgADwiMA= Date: Thu, 1 Aug 2019 09:21:41 +0000 Message-ID: References: <1564487414-9615-1-git-send-email-yhchuang@realtek.com> <20190730195703.GA224792@google.com> In-Reply-To: <20190730195703.GA224792@google.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.68.183] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > Subject: Re: [PATCH] rtw88: pci: enable MSI interrupt > > Hi, > > On Tue, Jul 30, 2019 at 07:50:14PM +0800, yhchuang@realtek.com wrote: > > From: Yu-Yen Ting > > > > MSI interrupt should be enabled on certain platform. > > > > Add a module parameter disable_msi to disable MSI interrupt, > > driver will then use legacy interrupt instead. > > And the interrupt mode is not able to change at run-time, so > > the module parameter is read only. > > Well, if we unbind/rebind the device, probe() will pick up the new > value. e.g.: > > echo '0000:01:00.0' > /sys/bus/pci/drivers/rtw_pci/unbind > echo '0000:01:00.0' > /sys/bus/pci/drivers/rtw_pci/bind > > So is it really necessary to mark read-only? I think there's a general > understanding that module parameters are not always "immediately > effective." If there's a general understanding of not always effective immediately, I think I can change the file mode to 0644. > > > Tested-by: J?n Vesel? > > Signed-off-by: Yu-Yen Ting > > Signed-off-by: Yan-Hsuan Chuang > > --- > > drivers/net/wireless/realtek/rtw88/pci.c | 51 > ++++++++++++++++++++++++++++++-- > > drivers/net/wireless/realtek/rtw88/pci.h | 1 + > > 2 files changed, 49 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/wireless/realtek/rtw88/pci.c > b/drivers/net/wireless/realtek/rtw88/pci.c > > index 23dd06a..25410f6 100644 > > --- a/drivers/net/wireless/realtek/rtw88/pci.c > > +++ b/drivers/net/wireless/realtek/rtw88/pci.c > > @@ -874,6 +878,7 @@ static irqreturn_t rtw_pci_interrupt_handler(int irq, > void *dev) > > if (!rtwpci->irq_enabled) > > goto out; > > > > + rtw_pci_disable_interrupt(rtwdev, rtwpci); > > Why exactly do you have to mask interrupts during the ISR? Is there a > race in rtw_pci_irq_recognized() or something? I think there is a race between SW and HW, if we do not stop the IRQ first, write 1 clear will make the interrupt to be lost. > > > rtw_pci_irq_recognized(rtwdev, rtwpci, irq_status); > > > > if (irq_status[0] & IMR_MGNTDOK) > > ... > > > Otherwise, looks fine: > > Reviewed-by: Brian Norris > Yan-Hsuan