From: Isaku Yamahata Date: Mon, 18 Oct 2010 03:17:42 +0000 (+0900) Subject: pci: make pci_del_capability() update for w1cmask X-Git-Tag: v0.14.0-rc0~500^2^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a4f5971b6f785db7cb2b964754d04103a0d2033;p=thirdparty%2Fqemu.git pci: make pci_del_capability() update for w1cmask Clear w1cmask when deleting a pci capability. Signed-off-by: Isaku Yamahata Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/pci.c b/hw/pci.c index abddc6d2392..e3462a93841 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1745,6 +1745,7 @@ void pci_del_capability(PCIDevice *pdev, uint8_t cap_id, uint8_t size) pdev->config[prev] = pdev->config[offset + PCI_CAP_LIST_NEXT]; /* Make capability writeable again */ memset(pdev->wmask + offset, 0xff, size); + memset(pdev->w1cmask + offset, 0, size); /* Clear cmask as device-specific registers can't be checked */ memset(pdev->cmask + offset, 0, size); memset(pdev->used + offset, 0, size);