pci: Arch hook to determine config space size
Brian King
brking at us.ibm.com
Tue Feb 1 08:35:38 EST 2005
Matthew Wilcox wrote:
> Basically, ppc64's config ops are broken and need to check the offset
> being read. Here's i386:
>
> static int pci_conf1_write (int seg, int bus, int devfn, int reg, int len, u32 v
> alue)
> {
> unsigned long flags;
>
> if ((bus > 255) || (devfn > 255) || (reg > 255))
> return -EINVAL;
Here is a pure ppc64 implementation that does this.
>
> I think all the config ops in ppc64 are broken and need to check for these
> limits. Also, it does some checks that are already performed by upper layers:
>
> if (where & (size - 1))
> return PCIBIOS_BAD_REGISTER_NUMBER;
>
> is checked for in drivers/pci/access.c
I can submit a separate patch to clean that up.
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppc64_pcix_mode2_cfg.patch
Url: http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050131/6840b689/attachment.txt
More information about the Linuxppc64-dev
mailing list