From: Rostislav Lisovy Date: Fri, 16 Dec 2011 09:46:32 +0000 (+0100) Subject: sllin: rx_timer is also used when waiting for received characters while sending Heade... X-Git-Url: http://rtime.felk.cvut.cz/gitweb/linux-lin.git/commitdiff_plain/399c19f1b3e62f76c7f5baf29a2b5c366d341335 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. --- 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);