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 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21305C64ED8 for ; Mon, 27 Feb 2023 13:09:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B050641707; Mon, 27 Feb 2023 13:09:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B050641707 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1677503351; bh=QsHdee1JflKfUkHty8Xc/FuYlvMLj62dQbCnjuswUBY=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=goAzgHtpnFZs9Mzn1d8VwmINathc5OMEtelMdxUNpzZNmCGC2D9inaK4cjwhGCFbJ D+HBgXbGLc0o4rexiqeKsVuSuu+NnBh63b+5r2ECfCsmYaT4CTevlwOwd/tYshX/YS rSuHpb599IbM0yUJbpOBVO3WCW90INX6/NBnK1yRW74k3PzYQbhlON4k1h5VmA+C8M BW9a/Njvl7fjBStz7jhU/dlJXMRs+dmSA4XivNoqEf1F8QD2Pd+u34yXC1VPCfh+sc x54O17O5r3PxZSAhqPOaAN2Y9uTmJ3R8ZRVaY8Hr5bZgKcxHc6GDNHxPwVxVZF1MIn t5uX1ww+X6DQA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ppwgu-nes_et; Mon, 27 Feb 2023 13:09:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 79125410B5; Mon, 27 Feb 2023 13:09:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 79125410B5 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 050901BF86B for ; Mon, 27 Feb 2023 13:09:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id DF2E6416CE for ; Mon, 27 Feb 2023 13:09:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org DF2E6416CE X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W2Xw_v-2h9u1 for ; Mon, 27 Feb 2023 13:09:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 789AB410B5 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by smtp4.osuosl.org (Postfix) with ESMTPS id 789AB410B5 for ; Mon, 27 Feb 2023 13:09:04 +0000 (UTC) Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pWdEx-0064oo-Pg; Mon, 27 Feb 2023 14:08:27 +0100 Date: Mon, 27 Feb 2023 14:08:27 +0100 From: Andrew Lunn To: Guenter Roeck Message-ID: References: <20230211074113.2782508-1-o.rempel@pengutronix.de> <20230211074113.2782508-7-o.rempel@pengutronix.de> <20230224035553.GA1089605@roeck-us.net> <20230224041604.GA1353778@roeck-us.net> <20230224045340.GN19238@pengutronix.de> <363517fc-d16e-5bcd-763d-fc0e32c2301a@roeck-us.net> <20230224165213.GO19238@pengutronix.de> <20230224174132.GA1224969@roeck-us.net> <20230224183646.GA26307@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Original-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=S/7WtCGaQMhXLXtk7Vr0qWEeT3/0Qv7S0/Mtts2Gzn0=; b=kDGxtBGgY7u9qf1RnK+vtQTBir uorUoWl/XnfkFfXHPt0L2r6hu/z+jQQ/fqlrWMeCRWQXBUZu6pS9Pw4t8ky1lPKSy/b0AxG1bcUSx Yocm97Qfq2bNDlKufQfsKscqyVzrcLX7a4tRwsLnw/mkEMyCIuj6WU2We/SvJAfn6wgE=; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=kDGxtBGg Subject: Re: [Intel-wired-lan] [PATCH net-next v8 6/9] net: phy: c22: migrate to genphy_c45_write_eee_adv() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Woojung Huh , Arun.Ramadoss@microchip.com, Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vivien Didelot , UNGLinuxDriver@microchip.com, Oleksij Rempel , Eric Dumazet , Vladimir Oltean , Wei Fang , kernel@pengutronix.de, Jakub Kicinski , intel-wired-lan@lists.osuosl.org, Paolo Abeni , "David S. Miller" , Heiner Kallweit Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" > > diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c > > index f595acd0a895..67dac9f0e71d 100644 > > --- a/drivers/net/phy/phy-c45.c > > +++ b/drivers/net/phy/phy-c45.c > > @@ -799,6 +799,7 @@ static int genphy_c45_read_eee_cap1(struct phy_device *phydev) > > * (Register 3.20) > > */ > > val = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE); > > + printk("MDIO_PCS_EEE_ABLE = 0x%04x", val); > > if (val < 0) > > return val; > > > > For cubieboard: > > MDIO_PCS_EEE_ABLE = 0x0000 > > qemu reports attempts to access unsupported registers. MDIO is a serial bus with two lines, clock driven by the bus master and data. There is a pull up on the data line, so if the device does not respond to a read request, you get 0xffff. That value is all i've ever seen a real PHY do when asked to read a register which does not exist. So i would say QEMU could be better emulate this. The code actually looks for the value 0xffff and then decides that EEE is not supporting in the PHY. The value of 0x0 is probably being interpreted as meaning EEE is supported, but none of the link modes, 10Mbps, 100Mbps etc support EEE. I would say it is then legitimate to read/write other EEE registers, so long as those writes take into account that no link modes are actually supported. Reading the other messages in this thread, a bug has been found in the patches. But i would also say QEMU could do better. Andrew _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan