ia64/xen-unstable

changeset 3395:1c0155635933

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.
author kaf24@scramble.cl.cam.ac.uk
date Sat Jan 08 17:18:44 2005 +0000 (2005-01-08)
parents acf0fa185f4a
children a4621fab44b4 47678d2c18c3
files xen/common/physdev.c
line diff
     1.1 --- a/xen/common/physdev.c	Sat Jan 08 01:54:42 2005 +0000
     1.2 +++ b/xen/common/physdev.c	Sat Jan 08 17:18:44 2005 +0000
     1.3 @@ -45,6 +45,7 @@ extern void pcibios_enable_irq(struct pc
     1.4  #define INFO(_f, _a...) ((void)0)
     1.5  #endif
     1.6  
     1.7 +#define SLOPPY_CHECKING
     1.8  
     1.9  #define ACC_READ  1
    1.10  #define ACC_WRITE 2
    1.11 @@ -289,7 +290,7 @@ inline static int check_dev_acc (struct 
    1.12      return 0;
    1.13  }
    1.14  
    1.15 -
    1.16 +#ifndef SLOPPY_CHECKING
    1.17  /*
    1.18   * Base address registers contain the base address for IO regions.
    1.19   * The length can be determined by writing all 1s to the register and
    1.20 @@ -480,6 +481,7 @@ static int do_rom_address_access(phys_de
    1.21      return ret;
    1.22  
    1.23  }
    1.24 +#endif /* SLOPPY_CHECKING */
    1.25  
    1.26  /*
    1.27   * Handle a PCI config space read access if the domain has access privileges.
    1.28 @@ -496,12 +498,13 @@ static long pci_cfgreg_read(int bus, int
    1.29           * all 1s.  In this case the domain has no read access, which should
    1.30           * also look like the device is non-existent. */
    1.31          *val = 0xFFFFFFFF;
    1.32 -        return ret; /* KAF: error return seems to matter on my test machine. */
    1.33 +        return ret;
    1.34      }
    1.35  
    1.36      /* Fake out read requests for some registers. */
    1.37      switch ( reg )
    1.38      {
    1.39 +#ifndef SLOPPY_CHECKING
    1.40      case PCI_BASE_ADDRESS_0:
    1.41          ret = do_base_address_access(pdev, ACC_READ, 0, len, val);
    1.42          break;
    1.43 @@ -529,6 +532,7 @@ static long pci_cfgreg_read(int bus, int
    1.44      case PCI_ROM_ADDRESS:
    1.45          ret = do_rom_address_access(pdev, ACC_READ, len, val);
    1.46          break;        
    1.47 +#endif
    1.48  
    1.49      case PCI_INTERRUPT_LINE:
    1.50          *val = pdev->dev->irq;
    1.51 @@ -561,6 +565,7 @@ static long pci_cfgreg_write(int bus, in
    1.52      /* special treatment for some registers */
    1.53      switch (reg)
    1.54      {
    1.55 +#ifndef SLOPPY_CHECKING
    1.56      case PCI_BASE_ADDRESS_0:
    1.57          ret = do_base_address_access(pdev, ACC_WRITE, 0, len, &val);
    1.58          break;
    1.59 @@ -588,6 +593,7 @@ static long pci_cfgreg_write(int bus, in
    1.60      case PCI_ROM_ADDRESS:
    1.61          ret = do_rom_address_access(pdev, ACC_WRITE, len, &val);
    1.62          break;        
    1.63 +#endif
    1.64  
    1.65      default:
    1.66          if ( pdev->flags != ACC_WRITE )