lkml.org 
[lkml]   [2020]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] add virtual PHY for PHY-less devices
From
Date
(please do not top-post)

On 9/17/2020 5:17 PM, Sergej Bauer wrote:
> Hi Andrew
>
> To tell the truth, I thought that fixed_phy is only for devices with a Device
> Trees and I never met DTS on x86 machines...

fixed_phy existed long before Device Tree was popular and you can
register a fixed PHY device from within your Ethernet MAC driver, see
drivers/net/dsa/dsa_loop.c for an example.

>
> So it looks like there realy no any significant advantage _except_ of
> ability to use ethtool and ioctl to set speed and rx-all/fcs flags without
> removing module. That was most wanted request from HW designers as they are
> wanted to change registers of virtual PHY on-the-fly with ethtool either custom
> tool (using SIOCSMIIREG ioctl) for controling PHY registers.

NETIF_F_RXALL and NETIF_F_RXFCS are feature flags that are applicable to
the Ethernet MAC, so I am not really sure where the virtual PHY, or the
fixed PHY plays a role in those?

The key thing with the fixed PHY is that it is an emulation device,
therefore from the Ethernet MAC perspective you can tell
(phy_is_pseudo_fixed_link) whether this is a real PHY device on a MDIO
bus or the emulated fixed PHY but there is really no need for you to
make that difference.

>
> p.s. And that's my bad, the original driver was developed year ago (for
> linux-5.2.15),
> but I had no time before this moment.
>
>
> p.p.s. sorry for long time to answer but it's far behind the midnight in my
> region.
>

--
Florian

\
 
 \ /
  Last update: 2020-09-18 03:32    [W:0.043 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site