lkml.org 
[lkml]   [2021]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 net-next 4/9] net: dsa: microchip: add DSA support for microchip lan937x
> What do you think on the following code?
>
> struct dsa_port *dp = dsa_to_port(dev->ds, port);
> struct phy_device *phy_dev = dp->slave->phydev;
> .
> .
> .
>
> if (!phydev || phy_driver_is_genphy(phydev)) {
> /*Add RGMII internal delay*/
> }


phy_driver_is_genphy(phydev) is probably a bad idea. If you get a
delay depends on if they driver is available? I would prefer you
assume the PHY can do delays. So you only need to consider when the
MII port is used for connecting to the CPU. So make use of
dsa_is_cpu_port().

Andrew

\
 
 \ /
  Last update: 2021-04-26 14:36    [W:0.565 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site