Questions about ioport-assignments
Dominik Brodowski
linux at dominikbrodowski.net
Sun Apr 18 05:30:38 EDT 2010
Hey,
On Sun, Apr 18, 2010 at 10:11:41AM +0900, Komuro wrote:
>
> Hi,
>
> >Hm, I don't get (yet) where you're heading to -- could you provide me with a
> >patch and/or more extensive explanation?
>
> OK. Here is the patch.
>
> pci_bus_alloc_resource calls pcmcia_align with res->start=0xc000.
> To avoid this , we need to call pcmcia_align manually.
>
>
>
> --- linux-2.6.34-rc4-git4/drivers/pcmcia/rsrc_nonstatic.c.orig 2010-04-18 09:52:12.000000000 +0900
> +++ linux-2.6.34-rc4-git4/drivers/pcmcia/rsrc_nonstatic.c 2010-04-18 09:56:09.000000000 +0900
> @@ -697,6 +697,9 @@ static struct resource *nonstatic_find_i
> struct pcmcia_align_data data;
> unsigned long min = base;
> int ret;
> +#if defined(CONFIG_X86)
> + resource_size_t start;
> +#endif
>
> if (align == 0)
> align = 0x10000;
> @@ -705,6 +708,16 @@ static struct resource *nonstatic_find_i
> data.offset = base & data.mask;
> data.map = &s_data->io_db;
>
> +#if defined(CONFIG_X86)
> + start = pcmcia_align(&data, res, num, align);
> +
> + if (start) {
> + res->start = start;
> + res->end = start+num-1;
> + return res;
> + }
> +#endif
> +
> #ifdef CONFIG_PCI
> if (s->cb_dev) {
> ret = pci_bus_alloc_resource(s->cb_dev->bus, res, num, 1,
No, that can't be right -- see commits 509b0865 and 7a96e87d , both based on
reports from you, on why we need to call pci_bus_alloc_resource...
Best,
Dominik
More information about the linux-pcmcia
mailing list