Re: [PATCH 1/2] serial: 8250: enable SERIAL_MCTRL_GPIO by default.

2018-06-05 Thread Andy Shevchenko
On Mon, 2018-06-04 at 20:57 +0200, Giulio Benetti wrote:
> Il 04/06/2018 13:49, Andy Shevchenko ha scritto:
> > On Fri, 2018-06-01 at 16:11 +0200, Giulio Benetti wrote:
> > > It can be useful to override 8250 mctrl lines with gpios, for rts
> > > on
> > > rs485 for example, when rts is not mapped correctly to HW RTS pin.
> > > 
> > > Enable SERIAL_MCTRL_GPIO by default.
> > > 
> > 
> > Unfortunately NAK, see
> > 
> > commit 5db4f7f80d165fc9725f356e99feec409e446baa
> > Author: Andy Shevchenko 
> > Date:   Tue Aug 16 15:06:54 2016 +0300
> > 
> >  Revert "tty/serial/8250: use mctrl_gpio helpers"
> > 
> > for the details.
> > 
> > I would love to see a solution that will satisfy everyone, though I
> > have
> > only means to test proposals for now.
> 
> Thanks for pointing me that.
> I would try to solve serial breakage on intel with already extisting 
> patches dropping this one.
> I'm going to try.
> 
> I can't understand if it's enough using qemu x86 to reproduce the bug.
> If so I'm going to debug and check what makes driver to fail.

You need to provide an ACPI table with UART contains GpioInt() or
GpioIo() resource in it.

Where GPIO number is a number of pin related to UART's RxD.


> Do you think it makes sense? Would it be accepted after bug fixing?

I can test on our hardware. Can't say about the rest, though.

-- 
Andy Shevchenko 
Intel Finland Oy


Re: [PATCH 1/2] serial: 8250: enable SERIAL_MCTRL_GPIO by default.

2018-06-05 Thread Andy Shevchenko
On Mon, 2018-06-04 at 20:57 +0200, Giulio Benetti wrote:
> Il 04/06/2018 13:49, Andy Shevchenko ha scritto:
> > On Fri, 2018-06-01 at 16:11 +0200, Giulio Benetti wrote:
> > > It can be useful to override 8250 mctrl lines with gpios, for rts
> > > on
> > > rs485 for example, when rts is not mapped correctly to HW RTS pin.
> > > 
> > > Enable SERIAL_MCTRL_GPIO by default.
> > > 
> > 
> > Unfortunately NAK, see
> > 
> > commit 5db4f7f80d165fc9725f356e99feec409e446baa
> > Author: Andy Shevchenko 
> > Date:   Tue Aug 16 15:06:54 2016 +0300
> > 
> >  Revert "tty/serial/8250: use mctrl_gpio helpers"
> > 
> > for the details.
> > 
> > I would love to see a solution that will satisfy everyone, though I
> > have
> > only means to test proposals for now.
> 
> Thanks for pointing me that.
> I would try to solve serial breakage on intel with already extisting 
> patches dropping this one.
> I'm going to try.
> 
> I can't understand if it's enough using qemu x86 to reproduce the bug.
> If so I'm going to debug and check what makes driver to fail.

You need to provide an ACPI table with UART contains GpioInt() or
GpioIo() resource in it.

Where GPIO number is a number of pin related to UART's RxD.


> Do you think it makes sense? Would it be accepted after bug fixing?

I can test on our hardware. Can't say about the rest, though.

-- 
Andy Shevchenko 
Intel Finland Oy


Re: [PATCH 1/2] serial: 8250: enable SERIAL_MCTRL_GPIO by default.

2018-06-04 Thread Giulio Benetti

Il 04/06/2018 13:49, Andy Shevchenko ha scritto:

On Fri, 2018-06-01 at 16:11 +0200, Giulio Benetti wrote:

It can be useful to override 8250 mctrl lines with gpios, for rts on
rs485 for example, when rts is not mapped correctly to HW RTS pin.

Enable SERIAL_MCTRL_GPIO by default.



Unfortunately NAK, see

commit 5db4f7f80d165fc9725f356e99feec409e446baa
Author: Andy Shevchenko 
Date:   Tue Aug 16 15:06:54 2016 +0300

 Revert "tty/serial/8250: use mctrl_gpio helpers"

for the details.

I would love to see a solution that will satisfy everyone, though I have
only means to test proposals for now.


Thanks for pointing me that.
I would try to solve serial breakage on intel with already extisting 
patches dropping this one.

I'm going to try.

I can't understand if it's enough using qemu x86 to reproduce the bug.
If so I'm going to debug and check what makes driver to fail.

Do you think it makes sense? Would it be accepted after bug fixing?

Thanks
Best regards

--
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642




Signed-off-by: Giulio Benetti 
---
  drivers/tty/serial/8250/Kconfig | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/8250/Kconfig
b/drivers/tty/serial/8250/Kconfig
index f005eaf8bc57..c7992b94fece 100644
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
@@ -7,6 +7,7 @@ config SERIAL_8250
tristate "8250/16550 and compatible serial support"
depends on !S390
select SERIAL_CORE
+   select SERIAL_MCTRL_GPIO if GPIOLIB
---help---
  This selects whether you want to include the driver for the
standard
  serial ports.  The standard answer is Y.  People who might
say N




Re: [PATCH 1/2] serial: 8250: enable SERIAL_MCTRL_GPIO by default.

2018-06-04 Thread Giulio Benetti

Il 04/06/2018 13:49, Andy Shevchenko ha scritto:

On Fri, 2018-06-01 at 16:11 +0200, Giulio Benetti wrote:

It can be useful to override 8250 mctrl lines with gpios, for rts on
rs485 for example, when rts is not mapped correctly to HW RTS pin.

Enable SERIAL_MCTRL_GPIO by default.



Unfortunately NAK, see

commit 5db4f7f80d165fc9725f356e99feec409e446baa
Author: Andy Shevchenko 
Date:   Tue Aug 16 15:06:54 2016 +0300

 Revert "tty/serial/8250: use mctrl_gpio helpers"

for the details.

I would love to see a solution that will satisfy everyone, though I have
only means to test proposals for now.


Thanks for pointing me that.
I would try to solve serial breakage on intel with already extisting 
patches dropping this one.

I'm going to try.

I can't understand if it's enough using qemu x86 to reproduce the bug.
If so I'm going to debug and check what makes driver to fail.

Do you think it makes sense? Would it be accepted after bug fixing?

Thanks
Best regards

--
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642




Signed-off-by: Giulio Benetti 
---
  drivers/tty/serial/8250/Kconfig | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/8250/Kconfig
b/drivers/tty/serial/8250/Kconfig
index f005eaf8bc57..c7992b94fece 100644
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
@@ -7,6 +7,7 @@ config SERIAL_8250
tristate "8250/16550 and compatible serial support"
depends on !S390
select SERIAL_CORE
+   select SERIAL_MCTRL_GPIO if GPIOLIB
---help---
  This selects whether you want to include the driver for the
standard
  serial ports.  The standard answer is Y.  People who might
say N




Re: [PATCH 1/2] serial: 8250: enable SERIAL_MCTRL_GPIO by default.

2018-06-04 Thread Andy Shevchenko
On Fri, 2018-06-01 at 16:11 +0200, Giulio Benetti wrote:
> It can be useful to override 8250 mctrl lines with gpios, for rts on
> rs485 for example, when rts is not mapped correctly to HW RTS pin.
> 
> Enable SERIAL_MCTRL_GPIO by default.
> 

Unfortunately NAK, see 

commit 5db4f7f80d165fc9725f356e99feec409e446baa
Author: Andy Shevchenko 
Date:   Tue Aug 16 15:06:54 2016 +0300

Revert "tty/serial/8250: use mctrl_gpio helpers"

for the details.

I would love to see a solution that will satisfy everyone, though I have
only means to test proposals for now.

> Signed-off-by: Giulio Benetti 
> ---
>  drivers/tty/serial/8250/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/8250/Kconfig
> b/drivers/tty/serial/8250/Kconfig
> index f005eaf8bc57..c7992b94fece 100644
> --- a/drivers/tty/serial/8250/Kconfig
> +++ b/drivers/tty/serial/8250/Kconfig
> @@ -7,6 +7,7 @@ config SERIAL_8250
>   tristate "8250/16550 and compatible serial support"
>   depends on !S390
>   select SERIAL_CORE
> + select SERIAL_MCTRL_GPIO if GPIOLIB
>   ---help---
> This selects whether you want to include the driver for the
> standard
> serial ports.  The standard answer is Y.  People who might
> say N

-- 
Andy Shevchenko 
Intel Finland Oy


Re: [PATCH 1/2] serial: 8250: enable SERIAL_MCTRL_GPIO by default.

2018-06-04 Thread Andy Shevchenko
On Fri, 2018-06-01 at 16:11 +0200, Giulio Benetti wrote:
> It can be useful to override 8250 mctrl lines with gpios, for rts on
> rs485 for example, when rts is not mapped correctly to HW RTS pin.
> 
> Enable SERIAL_MCTRL_GPIO by default.
> 

Unfortunately NAK, see 

commit 5db4f7f80d165fc9725f356e99feec409e446baa
Author: Andy Shevchenko 
Date:   Tue Aug 16 15:06:54 2016 +0300

Revert "tty/serial/8250: use mctrl_gpio helpers"

for the details.

I would love to see a solution that will satisfy everyone, though I have
only means to test proposals for now.

> Signed-off-by: Giulio Benetti 
> ---
>  drivers/tty/serial/8250/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/8250/Kconfig
> b/drivers/tty/serial/8250/Kconfig
> index f005eaf8bc57..c7992b94fece 100644
> --- a/drivers/tty/serial/8250/Kconfig
> +++ b/drivers/tty/serial/8250/Kconfig
> @@ -7,6 +7,7 @@ config SERIAL_8250
>   tristate "8250/16550 and compatible serial support"
>   depends on !S390
>   select SERIAL_CORE
> + select SERIAL_MCTRL_GPIO if GPIOLIB
>   ---help---
> This selects whether you want to include the driver for the
> standard
> serial ports.  The standard answer is Y.  People who might
> say N

-- 
Andy Shevchenko 
Intel Finland Oy