summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-03-10 04:09:54 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-03-10 04:09:54 +0000
commit35ec3b6ab4c1ee867d5a9e6d6ae1e9a7d5305e49 (patch)
tree7c23d06633871b229aeaa922214c1376dc753ab2 /sys/dev
parent7c75918ee55e1ec431d99752d6e8167983c06bd8 (diff)
match on 82580 quad fiber and add untested support for
DH89XX/Cave Creek PCH which seem to function like a 82580 with some external Marvell PHYs.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_em.c7
-rw-r--r--sys/dev/pci/if_em_hw.c11
-rw-r--r--sys/dev/pci/if_em_hw.h10
3 files changed, 24 insertions, 4 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 3bcf72c54ac..5b2b4f256d5 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.278 2014/03/10 03:08:34 jsg Exp $ */
+/* $OpenBSD: if_em.c,v 1.279 2014/03/10 04:09:53 jsg Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -150,6 +150,11 @@ const struct pci_matchid em_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82580_SERDES },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82580_SGMII },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82580_COPPER_DUAL },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82580_QUAD_FIBER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_DH89XXCC_SGMII },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_DH89XXCC_SERDES },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_DH89XXCC_BPLANE },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_DH89XXCC_SFP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82583V },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_COPPER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_FIBER },
diff --git a/sys/dev/pci/if_em_hw.c b/sys/dev/pci/if_em_hw.c
index 99dab188122..3a1f0cdaed8 100644
--- a/sys/dev/pci/if_em_hw.c
+++ b/sys/dev/pci/if_em_hw.c
@@ -31,7 +31,7 @@
*******************************************************************************/
-/* $OpenBSD: if_em_hw.c,v 1.78 2014/03/10 03:08:34 jsg Exp $ */
+/* $OpenBSD: if_em_hw.c,v 1.79 2014/03/10 04:09:53 jsg Exp $ */
/*
* if_em_hw.c Shared functions for accessing and configuring the MAC
*/
@@ -225,8 +225,10 @@ em_set_phy_type(struct em_hw *hw)
case M88E1000_I_PHY_ID:
case M88E1011_I_PHY_ID:
case M88E1111_I_PHY_ID:
+ case M88E1112_E_PHY_ID:
case M88E1543_E_PHY_ID:
case I210_I_PHY_ID:
+ case I347AT4_E_PHY_ID:
hw->phy_type = em_phy_m88;
break;
case IGP01E1000_I_PHY_ID:
@@ -514,9 +516,14 @@ em_set_mac_type(struct em_hw *hw)
break;
case E1000_DEV_ID_82580_COPPER:
case E1000_DEV_ID_82580_FIBER:
+ case E1000_DEV_ID_82580_QUAD_FIBER:
case E1000_DEV_ID_82580_SERDES:
case E1000_DEV_ID_82580_SGMII:
case E1000_DEV_ID_82580_COPPER_DUAL:
+ case E1000_DEV_ID_DH89XXCC_SGMII:
+ case E1000_DEV_ID_DH89XXCC_SERDES:
+ case E1000_DEV_ID_DH89XXCC_BACKPLANE:
+ case E1000_DEV_ID_DH89XXCC_SFP:
hw->mac_type = em_82580;
hw->initialize_hw_bits_disable = 1;
break;
@@ -5203,7 +5210,9 @@ em_match_gig_phy(struct em_hw *hw)
case em_i350:
if (hw->phy_id == I82580_I_PHY_ID ||
hw->phy_id == I210_I_PHY_ID ||
+ hw->phy_id == I347AT4_E_PHY_ID ||
hw->phy_id == I350_I_PHY_ID ||
+ hw->phy_id == M88E1112_E_PHY_ID ||
hw->phy_id == M88E1543_E_PHY_ID) {
uint32_t mdic;
diff --git a/sys/dev/pci/if_em_hw.h b/sys/dev/pci/if_em_hw.h
index 4634dc52d92..5e5f9d5cd75 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.59 2014/03/10 03:08:34 jsg Exp $ */
+/* $OpenBSD: if_em_hw.h,v 1.60 2014/03/10 04:09:53 jsg Exp $ */
/* $FreeBSD: if_em_hw.h,v 1.15 2005/05/26 23:32:02 tackerman Exp $ */
/* if_em_hw.h
@@ -570,6 +570,11 @@ int32_t em_check_phy_reset_block(struct em_hw *hw);
#define E1000_DEV_ID_82580_SERDES 0x1510
#define E1000_DEV_ID_82580_SGMII 0x1511
#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516
+#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527
+#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438
+#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A
+#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C
+#define E1000_DEV_ID_DH89XXCC_SFP 0x0440
#define E1000_DEV_ID_I350_COPPER 0x1521
#define E1000_DEV_ID_I350_FIBER 0x1522
#define E1000_DEV_ID_I350_SERDES 0x1523
@@ -586,7 +591,6 @@ int32_t em_check_phy_reset_block(struct em_hw *hw);
#define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40
#define E1000_DEV_ID_I354_SGMII 0x1F41
#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45
-#define E1000_DEV_ID_82574L 0x10D3
#define E1000_DEV_ID_EP80579_LAN_1 0x5040
#define E1000_DEV_ID_EP80579_LAN_2 0x5044
#define E1000_DEV_ID_EP80579_LAN_3 0x5048
@@ -3385,6 +3389,8 @@ struct em_host_command_info {
#define M88E1000_14_PHY_ID M88E1000_E_PHY_ID
#define M88E1011_I_REV_4 0x04
#define M88E1111_I_PHY_ID 0x01410CC0
+#define M88E1112_E_PHY_ID 0x01410C90
+#define I347AT4_E_PHY_ID 0x01410DC0
#define L1LXT971A_PHY_ID 0x001378E0
#define GG82563_E_PHY_ID 0x01410CA0
#define BME1000_E_PHY_ID 0x01410CB0