summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-02-11 05:31:14 +0100
committerRusty Russell <rusty@rustcorp.com.au>2015-02-11 05:33:17 +0100
commitbe8ff5952a8d943660d3c01f1abf4e71eb565fdb (patch)
treef1f9f10049443136ae0427889c7d2ccbfd74583a /drivers/char
parentvirtio_pci: use 16-bit accessor for queue_enable. (diff)
downloadlinux-be8ff5952a8d943660d3c01f1abf4e71eb565fdb.tar.xz
linux-be8ff5952a8d943660d3c01f1abf4e71eb565fdb.zip
virtio: don't require a config space on the console device.
Strictly, it's only needed when we have features (size or multiport). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/virtio_console.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 26afb56a8073..fae2dbbf5745 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1986,7 +1986,10 @@ static int virtcons_probe(struct virtio_device *vdev)
bool multiport;
bool early = early_put_chars != NULL;
- if (!vdev->config->get) {
+ /* We only need a config space if features are offered */
+ if (!vdev->config->get &&
+ (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_SIZE)
+ || virtio_has_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT))) {
dev_err(&vdev->dev, "%s failure: config access disabled\n",
__func__);
return -EINVAL;