Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160AbbBKLQq (ORCPT ); Wed, 11 Feb 2015 06:16:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41076 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbbBKLQp (ORCPT ); Wed, 11 Feb 2015 06:16:45 -0500 Date: Wed, 11 Feb 2015 16:46:32 +0530 From: Amit Shah To: Rusty Russell Cc: "Michael S. Tsirkin" , lkml Subject: Re: [PATCH 5/5] virtio: don't require a config space on the console device. Message-ID: <20150211111632.GF17420@grmbl.mre> References: <1423199216-2094-1-git-send-email-rusty@rustcorp.com.au> <1423199216-2094-6-git-send-email-rusty@rustcorp.com.au> <20150208110336.GL3185@redhat.com> <87bnl43qky.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bnl43qky.fsf@rustcorp.com.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1241 Lines: 32 On (Mon) 09 Feb 2015 [10:26:29], Rusty Russell wrote: > 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 Reviewed-by: Amit Shah > 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; Amit -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/