From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28688C433E0 for ; Tue, 26 May 2020 15:21:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1D3020723 for ; Tue, 26 May 2020 15:21:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="C5OxeFs8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729079AbgEZPVO (ORCPT ); Tue, 26 May 2020 11:21:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728279AbgEZPVN (ORCPT ); Tue, 26 May 2020 11:21:13 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E64BC03E96D for ; Tue, 26 May 2020 08:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=De3WiELNUugEoC/dk6ZOZJqilC5OH2qQmhMugLmVNM8=; b=C5OxeFs8a0W5nKAQdvbLtVzLk b3jiqfvgpX1C+oV0rQ+jBkRmmAQM5l2cFNDZhb8xmq1xE8RPoXz6KefpJyhCBGzsJuAOg1Digzy9f mtq8rcxgkLZWNCieUsefnQbZ0/hxpwzaEJEtvZuTRy4wWCKbmnKcAs8j0C65O7zg4vZq5tjP5mB/g cyx7nWwvHZYHKFD30rQiAV1jXLO5zcMFAavJe4Dya7Z3S/T3/zY1DWCeghyUM7/TcY3TQ6r4Z2syk QNU5HICXpu5Q3STF4SsvjGcWOcbjThXcoxP3ni4AdnjcmyXOevOB5suVONHMvHkBN2o/WWMZna37f NrvTb/tjw==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:45326) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdbO5-00089E-ID; Tue, 26 May 2020 16:21:05 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jdbO3-0005U2-2g; Tue, 26 May 2020 16:21:03 +0100 Date: Tue, 26 May 2020 16:21:03 +0100 From: Russell King - ARM Linux admin To: Andrew Lunn Cc: Heiner Kallweit , Jeremy Linton , Florian Fainelli , netdev@vger.kernel.org Subject: Re: [PATCH RFC 1/7] net: mdiobus: add clause 45 mdiobus accessors Message-ID: <20200526152102.GA1551@shell.armlinux.org.uk> References: <20200526142948.GY1551@shell.armlinux.org.uk> <20200526143906.GK768009@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200526143906.GK768009@lunn.ch> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, May 26, 2020 at 04:39:06PM +0200, Andrew Lunn wrote: > On Tue, May 26, 2020 at 03:31:01PM +0100, Russell King wrote: > > There is a recurring pattern throughout some of the PHY code converting > > a devad and regnum to our packed clause 45 representation. Rather than > > having this scattered around the code, let's put a common translation > > function in mdio.h, and provide some register accessors. > > > > Convert the phylib core, phylink, bcm87xx and cortina to use these. > > Hi Russell > > This is a useful patch whatever we decide about C45 probing. If you > can do some basic testing of it, i say submit it for this merge > window. It's almost fine, except for one << 16 I seem to have left in phylink.c. I can also report that the 2nd revision of the 88x3310 PHY does _not_ have bit 0 set in the devices-in-package (just like the first revision). The 2nd revision should respond to clause 22 cycles, but as it's connected to the XSMI interface on the 8040, clause 22 cycles can't be generated. Also, I found this in linux/mdio.h: #define MDIO_SUPPORTS_C22 1 #define MDIO_SUPPORTS_C45 2 #define MDIO_EMULATE_C22 4 which are for use with struct mdio_if_info which we don't use in phylib. That seems relevant to our discussions last night. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC for 0.8m (est. 1762m) line in suburbia: sync at 13.1Mbps down 424kbps up