From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Simon Horman <horms@kernel.org>, Vadim Fedorenko <vadfed@meta.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
Jonathan Lemon <jonathan.lemon@gmail.com>,
Jiri Slaby <jirislaby@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH net v3 1/2] ptp: ocp: adjust sysfs entries to expose tty information
Date: Thu, 15 Aug 2024 15:05:28 +0100 [thread overview]
Message-ID: <8e9a5b58-e975-4d6b-81fd-da5e0139a552@linux.dev> (raw)
In-Reply-To: <20240815135455.GE632411@kernel.org>
On 15/08/2024 14:54, Simon Horman wrote:
> On Thu, Aug 15, 2024 at 05:59:04AM -0700, Vadim Fedorenko wrote:
>> Starting v6.8 the serial port subsystem changed the hierarchy of devices
>> and symlinks are not working anymore. Previous discussion made it clear
>> that the idea of symlinks for tty devices was wrong by design. Implement
>> additional attributes to expose the information. Fixes tag points to the
>> commit which introduced the change.
>
> Hi Vadim,
>
> Would it be possible to provide a link to the discussion(s)?
>
Hi Simon,
Yeah, sure:
the initial RFC of serial port subsystem changes is
https://lore.kernel.org/linux-serial/20231024113624.54364-1-tony@atomide.com/
the merged version is (serial port subsystem):
https://lore.kernel.org/linux-serial/20231113080758.30346-1-tony@atomide.com/
The first update to ptp_ocp driver is
https://lore.kernel.org/linux-serial/20240510110405.15115-1-vadim.fedorenko@linux.dev/
>>
>> Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device")
>> Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
>
> ...
>
>> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
>
> ...
>
>> @@ -3346,6 +3352,54 @@ static EXT_ATTR_RO(freq, frequency, 1);
>> static EXT_ATTR_RO(freq, frequency, 2);
>> static EXT_ATTR_RO(freq, frequency, 3);
>>
>> +static ssize_t
>> +ptp_ocp_tty_show(struct device *dev, struct device_attribute *attr, char *buf)
>> +{
>> + struct dev_ext_attribute *ea = to_ext_attr(attr);
>> + struct ptp_ocp *bp = dev_get_drvdata(dev);
>> + struct ptp_ocp_serial_port *port;
>
> nit: Port is unused in this function, it should be removed.
Ah, yeah, it was last second change, didn't clean it fully,
thanks for pointing.
>
>> +
>> + return sysfs_emit(buf, "ttyS%d", bp->port[(uintptr_t)ea->var].line);
>> +}
>
> ...
next prev parent reply other threads:[~2024-08-15 14:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 12:59 [PATCH net v3 1/2] ptp: ocp: adjust sysfs entries to expose tty information Vadim Fedorenko
2024-08-15 12:59 ` [PATCH net v3 2/2] docs: ABI: update OCP TimeCard sysfs entries Vadim Fedorenko
2024-08-15 13:41 ` [PATCH net v3 1/2] ptp: ocp: adjust sysfs entries to expose tty information Greg Kroah-Hartman
2024-08-15 15:06 ` Vadim Fedorenko
2024-08-15 13:54 ` Simon Horman
2024-08-15 14:05 ` Vadim Fedorenko [this message]
2024-08-16 5:26 ` Jiri Slaby
2024-08-16 18:48 ` Vadim Fedorenko
2024-08-16 12:03 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8e9a5b58-e975-4d6b-81fd-da5e0139a552@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=horms@kernel.org \
--cc=jirislaby@kernel.org \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vadfed@meta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).