From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvLWw-0001Md-Kr for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:27:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvLWu-0006EB-1V for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:27:18 -0500 Message-ID: <50F63A2D.1010005@suse.de> Date: Wed, 16 Jan 2013 06:27:09 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1357828825-2414-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1357828825-2414-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] virtio-s390: add a reset function to virtio-s390 devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Michael Roth , qemu-stable@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de Am 10.01.2013 15:40, schrieb Paolo Bonzini: > virtio-s390 devices are not being reset when their bus is. To fix > this, add a reset method that forwards to virtio_reset. This is > only needed because of the "strange" modeling of virtio devices; > the ->vdev link is being handled manually rather than through qdev. >=20 > Signed-off-by: Paolo Bonzini > --- > hw/s390-virtio-bus.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c > index 7e99175..1e3e4f0 100644 > --- a/hw/s390-virtio-bus.c > +++ b/hw/s390-virtio-bus.c > @@ -505,6 +505,13 @@ static int s390_virtio_busdev_init(DeviceState *de= v) > return _info->init(_dev); > } > =20 > +static void s390_virtio_busdev_reset(DeviceState *dev) > +{ > + VirtIOS390Device *_dev =3D (VirtIOS390Device *)dev; Underscore alert. ;) What about naming the arg d and the variable dev? Andreas > + > + virtio_reset(_dev->vdev); > +} > + > static void virtio_s390_device_class_init(ObjectClass *klass, void *da= ta) > { > DeviceClass *dc =3D DEVICE_CLASS(klass); > @@ -512,6 +519,7 @@ static void virtio_s390_device_class_init(ObjectCla= ss *klass, void *data) > dc->init =3D s390_virtio_busdev_init; > dc->bus_type =3D TYPE_S390_VIRTIO_BUS; > dc->unplug =3D qdev_simple_unplug_cb; > + dc->reset =3D s390_virtio_busdev_reset; > } > =20 > static TypeInfo virtio_s390_device_info =3D { --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg