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]

 



On 09/08/2011 12:13 PM, Francois Romieu wrote:
>
> 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 ?
>
The HW driver is 'FEC' for iMX Ethernet. For the PHY, just MII and PHYLIB.
I am rather new to linux, didn't knew phy_mask. Checked it now, and is 
not set in fec.c.
You mean then to patch drivers/net/fec.c in the same way (as my current 
patch) to set the phy_mask instead (via menuconfig, or in the platform 
init)?

Thanks for your reply,
Jürgen
>
>
> --
> Ueimor
>


-- 
Jürgen Lambrecht
R&D Associate
Tel: +32 (0)51 303045    Fax: +32 (0)51 310670
http://www.televic-rail.com
Televic Rail NV - Leo Bekaertlaan 1 - 8870 Izegem - Belgium
Company number 0825.539.581 - RPR Kortrijk
��.n��������+%������w��{.n�����{��w��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f



[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