lkml.org 
[lkml]   [2001]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sym53c8xx timer rework
>  /*
> -** Stop the ncr_timeout process
> -** Set release_stage to 1 and wait that ncr_timeout() set it to 2.
> +** Stop the ncr_timeout process - lock it to ensure no timer is running
> +** on a different CPU, or anything
> */
> - np->release_stage = 1;
> - for (i = 50 ; i && np->release_stage != 2 ; i--) MDELAY (100);
> - if (np->release_stage != 2)
> - printk("%s: the timer seems to be already stopped\n",
> - ncr_name(np));
> - else np->release_stage = 2;
> + NCR_LOCK_NCB(np, flags);
> + del_timer(&np->timer);
> + NCR_UNLOCK_NCB(np, flags);

I'm only reading the diff, but this change looks wrong.
The simplest solution is del_timer_sync() instead of
LOCK;del_timer;UNLOCK.

Why do you acqurie the NCB spinlock? the _timeout function runs without
it.

--
Manfred
-
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 12:56    [W:0.038 / U:3.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site