]> xenbits.xen.org Git - xenclient/linux-2.6.27-pq.git/commitdiff
Have the kernel run vbetool post after flring the iGFX
authorroot <root@kiffu-2.uk.xensource.com>
Mon, 3 Aug 2009 16:59:35 +0000 (17:59 +0100)
committerroot <root@kiffu-2.uk.xensource.com>
Mon, 3 Aug 2009 16:59:35 +0000 (17:59 +0100)
master/post-after-flr [new file with mode: 0644]

diff --git a/master/post-after-flr b/master/post-after-flr
new file mode 100644 (file)
index 0000000..814a8a7
--- /dev/null
@@ -0,0 +1,33 @@
+diff --git a/drivers/xen/pciback/pciback_ops.c b/drivers/xen/pciback/pciback_ops.c
+index 8e6f512..3ef73cc 100644
+--- a/drivers/xen/pciback/pciback_ops.c
++++ b/drivers/xen/pciback/pciback_ops.c
+@@ -437,6 +437,28 @@ static int pciback_do_secondary_bus_reset(struct pci_dev *dev, u32 dev_type)
+       return 0;
+ }
++/*quick hack to run post*/
++static void hack_repost_after_flr(struct pci_dev *dev)
++{
++      if (dev->vendor != PCIBACK_VENDOR_INTEL)
++              return;
++
++      if ((dev->class >> 8) != PCIBACK_CLASS_ID_VGA) 
++              return;
++              
++      if (dev->bus->number != 0 || dev->devfn != PCI_DEVFN(2,0))
++                      return;
++
++      pci_write_config_word(dev, PCI_COMMAND, 7);
++
++
++      {
++      char *argv[]={"/usr/sbin/vbetool","post",NULL};
++      char *env[]={NULL,NULL};
++      call_usermodehelper(argv[0],argv,env,UMH_WAIT_EXEC);
++      }
++}
++
+ /* This function is used to do a function level reset on a singe 
+  * device/function. FLRs must be done on devices before they are 
+  * unassigned from one domain and passed through to another. The