diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-09-27 15:53:57 -0400 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-09-27 15:53:57 -0400 |
commit | caeccb682a2483a79162bb66a431175d4134ae0b (patch) | |
tree | b4f79e694f1cd2332c8294371ba15e1b906f768e /drivers/net/e1000/e1000_main.c | |
parent | 61c2505fd5044d9e108acc6b469d3caa02522043 (diff) |
e1000: add PCI-E capability detection code
Add code to display the detected PCI-E bus width.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
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 | { |