Re: [PATCH v2 net-next 4/9] net: dsa: microchip: add DSA support for microchip lan937x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux