Re: pci: Arch hook to determine config space size

From: Matthew Wilcox
Date: Tue Feb 01 2005 - 07:35:15 EST


On Mon, Jan 31, 2005 at 10:52:29PM -0600, Brian King wrote:
> @@ -62,8 +72,11 @@ static int rtas_read_config(struct devic
> return PCIBIOS_DEVICE_NOT_FOUND;
> if (where & (size - 1))
> return PCIBIOS_BAD_REGISTER_NUMBER;

You should probably delete this redundant test at the same time ...

> + if (!config_access_valid(dn, where))
> + return PCIBIOS_BAD_REGISTER_NUMBER;
>
> - addr = (dn->busno << 16) | (dn->devfn << 8) | where;
> + addr = ((where & 0xf00) << 20) | (dn->busno << 16) |
> + (dn->devfn << 8) | (where & 0xff);
> buid = dn->phb->buid;
> if (buid) {
> ret = rtas_call(ibm_read_pci_config, 4, 2, &returnval,

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
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/