Re: [PATCH net-next v1 3/5] net: dsa: microchip: Refactor MDIO handling for side MDIO access

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

 



>  static int ksz_mdio_register(struct ksz_device *dev)
>  {
> +	struct device_node *parent_bus_node;
> +	struct mii_bus *parent_bus = NULL;
>  	struct dsa_switch *ds = dev->ds;
>  	struct device_node *mdio_np;
>  	struct mii_bus *bus;
> -	int ret;
> +	struct dsa_port *dp;
> +	int ret, i;
>  
>  	mdio_np = of_get_child_by_name(dev->dev->of_node, "mdio");
>  	if (!mdio_np)
>  		return 0;
>  
> +	parent_bus_node = of_parse_phandle(mdio_np, "mdio-parent-bus", 0);
> +	if (parent_bus_node && !dev->info->phy_side_mdio_supported) {
> +		dev_warn(dev->dev, "Side MDIO bus is not supported for this HW, ignoring 'mdio-parent-bus' property.\n");

I think dev_err() and return -EINVAL. It is an error in the DT.


    Andrew

---
pw-bot: cr




[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