Linux support of ethtool ETHTOOL_PHYS_ID in fsl_dpa (t4160)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux support of ethtool ETHTOOL_PHYS_ID in fsl_dpa (t4160)

3,244 Views
dennislipschins
Contributor I

Hello,

in my device I must switch on the Ethernet LED's of the network phy from user space.

In other devices I use the SIOCGMIIREG and SIOCSMIIREG to write to the mdio registers direct.

But the SIOCGMIIREG and SIOCSMIIREG is not supported any more:

root@myimg-64b:/proc/net# mii-tool eth5

SIOCGMIIPHY on 'eth5' failed: Invalid argument

So I tried to use ethtool:

root@myimg-64b:/proc/net# ethtool -p eth5 2

Cannot identify NIC: Operation not supported

The problem is that set_phys_id is not implemented in driveres/net/ethernet/freescale/dpa/dpaa_ethtool.c

I am using the Freescale Linux SDK 1.8

Hope someone has a idea.

Dennis

Labels (1)
2 Replies

1,652 Views
dennislipschins
Contributor I

As simple workaround I added following lines of code to the end of function dpa_ioctl in dpaa_eth_common.c

  if( cmd >= SIOCGMIIPHY && cmd <= SIOCSMIIREG) {

  struct dpa_priv_s *priv = netdev_priv(dev);

    if( priv && priv->mac_dev && priv->mac_dev->phy_dev ) {

      return phy_mii_ioctl(priv->mac_dev->phy_dev, rq, cmd);

    } else {

      netdev_warn(dev, "No phy device\n");

      ret = -ENODEV;

    }

  }

1,652 Views
JoaoMano
Contributor II

I have used this patch over Freescale Linux SDK 1.9, I see that this is not present at SDK 2.0...

To NXP:

Is there any plans to integrate this? If yes can you refer patch on your git repository.

Thanks Dennis and NXP, rgds,

Joao.

0 Kudos