From: Heiner Kallweit Subject: Re: r8169: improve spurious interrupt detection Date: Sat, 15 Dec 2018 20:18:23 +0100 Message-ID: <19a539a4-b838-033c-eb5d-35231c8d8911@gmail.com> References: <36e8a8bd-473c-7146-76bb-24388b9d7ef6@gmail.com> <20181215.103543.935738830761092732.davem@davemloft.net> <2cdc4693-36e0-3323-1327-4a03e7426367@gmail.com> <20181215.111511.1892880384924197561.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: nic_swsd@realtek.com, netdev@vger.kernel.org To: David Miller Return-path: Received: from mail-wm1-f41.google.com ([209.85.128.41]:55928 "EHLO mail-wm1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbeLOTSa (ORCPT ); Sat, 15 Dec 2018 14:18:30 -0500 Received: by mail-wm1-f41.google.com with SMTP id y139so8605880wmc.5 for ; Sat, 15 Dec 2018 11:18:28 -0800 (PST) In-Reply-To: <20181215.111511.1892880384924197561.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 15.12.2018 20:15, David Miller wrote: > From: Heiner Kallweit > Date: Sat, 15 Dec 2018 19:44:35 +0100 > >> tp->irq_mask holds the chip-specific interrupt mask. It doesn't say >> whether interrupts are enabled or not. rtl_get_events() reads via >> PCI(e) anyway, so I was under the impression that one more PCI(e) read >> doesn't really matter. >> We could introduce a flag shadowing the "interrupts are enabled" state >> and use it here. But I'm not sure whether it's worth it. >> Alternatively we could also go with the readw_relaxed() version to >> get the values, this would eliminate the memory barrier at least. > > Thank for explaining, I thought ->irq_mask shadows IntrMask. > > I see what you are saying about rtl8169_irq_mask_and_ack() so maybe > adding one more PCIe read won't matter. > > I think I'll apply this as-is, this was supposed to be net-next and > that's why you reposted it with a corrected Subject correct? > Right, I missed to state net vs. net-next. >