Hi all,

I just wanted to put a quick note out for anyone who wants to use LinuxPTP on a 
Raspberry Pi 3B+ and can't get it to work.

I found an old message from this list by Naoki Itokawa about making LinuxPTP 
work on a Pi 3, but this doesn't work on a 3B+ as it uses a new Ethernet 
driver, lan78xx.

Naoki's post is in the archive here:
https://sourceforge.net/p/linuxptp/mailman/message/35565972/

I have confirmed that the same technique used by Naoki works with the new 
driver (drivers/net/usb/lan78xx.c), so add ".get_ts_info = 
ethtool_op_get_ts_info," to the end of the lan78xx_ethtool_ops structure making 
it look like this:

static const struct ethtool_ops lan78xx_ethtool_ops = {
        .get_link       = lan78xx_get_link,
        .nway_reset     = phy_ethtool_nway_reset,
        .get_drvinfo    = lan78xx_get_drvinfo,
        .get_msglevel   = lan78xx_get_msglevel,
        .set_msglevel   = lan78xx_set_msglevel,
        .get_eeprom_len = lan78xx_ethtool_get_eeprom_len,
        .get_eeprom     = lan78xx_ethtool_get_eeprom,
        .set_eeprom     = lan78xx_ethtool_set_eeprom,
        .get_ethtool_stats = lan78xx_get_stats,
        .get_sset_count = lan78xx_get_sset_count,
        .get_strings    = lan78xx_get_strings,
        .get_wol        = lan78xx_get_wol,
        .set_wol        = lan78xx_set_wol,
        .get_eee        = lan78xx_get_eee,
        .set_eee        = lan78xx_set_eee,
        .get_pauseparam = lan78xx_get_pause,
        .set_pauseparam = lan78xx_set_pause,
        .get_link_ksettings = lan78xx_get_link_ksettings,
        .set_link_ksettings = lan78xx_set_link_ksettings,
        .get_regs_len   = lan78xx_get_regs_len,
        .get_regs       = lan78xx_get_regs,
        .get_ts_info    = ethtool_op_get_ts_info,
};

And recompiling will allow LinuxPTP to start in software mode.

Obviously don't expect blinding performance with the Raspberry Pi 3B+ - 
realistically synchronizing to within micro seconds is the best achievable.

Thanks to all,

Gethyn Longworth, MEng CEng MIET
The data contained in, or attached to, this e-mail, may contain confidential 
information. If you have received it in error you should notify the sender 
immediately by reply e-mail, delete the message from your system and contact 
+44 (0) 3301235850 (Security Operations Centre) if you need assistance. Please 
do not copy it for any purpose, or disclose its contents to any other person.

An e-mail response to this address may be subject to interception or monitoring 
for operational reasons or for lawful business practices.

(c) 2019 Rolls-Royce plc

Registered office: 62 Buckingham Gate, London SW1E 6AT Company number: 1003142. 
Registered in England.
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to