qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-pci: thinko fix
@ 2010-01-11 15:57 Michael S. Tsirkin
  2010-01-11 19:47 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2010-01-11 15:57 UTC (permalink / raw)
  To: qemu-devel, aliguori, yvugenfi

Since patch ed757e140c0ada220f213036e4497315d24ca8bct, virtio will
sometimes clear all status registers on bus master disable, which loses
information such as VIRTIO_CONFIG_S_FAILED bit.  This is a result of
a patch being misapplied: code uses !  instead of ~ for bit
operations as in Yan's original patch.  This obviously does not make
sense.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

 hw/virtio-pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index d222ce0..f4f1bc1 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -374,7 +374,7 @@ static void virtio_write_config(PCIDevice *pci_dev, uint32_t address,
 
     if (PCI_COMMAND == address) {
         if (!(val & PCI_COMMAND_MASTER)) {
-            proxy->vdev->status &= !VIRTIO_CONFIG_S_DRIVER_OK;
+            proxy->vdev->status &= ~VIRTIO_CONFIG_S_DRIVER_OK;
         }
     }
 
-- 
1.6.6.rc1.43.gf55cc

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] virtio-pci: thinko fix
  2010-01-11 15:57 [Qemu-devel] [PATCH] virtio-pci: thinko fix Michael S. Tsirkin
@ 2010-01-11 19:47 ` Anthony Liguori
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2010-01-11 19:47 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: aliguori, yvugenfi, qemu-devel

On 01/11/2010 09:57 AM, Michael S. Tsirkin wrote:
> Since patch ed757e140c0ada220f213036e4497315d24ca8bct, virtio will
> sometimes clear all status registers on bus master disable, which loses
> information such as VIRTIO_CONFIG_S_FAILED bit.  This is a result of
> a patch being misapplied: code uses !  instead of ~ for bit
> operations as in Yan's original patch.  This obviously does not make
> sense.
>    

Actually, the original patch used '!'.  It didn't carry a Signed-off-by 
and when it was reposted with a SoB, this was changed to '~'.  There was 
no indication though that the contents of the patch was different.

Moral of the story is, when you make a change to the patch, add a (v2) 
and state in the commit message what change was made.

Thanks for catching this.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-11 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 15:57 [Qemu-devel] [PATCH] virtio-pci: thinko fix Michael S. Tsirkin
2010-01-11 19:47 ` Anthony Liguori

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).