linux-qoriq LSDK 1903 ethtool error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

linux-qoriq LSDK 1903 ethtool error

1,809件の閲覧回数
wangmy
Contributor I

 

I tried build kernel(lsdk 1903) for ls1046a, and got error message as following when I tested command ethtool.

-------------------------------------------------

 

root # ethtool eth1

Settings for eth1:

Cannot get device settings: Success

        Supports Wake-on: d

        Wake-on: d

        Current message level: 0xffffffff (-1)

                               drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol 0xffff8000

        Link detected: yes

 

-------------------------------------------------

 

I made a patch 0001-To-fix-ethtool-error-of-getting-device-settings.patch to fix this bug.

Please refer to the attachment for details.

0 件の賞賛
返信
2 返答(返信)

1,695件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

I have verified pre_built Linux Kernel Image 4.14 and 4.19 provided in LSDK 1903, there is no problem with ethtool, please refer to the attached log. So no need to modify Linux Kernel source code.

If your problem remains, please send your Kernel configuration file(.config) to me to do more investigation.

Thanks,

Yiping

0 件の賞賛
返信

1,695件の閲覧回数
wangmy
Contributor I

 After testing, this problem does not happen every time, because the return value is a random value.
Please see the code below for details.

drivers/net/ethernet/freescale/sdk_dppa/dpaa_ethtool.c :

static int __cold dpa_get_ksettings(struct net_device *net_dev,

                struct ethtool_link_ksettings *cmd)

{

        int                      _errno;

        struct dpa_priv_s       *priv;

        priv = netdev_priv(net_dev);

 

        if (priv->mac_dev == NULL) {

                netdev_info(net_dev, "This is a MAC-less interface\n");

                return -ENODEV;

        }

        if (unlikely(priv->mac_dev->phy_dev == NULL)) {

                netdev_dbg(net_dev, "phy device not initialized\n");

                return 0;

        }

 

        phy_ethtool_ksettings_get(priv->mac_dev->phy_dev, cmd);

 

        return _errno;

}

 

With the above sources, the variable _errno with no value is returned.
This is a random value depending on the status of the stack. Therefore, the command can not be executed correctly.After testing, this problem does not happen every time, because the return value is a random value.
Please see the code below for details.

0 件の賞賛
返信