From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751926AbdBAUWa convert rfc822-to-8bit (ORCPT ); Wed, 1 Feb 2017 15:22:30 -0500 Received: from smtprelay.synopsys.com ([198.182.47.9]:57439 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751840AbdBAUW2 (ORCPT ); Wed, 1 Feb 2017 15:22:28 -0500 From: Alexey Brodkin To: David Miller , "stable@vger.kernel.org" CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "peppe.cavallaro@st.com" , "fabrice.gasnier@st.com" , "manabian@gmail.com" , "preid@electromag.com.au" , "alexandre.torgue@gmail.com" , Vineet Gupta Subject: RE: [PATCH] stmmac: Discard masked flags in interrupt status register Thread-Topic: [PATCH] stmmac: Discard masked flags in interrupt status register Thread-Index: AQHSeJhbJBzLpZ1W7keYkFl3fw8WjaFQCUOAgASV7uA= Date: Wed, 1 Feb 2017 20:22:22 +0000 Message-ID: <4881796E12491D4BB15146FE0209CE64678ACDB7@DE02WEMBXB.internal.synopsys.com> References: <1485519883-24969-1-git-send-email-abrodkin@synopsys.com> <20170129.181541.423447436903187089.davem@davemloft.net> In-Reply-To: <20170129.181541.423447436903187089.davem@davemloft.net> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcYWJyb2RraW4uc3lub3BzeXNcYXBwZGF0YVxyb2FtaW5nXDA5ZDg0OWI2LTMyZDMtNGE0MC04NWVlLTZiODRiYTI5ZTM1Ylxtc2dzXG1zZy0yMjUxMjM0Ni1lOGJjLTExZTYtYjhiYS04MDE5MzQxZjVlNTRcYW1lLXRlc3RcMjI1MTIzNDgtZThiYy0xMWU2LWI4YmEtODAxOTM0MWY1ZTU0Ym9keS50eHQiIHN6PSIyMjI4IiB0PSIxMzEzMDQ1NDE0MTg3NDkwNjYiIGg9IlE2SWdPUWJSbWdBRU1IWThVNGVpRU1aVjVGdz0iIGlkPSIiIGJsPSIwIiBibz0iMSIvPjwvbWV0YT4= x-originating-ip: [10.225.15.134] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, all, > -----Original Message----- > From: David Miller [mailto:davem@davemloft.net] > Sent: Monday, January 30, 2017 2:16 AM > To: Alexey.Brodkin@synopsys.com > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; > peppe.cavallaro@st.com; fabrice.gasnier@st.com; manabian@gmail.com; > preid@electromag.com.au; alexandre.torgue@gmail.com; > Vineet.Gupta1@synopsys.com > Subject: Re: [PATCH] stmmac: Discard masked flags in interrupt status > register > > From: Alexey Brodkin > Date: Fri, 27 Jan 2017 15:24:43 +0300 > > > DW GMAC databook says the following about bits in "Register 15 > > (Interrupt Mask Register)": > > --------------------------->8------------------------- > > When set, this bit __disables_the_assertion_of_the_interrupt_signal__ > > because of the setting of XXX bit in Register 14 (Interrupt Status > > Register). > > --------------------------->8------------------------- > > > > In fact even if we mask one bit in the mask register it doesn't > > prevent corresponding bit to appear in the status register, it only > > disables interrupt generation for corresponding event. > > > > But currently we expect a bit different behavior: status bits to be in > > sync with their masks, i.e. if mask for bit A is set in the mask > > register then bit A won't appear in the interrupt status register. > > > > This was proven to be incorrect assumption, see discussion here [1]. > > That misunderstanding causes unexpected behaviour of the GMAC, for > > example we were happy enough to just see bogus messages about link > > state changes. > > > > So from now on we'll be only checking bits that really may trigger an > > interrupt. > > > > [1] https://lkml.org/lkml/2016/11/3/413 > > > > Signed-off-by: Alexey Brodkin > > This looks good, applied, thanks. May we have that one back-ported to stable branches starting from 4.8.x? That issue started to appear due to a change from pr_debug() to pr_info() in commit 70523e639bf8 ("drivers: net: stmmac: reworking the PCS code."). -Alexey