Re: [PATCH] net: phy: Add config option to specify external switch port to be used if switch is used as PHY

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

 



Lambrecht Jürgen <J.Lambrecht@xxxxxxxxxxx> :
[...]
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index 6c58da2..016437a 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -112,7 +112,14 @@ int mdiobus_register(struct mii_bus *bus)
>          if (bus->reset)
>                  bus->reset(bus);
> 
> +       /* The config below is always availble with CONFIG_PHYLIB. If 0, the
> +          behavior is as before without this patch (or P0 of the switch is
> +          taken because it is the first one found). */
> +#if CONFIG_SWITCH_PHY
> +       i = CONFIG_SWITCH_PHY;
> +#else
>          for (i = 0; i < PHY_MAX_ADDR; i++) {
> +#endif
>                  if ((bus->phy_mask & (1 << i)) == 0) {
>                          struct phy_device *phydev;

This config option may help your platform but it is nowhere reusable on a
slightly different one (each mii_bus behavior is changed).

Which driver(s) do you use that you can not set phy_mask directly ?

-- 
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux