From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Gerd Hoffmann <kraxel@redhat.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH 3.12 13/19] hyperv-fb: add pci stub
Date: Mon, 18 Nov 2013 10:37:26 -0800 [thread overview]
Message-ID: <20131118183647.871718116@linuxfoundation.org> (raw)
In-Reply-To: <20131118183644.030738675@linuxfoundation.org>
3.12-stable review patch. If anyone has any objections, please let me know.
------------------
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);
}
next prev parent reply other threads:[~2013-11-18 18:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 18:37 [PATCH 3.12 00/19] 3.12.1-stable review Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 01/19] net/mlx4_core: Fix call to __mlx4_unregister_mac Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 02/19] net: sctp: do not trigger BUG_ON in sctp_cmd_delete_tcb Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 03/19] net: flow_dissector: fail on evil iph->ihl Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 04/19] virtio-net: correctly handle cpu hotplug notifier during resuming Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 05/19] xen-netback: use jiffies_64 value to calculate credit timeout Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 06/19] cxgb3: Fix length calculation in write_ofld_wr() on 32-bit architectures Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 07/19] tcp: gso: fix truesize tracking Greg Kroah-Hartman
2013-11-28 5:25 ` Ben Hutchings
2013-12-05 21:31 ` David Miller
2013-11-18 18:37 ` [PATCH 3.12 08/19] tcp: fix SYNACK RTT estimation in Fast Open Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 09/19] tcp: only take RTT from timestamps if new data is acked Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 10/19] tcp: do not rearm RTO when future data are sacked Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 11/19] ipv6: ip6_dst_check needs to check for expired dst_entries Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 12/19] ipv6: reset dst.expires value when clearing expire flag Greg Kroah-Hartman
2013-11-18 18:37 ` Greg Kroah-Hartman [this message]
2013-11-18 18:37 ` [PATCH 3.12 14/19] USB: add new zte 3g-dongles pid to option.c Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 15/19] ALSA: hda - hdmi: Fix reported channel map on common default layouts Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 16/19] tracing: Fix potential out-of-bounds in trace_get_user() Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 17/19] misc: atmel_pwm: add deferred-probing support Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 18/19] backlight: atmel-pwm-bl: fix deferred probe from __init Greg Kroah-Hartman
2013-11-18 18:37 ` [PATCH 3.12 19/19] usbcore: set lpm_capable field for LPM capable root hubs Greg Kroah-Hartman
2013-11-19 3:11 ` [PATCH 3.12 00/19] 3.12.1-stable review Guenter Roeck
2013-11-20 11:07 ` Satoru Takeuchi
2013-11-20 15:25 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131118183647.871718116@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).