From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiner Kallweit Subject: Re: [PATCH net-next 2/2] net: phy: realtek: remove boilerplate code from driver configs Date: Thu, 8 Nov 2018 20:38:49 +0100 Message-ID: <262b52e8-6823-ea9a-5730-2d018b953093@gmail.com> References: <08d52675-f308-4ebb-4ec4-f6c7ac0b6b06@gmail.com> <7f3b2935-f6d3-f7f6-fb42-4fe40d381cc6@gmail.com> <20181108183721.GE5259@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Florian Fainelli , David Miller , "netdev@vger.kernel.org" To: Andrew Lunn Return-path: Received: from mail-wm1-f67.google.com ([209.85.128.67]:36872 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725739AbeKIFPw (ORCPT ); Fri, 9 Nov 2018 00:15:52 -0500 Received: by mail-wm1-f67.google.com with SMTP id p2-v6so2306760wmc.2 for ; Thu, 08 Nov 2018 11:38:56 -0800 (PST) In-Reply-To: <20181108183721.GE5259@lunn.ch> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 08.11.2018 19:37, Andrew Lunn wrote: >> { >> .phy_id = 0x00008201, >> .name = "RTL8201CP Ethernet", >> - .phy_id_mask = 0x0000ffff, >> .features = PHY_BASIC_FEATURES, >> .flags = PHY_HAS_INTERRUPT, >> }, { >> .phy_id = 0x001cc816, >> .name = "RTL8201F Fast Ethernet", >> - .phy_id_mask = 0x001fffff, > > Hi Heiner > > "RTL8201CP Ethernet" has a mask of 0x0000ffff, where as all the others > use 0x001fffff. Is this correct? > IMO none of the masks is correct. All of them should be 0xffffffff. Nowadays the 32 bit PHYID is assembled from (MSB to LSB): 22 bits vendor OUI, 6 bit model number, 4 bit revision number Just the old 8201 doesn't follow this scheme. With the current masks, a PHYID 0x12348201 would be recognized as Realtek 8201 too, what's obviously wrong. > Andrew >