Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148589095
D20873.id59526.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.id59526.diff
View Options
Index: sys/dev/pci/pci.c
===================================================================
--- sys/dev/pci/pci.c
+++ sys/dev/pci/pci.c
@@ -1666,15 +1666,15 @@
{
struct pci_devinfo *dinfo = device_get_ivars(dev);
struct pcicfg_msix *msix = &dinfo->cfg.msix;
- uint32_t offset, val;
+ uint32_t offset;
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);
- }
+ /*
+ * Some devices (eg Samsung PM961) cannot handle RMW on this register for
+ * all its vectors write the values we need directly.
+ */
+ bus_write_4(msix->msix_table_res, offset, PCIM_MSIX_VCTRL_MASK);
}
void
@@ -1682,15 +1682,15 @@
{
struct pci_devinfo *dinfo = device_get_ivars(dev);
struct pcicfg_msix *msix = &dinfo->cfg.msix;
- uint32_t offset, val;
+ uint32_t offset;
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);
- }
+ /*
+ * Some devices (eg Samsung PM961) cannot handle RMW on this register for
+ * all its vectors write the values we need directly.
+ */
+ bus_write_4(msix->msix_table_res, offset, 0);
}
int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 19, 11:59 PM (11 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29986391
Default Alt Text
D20873.id59526.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