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]
Date:   Tue, 9 Aug 2022 07:36:55 +0000
From:   Csókás Bence <Csokas.Bence@...lan.hu>
To:     Richard Cochran <richardcochran@...il.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] fec: Allow changing the PPS channel

Hi!

>On Mon, Aug 08, 2022 at 03:15:57PM +0200, Csókás Bence wrote:
>> +static ssize_t pps_ch_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count)
>> +{
>> +     struct device *dev = container_of(kobj, struct device, kobj);
>> +     struct net_device *ndev = to_net_dev(dev);
>> +     struct fec_enet_private *fep = netdev_priv(ndev);
>> +     int enable = fep->pps_enable;
>> +     struct ptp_clock_request ptp_rq = { .type = PTP_CLK_REQ_PPS };
>> +
>> +     if (enable)
>> +             fep->ptp_caps.enable(&fep->ptp_caps, &ptp_rq, 0);
>> +
>> +     kstrtoint(buf, 0, &fep->pps_channel);
>> +
>> +     if (enable)
>> +             fep->ptp_caps.enable(&fep->ptp_caps, &ptp_rq, 1);
>
> NAK.
>
> Don't use a private, custom sysfs knob.  The core PTP layer provides
> an API for that already.

Does it? I seem to have missed it. Can you point me at some docs?
Also, does it have support for setting pulse mode (i.e. high, low, toggle)?

> Thanks,
> Richard

Thanks,
Bence

>
>> +
>> +     return count;
>> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ