Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933455AbcKINZH (ORCPT ); Wed, 9 Nov 2016 08:25:07 -0500 Received: from smtpoutz26.laposte.net ([194.117.213.101]:43063 "EHLO smtp.laposte.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933366AbcKINZD (ORCPT ); Wed, 9 Nov 2016 08:25:03 -0500 To: afleming@freescale.com, jgarzik@pobox.com, =?UTF-8?B?TcOlbnMgUnVsbGc=?= =?UTF-8?Q?=c3=a5rd?= , Florian Fainelli Cc: netdev , LKML , "David S. Miller" From: Sebastian Frias Subject: Is Documentation/networking/phy.txt still up-to-date? Message-ID: <582323A8.20706@laposte.net> Date: Wed, 9 Nov 2016 14:24:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-VR-SrcIP: 92.154.11.170 X-VR-FullState: 0 X-VR-Score: -100 X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrfeelfedrtddtgddvudcutefuodetggdotefrodftvfcurfhrohhf X-VR-Cause-2: ihhlvgemucfntefrqffuvffgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhs X-VR-Cause-3: ucdlqddutddtmdenucfjughrpefvhffukffffgggtgfgsehtjegrtddtfeejnecuhfhrohhmpefuvggs X-VR-Cause-4: rghsthhirghnucfhrhhirghsuceoshhfkeegsehlrghpohhsthgvrdhnvghtqeenucfkphepledvrddu X-VR-Cause-5: heegrdduuddrudejtdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopegludejvddr X-VR-Cause-6: vdejrddtrddvudegngdpihhnvghtpeelvddrudehgedruddurddujedtpdhmrghilhhfrhhomhepshhf X-VR-Cause-7: keegsehlrghpohhsthgvrdhnvghtpdhrtghpthhtoheprghflhgvmhhinhhgsehfrhgvvghstggrlhgv X-VR-Cause-8: rdgtohhm X-VR-AvState: No X-VR-State: 0 X-VR-State: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1012 Lines: 30 Hi, Documentation/networking/phy.txt discusses phy_connect and states that: "... interface is a u32 which specifies the connection type used between the controller and the PHY. Examples are GMII, MII, RGMII, and SGMII. For a full list, see include/linux/phy.h Now just make sure that phydev->supported and phydev->advertising have any values pruned from them which don't make sense for your controller (a 10/100 controller may be connected to a gigabit capable PHY, so you would need to mask off SUPPORTED_1000baseT*). See include/linux/ethtool.h for definitions for these bitfields. Note that you should not SET any bits, or the PHY may get put into an unsupported state. ..." However, 'drivers/net/ethernet/aurora/nb8800.c' for example, does SETs some bits (in function 'nb8800_pause_adv'). I checked 'drivers/net/ethernet/broadcom/genet/bcmmii.c' and that one CLEARs bits (as per the documentation). Does anybody knows what is the correct/recommended approach? Best regards, Sebastian