diff options
author | Zhi-Jun Robin Fu <Zhijun.Fu@Sun.COM> | 2010-05-31 10:57:57 +0800 |
---|---|---|
committer | Zhi-Jun Robin Fu <Zhijun.Fu@Sun.COM> | 2010-05-31 10:57:57 +0800 |
commit | 586fe2c2bfa4216c91ca1ccaf9b43738d60ede7e (patch) | |
tree | 5709e44f08e037d2167c2d1406342ba5e9d649e7 | |
parent | f4377aa6bcfe69494deed22ad94325bb57b03a32 (diff) | |
download | illumos-gate-586fe2c2bfa4216c91ca1ccaf9b43738d60ede7e.tar.gz |
6953990 snv-139 WARNING: illegal PCI request: offset = ff, size = 1
-rw-r--r-- | usr/src/uts/i86pc/os/pci_cfgacc_x86.c | 6 | ||||
-rw-r--r-- | usr/src/uts/sun4u/io/pciex/pci_cfgacc_4u.c | 2 | ||||
-rw-r--r-- | usr/src/uts/sun4v/io/pciex/pci_cfgacc_4v.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/uts/i86pc/os/pci_cfgacc_x86.c b/usr/src/uts/i86pc/os/pci_cfgacc_x86.c index f643354245..b48a4c0703 100644 --- a/usr/src/uts/i86pc/os/pci_cfgacc_x86.c +++ b/usr/src/uts/i86pc/os/pci_cfgacc_x86.c @@ -196,12 +196,12 @@ pci_cfgacc_mmio(pci_cfgacc_req_t *req) } static boolean_t -pci_cfgacc_valid(pci_cfgacc_req_t *req, uint16_t maxoffset) +pci_cfgacc_valid(pci_cfgacc_req_t *req, uint16_t cfgspc_size) { int sz = req->size; if (IS_P2ALIGNED(req->offset, sz) && - (req->offset < maxoffset) && + (req->offset + sz - 1 < cfgspc_size) && ((sz & 0xf) && ISP2(sz))) return (B_TRUE); @@ -234,7 +234,7 @@ pci_cfgacc_acc(pci_cfgacc_req_t *req) pci_cfgacc_check_io(req); if (req->ioacc) { - if (pci_cfgacc_valid(req, pci_iocfg_max_offset)) + if (pci_cfgacc_valid(req, pci_iocfg_max_offset + 1)) pci_cfgacc_io(req); } else { if (pci_cfgacc_valid(req, PCIE_CFG_SPACE_SIZE)) diff --git a/usr/src/uts/sun4u/io/pciex/pci_cfgacc_4u.c b/usr/src/uts/sun4u/io/pciex/pci_cfgacc_4u.c index 9d12a74ce6..146aaf5757 100644 --- a/usr/src/uts/sun4u/io/pciex/pci_cfgacc_4u.c +++ b/usr/src/uts/sun4u/io/pciex/pci_cfgacc_4u.c @@ -45,7 +45,7 @@ pci_cfgacc_valid(pci_cfgacc_req_t *req) int sz = req->size; if (IS_P2ALIGNED(req->offset, sz) && - (req->offset < PCIE_CFG_SPACE_SIZE) && + (req->offset + sz - 1 < PCIE_CFG_SPACE_SIZE) && ((sz & 0xf) && ISP2(sz))) return (B_TRUE); diff --git a/usr/src/uts/sun4v/io/pciex/pci_cfgacc_4v.c b/usr/src/uts/sun4v/io/pciex/pci_cfgacc_4v.c index 9818ac0ce6..8e379cfd2f 100644 --- a/usr/src/uts/sun4v/io/pciex/pci_cfgacc_4v.c +++ b/usr/src/uts/sun4v/io/pciex/pci_cfgacc_4v.c @@ -50,7 +50,7 @@ pci_cfgacc_valid(pci_cfgacc_req_t *req) int sz = req->size; if (IS_P2ALIGNED(req->offset, sz) && - (req->offset < PCIE_CFG_SPACE_SIZE) && + (req->offset + sz - 1 < PCIE_CFG_SPACE_SIZE) && ((sz & 0xf) && ISP2(sz))) return (B_TRUE); |