Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6459774rwd; Mon, 19 Jun 2023 07:36:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6UwAQ9/uotQeGn92UWbrM2cf/h7jq60ubK1zIrqQgaAlH3BONbnVErNreHkwhFqjVAERgW X-Received: by 2002:a17:903:41c3:b0:1a9:7ffb:5ed0 with SMTP id u3-20020a17090341c300b001a97ffb5ed0mr6363621ple.59.1687185379157; Mon, 19 Jun 2023 07:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687185379; cv=none; d=google.com; s=arc-20160816; b=sk903bU2sMylz9hKBTs2rxFYVPVouoen/CvqdtcnGbuVBPLMGCKFP2BnsfhTt5oeCE 6fee8f39v6ZDHFMBFWSydOk+med/oydyM7MNUU7NNL0RPHfNEICyIe+frETLIt5j/tiW g8jNwDODK1CL15oHJ55rPMquBNzoGROJzdF2H0gtpJx3oHWfSsFIkl6NhU31SMyPJPOB xLOR7CAm2YT3MDRw22bBy1JJT33NT6TJMvvzT5XbUVptk2VQU5gvDaE0hKQODXS72RIy 2TlbwCwGYN2WR4euyTP6m28i/o6nuQmvbCm7LNjGxdqtNAV3mGrLAmSOT0nG7Htvbcd9 fR4Q== 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=EIRGd1UTDvTL390FzzHdf8HQrhz40uusNBI41NZbMhY=; b=t+MGlioZu7511amjXietFT7RHmoXvVPoq9K/Zg93eILZsaXXNA2ev704sfodShnoiM wU9xOyoODhXOSl5LzP+OfZg8hz9+us1XNRDLUVheb860+SODZZOPMRZdov1jzK1AJckG Eguwyzbt4cj0/fKf1zcz5J7tmmImt7X6QgIflpkxWQlJd7cWnUhBGjZtAC1ZEyGt3UuA V+HEHkRp+4NszONfUPjPzQR8zeWCtoJ0oy5czEzdm4pjf1XCQSuxznKl2vfNaB3Yu4uG MlsoT3g4t+DNvNQAUIabzpV4s7aK2vTlEuDA7UI4QlDXFb2It+uVrQmhcZYIA8Ug8vpV 9nXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=yzwRwoTG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a170902c95100b001b3b250fd1csi1332677pla.301.2023.06.19.07.35.57; Mon, 19 Jun 2023 07:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=yzwRwoTG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231948AbjFSOLF (ORCPT + 99 others); Mon, 19 Jun 2023 10:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjFSOLE (ORCPT ); Mon, 19 Jun 2023 10:11:04 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8A6B9C; Mon, 19 Jun 2023 07:11:03 -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=EIRGd1UTDvTL390FzzHdf8HQrhz40uusNBI41NZbMhY=; b=yzwRwoTGnJPjBQYvqskOO3huZz FnqDg6J/ffjxtcx4CNkxcqWG97x7K9lJheWf9HufBfPMIV+yDHyoafovCXbF53Uf27XTYX/2BirdF u46lYa0u+e0qlkOxZgKu18sIXQiLJYhr2jF/IMnu5cl5dnxCyJmpPt8W9ONQUdgwfLS8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qBFai-00Gun1-IO; Mon, 19 Jun 2023 16:10:48 +0200 Date: Mon, 19 Jun 2023 16:10:48 +0200 From: Andrew Lunn To: Rasmus Villemoes Cc: Woojung Huh , UNGLinuxDriver@microchip.com, Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Robert Hancock , stable@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: dsa: microchip: ksz9477: follow errata sheet when applying fixups Message-ID: References: <20230619081633.589703-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230619081633.589703-1-linux@rasmusvillemoes.dk> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 > static void ksz9477_phy_errata_setup(struct ksz_device *dev, int port) > { > + u16 cr; > + > + /* Errata document says the PHY must be configured to 100Mbps > + * with auto-neg disabled before configuring the PHY MMD > + * registers. > + */ > + ksz_pread16(dev, port, REG_PORT_PHY_CTRL, &cr); > + ksz_pwrite16(dev, port, REG_PORT_PHY_CTRL, > + PORT_SPEED_100MBIT | PORT_FULL_DUPLEX); > + For this fix, these are fine. Reviewed-by: Andrew Lunn Looking at the values of PORT_SPEED_100MBIT and PORT_FULL_DUPLEX, they are identical to BMCR_SPEED100 and BMCR_FULLDPLX. In fact, it looks like for 9477 this is a standard BMCR. Please could you add a follow up patch which replaces these #defines with the standard ones in include/uapi/linux/mii.h. The code is then more understandable by people who know the standard defines. Thanks Andrew