mbox series

[v2,0/3] Handle UART without interrupt on TEMT using em485

Message ID 20210204161158.643-1-etremblay@distech-controls.com
Headers show
Series Handle UART without interrupt on TEMT using em485 | expand

Message

Eric Tremblay Feb. 4, 2021, 4:11 p.m. UTC
Thanks everyone for the comments. I apply most of the comments on version 1
but there is still a pending point with the Jiri comment about the safety of:
struct tty_struct *tty = p->port.state->port.tty;
I thought about adding a check with tty_port_initialized() before accessing
the pointer, but I saw some other places where that same pointer is accessed
without further protection, at least from what I see. 

Changes from v1 to v2:
- Use UART_CAP_NOTEMT instead of UART_CAP_TEMT
- Use some predefined macro to reduce magicness
- Reset active_timer in temt timer handler
- add uart_get_byte_size
- set UART_CAP_NOTEMT in uart_config for PORT_16550A_FSL64
- Improve commit messages
- Improve grammar and spelling
- Add Giulio and Heiko SoB to reflect previous work

Eric Tremblay (3):
  serial: 8250: Handle UART without interrupt on TEMT using em485
  serial: 8250: Add UART_CAP_NOTEMT on PORT_16550A_FSL64
  serial: 8250: add compatible for fsl,16550-FIFO64

 drivers/tty/serial/8250/8250.h      |  1 +
 drivers/tty/serial/8250/8250_of.c   |  2 +
 drivers/tty/serial/8250/8250_port.c | 68 ++++++++++++++++++++++++++++-
 drivers/tty/serial/serial_core.c    | 29 ++++++++----
 include/linux/serial_8250.h         |  2 +
 include/linux/serial_core.h         |  2 +
 6 files changed, 94 insertions(+), 10 deletions(-)

Comments

Andy Shevchenko Feb. 5, 2021, 2:20 p.m. UTC | #1
On Thu, Feb 04, 2021 at 11:11:55AM -0500, Eric Tremblay wrote:
> Thanks everyone for the comments. I apply most of the comments on version 1

> but there is still a pending point with the Jiri comment about the safety of:

> struct tty_struct *tty = p->port.state->port.tty;

> I thought about adding a check with tty_port_initialized() before accessing

> the pointer, but I saw some other places where that same pointer is accessed

> without further protection, at least from what I see.


Thanks for the update. Unfortunately I'm a bit busy with other prioritized
stuff, but I will review this next week.

> Changes from v1 to v2:

> - Use UART_CAP_NOTEMT instead of UART_CAP_TEMT

> - Use some predefined macro to reduce magicness

> - Reset active_timer in temt timer handler

> - add uart_get_byte_size

> - set UART_CAP_NOTEMT in uart_config for PORT_16550A_FSL64

> - Improve commit messages

> - Improve grammar and spelling

> - Add Giulio and Heiko SoB to reflect previous work

> 

> Eric Tremblay (3):

>   serial: 8250: Handle UART without interrupt on TEMT using em485

>   serial: 8250: Add UART_CAP_NOTEMT on PORT_16550A_FSL64

>   serial: 8250: add compatible for fsl,16550-FIFO64

> 

>  drivers/tty/serial/8250/8250.h      |  1 +

>  drivers/tty/serial/8250/8250_of.c   |  2 +

>  drivers/tty/serial/8250/8250_port.c | 68 ++++++++++++++++++++++++++++-

>  drivers/tty/serial/serial_core.c    | 29 ++++++++----

>  include/linux/serial_8250.h         |  2 +

>  include/linux/serial_core.h         |  2 +

>  6 files changed, 94 insertions(+), 10 deletions(-)

> 

> -- 

> 2.17.1

> 


-- 
With Best Regards,
Andy Shevchenko
Uwe Kleine-König Sept. 29, 2021, 8:07 p.m. UTC | #2
Hello,

On Fri, Feb 05, 2021 at 04:20:00PM +0200, Andy Shevchenko wrote:
> On Thu, Feb 04, 2021 at 11:11:55AM -0500, Eric Tremblay wrote:

> > Thanks everyone for the comments. I apply most of the comments on version 1

> > but there is still a pending point with the Jiri comment about the safety of:

> > struct tty_struct *tty = p->port.state->port.tty;

> > I thought about adding a check with tty_port_initialized() before accessing

> > the pointer, but I saw some other places where that same pointer is accessed

> > without further protection, at least from what I see.

> 

> Thanks for the update. Unfortunately I'm a bit busy with other prioritized

> stuff, but I will review this next week.


I assume this fell through the cracks as "next week" is already over ...?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
Andy Shevchenko Oct. 1, 2021, 11:40 a.m. UTC | #3
On Wed, Sep 29, 2021 at 10:07:47PM +0200, Uwe Kleine-König wrote:
> On Fri, Feb 05, 2021 at 04:20:00PM +0200, Andy Shevchenko wrote:

> > On Thu, Feb 04, 2021 at 11:11:55AM -0500, Eric Tremblay wrote:

> > > Thanks everyone for the comments. I apply most of the comments on version 1

> > > but there is still a pending point with the Jiri comment about the safety of:

> > > struct tty_struct *tty = p->port.state->port.tty;

> > > I thought about adding a check with tty_port_initialized() before accessing

> > > the pointer, but I saw some other places where that same pointer is accessed

> > > without further protection, at least from what I see.

> > 

> > Thanks for the update. Unfortunately I'm a bit busy with other prioritized

> > stuff, but I will review this next week.

> 

> I assume this fell through the cracks as "next week" is already over ...?


Indeed. Anyways, there is a kbuildbot message against patch 1 as I see and
needs to be addressed. I'm going to look into the code right now.

-- 
With Best Regards,
Andy Shevchenko