All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial/amba-pl011: Return early in deadlock work-around if there is no tty
@ 2012-02-20  6:07 Kalle Vahlman
  2012-02-24 21:47 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Vahlman @ 2012-02-20  6:07 UTC (permalink / raw)
  To: linux-serial; +Cc: stable, Kalle Vahlman

The first amba port does not always have an attached tty, which will
result in a crash if the work-around is activated.

This seems to be the case for example on Snowball which has no modem
hw, which seems to be the main use-case for this work-around.
---
 drivers/tty/serial/amba-pl011.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 6800f5f..c3ffbed 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1061,6 +1061,10 @@ static void pl011_lockup_wa(unsigned long data)
 	int buf_empty_retries = 200;
 	int loop;
 
+	/* Exit early if there is no tty */
+	if (!tty)
+		return;
+
 	/* Stop HCI layer from submitting data for tx */
 	tty->hw_stopped = 1;
 	while (!uart_circ_empty(xmit)) {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial/amba-pl011: Return early in deadlock work-around if there is no tty
  2012-02-20  6:07 [PATCH] serial/amba-pl011: Return early in deadlock work-around if there is no tty Kalle Vahlman
@ 2012-02-24 21:47 ` Greg KH
  2012-02-25 10:57   ` Kalle Vahlman
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2012-02-24 21:47 UTC (permalink / raw)
  To: Kalle Vahlman; +Cc: linux-serial, stable

On Mon, Feb 20, 2012 at 08:07:04AM +0200, Kalle Vahlman wrote:
> The first amba port does not always have an attached tty, which will
> result in a crash if the work-around is activated.
> 
> This seems to be the case for example on Snowball which has no modem
> hw, which seems to be the main use-case for this work-around.
> ---
>  drivers/tty/serial/amba-pl011.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)

Can you re-read Documentation/SubmittingPatches and resend this patch
with the needed information so that I can apply it (hint, you forgot a
signed-off-by: line...)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial/amba-pl011: Return early in deadlock work-around if there is no tty
  2012-02-24 21:47 ` Greg KH
@ 2012-02-25 10:57   ` Kalle Vahlman
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Vahlman @ 2012-02-25 10:57 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-serial, stable

2012/2/24 Greg KH <gregkh@linuxfoundation.org>:
> On Mon, Feb 20, 2012 at 08:07:04AM +0200, Kalle Vahlman wrote:
>> The first amba port does not always have an attached tty, which will
>> result in a crash if the work-around is activated.
>>
>> This seems to be the case for example on Snowball which has no modem
>> hw, which seems to be the main use-case for this work-around.
>> ---
>>  drivers/tty/serial/amba-pl011.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> Can you re-read Documentation/SubmittingPatches and resend this patch
> with the needed information so that I can apply it (hint, you forgot a
> signed-off-by: line...)

Ah, sorry for that. But actually I was alerted to a plan to eradicate
the whole workaround so this patch can be left unapplied.

I will follow up with a new submission if that doesn't happen soon.

Cheers,

-- 
Kalle Vahlman, Movial Creative Technologies Inc.
Porkkalankatu 20, FI-00180 Helsinki
Tel +358 9 8567 6400
Fax +358 9 8567 6401
www.movial.com
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-25 10:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-20  6:07 [PATCH] serial/amba-pl011: Return early in deadlock work-around if there is no tty Kalle Vahlman
2012-02-24 21:47 ` Greg KH
2012-02-25 10:57   ` Kalle Vahlman

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.