Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S270524AbTHHJIq (ORCPT ); Fri, 8 Aug 2003 05:08:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S270642AbTHHJIq (ORCPT ); Fri, 8 Aug 2003 05:08:46 -0400 Received: from zeus.kernel.org ([204.152.189.113]:42167 "EHLO zeus.kernel.org") by vger.kernel.org with ESMTP id S270524AbTHHJI3 (ORCPT ); Fri, 8 Aug 2003 05:08:29 -0400 Date: Fri, 8 Aug 2003 10:54:51 +0200 (MEST) From: Javier Achirica To: Jeff Garzik cc: Benjamin Herrenschmidt , linux-kernel mailing list Subject: Re: [PATCH] airo driver: fix races, oops, etc.. In-Reply-To: <3F32678B.7020407@pobox.com> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1060332891=:387" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 45313 Lines: 758 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-851401618-1060332891=:387 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 7 Aug 2003, Jeff Garzik wrote: > Javier Achirica wrote: > > I've been studying the problem for a while and I've implemented a solution > > using a single kernel thread and a wait queue for synchronization. I've > > tested it and looks like it works fine. It can be used both in 2.4 > > and 2.6 kernels. Before submitting a patch with it I'd like someone with > > experience in this kind of code to take a look at it just in case I'm > > doing something dumb. Jeff? :-) > > Unless the patch is huge (100K or more), post it to linux-kernel, and CC > it to me and Benjamin Herrenschmidt. Here it goes. This version should be applied to the latest patches I sent you in the 2.4 tree. Comments are welcome. Thanks, Javier Achirica ---559023410-851401618-1060332891=:387 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="thread.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="thread.diff" LS0tIGxpbnV4L2RyaXZl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dGF0dXMgPSBzZXR1 cF9jYXJkKGFpLCBkZXYtPmRldl9hZGRyKTsNCiANCiAJZm9yKCBpID0gMDsg aSA8IE1BWF9GSURTOyBpKysgKSB7DQo= ---559023410-851401618-1060332891=:387-- - 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/