Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2657667lqo; Tue, 14 May 2024 05:47:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUlpcR5h/Pl/zJIwgUrHdgWVJsetMLb+q31C9nwfuufRoA8c2QNWMR2//P39HPS5jYOxW5hznWANjifbdoVtKC6G4/ic9CE/a/Ci8a6Bg== X-Google-Smtp-Source: AGHT+IFTcNMyjZ79HrSbhNnTRpbJjpwXy1zUfdCVmBlKiwc2JjaOH1P0UxiqQAe6x2uQhSJVMWKJ X-Received: by 2002:a05:6214:3a05:b0:6a0:de8b:4bfb with SMTP id 6a1803df08f44-6a1683769a3mr135273646d6.45.1715690858861; Tue, 14 May 2024 05:47:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715690858; cv=pass; d=google.com; s=arc-20160816; b=wRqJQBuUI964CegkUlYYL1EZ9ErtiSZlWylSTueXwgHqHw+TKycA1jvjjlzv+e5ukx ZjUuwSDsy4tSACyS6VJDXGVVyshaf0TPs/JwxFJqIAR/dE4/Ro2sh1HNV4nB3mr8TpR/ 3ouay41yAUeJ2uS3bRFbCT9aXkh/AsqHb93BIZegSweM8djg63+aYNPeK+QK03A2UW5e 0b5nj7SLMPRDFS2kcIXGdMCfwgiGh1Q3+Q3QHt4zyT3X4s0/n2bLHYq0beek0lSFGIjf lRC3eV3GluwmwPDiG7km8T5FupjSCyP1dimHwgVywtJXdARYDsOyRgjTgz4uev/FXVGX RUvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ItJZyxADy9lJjdoZnGrHNtUW02zg45BQFvl/bMS5INQ=; fh=jNxG+0gCwcZkA38KnLfggGdDIxDFMyccp0npRKSntD0=; b=tHt0bclLTcgdHSXCugnZTt0tdhb1CilYVEAxJJlB5OnXv31w0dCP0jQaUGz4W1X4e0 TOJZft57xi17uXvIeRFeHboFO20KyE3oTBSxhHn9qOHvTTL9PSMdyKGUQaW8AAA3+u05 MZAcJJk42d4SG7+JVblo8uyMS5r6EahegqqLFgqRzzVg/XzYpB2pzrML3cjydEMjCv2j t2cQpGpfLvFufsDTsZPVSM8ol60CsnVA3d05nBfa7ALse7zc6PgM2fDqnsA6ugSzmiIw 3QYECRcQ34xhl1aB3/CSaQZUYEe51k1qYn0gpGa/M6dYr51FykIdMWfO76ZBi96vzabs zcZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="DqO/Qli5"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-178670-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178670-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f1d731esi119646966d6.116.2024.05.14.05.47.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 05:47:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178670-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="DqO/Qli5"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-178670-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178670-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7C2FF1C21B0A for ; Tue, 14 May 2024 12:47:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8089E6DCE3; Tue, 14 May 2024 12:47:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="DqO/Qli5" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3C806BB39; Tue, 14 May 2024 12:47:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715690848; cv=none; b=bnqz3ApdgoiaOSEeNo2e5j0Wvy4oUz+adOpv8ktuXrLHlQMClZGYHDODoLRpLrI8o+ZFdN3TeOmlUFYCmOqPxQRhyZMbzifAgRjK8cHzj6QloWMNJI/ygqKC2NvDs7Gm5piQKr4PqKUommOeVxk/YyochKnPnCZP0aiLckdknCs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715690848; c=relaxed/simple; bh=tYB1OhNUKDw8GoD1uJ1/9nUQk/BqbBA+1FOGe3FpxuY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rN43cMZui9C0YpMzQrKD4TN+28i5f4MJHLnncV7dx+veBGeTYToJ+B3TFcpjX2RIj3rGeYLaAjbQJDIILY+SegjAqAjsB5x1/aniv+fOq6lleWAkAbIG9iljgvCffO8t30HcxEbYZ/lrZ+vqE8pudNyBu7+No2dm8IIRAwo69bc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=DqO/Qli5; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=ItJZyxADy9lJjdoZnGrHNtUW02zg45BQFvl/bMS5INQ=; b=DqO/Qli5wIMiSwBD8HsI0ETT1W ypcul6vfp2S2yoMv2m8iNDdcu8WHzAKuo+bxKVdYYSWjmkWiUCsPolC2zcauD18tNz/1J44VwyYsU 2a3aXsuBnMPmWFJctcr5eLHVMeZ4UAROM6xhQqgQoq7zpIYPto9/HOLqrulbV1M6bvpA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s6rYi-00FO5D-6S; Tue, 14 May 2024 14:47:08 +0200 Date: Tue, 14 May 2024 14:47:08 +0200 From: Andrew Lunn To: Thomas Gessler Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, MD Danish Anwar , Ravi Gunasekaran Subject: Re: [PATCH 1/2] net: phy: dp83869: Add PHY ID for chip revision 3 Message-ID: References: <20240514122728.1490156-1-thomas.gessler@brueckmann-gmbh.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240514122728.1490156-1-thomas.gessler@brueckmann-gmbh.de> On Tue, May 14, 2024 at 02:27:27PM +0200, Thomas Gessler wrote: > The recent silicon revision 3 of the DP83869 has a different PHY ID > which has to be added to the driver in order for the PHY to be detected. > There appear to be no documented differences between the revisions, > although there are some discussions in the TI forum about different > behavior for some registers. Do you have the datasheet? What does it say about the ID in registers 2 and 3? Often the lower nibble is the revision. Meaning there can be 16 revisions of a PHY. > static struct phy_driver dp83869_driver[] = { > - DP83869_PHY_DRIVER(DP83869_PHY_ID, "TI DP83869"), > + DP83869_PHY_DRIVER(DP83869REV1_PHY_ID, "TI DP83869 Rev. 1"), > + DP83869_PHY_DRIVER(DP83869REV3_PHY_ID, "TI DP83869 Rev. 3"), > DP83869_PHY_DRIVER(DP83561_PHY_ID, "TI DP83561-SP"), If you look at DP83869_PHY_DRIVER() it uses: #define DP83869_PHY_DRIVER(_id, _name) \ { \ PHY_ID_MATCH_MODEL(_id), \ As the name suggests, it matches on the model. The revision is ignored. A mask is applied to ignore the lower nibble. So this change looks pointless. > static struct mdio_device_id __maybe_unused dp83869_tbl[] = { > - { PHY_ID_MATCH_MODEL(DP83869_PHY_ID) }, > + { PHY_ID_MATCH_MODEL(DP83869REV1_PHY_ID) }, > + { PHY_ID_MATCH_MODEL(DP83869REV3_PHY_ID) }, > { PHY_ID_MATCH_MODEL(DP83561_PHY_ID) }, And this has the same issue. If you want the match to include the revision, you need to use PHY_ID_MATCH_EXACT(). If the different revisions are supposed to be compatible, a single PHY_ID_MATCH_MODEL() is sufficient. Andrew --- pw-bot: cr