From 399c19f1b3e62f76c7f5baf29a2b5c366d341335 Mon Sep 17 00:00:00 2001 From: Rostislav Lisovy Date: Fri, 16 Dec 2011 10:46:32 +0100 Subject: [PATCH] sllin: rx_timer is also used when waiting for received characters while sending Header -- this prevents from blocking when faulty or no LIN-voltage-level-converter is used. --- sllin/sllin.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sllin/sllin.c b/sllin/sllin.c index f10923e..6a4e8bf 100644 --- a/sllin/sllin.c +++ b/sllin/sllin.c @@ -831,6 +831,9 @@ int sllin_kwthread(void *ptr) clear_bit(SLF_MSGEVENT, &sl->flags); kfree_skb(sl->tx_req_skb); netif_wake_queue(sl->dev); + hrtimer_start(&sl->rx_timer, + ktime_add(ktime_get(), sl->rx_timer_timeout), + HRTIMER_MODE_ABS); break; case SLSTATE_BREAK_SENT: @@ -846,6 +849,7 @@ int sllin_kwthread(void *ptr) break; case SLSTATE_ID_SENT: + hrtimer_cancel(&sl->rx_timer); sl->id_to_send = false; if (sl->data_to_send) { sllin_send_tx_buff(sl); -- 2.39.2