lkml.org 
[lkml]   [2005]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2.6 IrDA] stir4200 turnaround calculation fix
From
ir261_stir_turn.diff :
~~~~~~~~~~~~~~~~~~~~
<Patch from John K. Luebs>
o [CORRECT] Proper turnaround computations in the stir4200 driver
o [CORRECT] Take care of Tx packet without IrDA metadata (speed)
Signed-off-by: John K. Luebs <jkluebs@lu...>
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>


diff -u -p linux/drivers/net/irda/stir4200.d0.c linux/drivers/net/irda/stir4200.c
--- linux/drivers/net/irda/stir4200.d0.c Mon Feb 7 16:35:45 2005
+++ linux/drivers/net/irda/stir4200.c Mon Feb 7 16:37:25 2005
@@ -671,7 +671,8 @@ static void turnaround_delay(const struc
return;

do_gettimeofday(&now);
- us -= (now.tv_sec - stir->rx_time.tv_sec) * USEC_PER_SEC;
+ if (now.tv_sec - stir->rx_time.tv_sec > 0)
+ us -= USEC_PER_SEC;
us -= now.tv_usec - stir->rx_time.tv_usec;
if (us < 10)
return;
@@ -787,7 +788,7 @@ static int stir_transmit_thread(void *ar
stir_send(stir, skb);
dev_kfree_skb(skb);

- if (stir->speed != new_speed) {
+ if ((new_speed != -1) && (stir->speed != new_speed)) {
if (fifo_txwait(stir, -1) ||
change_speed(stir, new_speed))
break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.018 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site