Re: [PATCH v1 2/2] phylib: add support for reset-gpios

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

 



Hi.

After sleeping on this I realizrd this patch is buggy.

> @@ -147,9 +189,6 @@ int mdiobus_register(struct mii_bus *bus)
>  		return -EINVAL;
>  	}
>  
> -	if (bus->reset)
> -		bus->reset(bus);
> -
>  	list_add_tail(&bus->list, &mii_bus_list);
>  
>  	pr_info("%s: probed\n", dev_name(&bus->dev));
> @@ -157,6 +196,10 @@ int mdiobus_register(struct mii_bus *bus)
>  	if (bus->dev.device_node)
>  		of_mdiobus_register(bus, bus->dev.device_node);

Within of_mdiobus_register() we call get_phy_device() which read from
the mdio bus. So the reset needs to be performed before we call
of_mdio_register.

So a little restructuring is required since we want to perform
both bus->reset() and mdiobus_reset() before we call get_phy_device().

I will fix this in v2.

	Sam

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux