]> xenbits.xen.org Git - xenclient/kernel.git/commitdiff
FLR - intermediate checkin 11 3/28 - disable gm45 igfx flr and
authorRoss Philipson <ross.philipson@citrix.com>
Sat, 28 Mar 2009 18:24:34 +0000 (14:24 -0400)
committerRoss Philipson <ross.philipson@citrix.com>
Sat, 28 Mar 2009 18:24:34 +0000 (14:24 -0400)
check for a NULL parent bridge.

 Changes to be committed:
modified:   drivers/xen/pciback/pciback_ops.c

drivers/xen/pciback/pciback_ops.c

index b9b5492e8bd4d866547c056b5bc988bc2cc4e02d..879975345ac650d4b9a0a96f8ac6899cad7a6b1d 100644 (file)
@@ -23,6 +23,9 @@
 int verbose_request = 0;
 module_param(verbose_request, int, 0644);
 
+/* TODO remove once this is fixed */
+static int disable_gm45_igfx_flr = 1;
+
 /* Used to store the config state so it can be restored after
  * resets.
  */
@@ -160,6 +163,9 @@ static int pciback_do_vendor_specific_reset(struct pci_dev *dev)
                return -ENXIO;
 
        if ((dev->class >> 8) == PCIBACK_CLASS_ID_VGA) {
+               if (disable_gm45_igfx_flr)
+                       return -ENXIO;
+
                if (dev->bus->number != 0 || dev->devfn != PCI_DEVFN(2,0))
                        return -ENXIO;
 
@@ -274,6 +280,10 @@ static int pciback_do_secondary_bus_reset(struct pci_dev *dev)
        struct pci_dev *dev_arr[8];
        int i = 0, err = 0;
 
+       if (!bridge) {
+               dev_dbg(&dev->dev, "No parent bridge to reset\n");
+               return ENXIO;
+       }
        dev_dbg(&dev->dev, "doing PCIe secondary bus reset\n"); 
 
        /* Enumerate all devices that share the same slot for the