From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:58290 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbeB0QsU (ORCPT ); Tue, 27 Feb 2018 11:48:20 -0500 Date: Tue, 27 Feb 2018 11:48:19 -0500 (EST) Message-Id: <20180227.114819.279408262655099664.davem@davemloft.net> To: hkallweit1@gmail.com Cc: nic_swsd@realtek.com, romieu@fr.zoreil.com, netdev@vger.kernel.org Subject: Re: [PATCH net-next v2] r8169: improve interrupt handling From: David Miller In-Reply-To: <83b2824d-187c-de76-f6e3-14084f216d59@gmail.com> References: <7f1cbc71-9d2d-627f-9e0e-b7e7b1f6ce9b@gmail.com> <20180226.135622.1205217981314568094.davem@davemloft.net> <83b2824d-187c-de76-f6e3-14084f216d59@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Heiner Kallweit Date: Mon, 26 Feb 2018 20:50:32 +0100 > Am 26.02.2018 um 19:56 schrieb David Miller: >> From: Heiner Kallweit >> Date: Sat, 24 Feb 2018 16:53:23 +0100 >> >>> @@ -736,8 +736,7 @@ struct ring_info { >>> }; >>> >>> enum features { >>> - RTL_FEATURE_MSI = (1 << 0), >>> - RTL_FEATURE_GMII = (1 << 1), >>> + RTL_FEATURE_GMII = (1 << 0), >>> }; >>> >>> struct rtl8169_counters { >> ... >>> + if (tp->mac_version <= RTL_GIGA_MAC_VER_06) { >> >> Please, if you are going to keep the logic the same for the older >> chips, just keep the RTL_FEATURE_MSI flag around instead of adding >> new (and potentially regression causing) tests for this condition. >> > I see your point. In the case here the condition is meant to be true > for chip versions: > - having the MSIEnable bit > - being PCI, not PCIe > > Both is true for chip versions <= 06 only, as can be seen in different > places in the driver, e.g. > - where bit MSIEnable is defined comment says: /* 8169 only. Reserved in the 8168. */ > - array rtl_chip_infos[] definition shows that only versions <= 06 > are named RTL8169xx and are marked as PCI > > Last but not least condition "chip version <= 06" is used also in > other places in the driver when it's about the RTL8169xx PCI chips. > > At least I'm convinced this gives enough confidence that we can get > rid of flag RTL_FEATURE_MSI. Fair enough, I'm convinced too. I'll apply this. Meanwhile there is only one flag bit left, and you can therefore convert the flags to a straight "bool has_gmii" or similar. Thanks.