diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2005-01-08 17:18:44 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2005-01-08 17:18:44 +0000 |
commit | b67b453040895fa9d618ea47e4f7c1ce8c9c4101 (patch) | |
tree | 2a39026e08fa4a2d5512d2ccd3d381574abdd6c6 | |
parent | 90799422b4e79aa48fb257e072541b76c88cd184 (diff) | |
download | xen-b67b453040895fa9d618ea47e4f7c1ce8c9c4101.tar.gz xen-b67b453040895fa9d618ea47e4f7c1ce8c9c4101.tar.bz2 xen-b67b453040895fa9d618ea47e4f7c1ce8c9c4101.zip |
bitkeeper revision 1.1159.170.82 (41e015f4JgNe4YTschd0_g0exH4QQw)
Turn off strict PCI base-address poking checks. May help video-card
compatibility. May revert this patch if not.
-rw-r--r-- | xen/common/physdev.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xen/common/physdev.c b/xen/common/physdev.c index c01b7f0805..4b6f398e9a 100644 --- a/xen/common/physdev.c +++ b/xen/common/physdev.c @@ -45,6 +45,7 @@ extern void pcibios_enable_irq(struct pci_dev *dev); #define INFO(_f, _a...) ((void)0) #endif +#define SLOPPY_CHECKING #define ACC_READ 1 #define ACC_WRITE 2 @@ -289,7 +290,7 @@ inline static int check_dev_acc (struct domain *p, return 0; } - +#ifndef SLOPPY_CHECKING /* * Base address registers contain the base address for IO regions. * The length can be determined by writing all 1s to the register and @@ -480,6 +481,7 @@ static int do_rom_address_access(phys_dev_t *pdev, int acc, int len, u32 *val) return ret; } +#endif /* SLOPPY_CHECKING */ /* * Handle a PCI config space read access if the domain has access privileges. @@ -496,12 +498,13 @@ static long pci_cfgreg_read(int bus, int dev, int func, int reg, * all 1s. In this case the domain has no read access, which should * also look like the device is non-existent. */ *val = 0xFFFFFFFF; - return ret; /* KAF: error return seems to matter on my test machine. */ + return ret; } /* Fake out read requests for some registers. */ switch ( reg ) { +#ifndef SLOPPY_CHECKING case PCI_BASE_ADDRESS_0: ret = do_base_address_access(pdev, ACC_READ, 0, len, val); break; @@ -529,6 +532,7 @@ static long pci_cfgreg_read(int bus, int dev, int func, int reg, case PCI_ROM_ADDRESS: ret = do_rom_address_access(pdev, ACC_READ, len, val); break; +#endif case PCI_INTERRUPT_LINE: *val = pdev->dev->irq; @@ -561,6 +565,7 @@ static long pci_cfgreg_write(int bus, int dev, int func, int reg, /* special treatment for some registers */ switch (reg) { +#ifndef SLOPPY_CHECKING case PCI_BASE_ADDRESS_0: ret = do_base_address_access(pdev, ACC_WRITE, 0, len, &val); break; @@ -588,6 +593,7 @@ static long pci_cfgreg_write(int bus, int dev, int func, int reg, case PCI_ROM_ADDRESS: ret = do_rom_address_access(pdev, ACC_WRITE, len, &val); break; +#endif default: if ( pdev->flags != ACC_WRITE ) |