Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628813 > unrolled thread

[PATCH] serial: exar: Fix stuck MSIs

Started byJan Kiszka <jan.kiszka@web.de>
First post2017-04-22 11:40 +0200
Last post2017-04-24 14:10 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] serial: exar: Fix stuck MSIs Jan Kiszka <jan.kiszka@web.de> - 2017-04-22 11:40 +0200
    Re: [PATCH] serial: exar: Fix stuck MSIs Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-24 11:00 +0200
      Re: [PATCH] serial: exar: Fix stuck MSIs Jan Kiszka <jan.kiszka@web.de> - 2017-04-24 11:10 +0200
        Re: [PATCH] serial: exar: Fix stuck MSIs Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-24 12:00 +0200
          [PATCH v2] serial: exar: Fix stuck MSIs Jan Kiszka <jan.kiszka@siemens.com> - 2017-04-24 12:40 +0200
            Re: [PATCH v2] serial: exar: Fix stuck MSIs Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-24 14:10 +0200

#1628813 — [PATCH] serial: exar: Fix stuck MSIs

FromJan Kiszka <jan.kiszka@web.de>
Date2017-04-22 11:40 +0200
Subject[PATCH] serial: exar: Fix stuck MSIs
Message-ID<tyZGh-15u-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

From: Jan Kiszka <jan.kiszka@siemens.com>

After migrating 8250_exar to MSI in 172c33cb61da, we can get stuck
without further interrupts because of the special wake-up event these
chips send. They are only cleared by reading INT0. As we fail to do so
during startup and shutdown, we can leave the interrupt line asserted,
which is fatal with edge-triggered MSIs.

Add the required reading of INT0 to startup and shutdown. Also account
for the fact that a pending wake-up interrupt means we have to return 1
from exar_handle_irq.

An alternative approach would have been disabling the wake-up interrupt.
Unfortunately, this feature (REGB[17] = 1) is not available on the
XR17D15X.

Fixes: 172c33cb61da ("serial: exar: Enable MSI support")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Regression of upcoming 4.11.

 drivers/tty/serial/8250/8250_port.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 6119516ef5fc..3a3667880fcf 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -47,6 +47,7 @@
 /*
  * These are definitions for the Exar XR17V35X and XR17(C|D)15X
  */
+#define UART_EXAR_INT0		0x80
 #define UART_EXAR_SLEEP		0x8b	/* Sleep mode */
 #define UART_EXAR_DVID		0x8d	/* Device identification */
 
@@ -1869,17 +1870,13 @@ static int serial8250_default_handle_irq(struct uart_port *port)
 static int exar_handle_irq(struct uart_port *port)
 {
 	unsigned int iir = serial_port_in(port, UART_IIR);
-	int ret;
+	int ret = 0;
 
-	ret = serial8250_handle_irq(port, iir);
+	if (((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X)) &&
+	    serial_port_in(port, UART_EXAR_INT0) != 0)
+		ret = 1;
 
-	if ((port->type == PORT_XR17V35X) ||
-	   (port->type == PORT_XR17D15X)) {
-		serial_port_in(port, 0x80);
-		serial_port_in(port, 0x81);
-		serial_port_in(port, 0x82);
-		serial_port_in(port, 0x83);
-	}
+	ret |= serial8250_handle_irq(port, iir);
 
 	return ret;
 }
@@ -2177,6 +2174,8 @@ int serial8250_do_startup(struct uart_port *port)
 	serial_port_in(port, UART_RX);
 	serial_port_in(port, UART_IIR);
 	serial_port_in(port, UART_MSR);
+	if ((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X))
+		serial_port_in(port, UART_EXAR_INT0);
 
 	/*
 	 * At this point, there's no way the LSR could still be 0xff;
@@ -2335,6 +2334,8 @@ int serial8250_do_startup(struct uart_port *port)
 	serial_port_in(port, UART_RX);
 	serial_port_in(port, UART_IIR);
 	serial_port_in(port, UART_MSR);
+	if ((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X))
+		serial_port_in(port, UART_EXAR_INT0);
 	up->lsr_saved_flags = 0;
 	up->msr_saved_flags = 0;
 
-- 
2.12.0

[toc] | [next] | [standalone]


#1629317

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-04-24 11:00 +0200
Message-ID<tzI0G-4Nd-17@gated-at.bofh.it>
In reply to#1628813
On Sat, 2017-04-22 at 11:36 +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> After migrating 8250_exar to MSI in 172c33cb61da, we can get stuck
> without further interrupts because of the special wake-up event these
> chips send. They are only cleared by reading INT0. As we fail to do so
> during startup and shutdown, we can leave the interrupt line asserted,
> which is fatal with edge-triggered MSIs.
> 
> Add the required reading of INT0 to startup and shutdown. Also account
> for the fact that a pending wake-up interrupt means we have to return
> 1
> from exar_handle_irq.
> 
> An alternative approach would have been disabling the wake-up
> interrupt.
> Unfortunately, this feature (REGB[17] = 1) is not available on the
> XR17D15X.
> 
> Fixes: 172c33cb61da ("serial: exar: Enable MSI support")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> Regression of upcoming 4.11.
> 
>  drivers/tty/serial/8250/8250_port.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_port.c
> b/drivers/tty/serial/8250/8250_port.c
> index 6119516ef5fc..3a3667880fcf 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -47,6 +47,7 @@
>  /*
>   * These are definitions for the Exar XR17V35X and XR17(C|D)15X
>   */
> +#define UART_EXAR_INT0		0x80
>  #define UART_EXAR_SLEEP		0x8b	/* Sleep mode */
>  #define UART_EXAR_DVID		0x8d	/* Device
> identification */
>  
> @@ -1869,17 +1870,13 @@ static int
> serial8250_default_handle_irq(struct uart_port *port)
>  static int exar_handle_irq(struct uart_port *port)
>  {
>  	unsigned int iir = serial_port_in(port, UART_IIR);
> -	int ret;
> +	int ret = 0;
>  
> -	ret = serial8250_handle_irq(port, iir);
> +	if (((port->type == PORT_XR17V35X) || (port->type ==
> PORT_XR17D15X)) &&
> +	    serial_port_in(port, UART_EXAR_INT0) != 0)
> +		ret = 1;
>  
> -	if ((port->type == PORT_XR17V35X) ||
> -	   (port->type == PORT_XR17D15X)) {

> -		serial_port_in(port, 0x80);
> -		serial_port_in(port, 0x81);
> -		serial_port_in(port, 0x82);
> -		serial_port_in(port, 0x83);

You replaced 4 reads by one. I'm suspecting that on multi-port cards you
still need to read all of them (I assume they are called INT0, INT1,
...). Perhaps you need a helper where you do that and call it from all
necessary places.

> -	}
> +	ret |= serial8250_handle_irq(port, iir);
>  
>  	return ret;
>  }
> @@ -2177,6 +2174,8 @@ int serial8250_do_startup(struct uart_port
> *port)
>  	serial_port_in(port, UART_RX);
>  	serial_port_in(port, UART_IIR);
>  	serial_port_in(port, UART_MSR);
> +	if ((port->type == PORT_XR17V35X) || (port->type ==
> PORT_XR17D15X))
> +		serial_port_in(port, UART_EXAR_INT0);
>  
>  	/*
>  	 * At this point, there's no way the LSR could still be 0xff;
> @@ -2335,6 +2334,8 @@ int serial8250_do_startup(struct uart_port
> *port)
>  	serial_port_in(port, UART_RX);
>  	serial_port_in(port, UART_IIR);
>  	serial_port_in(port, UART_MSR);
> +	if ((port->type == PORT_XR17V35X) || (port->type ==
> PORT_XR17D15X))
> +		serial_port_in(port, UART_EXAR_INT0);
>  	up->lsr_saved_flags = 0;
>  	up->msr_saved_flags = 0;
>  

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

[toc] | [prev] | [next] | [standalone]


#1629328

FromJan Kiszka <jan.kiszka@web.de>
Date2017-04-24 11:10 +0200
Message-ID<tzIam-56i-17@gated-at.bofh.it>
In reply to#1629317

[Multipart message — attachments visible in raw view] — view raw

On 2017-04-24 10:59, Andy Shevchenko wrote:
> On Sat, 2017-04-22 at 11:36 +0200, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> After migrating 8250_exar to MSI in 172c33cb61da, we can get stuck
>> without further interrupts because of the special wake-up event these
>> chips send. They are only cleared by reading INT0. As we fail to do so
>> during startup and shutdown, we can leave the interrupt line asserted,
>> which is fatal with edge-triggered MSIs.
>>
>> Add the required reading of INT0 to startup and shutdown. Also account
>> for the fact that a pending wake-up interrupt means we have to return
>> 1
>> from exar_handle_irq.
>>
>> An alternative approach would have been disabling the wake-up
>> interrupt.
>> Unfortunately, this feature (REGB[17] = 1) is not available on the
>> XR17D15X.
>>
>> Fixes: 172c33cb61da ("serial: exar: Enable MSI support")
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>> Regression of upcoming 4.11.
>>
>>  drivers/tty/serial/8250/8250_port.c | 19 ++++++++++---------
>>  1 file changed, 10 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/tty/serial/8250/8250_port.c
>> b/drivers/tty/serial/8250/8250_port.c
>> index 6119516ef5fc..3a3667880fcf 100644
>> --- a/drivers/tty/serial/8250/8250_port.c
>> +++ b/drivers/tty/serial/8250/8250_port.c
>> @@ -47,6 +47,7 @@
>>  /*
>>   * These are definitions for the Exar XR17V35X and XR17(C|D)15X
>>   */
>> +#define UART_EXAR_INT0		0x80
>>  #define UART_EXAR_SLEEP		0x8b	/* Sleep mode */
>>  #define UART_EXAR_DVID		0x8d	/* Device
>> identification */
>>  
>> @@ -1869,17 +1870,13 @@ static int
>> serial8250_default_handle_irq(struct uart_port *port)
>>  static int exar_handle_irq(struct uart_port *port)
>>  {
>>  	unsigned int iir = serial_port_in(port, UART_IIR);
>> -	int ret;
>> +	int ret = 0;
>>  
>> -	ret = serial8250_handle_irq(port, iir);
>> +	if (((port->type == PORT_XR17V35X) || (port->type ==
>> PORT_XR17D15X)) &&
>> +	    serial_port_in(port, UART_EXAR_INT0) != 0)
>> +		ret = 1;
>>  
>> -	if ((port->type == PORT_XR17V35X) ||
>> -	   (port->type == PORT_XR17D15X)) {
> 
>> -		serial_port_in(port, 0x80);
>> -		serial_port_in(port, 0x81);
>> -		serial_port_in(port, 0x82);
>> -		serial_port_in(port, 0x83);
> 
> You replaced 4 reads by one. I'm suspecting that on multi-port cards you
> still need to read all of them (I assume they are called INT0, INT1,
> ...). Perhaps you need a helper where you do that and call it from all
> necessary places.

Nope, we never had to read them all: "Wake-up Indicator is cleared by
reading the INT0 register." (Exar manual) INT0 contains the interrupt
status for all channels.

Jan

> 
>> -	}
>> +	ret |= serial8250_handle_irq(port, iir);
>>  
>>  	return ret;
>>  }
>> @@ -2177,6 +2174,8 @@ int serial8250_do_startup(struct uart_port
>> *port)
>>  	serial_port_in(port, UART_RX);
>>  	serial_port_in(port, UART_IIR);
>>  	serial_port_in(port, UART_MSR);
>> +	if ((port->type == PORT_XR17V35X) || (port->type ==
>> PORT_XR17D15X))
>> +		serial_port_in(port, UART_EXAR_INT0);
>>  
>>  	/*
>>  	 * At this point, there's no way the LSR could still be 0xff;
>> @@ -2335,6 +2334,8 @@ int serial8250_do_startup(struct uart_port
>> *port)
>>  	serial_port_in(port, UART_RX);
>>  	serial_port_in(port, UART_IIR);
>>  	serial_port_in(port, UART_MSR);
>> +	if ((port->type == PORT_XR17V35X) || (port->type ==
>> PORT_XR17D15X))
>> +		serial_port_in(port, UART_EXAR_INT0);
>>  	up->lsr_saved_flags = 0;
>>  	up->msr_saved_flags = 0;
>>  
> 


[toc] | [prev] | [next] | [standalone]


#1629373

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-04-24 12:00 +0200
Message-ID<tzIWJ-5lR-3@gated-at.bofh.it>
In reply to#1629328
On Mon, 2017-04-24 at 11:06 +0200, Jan Kiszka wrote:
> On 2017-04-24 10:59, Andy Shevchenko wrote:
> > On Sat, 2017-04-22 at 11:36 +0200, Jan Kiszka wrote:
> > > From: Jan Kiszka <jan.kiszka@siemens.com>
> > > 
> > > After migrating 8250_exar to MSI in 172c33cb61da, we can get stuck
> > > without further interrupts because of the special wake-up event
> > > these
> > > chips send. They are only cleared by reading INT0. As we fail to
> > > do so
> > > during startup and shutdown, we can leave the interrupt line
> > > asserted,
> > > which is fatal with edge-triggered MSIs.
> > > 
> > > Add the required reading of INT0 to startup and shutdown. Also
> > > account
> > > for the fact that a pending wake-up interrupt means we have to
> > > return
> > > 1
> > > from exar_handle_irq.
> > > 
> > > An alternative approach would have been disabling the wake-up
> > > interrupt.
> > > Unfortunately, this feature (REGB[17] = 1) is not available on the
> > > XR17D15X.
> > > 
> > > Fixes: 172c33cb61da ("serial: exar: Enable MSI support")
> > > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > > ---
> > > 
> > > Regression of upcoming 4.11.
> > > 
> > >  drivers/tty/serial/8250/8250_port.c | 19 ++++++++++---------
> > >  1 file changed, 10 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/drivers/tty/serial/8250/8250_port.c
> > > b/drivers/tty/serial/8250/8250_port.c
> > > index 6119516ef5fc..3a3667880fcf 100644
> > > --- a/drivers/tty/serial/8250/8250_port.c
> > > +++ b/drivers/tty/serial/8250/8250_port.c
> > > @@ -47,6 +47,7 @@
> > >  /*
> > >   * These are definitions for the Exar XR17V35X and XR17(C|D)15X
> > >   */
> > > +#define UART_EXAR_INT0		0x80
> > >  #define UART_EXAR_SLEEP		0x8b	/* Sleep mode
> > > */
> > >  #define UART_EXAR_DVID		0x8d	/* Device
> > > identification */
> > >  
> > > @@ -1869,17 +1870,13 @@ static int
> > > serial8250_default_handle_irq(struct uart_port *port)
> > >  static int exar_handle_irq(struct uart_port *port)
> > >  {
> > >  	unsigned int iir = serial_port_in(port, UART_IIR);
> > > -	int ret;
> > > +	int ret = 0;
> > >  
> > > -	ret = serial8250_handle_irq(port, iir);
> > > +	if (((port->type == PORT_XR17V35X) || (port->type ==
> > > PORT_XR17D15X)) &&
> > > +	    serial_port_in(port, UART_EXAR_INT0) != 0)
> > > +		ret = 1;
> > >  
> > > -	if ((port->type == PORT_XR17V35X) ||
> > > -	   (port->type == PORT_XR17D15X)) {
> > > -		serial_port_in(port, 0x80);
> > > -		serial_port_in(port, 0x81);
> > > -		serial_port_in(port, 0x82);
> > > -		serial_port_in(port, 0x83);
> > 
> > You replaced 4 reads by one. I'm suspecting that on multi-port cards
> > you
> > still need to read all of them (I assume they are called INT0, INT1,
> > ...). Perhaps you need a helper where you do that and call it from
> > all
> > necessary places.
> 
> Nope, we never had to read them all: "Wake-up Indicator is cleared by
> reading the INT0 register." (Exar manual) INT0 contains the interrupt
> status for all channels.

Perhaps it needs to be mentioned in commit message as well.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

[toc] | [prev] | [next] | [standalone]


#1629405 — [PATCH v2] serial: exar: Fix stuck MSIs

FromJan Kiszka <jan.kiszka@siemens.com>
Date2017-04-24 12:40 +0200
Subject[PATCH v2] serial: exar: Fix stuck MSIs
Message-ID<tzJzs-5R1-15@gated-at.bofh.it>
In reply to#1629373
After migrating 8250_exar to MSI in 172c33cb61da, we can get stuck
without further interrupts because of the special wake-up event these
chips send. They are only cleared by reading INT0. As we fail to do so
during startup and shutdown, we can leave the interrupt line asserted,
which is fatal with edge-triggered MSIs.

Add the required reading of INT0 to startup and shutdown. Also account
for the fact that a pending wake-up interrupt means we have to return 1
from exar_handle_irq. Drop the unneeded reading of INT1..3 along with
this - those never reset anything.

An alternative approach would have been disabling the wake-up interrupt.
Unfortunately, this feature (REGB[17] = 1) is not available on the
XR17D15X.

Fixes: 172c33cb61da ("serial: exar: Enable MSI support")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v2:
 - mention removal of INT1..3 reading in commit log [Andy]
   (no functional changes)

 drivers/tty/serial/8250/8250_port.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 6119516ef5fc..3a3667880fcf 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -47,6 +47,7 @@
 /*
  * These are definitions for the Exar XR17V35X and XR17(C|D)15X
  */
+#define UART_EXAR_INT0		0x80
 #define UART_EXAR_SLEEP		0x8b	/* Sleep mode */
 #define UART_EXAR_DVID		0x8d	/* Device identification */
 
@@ -1869,17 +1870,13 @@ static int serial8250_default_handle_irq(struct uart_port *port)
 static int exar_handle_irq(struct uart_port *port)
 {
 	unsigned int iir = serial_port_in(port, UART_IIR);
-	int ret;
+	int ret = 0;
 
-	ret = serial8250_handle_irq(port, iir);
+	if (((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X)) &&
+	    serial_port_in(port, UART_EXAR_INT0) != 0)
+		ret = 1;
 
-	if ((port->type == PORT_XR17V35X) ||
-	   (port->type == PORT_XR17D15X)) {
-		serial_port_in(port, 0x80);
-		serial_port_in(port, 0x81);
-		serial_port_in(port, 0x82);
-		serial_port_in(port, 0x83);
-	}
+	ret |= serial8250_handle_irq(port, iir);
 
 	return ret;
 }
@@ -2177,6 +2174,8 @@ int serial8250_do_startup(struct uart_port *port)
 	serial_port_in(port, UART_RX);
 	serial_port_in(port, UART_IIR);
 	serial_port_in(port, UART_MSR);
+	if ((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X))
+		serial_port_in(port, UART_EXAR_INT0);
 
 	/*
 	 * At this point, there's no way the LSR could still be 0xff;
@@ -2335,6 +2334,8 @@ int serial8250_do_startup(struct uart_port *port)
 	serial_port_in(port, UART_RX);
 	serial_port_in(port, UART_IIR);
 	serial_port_in(port, UART_MSR);
+	if ((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X))
+		serial_port_in(port, UART_EXAR_INT0);
 	up->lsr_saved_flags = 0;
 	up->msr_saved_flags = 0;
 
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


#1629463 — Re: [PATCH v2] serial: exar: Fix stuck MSIs

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-04-24 14:10 +0200
SubjectRe: [PATCH v2] serial: exar: Fix stuck MSIs
Message-ID<tzKYx-6Qa-11@gated-at.bofh.it>
In reply to#1629405
On Mon, 2017-04-24 at 12:30 +0200, Jan Kiszka wrote:
> After migrating 8250_exar to MSI in 172c33cb61da, we can get stuck
> without further interrupts because of the special wake-up event these
> chips send. They are only cleared by reading INT0. As we fail to do so
> during startup and shutdown, we can leave the interrupt line asserted,
> which is fatal with edge-triggered MSIs.
> 
> Add the required reading of INT0 to startup and shutdown. Also account
> for the fact that a pending wake-up interrupt means we have to return
> 1
> from exar_handle_irq. Drop the unneeded reading of INT1..3 along with
> this - those never reset anything.
> 
> An alternative approach would have been disabling the wake-up
> interrupt.
> Unfortunately, this feature (REGB[17] = 1) is not available on the
> XR17D15X.

FWIW:
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 
> Fixes: 172c33cb61da ("serial: exar: Enable MSI support")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> Changes in v2:
>  - mention removal of INT1..3 reading in commit log [Andy]
>    (no functional changes)
> 
>  drivers/tty/serial/8250/8250_port.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_port.c
> b/drivers/tty/serial/8250/8250_port.c
> index 6119516ef5fc..3a3667880fcf 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -47,6 +47,7 @@
>  /*
>   * These are definitions for the Exar XR17V35X and XR17(C|D)15X
>   */
> +#define UART_EXAR_INT0		0x80
>  #define UART_EXAR_SLEEP		0x8b	/* Sleep mode */
>  #define UART_EXAR_DVID		0x8d	/* Device
> identification */
>  
> @@ -1869,17 +1870,13 @@ static int
> serial8250_default_handle_irq(struct uart_port *port)
>  static int exar_handle_irq(struct uart_port *port)
>  {
>  	unsigned int iir = serial_port_in(port, UART_IIR);
> -	int ret;
> +	int ret = 0;
>  
> -	ret = serial8250_handle_irq(port, iir);
> +	if (((port->type == PORT_XR17V35X) || (port->type ==
> PORT_XR17D15X)) &&
> +	    serial_port_in(port, UART_EXAR_INT0) != 0)
> +		ret = 1;
>  
> -	if ((port->type == PORT_XR17V35X) ||
> -	   (port->type == PORT_XR17D15X)) {
> -		serial_port_in(port, 0x80);
> -		serial_port_in(port, 0x81);
> -		serial_port_in(port, 0x82);
> -		serial_port_in(port, 0x83);
> -	}
> +	ret |= serial8250_handle_irq(port, iir);
>  
>  	return ret;
>  }
> @@ -2177,6 +2174,8 @@ int serial8250_do_startup(struct uart_port
> *port)
>  	serial_port_in(port, UART_RX);
>  	serial_port_in(port, UART_IIR);
>  	serial_port_in(port, UART_MSR);
> +	if ((port->type == PORT_XR17V35X) || (port->type ==
> PORT_XR17D15X))
> +		serial_port_in(port, UART_EXAR_INT0);
>  
>  	/*
>  	 * At this point, there's no way the LSR could still be 0xff;
> @@ -2335,6 +2334,8 @@ int serial8250_do_startup(struct uart_port
> *port)
>  	serial_port_in(port, UART_RX);
>  	serial_port_in(port, UART_IIR);
>  	serial_port_in(port, UART_MSR);
> +	if ((port->type == PORT_XR17V35X) || (port->type ==
> PORT_XR17D15X))
> +		serial_port_in(port, UART_EXAR_INT0);
>  	up->lsr_saved_flags = 0;
>  	up->msr_saved_flags = 0;
>  

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web