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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23372C433F5 for ; Thu, 2 Dec 2021 13:04:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346633AbhLBNIR (ORCPT ); Thu, 2 Dec 2021 08:08:17 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:35678 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241818AbhLBNIP (ORCPT ); Thu, 2 Dec 2021 08:08:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=BVqw7MpQPVSfrDQsvcV3mEpYc9ny+418FpeFJbGTXoI=; b=Nqc00gKYLPUaP9IJ6SxkNolL0B C5yF+x7K+TfcW8sSmNtmJsnM2HBv/20tPDxVEbWz+A7MDHU95gJ7qGEmiHbXFHCdN/zT8qV6vhqIN lPYXoKBYpO/DQTCheykANxaISAZNdILEvEh+bmb8lK8g+I1FB/vxfd61p1HOjkg4OKpA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1msllV-00FKI4-Fu; Thu, 02 Dec 2021 14:04:45 +0100 Date: Thu, 2 Dec 2021 14:04:45 +0100 From: Andrew Lunn To: Wells Lu =?utf-8?B?5ZGC6Iqz6aiw?= Cc: Wells Lu , "davem@davemloft.net" , "kuba@kernel.org" , "robh+dt@kernel.org" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "p.zabel@pengutronix.de" , Vincent Shih =?utf-8?B?5pa96YyV6bS7?= Subject: Re: [PATCH net-next v3 2/2] net: ethernet: Add driver for Sunplus SP7021 Message-ID: References: <1638266572-5831-1-git-send-email-wellslutw@gmail.com> <1638266572-5831-3-git-send-email-wellslutw@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org > I printed out the value of 'supported' and 'advertising'. > 'supported' shows PHY device supports Pause and AsymPause (0x62cf). > But 'advertising' shows PHY device does not support Pause or AsymPause (0x02cf). > Is this correct? > > How to let link partner know local node supports > Pause & AsymPause (flow control)? > 'supported' indicates that the PHY can do. It has the ability to advertise pause. But we don't automatically copy those bits into 'advertising' because we don't know if the MAC actually supports pause/asym pause. The MAC driver needs to call phy_support_sym_pause() or phy_support_asym_pause() to let phylib know what it can do. phylib will then add the appropriate bits to 'advertising'. > Will mii_read() and mii_write() be called in interrupt context? No. Only thread context, because it uses a mutex to prevent multiple accesses at the same time. Andrew