From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id A61162F460 for ; Fri, 2 Mar 2001 11:46:25 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f22GlHL30954 for axp-list@listman.redhat.com; Fri, 2 Mar 2001 11:47:17 -0500 Received: from jurassic.park.msu.ru (jurassic.park.msu.ru [195.208.223.243]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f22GlB430950 for ; Fri, 2 Mar 2001 11:47:14 -0500 Received: (from ink@localhost) by jurassic.park.msu.ru (8.11.0/8.11.0) id f22Gjqu22389 for axp-list@redhat.com; Fri, 2 Mar 2001 19:45:52 +0300 Date: Fri, 2 Mar 2001 19:45:52 +0300 From: Ivan Kokshaysky To: axp-list@redhat.com Subject: Re: No valid MMIO address in PCI config space Message-ID: <20010302194552.A22364@jurassic.park.msu.ru> References: <200102271611.RAA00755@ludwig-alpha.unil.ch> <20010227204041.A2839@jurassic.park.msu.ru> <20010227144151.A1877@linux04.mro.cpqcorp.net> <20010228203716.A546@jurassic.park.msu.ru> <20010228154048.A2198@linux04.mro.cpqcorp.net> <20010301212922.A28916@jurassic.park.msu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010301212922.A28916@jurassic.park.msu.ru>; from ink@jurassic.park.msu.ru on Thu, Mar 01, 2001 at 09:29:22PM +0300 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: > I'll investigate this tomorrow. Well, here is a fix. Problem was that on alpha lines in /proc/bus/pci/devices are quite a bit longer (format for "long" is "%16lx" vs. "%08lx" on 32-bit platforms), so they don't fit in the fgets() buffer. Apparently lnx_pci.c was written and tested on some 32-bit system. ;-) With this patch all that "resource overlap" weirdness is gone. Ivan. --- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c.orig Tue Oct 17 20:53:20 2000 +++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_pci.c Fri Mar 2 13:23:04 2001 @@ -13,7 +13,7 @@ Bool xf86GetPciSizeFromOS(PCITAG tag, int index, int* bits) { FILE *file; - char c[0x100]; + char c[0x200]; char *res; int bus, devfn, dev, fn; unsigned int size[7]; @@ -26,7 +26,7 @@ xf86GetPciSizeFromOS(PCITAG tag, int ind if (!(file = fopen("/proc/bus/pci/devices","r"))) return FALSE; do { - res = fgets(c,0xff,file); + res = fgets(c,0x1ff,file); if (res) { num = sscanf(res,"%02x%02x\t%*04x%*04x\t%*x" "\t%*x\t%*x\t%*x\t%*x\t%*x\t%*x\t%*x"