From: Jean T. <jt...@hp...> - 2005-02-07 17:33:24
|
On Mon, Feb 07, 2005 at 09:25:34AM -0800, Stephen Hemminger wrote: > On Mon, 31 Jan 2005 23:08:56 -0500 > John K Luebs <jk...@lu...> wrote: > > > Patch has two bug fixes for the Sigmatel stir4200 driver > > - Prevent 36 minutes of no receive activity from causing large jiffie > > sleep in turnaround_delay > > - Ignore skb speed request if it's -1 > > > > Signed-off-by: John K. Luebs <jk...@lu...> > > > > --- linux-2.6.11-rc2/drivers/net/irda/stir4200.c.orig 2005-01-21 20:47:31.000000000 -0500 > > +++ linux-2.6.11-rc2/drivers/net/irda/stir4200.c 2005-01-31 19:14:38.000000000 -0500 > > @@ -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; > > > > > Go ahead on this as is. Since HZ=1000 on 2.6 perhaps using jiffies and msleep_interruptible > would be good later. Thanks, I'll process that. Jean |