diff options
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index fd30161d2f12..e2615782966e 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -4473,6 +4473,22 @@ e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t *value) | |||
4473 | pci_write_config_word(adapter->pdev, reg, *value); | 4473 | pci_write_config_word(adapter->pdev, reg, *value); |
4474 | } | 4474 | } |
4475 | 4475 | ||
4476 | int32_t | ||
4477 | e1000_read_pcie_cap_reg(struct e1000_hw *hw, uint32_t reg, uint16_t *value) | ||
4478 | { | ||
4479 | struct e1000_adapter *adapter = hw->back; | ||
4480 | uint16_t cap_offset; | ||
4481 | |||
4482 | cap_offset = pci_find_capability(adapter->pdev, PCI_CAP_ID_EXP); | ||
4483 | if (!cap_offset) | ||
4484 | return -E1000_ERR_CONFIG; | ||
4485 | |||
4486 | pci_read_config_word(adapter->pdev, cap_offset + reg, value); | ||
4487 | |||
4488 | return E1000_SUCCESS; | ||
4489 | } | ||
4490 | |||
4491 | |||
4476 | void | 4492 | void |
4477 | e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value) | 4493 | e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value) |
4478 | { | 4494 | { |