Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp361703ima; Sat, 20 Oct 2018 08:52:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV61hGMQqkd3XusktrMKFQudXP9D03XnGopVrY3pJ9EyJq5K4XkiAxtIeT/Ys95QccWj1uFRy X-Received: by 2002:a17:902:9a45:: with SMTP id x5-v6mr38149632plv.213.1540050772157; Sat, 20 Oct 2018 08:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540050772; cv=none; d=google.com; s=arc-20160816; b=spS//TEnl1ykWUNWLdge735lUdKf5Q8YG3YkZpsaeHDMQhPpfMy80DqyV8hlFuG/Bl QZSH5Kl5oSIzheRu7qgD/sxwpWzyFT0U2qYRdYg6JBabfQkS90uMN8zwckaIqkU3T+IJ eSiKXanEjNtAcYszwuIBZCP9aE2AvlWNlUdpLN8WI53uRt4pYaD7rsZsW/aNB27+SiVX nlSnvbzF2qcfsSZeO8V9wQLYxYUSpWsqIokR0owF9D/VV0qeQjC2fdphgzVtmGZShajh LHA66vXU183s5xw0O6YeH8sc/kiroIu23XVVBIhSSo60aRTOaGPMNXNYn1ZGLA8tjFmz 9rcw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=rDWf/YK3a5fNwa8sjUoNTG/STScEUW/gOMZ8cBb03QY=; b=EqtVygdyfcCx1pBop+pfPufq/VRoBk52JnhJfZJ0nzlt1HwPp1biWnWk2LxXJpFgeg cpCvxyir/W/SW8MJRJf8W0slBKcRRJeQfa0ntpQfaBRlRnkTwjCrwejDoh32hiJUkOR/ VCXed86eSjMBhlraS3MxyCFwzkzvs4fm5eyKGEfFwdPhX+cHqkM/E7uRFvKkd6KjmonU 66ARfMdnLM97owpYUkxrydyc70wDuaNvYz/PSxEglsTn5W+PWn+YdtPVXJI6vrnHJdvg b82Ax96auXtYVRVqTgOAUX1yFBP7k3AC30jHYgfLq7kJM/47Bx3q8YE+ornLqLUUYeSA 3MlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=defTfOWD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si29644445plk.368.2018.10.20.08.52.20; Sat, 20 Oct 2018 08:52:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=defTfOWD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727543AbeJUACp (ORCPT + 99 others); Sat, 20 Oct 2018 20:02:45 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46661 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727397AbeJUACp (ORCPT ); Sat, 20 Oct 2018 20:02:45 -0400 Received: by mail-wr1-f68.google.com with SMTP id i4-v6so1668559wrr.13; Sat, 20 Oct 2018 08:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rDWf/YK3a5fNwa8sjUoNTG/STScEUW/gOMZ8cBb03QY=; b=defTfOWDZTJIe6rmJ8p9JP5DpFVToFbTIfFE1sYxfNu0gKfHFdH5jFhNW9KIc65Wyo +5uAE7HiznjD4Li1zXg7TAAgjX1gOu5lhaATUgNzZlVERuArxWvYOgcX0izRkGeTT+0c CbUm7d8yKplP2mh9l0LDRwofVZguh6z++cSlPGVFo+yQxOJhsUBtTWAVh5SePfF949s3 ZXo4YB1vqUGGRoDm967y8xF6RU9FMlJuesk2A+ROolj8SknbRb/30h0LzAlP7eHs5T1Z m03t4ItB2B/s91wX3qGI7r6K+4tu2myFc/5bgepssPSEJbcS53osj/iv/h0tEmmr8e80 LWGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rDWf/YK3a5fNwa8sjUoNTG/STScEUW/gOMZ8cBb03QY=; b=jIRnL3crLYK66CB47dI93AOGDzwt9Qwp6AyYpFX0XmfHMVKVIyg+FOsfKcM3bGBmLU f/hmmB1gTkV6zOX+MyON4za5/9M/xPP/vds92VvY0mNTCTKm7NNHoIAn1dUc7uD3bzuE ajdju/YLGVceeiriqLTaxCM0V4inhGtHa/+IH5jKOgwGA7yF5phVwEsSrQS8lnkZ8BY3 VtFW5nOl/XSDRYATqvvMU5EGLPzFvVaXGDVJcBlV/z+rfgL4eYM1Awr31ICHdiUXPzmd +1me6xTgBlKxtHqiKJrtQ+WHXQA9ulcR3x8oyUdGduf7W1HSdGGhylFvHTwobNXUOEvR Ddnw== X-Gm-Message-State: ABuFfogxf8ovDSqV8gMLoNU/czNVpwUvesDBnsNA6qRN3RK8Y3Z9yGMf /zL9Eh4nrGwM/YSbGBKP6FDoX3K8+pU= X-Received: by 2002:adf:b6a0:: with SMTP id j32-v6mr35868968wre.55.1540050709683; Sat, 20 Oct 2018 08:51:49 -0700 (PDT) Received: from ?IPv6:2003:ea:8bd4:3f00:c570:5259:d176:b6d7? (p200300EA8BD43F00C5705259D176B6D7.dip0.t-ipconnect.de. [2003:ea:8bd4:3f00:c570:5259:d176:b6d7]) by smtp.googlemail.com with ESMTPSA id e196-v6sm14236198wmf.43.2018.10.20.08.51.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Oct 2018 08:51:49 -0700 (PDT) Subject: Re: [PATCH] net: ethernet: fec: Add missing SPEED_ To: Andrew Lunn Cc: Florian Fainelli , LABBE Corentin , davem@davemloft.net, fugang.duan@nxp.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <1539875100-11121-1-git-send-email-clabbe@baylibre.com> <2621cbc9-47ed-ce2a-b7ee-262f17dc138f@gmail.com> <20181018184715.GA31736@Red> <20181018191612.GB31736@Red> <5cb0731b-83c5-5ed5-d022-98f8627d1737@gmail.com> <20181018195909.GA11317@Red> <1b784f69-3ec2-feb2-81e1-9a335cf477c3@gmail.com> <20181020153922.GC1596@lunn.ch> From: Heiner Kallweit Message-ID: Date: Sat, 20 Oct 2018 17:51:42 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181020153922.GC1596@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.10.2018 17:39, Andrew Lunn wrote: >>>> I have patched by adding: >>>> phy_remove_link_mode(phy_dev, ETHTOOL_LINK_MODE_Asym_Pause_BIT); >> >> Instead of programmatically removing the feature bit it should be >> possible to do this in the PHY driver configuration. See also >> this part of phy_probe(). >> >> if (phydrv->features & (SUPPORTED_Pause | SUPPORTED_Asym_Pause)) { >> phydev->supported &= ~(SUPPORTED_Pause | SUPPORTED_Asym_Pause); >> phydev->supported |= phydrv->features & >> (SUPPORTED_Pause | SUPPORTED_Asym_Pause); >> } else { >> phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause; >> } > > Sorry for the late reply. Been on vacation. > > I need to check the datasheet, but it seems like the KSZ9021 does not > support asym pause. Using the above code is the correct way to solve > this problem. Look at the bcm63xx.c:bcm63xx_config_init() which does > this. > I dare to dispute here ;) Above code snippet from phy_probe() will (try to) set also SUPPORTED_Asym_Pause, because phydrv->features doesn't include any of the two pause flags. The statement in bcm63xx_config_init you refer to seems to be a no-op to me therefore. I'd say the correct way is to change the PHY config like this: .features = PHY_BASIC_FEATURES | SUPPORTED_Pause; It's exactly the use case the code snippet above covers. I think the bcm63xx driver would need to be changed. > I will cook up a patch. > > Andrew >