All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Johan Hovold <johan@kernel.org>
Cc: Magnus Damm <damm@opensource.se>,
	linux-serial@vger.kernel.org, robh@kernel.org,
	geert+renesas@glider.be, linux-renesas-soc@vger.kernel.org,
	wsa+renesas@sang-engineering.com, jirislaby@kernel.org
Subject: Re: [PATCH] serdev: BREAK/FRAME/PARITY/OVERRUN notification prototype V2
Date: Fri, 31 Dec 2021 13:42:58 +0100	[thread overview]
Message-ID: <Yc760m+/mXsuVo1h@kroah.com> (raw)
In-Reply-To: <Yc7oZ/1tu95Z4wPS@hovoldconsulting.com>

On Fri, Dec 31, 2021 at 12:24:23PM +0100, Johan Hovold wrote:
> On Thu, Dec 30, 2021 at 01:30:18PM +0100, Greg Kroah-Hartman wrote:
> > On Sun, Dec 12, 2021 at 10:21:28PM +0900, Magnus Damm wrote:
> > > From: Magnus Damm <damm+renesas@opensource.se>
> > > 
> > > Allow serdev device drivers get notified by hardware errors such as BREAK,
> > > FRAME, PARITY and OVERRUN.
> > > 
> > > With this patch, in the event of an error detected in the UART device driver
> > > the serdev_device_driver will get the newly introduced ->error() callback
> > > invoked if serdev_device_set_error_mask() has previously been used to enable
> > > the type of error. The errors are taken straight from the TTY layer and fed
> > > into the serdev_device_driver after filtering out only enabled errors.
> > > 
> > > Without this patch the hardware errors never reach the serdev_device_driver.
> > > 
> > > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> > > ---
> > > 
> > >  Applies to linux-5.16-rc4
> > > 
> > >  Change since V1:
> > >  - Use __set_bit() instead of set_bit() in ttyport_receive_buf()
> > >  - Switch to assign_bit() in ttyport_set_error_mask()
> > > 
> > >  Thanks to Geert for feedback!
> > > 
> > >  The following prototype patch is using serdev error notifications:
> > >  [PATCH] r8a77995 Draak SCIF0 LED and KEY Serdev prototype V2
> > 
> > Looks good, now applied to my tty tree.
> 
> I really don't think this is ready to be merged. There's been no
> discussion about the design of this interface and importantly there are
> no users (there was an RFC floating around but that one too has issues).
> 
> Some of the problems with this patch include:
> 
>  - performance penalty for all serdev drivers due to unconditional per
>    character processing
>  - flagged characters are still being forwarded to the consumer (e.g.
>    NUL chars inserted on breaks)
>  - it only works with some broken serial drivers which do not honour
>    TTY_DRIVER_REAL_RAW
>  - interface basically limited to the hacky led/input driver mentioned
>    above since it does not match flags with characters
> 
> I suggest reverting for now.

No problem, will go revert it right now, thanks for looking at it.

greg k-h

      reply	other threads:[~2021-12-31 12:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-12 13:21 [PATCH] serdev: BREAK/FRAME/PARITY/OVERRUN notification prototype V2 Magnus Damm
2021-12-30 12:30 ` Greg KH
2021-12-31 11:24   ` Johan Hovold
2021-12-31 12:42     ` Greg KH [this message]

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=Yc760m+/mXsuVo1h@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=damm@opensource.se \
    --cc=geert+renesas@glider.be \
    --cc=jirislaby@kernel.org \
    --cc=johan@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.