summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-07-15 17:50:21 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-07-15 17:50:21 +0000
commit23af302ba59948da10b50d5bda91cb50b8fff0a4 (patch)
treea3f9c25f89da067cd8c7625e6c154d117bea1404 /sys
parente20858fbab613e9afd4ecb05170196699ee9466a (diff)
Backout rev 1.162. This change made us muck with with pci config space at
address 0x1a and 0x1e, and that's not where the PCIe capability stuff lives. Potentially it was mucking with an IO BAR (super dangerous). But probably it was achieving nothing at all. ok dlg@, marco@, brad@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_em.c24
-rw-r--r--sys/dev/pci/if_em_hw.h3
2 files changed, 8 insertions, 19 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 1568a17b56a..459b507614a 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.185 2008/06/15 16:37:00 millert Exp $ */
+/* $OpenBSD: if_em.c,v 1.186 2008/07/15 17:50:20 kettenis Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -2869,26 +2869,14 @@ em_pci_clear_mwi(struct em_hw *hw)
(hw->pci_cmd_word & ~CMD_MEM_WRT_INVALIDATE));
}
+/*
+ * We may eventually really do this, but its unnecessary
+ * for now so we just return unsupported.
+ */
int32_t
em_read_pcie_cap_reg(struct em_hw *hw, uint32_t reg, uint16_t *value)
{
- struct pci_attach_args *pa = &((struct em_osdep *)hw->back)->em_pa;
- int32_t rc;
- u_int16_t pectl;
-
- /* find the PCIe link width and set max read request to 4KB */
- if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIEXPRESS,
- NULL, NULL) != 0) {
- em_read_pci_cfg(hw, reg + 0x12, value);
-
- em_read_pci_cfg(hw, reg + 0x8, &pectl);
- pectl = (pectl & ~0x7000) | (5 << 12);
- em_write_pci_cfg(hw, reg + 0x8, &pectl);
- rc = 0;
- } else
- rc = -1;
-
- return (rc);
+ return -E1000_NOT_IMPLEMENTED;
}
/*********************************************************************
diff --git a/sys/dev/pci/if_em_hw.h b/sys/dev/pci/if_em_hw.h
index db7ffd037fb..aa5667f77b4 100644
--- a/sys/dev/pci/if_em_hw.h
+++ b/sys/dev/pci/if_em_hw.h
@@ -31,7 +31,7 @@
*******************************************************************************/
-/* $OpenBSD: if_em_hw.h,v 1.25 2008/03/21 00:20:55 brad Exp $ */
+/* $OpenBSD: if_em_hw.h,v 1.26 2008/07/15 17:50:20 kettenis Exp $ */
/* $FreeBSD: if_em_hw.h,v 1.15 2005/05/26 23:32:02 tackerman Exp $ */
/* if_em_hw.h
@@ -299,6 +299,7 @@ typedef enum {
#define E1000_ERR_HOST_INTERFACE_COMMAND 11
#define E1000_BLK_PHY_RESET 12
#define E1000_ERR_SWFW_SYNC 13
+#define E1000_NOT_IMPLEMENTED 14
#define E1000_BYTE_SWAP_WORD(_value) ((((_value) & 0x00ff) << 8) | \
(((_value) & 0xff00) >> 8))