Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145323788
D25028.id72399.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25028.id72399.diff
View Options
Index: head/sys/dev/pci/pci.c
===================================================================
--- head/sys/dev/pci/pci.c
+++ head/sys/dev/pci/pci.c
@@ -5932,7 +5932,6 @@
*/
if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0)
pci_set_powerstate(dev, PCI_POWERSTATE_D0);
- pci_write_config(dev, PCIR_COMMAND, dinfo->cfg.cmdreg, 2);
pci_write_config(dev, PCIR_INTLINE, dinfo->cfg.intline, 1);
pci_write_config(dev, PCIR_INTPIN, dinfo->cfg.intpin, 1);
pci_write_config(dev, PCIR_CACHELNSZ, dinfo->cfg.cachelnsz, 1);
@@ -5970,6 +5969,9 @@
break;
}
pci_restore_bars(dev);
+
+ if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_BRIDGE)
+ pci_write_config(dev, PCIR_COMMAND, dinfo->cfg.cmdreg, 2);
/*
* Restore extended capabilities for PCI-Express and PCI-X
Index: head/sys/dev/pci/pci_pci.c
===================================================================
--- head/sys/dev/pci/pci_pci.c
+++ head/sys/dev/pci/pci_pci.c
@@ -1792,6 +1792,12 @@
{
pcib_cfg_restore(device_get_softc(dev));
+
+ /*
+ * Restore the Command register only after restoring the windows.
+ * The bridge should not be claiming random windows.
+ */
+ pci_write_config(dev, PCIR_COMMAND, pci_get_cmdreg(dev), 2);
return (bus_generic_resume(dev));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 19, 10:27 AM (3 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28875296
Default Alt Text
D25028.id72399.diff (1 KB)
Attached To
Mode
D25028: do not enable pci bridge decoding on resume until I/O windows are restored
Attached
Detach File
Event Timeline
Log In to Comment