Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146966289
D7914.id20411.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
806 B
Referenced Files
None
Subscribers
None
D7914.id20411.diff
View Options
Index: sys/dev/pci/pci.c
===================================================================
--- sys/dev/pci/pci.c
+++ sys/dev/pci/pci.c
@@ -2900,6 +2900,14 @@
{
struct pci_devinfo *dinfo;
int ln2range;
+ pci_addr_t map;
+ uint16_t cmd;
+
+ /* Clear the MEMEN or PORTEN bit */
+ map = pm->pm_value;
+ cmd = pci_read_config(dev, PCIR_COMMAND, 2);
+ pci_write_config(dev, PCIR_COMMAND,
+ cmd & ~(PCI_BAR_MEM(map) ? PCIM_CMD_MEMEN : PCIM_CMD_PORTEN), 2);
/* The device ROM BAR is always a 32-bit memory BAR. */
dinfo = device_get_ivars(dev);
@@ -2914,6 +2922,9 @@
if (ln2range == 64)
pm->pm_value |= (pci_addr_t)pci_read_config(dev,
pm->pm_reg + 4, 4) << 32;
+
+ /* Restore the original value of PCIR_COMMAND */
+ pci_write_config(dev, PCIR_COMMAND, cmd, 2);
}
struct pci_map *
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 8, 5:18 AM (15 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29395841
Default Alt Text
D7914.id20411.diff (806 B)
Attached To
Mode
D7914: Clear the MEM/PORT_EN bit when updating PCI BAR
Attached
Detach File
Event Timeline
Log In to Comment