cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped

If the cirrus_vga PCI BAR is unmapped than we should not only reset
map_addr but also lfb_addr, otherwise we'll keep trying to map
the old lfb_addr in map_linear_vram.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Stefano Stabellini 2011-06-03 16:56:54 +01:00 committed by Alexander Graf
parent 712c2b4149
commit 45dcd36e1e
1 changed files with 4 additions and 1 deletions

View File

@ -3088,8 +3088,11 @@ static void pci_cirrus_write_config(PCIDevice *d,
CirrusVGAState *s = &pvs->cirrus_vga;
pci_default_write_config(d, address, val, len);
if (s->vga.map_addr && d->io_regions[0].addr == PCI_BAR_UNMAPPED)
if (s->vga.map_addr && d->io_regions[0].addr == PCI_BAR_UNMAPPED) {
s->vga.map_addr = 0;
s->vga.lfb_addr = 0;
s->vga.lfb_end = 0;
}
cirrus_update_memory_access(s);
}