|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [linux-2.6.18-xen] pciback: Allow DomU to restore addres
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1184059104 -3600
# Node ID a70de77dd8d3db31dce965c718f5d221e2372e16
# Parent e9c0b1c115872a62aedb298da80a48621f6f958b
pciback: Allow DomU to restore address bars if needed.
Signed-off-by: Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>
---
drivers/xen/pciback/conf_space_header.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff -r e9c0b1c11587 -r a70de77dd8d3 drivers/xen/pciback/conf_space_header.c
--- a/drivers/xen/pciback/conf_space_header.c Tue Jul 10 10:12:11 2007 +0100
+++ b/drivers/xen/pciback/conf_space_header.c Tue Jul 10 10:18:24 2007 +0100
@@ -75,8 +75,15 @@ static int rom_write(struct pci_dev *dev
*/
if (value == ~PCI_ROM_ADDRESS_ENABLE)
bar->which = 1;
- else
+ else {
+ u32 tmpval;
+ pci_read_config_dword(dev, offset, &tmpval);
+ if (tmpval != bar->val && value == bar->val) {
+ /* Allow restoration of bar value. */
+ pci_write_config_dword(dev, offset, bar->val);
+ }
bar->which = 0;
+ }
/* Do we need to support enabling/disabling the rom address here? */
@@ -102,8 +109,15 @@ static int bar_write(struct pci_dev *dev
*/
if (value == ~0)
bar->which = 1;
- else
+ else {
+ u32 tmpval;
+ pci_read_config_dword(dev, offset, &tmpval);
+ if (tmpval != bar->val && value == bar->val) {
+ /* Allow restoration of bar value. */
+ pci_write_config_dword(dev, offset, bar->val);
+ }
bar->which = 0;
+ }
return 0;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [linux-2.6.18-xen] pciback: Allow DomU to restore address bars if needed.,
Xen patchbot-linux-2.6.18-xen <=
|
|
|
|
|