From e74605baa8acb286be4156860d0180c426c4bff0 Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Thu, 21 Sep 2006 14:25:34 -0500 Subject: [PATCH] --- yaml --- r: 34130 b: refs/heads/master c: d608df5c7da6ee968aa2ad43c596d5f8d4022299 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/maple/pci.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index fb1d5b668308..7132f9cf3945 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ed709d134deeaea7925a3d748b33ca7e58cc683d +refs/heads/master: d608df5c7da6ee968aa2ad43c596d5f8d4022299 diff --git a/trunk/arch/powerpc/platforms/maple/pci.c b/trunk/arch/powerpc/platforms/maple/pci.c index dc05af5156a9..ec5c14f5ba49 100644 --- a/trunk/arch/powerpc/platforms/maple/pci.c +++ b/trunk/arch/powerpc/platforms/maple/pci.c @@ -213,6 +213,9 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; + if (offset > 0xff) + return PCIBIOS_BAD_REGISTER_NUMBER; + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); if (!addr) return PCIBIOS_DEVICE_NOT_FOUND; @@ -245,6 +248,9 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; + if (offset > 0xff) + return PCIBIOS_BAD_REGISTER_NUMBER; + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); if (!addr) return PCIBIOS_DEVICE_NOT_FOUND;