From: David Miller Subject: Re: r8169: improve spurious interrupt detection Date: Sat, 15 Dec 2018 10:35:43 -0800 (PST) Message-ID: <20181215.103543.935738830761092732.davem@davemloft.net> References: <36e8a8bd-473c-7146-76bb-24388b9d7ef6@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: nic_swsd@realtek.com, netdev@vger.kernel.org To: hkallweit1@gmail.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:53068 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbeLOSfr (ORCPT ); Sat, 15 Dec 2018 13:35:47 -0500 In-Reply-To: <36e8a8bd-473c-7146-76bb-24388b9d7ef6@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Heiner Kallweit Date: Sat, 15 Dec 2018 16:24:02 +0100 > @@ -6405,8 +6405,9 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) > { > struct rtl8169_private *tp = dev_instance; > u16 status = rtl_get_events(tp); > + u16 irq_mask = RTL_R16(tp, IntrMask); > > - if (status == 0xffff || !(status & tp->irq_mask)) > + if (status == 0xffff || !(status & irq_mask)) > return IRQ_NONE; Heiner, this is really expensive. Why is the tp->irq_mask value out of sync with the value programmed into IntrMask? Is there some way we can fix that instead?