Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2313820pxp; Mon, 21 Mar 2022 16:40:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9P3nrF763tVkcYBCbvlNaf6LreAJLmnvQpqIFrttxkcyFdJ0zrg+X1JoMlA8Ll9pJhbFs X-Received: by 2002:a17:902:7781:b0:153:35ef:e3d1 with SMTP id o1-20020a170902778100b0015335efe3d1mr15502800pll.116.1647906052530; Mon, 21 Mar 2022 16:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647906052; cv=none; d=google.com; s=arc-20160816; b=SPOfSRoOWuqmSObwJOMCH8LQCjmgLddZdNh0zO4Q2qWR9ps/sQ6iZPuoo2u074Afhr wG09wOyBK6L/SkIr+FezsCWYnDGp59KYJsZxO7zI2zBhKBIpNqdWCzhnRIYtEqK18VRE dWbNTOgbacREFwG1jfMOI3I0u8JwMz7BnO6KPGSH5dF3+nyJE6Nkt3aaG/SDjGz1xiIF MmciSbYU2s/2y9Msm3U+tnocRrRSfWZqWpZVF0OiVTKKWnw32MKzIKqxuh93lJw8qoaB uRVulHt1Gm72PcPTwUnhBdeHSA8cawzAHmN5Kr0x1Jiblk6OpzDQRXn8mUbuwYh0dMwE m5+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UBm3ZjytRb4UWe3yTQNc0gsXTg4o3/vjn11r6LYHBUk=; b=T5+F4UnBzNw9tx+yccg1OF6GfvjlfX324PvXaaC1pdGyvxJSBnDkDTa4FYj4kTI8LO HC/X4LTcsSPem4Zh73zhtsmAYCCw5tQ6i6JD6qXdoghFntky9BR5Haiqz8ZFuJSDBwuZ aA6kUMQPcNH8iHIRO4CEeUEYYCkdTy1kZMV0XQ+WD4E3MIV9Fi/Y4U/U8/aHZgbC7bTC ikZcAlOEeMMelnfqLIkUUH9fVtkiAw4+4C1ceplvXuePGh72W210rb10U+G8mOUwCVbZ lWygk4mhNXPqjwOJXQQtBuge0AW67AknXgKuPpF4TsLM8c9Ge8ZNpVUab3oQW7uX0x7Q 4tbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EFcWcZxD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m12-20020a63ed4c000000b003816043f00csi13669645pgk.513.2022.03.21.16.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 16:40:52 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EFcWcZxD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 52F2E4138BE; Mon, 21 Mar 2022 15:54:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230206AbiCUWz0 (ORCPT + 99 others); Mon, 21 Mar 2022 18:55:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbiCUWzS (ORCPT ); Mon, 21 Mar 2022 18:55:18 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A83AA3B584E; Mon, 21 Mar 2022 15:37:57 -0700 (PDT) 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=UBm3ZjytRb4UWe3yTQNc0gsXTg4o3/vjn11r6LYHBUk=; b=EFcWcZxDNpzXTxn6wpCEk3BAeA M71XlJmd/7vwPd/eQG7ok/bTqCxOuolRmMsx1YLovGmeg0eatXci8kcHDkY3oDgKXSPu1vCvknY9N 2tATwn6J2tHYRNrEY6BXsgF7UxN+B4f8Q9EDwmacbY8AiVGU5vb0KsiiyAdNKobXtQ6Y=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nWQey-00C1zY-4M; Mon, 21 Mar 2022 23:37:56 +0100 Date: Mon, 21 Mar 2022 23:37:56 +0100 From: Andrew Lunn To: Michael Walle Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Clause 45 and Clause 22 PHYs on one MDIO bus Message-ID: References: <240354b0a54b37e8b5764773711b8aa3@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 21, 2022 at 10:51:29PM +0100, Michael Walle wrote: > Am 2022-03-21 21:21, schrieb Andrew Lunn: > > On Mon, Mar 21, 2022 at 12:21:48PM +0100, Michael Walle wrote: > > > The SoC I'm using is the LAN9668, which uses the mdio-mscc-mdio > > > driver. > > > First problem there, it doesn't support C45 (yet) but also doesn't > > > check > > > for MII_ADDR_C45 and happily reads/writes bogus registers. > > > > There are many drivers like that :-( > > > > Whenever a new driver is posted, it is one of the things i ask > > for. But older drivers are missing such checks. > > Should that be a patch for net or net-next? One thing to consider; > The gpy215 is probing just fine with a c22 only mdio driver which doesn't > check for c45 accesses. It might read fishy registers during its probe, > though. After adding the c45 check in the mdio drivers read and write > it will fail to probe. So depending on the mdio driver it might went > unnoticed that the phy_get_c45_ids() could fail. > > If it should go via net, then it should probably be accompanied > by a patch to fix the gpy_probe() (i.e. ignoring -EOPNOTSUPP > error). I would suggest net-next first, so it gets some testing. We can then add it to net later. We just need to keep an eye out for the automagic bots which magically pick patches to backport. We don't want them to pickup these patches too soon and only take part of the fix. Andrew