From: root Date: Mon, 3 Aug 2009 17:11:41 +0000 (+0100) Subject: run vbetool post after flr of iGFX X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6e6d994b51f4006b99fcd8660ac265db72890bd3;p=xenclient%2Flinux-2.6.27-pq.git run vbetool post after flr of iGFX --- diff --git a/master/post-after-flr b/master/post-after-flr index 814a8a7..2226523 100644 --- a/master/post-after-flr +++ b/master/post-after-flr @@ -1,14 +1,15 @@ diff --git a/drivers/xen/pciback/pciback_ops.c b/drivers/xen/pciback/pciback_ops.c -index 8e6f512..3ef73cc 100644 +index 8e6f512..dc3b43c 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) +@@ -437,6 +437,32 @@ 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) +{ ++ printk(KERN_ERR "hack_repost_after_flr()\n"); + if (dev->vendor != PCIBACK_VENDOR_INTEL) + return; + @@ -18,16 +19,28 @@ index 8e6f512..3ef73cc 100644 + if (dev->bus->number != 0 || dev->devfn != PCI_DEVFN(2,0)) + return; + ++ printk(KERN_ERR "hack: command_register=7\n"); + pci_write_config_word(dev, PCI_COMMAND, 7); + + ++ printk(KERN_ERR "hack: starting post\n"); + { -+ char *argv[]={"/usr/sbin/vbetool","post",NULL}; ++ char *argv[]={"/usr/bin/vbetool","post",NULL}; + char *env[]={NULL,NULL}; + call_usermodehelper(argv[0],argv,env,UMH_WAIT_EXEC); + } ++ printk(KERN_ERR "hack: ending post\n"); +} + /* 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 +@@ -496,6 +522,8 @@ void pciback_flr_device(struct pci_dev *dev) + err = -ENODEV; + } while (0); + ++ hack_repost_after_flr(dev); ++ + if (err) + dev_warn(&dev->dev, "FLR not performed for device\n"); + } diff --git a/master/series b/master/series index ce4d679..2549eb9 100644 --- a/master/series +++ b/master/series @@ -310,3 +310,4 @@ xen-acpi-wmi pass2-driver on-the-fly-cx-change bridge-carrier +post-after-flr