]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2013 14:13:04 +0000 (23:13 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2013 14:13:04 +0000 (23:13 +0900)
added patches:
hyperv-fb-add-pci-stub.patch

queue-3.10/hyperv-fb-add-pci-stub.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/hyperv-fb-add-pci-stub.patch b/queue-3.10/hyperv-fb-add-pci-stub.patch
new file mode 100644 (file)
index 0000000..d23895e
--- /dev/null
@@ -0,0 +1,104 @@
+From 7ad9684721606efbfb9b347346816e1e6baff8bb Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel@redhat.com>
+Date: Wed, 2 Oct 2013 13:55:10 +0200
+Subject: hyperv-fb: add pci stub
+
+From: Gerd Hoffmann <kraxel@redhat.com>
+
+commit 7ad9684721606efbfb9b347346816e1e6baff8bb upstream.
+
+This patch adds a pci stub driver to hyper-fb.  The hyperv framebuffer
+driver will bind to the pci device then, so linux kernel and userspace
+know there is a proper kernel driver for the device active.  lspci shows
+this for example:
+
+[root@dhcp231 ~]# lspci -vs8
+00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual
+VGA (prog-if 00 [VGA controller])
+        Flags: bus master, fast devsel, latency 0, IRQ 11
+        Memory at f8000000 (32-bit, non-prefetchable) [size=64M]
+        Expansion ROM at <unassigned> [disabled]
+        Kernel driver in use: hyperv_fb
+
+Another effect is that the xorg vesa driver will not attach to the
+device and thus the Xorg server will automatically use the fbdev
+driver instead.
+
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/video/hyperv_fb.c |   40 +++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 39 insertions(+), 1 deletion(-)
+
+--- a/drivers/video/hyperv_fb.c
++++ b/drivers/video/hyperv_fb.c
+@@ -795,12 +795,21 @@ static int hvfb_remove(struct hv_device
+ }
++static DEFINE_PCI_DEVICE_TABLE(pci_stub_id_table) = {
++      {
++              .vendor      = PCI_VENDOR_ID_MICROSOFT,
++              .device      = PCI_DEVICE_ID_HYPERV_VIDEO,
++      },
++      { /* end of list */ }
++};
++
+ static const struct hv_vmbus_device_id id_table[] = {
+       /* Synthetic Video Device GUID */
+       {HV_SYNTHVID_GUID},
+       {}
+ };
++MODULE_DEVICE_TABLE(pci, pci_stub_id_table);
+ MODULE_DEVICE_TABLE(vmbus, id_table);
+ static struct hv_driver hvfb_drv = {
+@@ -810,14 +819,43 @@ static struct hv_driver hvfb_drv = {
+       .remove = hvfb_remove,
+ };
++static int hvfb_pci_stub_probe(struct pci_dev *pdev,
++                             const struct pci_device_id *ent)
++{
++      return 0;
++}
++
++static void hvfb_pci_stub_remove(struct pci_dev *pdev)
++{
++}
++
++static struct pci_driver hvfb_pci_stub_driver = {
++      .name =         KBUILD_MODNAME,
++      .id_table =     pci_stub_id_table,
++      .probe =        hvfb_pci_stub_probe,
++      .remove =       hvfb_pci_stub_remove,
++};
+ static int __init hvfb_drv_init(void)
+ {
+-      return vmbus_driver_register(&hvfb_drv);
++      int ret;
++
++      ret = vmbus_driver_register(&hvfb_drv);
++      if (ret != 0)
++              return ret;
++
++      ret = pci_register_driver(&hvfb_pci_stub_driver);
++      if (ret != 0) {
++              vmbus_driver_unregister(&hvfb_drv);
++              return ret;
++      }
++
++      return 0;
+ }
+ static void __exit hvfb_drv_exit(void)
+ {
++      pci_unregister_driver(&hvfb_pci_stub_driver);
+       vmbus_driver_unregister(&hvfb_drv);
+ }
index 32376996f22d26573057d37661b65c898e448a93..bb3aa132e8e650d160a80359ffbeb67e44f88a67 100644 (file)
@@ -9,3 +9,4 @@ net-mlx4_core-fix-call-to-__mlx4_unregister_mac.patch
 xen-netback-handle-backend-state-transitions-in-a-more-robust-way.patch
 xen-netback-transition-to-closed-when-removing-a-vif.patch
 batman-adv-set-up-network-coding-packet-handlers-during-module-init.patch
+hyperv-fb-add-pci-stub.patch