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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20F9DC282DD for ; Fri, 10 Jan 2020 14:20:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E48E42072E for ; Fri, 10 Jan 2020 14:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728048AbgAJOUm (ORCPT ); Fri, 10 Jan 2020 09:20:42 -0500 Received: from foss.arm.com ([217.140.110.172]:45250 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727859AbgAJOUm (ORCPT ); Fri, 10 Jan 2020 09:20:42 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D3CC4328; Fri, 10 Jan 2020 06:20:41 -0800 (PST) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 953CE3F534; Fri, 10 Jan 2020 06:20:40 -0800 (PST) Date: Fri, 10 Jan 2020 14:20:38 +0000 From: Andre Przywara To: Andrew Lunn Cc: "David S . Miller" , Radhey Shyam Pandey , Michal Simek , Robert Hancock , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King Subject: Re: [PATCH 07/14] net: axienet: Fix SGMII support Message-ID: <20200110142038.2ed094ba@donnerap.cambridge.arm.com> In-Reply-To: <20200110140415.GE19739@lunn.ch> References: <20200110115415.75683-1-andre.przywara@arm.com> <20200110115415.75683-8-andre.przywara@arm.com> <20200110140415.GE19739@lunn.ch> Organization: ARM X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Jan 2020 15:04:15 +0100 Andrew Lunn wrote: Hi Andrew, > On Fri, Jan 10, 2020 at 11:54:08AM +0000, Andre Przywara wrote: > > With SGMII, the MAC and the PHY can negotiate the link speed between > > themselves, without the host needing to mediate between them. > > Linux recognises this, and will call phylink's mac_config with the speed > > member set to SPEED_UNKNOWN (-1). > > Currently the axienet driver will bail out and complain about an > > unsupported link speed. > > > > Teach axienet's mac_config callback to leave the MAC's speed setting > > alone if the requested speed is SPEED_UNKNOWN. > > Hi Andre > > Is there an interrupt when SGMII signals a change in link state? If > so, you should call phylink_mac_change(). Good point. The doc describes a "Auto-Negotiation Complete" interrupt status bit, which signal that " ... auto-negotiation of the SGMII or 1000BASE-X interface has completed." But I have no clue whether that would trigger on a link status *change*. Is there a way to test this without pulling the cable? My board sits in a data centre, so is not easily accessible to me. Cheers, Andre. 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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0ACDC33CA4 for ; Fri, 10 Jan 2020 14:20:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76EA32072E for ; Fri, 10 Jan 2020 14:20:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NBz7Dneh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76EA32072E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gSb6QnSqrF6IFUkVTHzUUxsdyhPxVAnb8qY9h/qt9G0=; b=NBz7Dnehdt0FIF zoXR7+/Atgm46Jy56x+/CrpznR5imys4LqpAjlS0Nt19j/Tfm1oK0rMo0FumGUljyqLKrzOGFU9J/ lzQ1r7wkl3In+14D1fDOiKrTIiLEVCVoUAgVN+XUKL2Iq9oRFfzO38nDk8s9QmQHCN8OJr3jxIASj 0mo3UhFrNyrDMePLEFusTe0ZNeKkxGsk6MNczClnoZhikzqjEJKwpTL1bQq+FPhrlnPsyFnfxn50k FgYki3kdKV5k+3wiPw71zVD3To/QycpbGT6RuPxCVh1uDugk8rv1+kKlou49q+T6gjF3ySTcMxLAI r2R+yB0g6/LIC31SQcvA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipv9Z-0003wY-8z; Fri, 10 Jan 2020 14:20:45 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipv9W-0003w9-Cn for linux-arm-kernel@lists.infradead.org; Fri, 10 Jan 2020 14:20:43 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D3CC4328; Fri, 10 Jan 2020 06:20:41 -0800 (PST) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 953CE3F534; Fri, 10 Jan 2020 06:20:40 -0800 (PST) Date: Fri, 10 Jan 2020 14:20:38 +0000 From: Andre Przywara To: Andrew Lunn Subject: Re: [PATCH 07/14] net: axienet: Fix SGMII support Message-ID: <20200110142038.2ed094ba@donnerap.cambridge.arm.com> In-Reply-To: <20200110140415.GE19739@lunn.ch> References: <20200110115415.75683-1-andre.przywara@arm.com> <20200110115415.75683-8-andre.przywara@arm.com> <20200110140415.GE19739@lunn.ch> Organization: ARM X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200110_062042_479263_0D5317A5 X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Radhey Shyam Pandey , Michal Simek , linux-kernel@vger.kernel.org, Robert Hancock , Russell King , "David S . Miller" , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 10 Jan 2020 15:04:15 +0100 Andrew Lunn wrote: Hi Andrew, > On Fri, Jan 10, 2020 at 11:54:08AM +0000, Andre Przywara wrote: > > With SGMII, the MAC and the PHY can negotiate the link speed between > > themselves, without the host needing to mediate between them. > > Linux recognises this, and will call phylink's mac_config with the speed > > member set to SPEED_UNKNOWN (-1). > > Currently the axienet driver will bail out and complain about an > > unsupported link speed. > > > > Teach axienet's mac_config callback to leave the MAC's speed setting > > alone if the requested speed is SPEED_UNKNOWN. > > Hi Andre > > Is there an interrupt when SGMII signals a change in link state? If > so, you should call phylink_mac_change(). Good point. The doc describes a "Auto-Negotiation Complete" interrupt status bit, which signal that " ... auto-negotiation of the SGMII or 1000BASE-X interface has completed." But I have no clue whether that would trigger on a link status *change*. Is there a way to test this without pulling the cable? My board sits in a data centre, so is not easily accessible to me. Cheers, Andre. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel