RE: [EXT] Re: [PATCH v1] ethtool: provide UAPI for PHY master/slave configuration.

From: Christian Herber
Date: Fri Apr 17 2020 - 02:48:52 EST


Hi Oleksij,

>If we will follow strictly to the IEEE 802.3 spec, it should be named:
>
>#define PORT_MODE_UNKNOWN 0x00
>/* this two options will not force some specific mode, only influence
> * the chance to get it */
>#define PORT_TYPE_MULTI_PORT 0x01
>#define PORT_TYPE_SINGLE_PORT 0x02
>/* this two options will force master or slave mode */
>#define PORT_MODE_MASTER 0x03
>#define PORT_MODE_SLAVE 0x04
>
>Please tell, if you have better ideas.

This would be quite in the spirit of 802.3. My assumption is multiport devices preferably operate as master to reduce the amount of clock domain crossing on the multiport device. Of course, it is a bit use case driven and you could configure a preference for master mode also on a single port device. For such use cases the name is confusing. Here,

>#define PORT_MODE_MASTER_PREFERRED 0x01
>#define PORT_MODE_SLAVE_PREFERRED 0x02

might be better.

Christian