提交 be8ff595 编写于 作者: R Rusty Russell

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: NRusty Russell <rusty@rustcorp.com.au>
上级 7abb568d
...@@ -1986,7 +1986,10 @@ static int virtcons_probe(struct virtio_device *vdev) ...@@ -1986,7 +1986,10 @@ static int virtcons_probe(struct virtio_device *vdev)
bool multiport; bool multiport;
bool early = early_put_chars != NULL; 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", dev_err(&vdev->dev, "%s failure: config access disabled\n",
__func__); __func__);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册