Re: [PATCH net-next v3 2/2] net: phy: tja11xx: add support for master-slave configuration

From: Oleksij Rempel
Date: Thu Apr 30 2020 - 01:03:53 EST


On Wed, Apr 29, 2020 at 08:20:53PM +0200, Andrew Lunn wrote:
> > +static int tja11xx_config_aneg(struct phy_device *phydev)
> > +{
> > + u16 ctl = 0;
> > + int ret;
> > +
> > + switch (phydev->master_slave_set) {
> > + case PORT_MODE_CFG_MASTER_FORCE:
> > + case PORT_MODE_CFG_MASTER_PREFERRED:
> > + ctl |= MII_CFG1_MASTER_SLAVE;
> > + break;
> > + case PORT_MODE_CFG_SLAVE_FORCE:
> > + case PORT_MODE_CFG_SLAVE_PREFERRED:
> > + break;
> > + case PORT_MODE_CFG_UNKNOWN:
> > + return 0;
> > + default:
> > + phydev_warn(phydev, "Unsupported Master/Slave mode\n");
> > + return -ENOTSUPP;
> > + }
>
> Does the hardware actually support PORT_MODE_CFG_SLAVE_PREFERRED and
> PORT_MODE_CFG_MASTER_PREFERRED? I thought that required autoneg, which
> this PHY does not support? So i would of expected these two values to
> return ENOTSUPP?

I do not have strong opinion here. Will change it.

Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature