From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH net] net: dsa: Do not override PHY interface if already configured Date: Wed, 12 Aug 2015 14:34:12 -0700 Message-ID: <55CBBBD4.1080803@gmail.com> References: <1439063937-16316-1-git-send-email-f.fainelli@gmail.com> <20150812.143035.511637354777280164.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, andrew@lunn.ch, linux@roeck-us.net To: David Miller Return-path: Received: from mail-pa0-f53.google.com ([209.85.220.53]:34790 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752019AbbHLVgf (ORCPT ); Wed, 12 Aug 2015 17:36:35 -0400 Received: by pawu10 with SMTP id u10so22562329paw.1 for ; Wed, 12 Aug 2015 14:36:35 -0700 (PDT) In-Reply-To: <20150812.143035.511637354777280164.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On 12/08/15 14:30, David Miller wrote: > From: Florian Fainelli > Date: Sat, 8 Aug 2015 12:58:57 -0700 > >> In case we need to divert reads/writes using the slave MII bus, we may have >> already fetched a valid PHY interface property from Device Tree, and that >> mode is used by the PHY driver to make configuration decisions. >> >> If we could not fetch the "phy-mode" property, we will assign p->phy_interface >> to PHY_INTERFACE_MODE_NA, such that we can actually check for that condition as >> to whether or not we should override the interface value. >> >> Fixes: 19334920eaf7 ("net: dsa: Set valid phy interface type") >> Signed-off-by: Florian Fainelli >> --- >> Hi Guenter, >> >> Could you verify this does not break what you were trying to fix with your change? >> I am fairly confident this will not because for "PHYs" built-into the switch port >> we will not be able to fetch a "phy-mode" property from DT, so we will use >> PHY_INTERFACE_MODE_NA, but here, we will re-assign them to PHY_INTERFACE_MODE_GMII >> as before. > > I was trying to wait for Guenter's testing before applying this, but it's been some > time already and it makes no sense to wait any longer. I should be able to verify this myself in the future since I just setup a Marvell/DSA switch device here for testing. > > Applied to 'net', thanks Florian. Could you also schedule this for -stable, at least 4.1 is affected by this change, thank you! -- Florian