Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp476710ybm; Thu, 28 May 2020 07:37:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC2fyrRNspqvoqr384HhlYQPrYl8Gqgn7Dzo+MQlXKFNaDefwMxyctem/lGpgcwWicq0BR X-Received: by 2002:aa7:df05:: with SMTP id c5mr3439262edy.48.1590676641023; Thu, 28 May 2020 07:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590676641; cv=none; d=google.com; s=arc-20160816; b=rNf7KoU/HszbcEdhNxtjx0c5S3KizdnGlNp17kOlpQ7BIuKE0l+sw+B3JmyTiwF+Vk 0JnkEGMv0QWCh1y5oM7/9KPeCSkMFqr+GiJv+BmGbqdpG8lncRHo6Nl2494Ri9m2opVr 62jTVITIKMO0Cdbi5kETz0nMADZFBHfbuIhk4+z/MxtHgKZlLmpdhzKQ4QqpGkUaMoSV mpW0L+m46G5b++5HmdHPpbmDF9x4G3ZrMu34hCWnj1dtxL1czSchBvR/l1SkS0riVRjs /yMivnlvUDva7xbAGYD8+I/RfI9mRJIexNUNxuB7sddZ6qiUQmehwjWb26nEomSOlqA6 1jMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=ykdvLFflzyAEU7pGMlVYcD3O+qVXRuC9sMiX8d47enQ=; b=StXzDskj/lmlgae774fyXn8RPDjm9v7DcQpnKaILhH8XxoCMdakjZuIZyoeN3duUzH 4LMS4pHHiZYLkdJOWsBhA/mqGPvT2Cbbasl/PTls3d1nMahHbutQQLwmk85Z0XbwP6Gn r/sCIdNBvPOsO0pBi71/VNabunfe0IGXdxmLhUtgVsnmrkcfbArnxOSmd5RZMB3zWFUT 8GK0FM0cEUVpuagM0RDsqRsf3iHfOnzTBnHb3RJotySGv12XDHeo4rHxE4RwHDAh3fW8 sP6Jiq5/Zbd6WSPNTgUQOGsEnZ8yF2D5sBb5CUbSVdy0TwJo4kONU57SBrAxcayso+gf ugig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si3550114edx.80.2020.05.28.07.36.57; Thu, 28 May 2020 07:37:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391225AbgE1Odl convert rfc822-to-8bit (ORCPT + 99 others); Thu, 28 May 2020 10:33:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:60110 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391207AbgE1Odk (ORCPT ); Thu, 28 May 2020 10:33:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 18420AD09; Thu, 28 May 2020 14:33:37 +0000 (UTC) Date: Thu, 28 May 2020 16:33:35 +0200 From: Thomas Bogendoerfer To: Russell King - ARM Linux admin Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: mvpp2: Enable autoneg bypass for 1000BaseX/2500BaseX ports Message-Id: <20200528163335.8f730b5a3ddc8cd9beab367f@suse.de> In-Reply-To: <20200528135608.GU1551@shell.armlinux.org.uk> References: <20200528121121.125189-1-tbogendoerfer@suse.de> <20200528130738.GT1551@shell.armlinux.org.uk> <20200528151733.f1bc2fcdcb312b19b2919be9@suse.de> <20200528135608.GU1551@shell.armlinux.org.uk> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 May 2020 14:56:08 +0100 Russell King - ARM Linux admin wrote: > On Thu, May 28, 2020 at 03:17:33PM +0200, Thomas Bogendoerfer wrote: > > On Thu, 28 May 2020 14:07:38 +0100 > > Russell King - ARM Linux admin wrote: > > > > > On Thu, May 28, 2020 at 02:11:21PM +0200, Thomas Bogendoerfer wrote: > > > > Commit d14e078f23cc ("net: marvell: mvpp2: only reprogram what is necessary > > > > on mac_config") disabled auto negotiation bypass completely, which breaks > > > > platforms enabling bypass via firmware (not the best option, but it worked). > > > > Since 1000BaseX/2500BaseX ports neither negotiate speed nor duplex mode > > > > we could enable auto negotiation bypass to get back information about link > > > > state. > > > > > > Thanks, but your commit is missing some useful information. > > > > > > Which platforms have broken? > > > > it's an Ambedded MARS-400 > > > > > Can you describe the situation where you require this bit to be set? > > > > as I have no exact design details I'm just talking about what I can see > > on that platform. It looks like the switch connecting the internal nodes > > doesn't run autoneg on the internal links. So the link to the internal > > nodes will never come up. These links are running 2500BaseX so speed/duplex > > is clean and by enabling bypass I'll get a proper link state, too. > > > > > We should not be enabling bypass mode as a matter of course, it exists > > > to work around broken setups which do not send the control word. > > > > if you call it a broken setup I'm fine, but this doesn't solve the problem, > > which exists now. What would be your solution ? > > What I was after was additional information about the problem, so > that we can start thinking about how to deal with the AN bypass bit > in a sensible way. > > How is the connection between the switch and network interface > described? I don't think I see a .dts file in mainline for this > platform. below is the dts part for the two network interfaces. The switch to the outside has two ports, which correlate to the two internal ports. And the switch propagates the link state of the external ports to the internal ports. Thomas. &cp0_eth1 { status = "okay"; phy-mode = "2500base-x"; mac-address = [00 00 00 00 00 01]; interrupts = <41 IRQ_TYPE_LEVEL_HIGH>, <45 IRQ_TYPE_LEVEL_HIGH>, <49 IRQ_TYPE_LEVEL_HIGH>, <53 IRQ_TYPE_LEVEL_HIGH>, <57 IRQ_TYPE_LEVEL_HIGH>, <61 IRQ_TYPE_LEVEL_HIGH>, <65 IRQ_TYPE_LEVEL_HIGH>, <69 IRQ_TYPE_LEVEL_HIGH>, <73 IRQ_TYPE_LEVEL_HIGH>, <127 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4", "hif5", "hif6", "hif7", "hif8", "link"; port-id = <2>; gop-port-id = <3>; managed = "in-band-status"; }; &cp0_eth2 { status = "okay"; phy-mode = "2500base-x"; mac-address = [00 00 00 00 00 02]; interrupts = <40 IRQ_TYPE_LEVEL_HIGH>, <44 IRQ_TYPE_LEVEL_HIGH>, <48 IRQ_TYPE_LEVEL_HIGH>, <52 IRQ_TYPE_LEVEL_HIGH>, <56 IRQ_TYPE_LEVEL_HIGH>, <60 IRQ_TYPE_LEVEL_HIGH>, <64 IRQ_TYPE_LEVEL_HIGH>, <68 IRQ_TYPE_LEVEL_HIGH>, <72 IRQ_TYPE_LEVEL_HIGH>, <128 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4", "hif5", "hif6", "hif7", "hif8", "link"; port-id = <1>; gop-port-id = <2>; managed = "in-band-status"; }; -- SUSE Software Solutions Germany GmbH HRB 36809 (AG N?rnberg) Gesch?ftsf?hrer: Felix Imend?rffer