Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935126AbbGHQzt (ORCPT ); Wed, 8 Jul 2015 12:55:49 -0400 Received: from smtp44.i.mail.ru ([94.100.177.104]:36712 "EHLO smtp44.i.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932848AbbGHQzo (ORCPT ); Wed, 8 Jul 2015 12:55:44 -0400 Subject: Re: [5/6] mvneta: implement SGMII-based in-band link state signaling To: Sebastien Rannou References: <55155D9D.6070800@list.ru> Cc: netdev@vger.kernel.org, Linux kernel , Stas Sergeev , Thomas Petazzoni From: Stas Sergeev Message-ID: <559D5520.3030700@list.ru> Date: Wed, 8 Jul 2015 19:51:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam: Not detected X-Mras: Ok Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2045 Lines: 51 08.07.2015 19:30, Sebastien Rannou пишет: > Hi Stas, > > On Fri, 27 Mar 2015, Stas Sergeev wrote: > >> When MDIO bus is unavailable (common setup for SGMII), the in-band >> signaling must be used to correctly track link state. >> This patch enables the in-band status delivery and interrupts for >> links state changes, namely: >> - link up/down >> - link speed >> - duplex full/half >> Upon reciving the appropriate interrupt, the driver updates the >> fixed_phy status to match the received status. > I'm seeing a regression with this patch when trying to netboot an Armada > XP board (by reverting this commit it is fine), the network > link stays down: > > [ 9.274492] mvneta d0070000.ethernet eth0: Link is Down > > (I've added an extra call to phy_print_status() in mvneta_adjust_link() to > get this trace). > > I've tried to dig a bit in the code, and it seems that the status.link flag > never gets set in mvneta_fixed_link_update(). If I try to force the > use_inband_status to 0 in mvneta_probe(), it boots properly so I'm not > sure that I need the in-band status/delivery in my case ; I'm using a > custom DTB with a fixed-link: > > eth0: ethernet@70000 { > status = "okay"; > fixed-link = <1 1 1000 0 0>; > phy-mode = "sgmii"; > }; > > Could there be something missing in the condition that initializes > pp->use_inband_status? Hi, use_inband_status is set when fixed-link is used, which is exactly your case. But it seems something on the other end is not generating the inband status. What is there? A phy chip, or something else? Perhaps some DT property should be added to explicitly enable the use of the inband status... I just thought in sgmii protocol it is a mandatory. I'll try to come up with the patch tomorrow that adds such property. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/