***************************************************************************/
-/* $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>
(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;
}
/*********************************************************************
*******************************************************************************/
-/* $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
#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))