From owner-freebsd-current Sun Jan 6 12:31:35 2002 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id B2F5D37B41C for ; Sun, 6 Jan 2002 12:31:30 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g06KVPl65838; Sun, 6 Jan 2002 13:31:26 -0700 (MST) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g06KVNx22151; Sun, 6 Jan 2002 13:31:24 -0700 (MST) (envelope-from imp@village.org) Date: Sun, 06 Jan 2002 13:31:18 -0700 (MST) Message-Id: <20020106.133118.118973030.imp@village.org> To: root@nihil.plaut.de Cc: current@FreeBSD.ORG, winter@jurai.net Subject: Re: Why does bus_alloc_resource fail for sound and PCIC? From: "M. Warner Losh" In-Reply-To: <20020105232557.S706-100000@nihil> References: <20020105232557.S706-100000@nihil> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020105232557.S706-100000@nihil> Michael Reifenberger writes: : But why? : Where is PCI_ENABLE_IO_MODES different from: : : pci_enable_busmaster(dev); : pci_enable_io(dev, SYS_RES_IOPORT); : pci_enable_io(dev, SYS_RES_MEMORY); : : or : : data = pci_read_config(dev, PCIR_COMMAND, 2); : data |= (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); : pci_write_config(dev, PCIR_COMMAND, data, 2); : : which allready existed in snd_ich ?!? I think it has to do with the caching of these values in the pci layer. The option turns them on and updates the values in the cache, while the other options do not appear to do so. : BTW: In the case of the PCIC I still get: : pcib2: at device 30.0 on pci0 : pci2: on pcib2 : pccbb0: mem 0x50000000-0x50000fff irq 11 at device : 0.0 on pci2 : pcib2: device pccbb0 requested unsupported memory range 0x50000000-0x50000fff : (decoding 0xc0200000-0xcfffffff, 0xe8000000-0xefffffff) : pccbb0: Could not map register memory : device_probe_and_attach: pccbb0 attach returned 12 : pccbb0: mem 0x50100000-0x50100fff irq 11 at device : 0.1 on pci2 : pcib2: device pccbb0 requested unsupported memory range 0x50100000-0x50100fff : (decoding 0xc0200000-0xcfffffff, 0xe8000000-0xefffffff) : pccbb0: Could not map register memory : device_probe_and_attach: pccbb0 attach returned 12 Maybe you need some patches to the pci bridge code to map the range requested, or to just allow it (since it just works anyway). There's another kludge option: PCI_ALLOW_UNSUPPORTED_IO_RANGE. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message