From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754508AbcEPR7a (ORCPT ); Mon, 16 May 2016 13:59:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:34185 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753854AbcEPR73 (ORCPT ); Mon, 16 May 2016 13:59:29 -0400 Subject: Re: [PATCH] phy dp83867: depend on CONFIG_OF_MDIO To: Andrew Lunn References: <1463398095-123269-1-git-send-email-agraf@suse.de> <20160516124444.GB27725@lunn.ch> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, Dan Murphy From: Alexander Graf Message-ID: <6b92e909-6d2f-6ff0-8e1b-eb0c3f8c2dcd@suse.de> Date: Mon, 16 May 2016 19:59:26 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160516124444.GB27725@lunn.ch> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16.05.16 14:44, Andrew Lunn wrote: > On Mon, May 16, 2016 at 01:28:15PM +0200, Alexander Graf wrote: >> The DP83867 phy driver doesn't actually work when CONFIG_OF_MDIO isn't enabled. >> It simply passes the device tree test, but leaves all internal configuration >> initialized at 0. Then it configures the phy with those values and renders a >> previously working configuration useless. >> >> This patch makes sure that we only build the DP83867 phy code when >> CONFIG_OF_MDIO is set, to not run into that problem. > > Hi Alexander > > Looking at the code, the parameters read from device tree are needed > for RGMII mode. What about the case the PHY is used not in RGMII mode? > Could it be there are device trees which legitimately don't have these > properties since they are not needed, and are now going to get > -ENODEV? To be honest, I don't know. I only stumbled over this because we compile all those phy drivers as modules and the driver simply rendered one system I was working on unusable wrt network. Dan? Alex