[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fded2fc3a1344d0882ae2f186257911@sphcmbx02.sunplus.com.tw>
Date: Thu, 2 Dec 2021 18:46:40 +0000
From: Wells Lu 呂芳騰 <wells.lu@...plus.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Wells Lu <wellslutw@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
Vincent Shih 施錕鴻 <vincent.shih@...plus.com>
Subject: RE: [PATCH net-next v3 2/2] net: ethernet: Add driver for Sunplus
SP7021
Hi Andrew,
Thank you for explanation.
I'll add phy_support_asym_pause() after PHY connected next patch.
I found some drivers call phy_set_max_speed() to set PHY speed to
100M after PHY connected. Is that necessary? From 'supported', PHY
supports 10M/100M already.
I also found some drivers call phy_start_aneg() after PHY started.
Is that necessary? From status register of PHY, 'auto-nego' has
completed.
Best regards,
Wells
> > 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
Powered by blists - more mailing lists