From: Tero Roponen <teanropo@cc.jyu.fi>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Linus Torvalds <torvalds@osdl.org>, Greg KH <greg@kroah.com>,
Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] x86: pci_assign_unassigned_resources() update
Date: Tue, 30 Aug 2005 19:22:04 +0300 (EEST) [thread overview]
Message-ID: <Pine.GSO.4.58.0508301921080.17329@kanto> (raw)
In-Reply-To: <20050830184852.A25380@jurassic.park.msu.ru>
On Tue, 30 Aug 2005, Ivan Kokshaysky wrote:
>
> Tero, can you confirm that 2.6.13 with this patch works for you?
>
> Ivan.
Confirmed. Vanilla 2.6.13 with this patch works for me.
-
Tero Roponen
>
> --- 2.6.13/arch/i386/pci/common.c 2005-08-29 03:41:01.000000000 +0400
> +++ linux/arch/i386/pci/common.c 2005-08-30 13:44:24.000000000 +0400
> @@ -165,7 +165,6 @@ static int __init pcibios_init(void)
> if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
> pcibios_sort();
> #endif
> - pci_assign_unassigned_resources();
> return 0;
> }
>
> --- 2.6.13/arch/i386/pci/i386.c 2005-08-29 03:41:01.000000000 +0400
> +++ linux/arch/i386/pci/i386.c 2005-08-30 17:35:03.000000000 +0400
> @@ -170,43 +170,26 @@ static void __init pcibios_allocate_reso
> static int __init pcibios_assign_resources(void)
> {
> struct pci_dev *dev = NULL;
> - int idx;
> - struct resource *r;
> + struct resource *r, *pr;
>
> - for_each_pci_dev(dev) {
> - int class = dev->class >> 8;
> -
> - /* Don't touch classless devices and host bridges */
> - if (!class || class == PCI_CLASS_BRIDGE_HOST)
> - continue;
> -
> - for(idx=0; idx<6; idx++) {
> - r = &dev->resource[idx];
> -
> - /*
> - * Don't touch IDE controllers and I/O ports of video cards!
> - */
> - if ((class == PCI_CLASS_STORAGE_IDE && idx < 4) ||
> - (class == PCI_CLASS_DISPLAY_VGA && (r->flags & IORESOURCE_IO)))
> - continue;
> -
> - /*
> - * We shall assign a new address to this resource, either because
> - * the BIOS forgot to do so or because we have decided the old
> - * address was unusable for some reason.
> - */
> - if (!r->start && r->end)
> - pci_assign_resource(dev, idx);
> - }
> -
> - if (pci_probe & PCI_ASSIGN_ROMS) {
> + if (!(pci_probe & PCI_ASSIGN_ROMS)) {
> + /* Try to use BIOS settings for ROMs, otherwise let
> + pci_assign_unassigned_resources() allocate the new
> + addresses. */
> + for_each_pci_dev(dev) {
> r = &dev->resource[PCI_ROM_RESOURCE];
> - r->end -= r->start;
> - r->start = 0;
> - if (r->end)
> - pci_assign_resource(dev, PCI_ROM_RESOURCE);
> + if (!r->flags || !r->start)
> + continue;
> + pr = pci_find_parent_resource(dev, r);
> + if (!pr || request_resource(pr, r) < 0) {
> + r->end -= r->start;
> + r->start = 0;
> + }
> }
> }
> +
> + pci_assign_unassigned_resources();
> +
> return 0;
> }
>
> --- 2.6.13/drivers/pci/setup-bus.c 2005-08-29 03:41:01.000000000 +0400
> +++ linux/drivers/pci/setup-bus.c 2005-08-30 13:44:24.000000000 +0400
> @@ -40,7 +40,7 @@
> * FIXME: IO should be max 256 bytes. However, since we may
> * have a P2P bridge below a cardbus bridge, we need 4K.
> */
> -#define CARDBUS_IO_SIZE (256)
> +#define CARDBUS_IO_SIZE (4*1024)
> #define CARDBUS_MEM_SIZE (32*1024*1024)
>
> static void __devinit
>
prev parent reply other threads:[~2005-08-30 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-30 14:48 Ivan Kokshaysky
2005-08-30 16:22 ` Tero Roponen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.58.0508301921080.17329@kanto \
--to=teanropo@cc.jyu.fi \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®