Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261944AbTFFP5F (ORCPT ); Fri, 6 Jun 2003 11:57:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261956AbTFFP5F (ORCPT ); Fri, 6 Jun 2003 11:57:05 -0400 Received: from mion.elka.pw.edu.pl ([194.29.160.35]:34514 "EHLO mion.elka.pw.edu.pl") by vger.kernel.org with ESMTP id S261944AbTFFP5E (ORCPT ); Fri, 6 Jun 2003 11:57:04 -0400 Date: Fri, 6 Jun 2003 18:09:48 +0200 (MET DST) From: Bartlomiej Zolnierkiewicz To: Alan Cox cc: Rusty Russell , Linux Kernel Mailing List Subject: Re: __check_region in ide code? In-Reply-To: <1054913005.17190.6.camel@dhcp22.swansea.linux.org.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1368 Lines: 35 On 6 Jun 2003, Alan Cox wrote: > On Gwe, 2003-06-06 at 09:56, Bartlomiej Zolnierkiewicz wrote: > > > There's nothing inherently *wrong* with check_region, it's > > > just deprecated to trap the old (now racy) idiom of "if > > > (check_region(xx)) reserve_region(xx)". There's no reason not to > > > introduce a probe_region if IDE really wants it. > > > > And ide-probe.c does exactly this racy stuff. > > > > I did patch to convert it to request_region() some time ago, > > I just need to double check it and submit. > > request_region at that point doesn't actually help you. For PIO devices > its too late if you are handling PCMCIA, for PCI devices its too late > because you want to own the PCI device properly, for MMIO its completely > broken (all the mem region stuff in 2.5) Yes, I am aware of that. Patch is only to fix ide-probe.c (request_region() after check_region()) not whole ide resource allocation braindamage. > The only way I can see to fix it properly is to provide ide helpers > for resource allocation that are used by the drivers when needed. Exactly, it is already on my todo. -- Bartlomiej - 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/