lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250414143306.036c1e2e@kmaincent-XPS-13-7390>
Date: Mon, 14 Apr 2025 14:33:06 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Russell King <rmk+kernel@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>, Richard Cochran
 <richardcochran@...il.com>
Subject: Re: [PATCH RFC net-next 3/5] net: phy: add Marvell PHY PTP support

On Fri, 11 Apr 2025 22:26:42 +0100
Russell King <rmk+kernel@...linux.org.uk> wrote:

> Add PTP basic support for Marvell 88E151x single port PHYs.  These
> PHYs support timestamping the egress and ingress of packets, but does
> not support any packet modification, nor do we support any filtering
> beyond selecting packets that the hardware recognises as PTP/802.1AS.
> 
> The PHYs support hardware pins for providing an external clock for the
> TAI counter, and a separate pin that can be used for event capture or
> generation of a trigger (either a pulse or periodic). Only event
> capture is supported.
> 
> We currently use a delayed work to poll for the timestamps which is
> far from ideal, but we also provide a function that can be called from
> an interrupt handler - which would be good to tie into the main Marvell
> PHY driver.
> 
> The driver takes inspiration from the Marvell 88E6xxx DSA and DP83640
> drivers. The hardware is very similar to the implementation found in
> the 88E6xxx DSA driver, but the access methods are very different,
> although it may be possible to create a library that both can use
> along with accessor functions.

I wanted to test it, but this patch does not build.

drivers/net/phy/marvell_ptp.c:269:33: error: passing argument 4 of ‘marvell_tai_probe’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  269 |                                 "Marvell PHY", dev);
      |                                 ^~~~~~~~~~~~~
      |                                 |
      |                                 char *
In file included from drivers/net/phy/marvell_ptp.c:9:
./include/linux/marvell_ptp.h:81:44: note: expected ‘struct ptp_pin_desc *’ but argument is of type ‘char *’
   81 |                       struct ptp_pin_desc *pin_config, int n_pins,
      |                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/net/phy/marvell_ptp.c:269:48: warning: passing argument 5 of ‘marvell_tai_probe’ makes integer from pointer without a cast [-Wint-conversion]
  269 |                                 "Marvell PHY", dev);
      |                                                ^~~
      |                                                |
      |                                                struct device *
In file included from drivers/net/phy/marvell_ptp.c:9:
./include/linux/marvell_ptp.h:81:60: note: expected ‘int’ but argument is of type ‘struct device *’
   81 |                       struct ptp_pin_desc *pin_config, int n_pins,
      |                                                        ~~~~^~~~~~
drivers/net/phy/marvell_ptp.c:267:15: error: too few arguments to function ‘marvell_tai_probe’
  267 |         err = marvell_tai_probe(&tai, &marvell_phy_ptp_ops,
      |               ^~~~~~~~~~~~~~~~~
In file included from drivers/net/phy/marvell_ptp.c:9:
./include/linux/marvell_ptp.h:78:5: note: declared here
   78 | int marvell_tai_probe(struct marvell_tai **taip,
      |     ^~~~~~~~~~~~~~~~~

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ