From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261985AbUL0VMx (ORCPT ); Mon, 27 Dec 2004 16:12:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261986AbUL0VMx (ORCPT ); Mon, 27 Dec 2004 16:12:53 -0500 Received: from pils.us-lot.org ([212.67.207.13]:58376 "EHLO pils.us-lot.org") by vger.kernel.org with ESMTP id S261985AbUL0VMt (ORCPT ); Mon, 27 Dec 2004 16:12:49 -0500 To: Alan Cox Cc: torvalds@osdl.org, Linux Kernel Mailing List , linux-ide@vger.kernel.org, Bartlomiej Zolnierkiewicz Subject: Re: PATCH: (Discussion) Stop IDE legacy ISA probes on PCI systems References: <1104156823.20898.21.camel@localhost.localdomain> From: Adam Sampson Organization: Things I did not know at first I learned by doing twice. Date: Mon, 27 Dec 2004 21:15:26 +0000 In-Reply-To: <1104156823.20898.21.camel@localhost.localdomain> (Alan Cox's message of "Mon, 27 Dec 2004 14:13:45 +0000") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) 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 Alan Cox writes: > switch (index) { > case 0: return 0x1f0; > case 1: return 0x170; > + > + if(pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) { > + case 2: return 0x1e8; > + case 3: return 0x168; > + case 4: return 0x1e0; > + case 5: return 0x160; > + } > + > default: > return 0; > } I don't think that code will have the intended effect, unless your GCC has some funny ideas about switch statements... -- Adam Sampson