From: Takashi Iwai Subject: Re: [PATCH] cs4231-lib: improved waiting after mce_down (2nd rev) Date: Tue, 11 Sep 2007 01:08:07 +0200 Message-ID: References: <20070909221131.06372eb2.krzysztof.h1@gmail.com> <20070911004010.b9114b3e.krzysztof.h1@gmail.com> <46E5C89E.4010607@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 68CF4103803 for ; Tue, 11 Sep 2007 01:08:08 +0200 (CEST) In-Reply-To: <46E5C89E.4010607@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Rene Herman Cc: Krzysztof Helt , Alsa-devel List-Id: alsa-devel@alsa-project.org At Tue, 11 Sep 2007 00:43:42 +0200, Rene Herman wrote: > > Second -- not schedule_timeout_interruptible? A plain schedule_timeout won't > work, as you first need to __set_current_state or it will not schedule. That > is, schedule_timeout_interruptible or _uniterruptible and with the latter, > the loop wouldn't make much sense anymore as it's just going to sleep for > the full 250 ms directly. Ah, right. I'm obviously too sleepy to review now... Actually, the code with msleep() was basically OK. If more finer check is needed, it can simply use msleep(1). The point is to use timer_after_eq() instead of loop count for the precise timeouts. thanks, Takashi