Re: [PATCH 0/4] PCI: fix cardbus and sriov regressions

From: Bjorn Helgaas
Date: Mon Jun 27 2011 - 13:34:52 EST


[+linux-pci again]

On Fri, Jun 24, 2011 at 1:29 PM, Ram Pai <linuxram@xxxxxxxxxx> wrote:
> On Thu, Jun 23, 2011 at 04:55:06PM +0200, Oliver Hartkopp wrote:
>> Hello RP,
>>
>> unfortunately i noticed the discussion on linux-kernel ML a bit late, as i did
>> not subscribe it due to the traffic.
>
> sorry, did not see this mail earlier.
>
>
>> >>> When comparing the logs with mgdiff, i found
>> >>>
>> >>> in revered:
>> >>>
>> >>> pci_bus 0000:04: resource 0 [io  0x2000-0x20ff]
>> >>> pci_bus 0000:04: resource 1 [io  0x2400-0x24ff]
>> >>>
>> >>> in the fixed version (4 patches)
>> >>>
>> >>> pci_bus 0000:04: resource 0 [io  0x2400-0x24ff]
>> >>> pci_bus 0000:04: resource 1 [io  0x2001-0x2100]
>>
>> Did you get further with the unusual alignment?
>
> No. i was thinking this alignment  should be ok, since that cardbus resource
> has to be SIZE aligned and not START aligned.
>
> However if it is not acceptable, i will figure out a way
> to get it aligned on the right boundaries.

Does the bridge leading to bus 04 really support a window starting at 0x2001?

I assume this is a CardBus bridge because it has two I/O windows. My
interpretation of the MindShare CardBus book (I don't have the PC Card
Standard) is that the low two bits of the I/O base address register
tell you whether 16- or 32-bit addressing is supported (00b means
16-bit decoding is used, 01b means 32-bit decoding is used), and that
the actual window starts on a four-byte aligned address.

If that's correct, an I/O base register containing 0x2001 would mean a
window starting at 0x2000 and supporting 32-bit decoding, and it would
be impossible to have a window starting at 0x2001, i.e., one that
contains 0x2001 but not 0x2000.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/