Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102645171
D35250.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
D35250.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -129,6 +129,7 @@
#define PCI_EXP_DEVCAP2 PCIER_DEVICE_CAP2 /* Device Capabilities 2 */
#define PCI_EXP_DEVCTL2 PCIER_DEVICE_CTL2 /* Device Control 2 */
#define PCI_EXP_DEVCTL2_LTR_EN PCIEM_CTL2_LTR_ENABLE
+#define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS PCIEM_CTL2_COMP_TIMO_DISABLE
#define PCI_EXP_LNKCAP2 PCIER_LINK_CAP2 /* Link Capabilities 2 */
#define PCI_EXP_LNKCTL2 PCIER_LINK_CTL2 /* Link Control 2 */
#define PCI_EXP_LNKSTA2 PCIER_LINK_STA2 /* Link Status 2 */
@@ -1141,6 +1142,22 @@
return pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val);
}
+static inline int
+pcie_capability_set_word(struct pci_dev *dev, int pos, uint16_t val)
+{
+ int error;
+ uint16_t v;
+
+ error = pcie_capability_read_word(dev, pos, &v);
+ if (error != 0)
+ return (error);
+
+ v |= val;
+
+ error = pcie_capability_write_word(dev, pos, v);
+ return (error);
+}
+
static inline int pcie_get_minimum_link(struct pci_dev *dev,
enum pci_bus_speed *speed, enum pcie_link_width *width)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 6:54 AM (21 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14654812
Default Alt Text
D35250.diff (1 KB)
Attached To
Mode
D35250: LinuxKPI: implement pcie_capability_set_word()
Attached
Detach File
Event Timeline
Log In to Comment