Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148335057
D20873.id59542.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
D20873.id59542.diff
View Options
Index: sys/dev/pci/pci.c
===================================================================
--- sys/dev/pci/pci.c
+++ sys/dev/pci/pci.c
@@ -1671,10 +1671,13 @@
KASSERT(msix->msix_msgnum > index, ("bogus index"));
offset = msix->msix_table_offset + index * 16 + 12;
val = bus_read_4(msix->msix_table_res, offset);
- if (!(val & PCIM_MSIX_VCTRL_MASK)) {
- val |= PCIM_MSIX_VCTRL_MASK;
- bus_write_4(msix->msix_table_res, offset, val);
- }
+ val |= PCIM_MSIX_VCTRL_MASK;
+
+ /*
+ * Some devices (e.g. Samsung PM961) do not support reads of this
+ * register, so always write the new value.
+ */
+ bus_write_4(msix->msix_table_res, offset, val);
}
void
@@ -1687,10 +1690,13 @@
KASSERT(msix->msix_table_len > index, ("bogus index"));
offset = msix->msix_table_offset + index * 16 + 12;
val = bus_read_4(msix->msix_table_res, offset);
- if (val & PCIM_MSIX_VCTRL_MASK) {
- val &= ~PCIM_MSIX_VCTRL_MASK;
- bus_write_4(msix->msix_table_res, offset, val);
- }
+ val &= ~PCIM_MSIX_VCTRL_MASK;
+
+ /*
+ * Some devices (e.g. Samsung PM961) do not support reads of this
+ * register, so always write the new value.
+ */
+ bus_write_4(msix->msix_table_res, offset, val);
}
int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 18, 5:37 AM (6 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29884600
Default Alt Text
D20873.id59542.diff (1 KB)
Attached To
Mode
D20873: Program the MSI-X vector control field for MSI-X table entries without loading the previous content of the vector control word.
Attached
Detach File
Event Timeline
Log In to Comment