Module Name:    src
Committed By:   msaitoh
Date:           Thu Nov 14 09:11:36 UTC 2019

Modified Files:
        src/sys/dev/pci: if_jmereg.h if_re_pci.c xhci_pci.c

Log Message:
Add D-Link DGE-530T C1 and TP-Link TG-3468 v2.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/if_jmereg.h
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_re_pci.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/xhci_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_jmereg.h
diff -u src/sys/dev/pci/if_jmereg.h:1.3 src/sys/dev/pci/if_jmereg.h:1.4
--- src/sys/dev/pci/if_jmereg.h:1.3	Fri Jan 16 19:56:06 2009
+++ src/sys/dev/pci/if_jmereg.h	Thu Nov 14 09:11:35 2019
@@ -62,6 +62,21 @@
 #define	SPI_SCK_CTRL		0x00000002
 #define	SPI_CS_N_CTRL		0x00000001
 
+#define	JME_EFUSE_CTL1		0xB8
+#define	EFUSE_CTL1_DATA_MASK	0xF0000000
+#define	EFUSE_CTL1_EXECUTE	0x08000000
+#define	EFUSE_CTL1_CMD_AUTOLOAD	0x02000000
+#define	EFUSE_CTL1_CMD_READ	0x04000000
+#define	EFUSE_CTL1_CMD_BLOW	0x06000000
+#define	EFUSE_CTL1_CMD_MASK	0x06000000
+#define	EFUSE_CTL1_AUTOLOAD_ERR	0x00010000
+#define	EFUSE_CTL1_BYTE_SEL_MASK	0x0000FF00
+#define	EFUSE_CTL1_BIT_SEL_MASK	0x00000070
+#define	EFUSE_CTL1_AUTOLAOD_DONE	0x00000001
+
+#define	JME_EFUSE_CTL2		0xBC
+#define	EFUSE_CTL2_RESET	0x00008000
+
 #define	JME_PCI_PHYCFG0		0xC0
 
 #define	JME_PCI_PHYCFG1		0xC4
@@ -757,6 +772,10 @@
 #define	CHIPMODE_MODE_128P_MAC	0x00000003
 #define	CHIPMODE_MODE_128P_DBG	0x00000002
 #define	CHIPMODE_MODE_128P_PHY	0x00000000
+/* Chip full mask revision. */
+#define	CHIPMODE_REVFM(x)	((x) & 0x0F)
+/* Chip ECO revision. */
+#define	CHIPMODE_REVECO(x)	(((x) >> 4) & 0x0F)
 
 /* Shadow status base address high/low. */
 #define	JME_SHBASE_ADDR_HI	0x48

Index: src/sys/dev/pci/if_re_pci.c
diff -u src/sys/dev/pci/if_re_pci.c:1.49 src/sys/dev/pci/if_re_pci.c:1.50
--- src/sys/dev/pci/if_re_pci.c:1.49	Tue Nov 13 20:12:45 2018
+++ src/sys/dev/pci/if_re_pci.c	Thu Nov 14 09:11:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_re_pci.c,v 1.49 2018/11/13 20:12:45 jdolecek Exp $	*/
+/*	$NetBSD: if_re_pci.c,v 1.50 2019/11/14 09:11:35 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.49 2018/11/13 20:12:45 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.50 2019/11/14 09:11:35 msaitoh Exp $");
 
 #include <sys/types.h>
 
@@ -99,6 +99,9 @@ static const struct rtk_type re_devs[] =
 	{ PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8168,
 	    RTK_8168,
 	    "RealTek 8168/8111 PCIe Gigabit Ethernet" },
+	{ PCI_VENDOR_NCUBE, PCI_PRODUCT_NCUBE_TG3648,
+	    RTK_8168,
+	    "TP-Link TG-3468 v2 (RTL8168) Gigabit Ethernet" },
 	{ PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8169,
 	    RTK_8169,
 	    "RealTek 8169/8110 Gigabit Ethernet" },
@@ -111,6 +114,9 @@ static const struct rtk_type re_devs[] =
 	{ PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DGE528T,
 	    RTK_8169,
 	    "D-Link DGE-528T Gigabit Ethernet" },
+	{ PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DGE530T_C1,
+	    RTK_8169,
+	    "D-Link DGE-530T C1 Gigabit Ethernet" },
 	{ PCI_VENDOR_USR2, PCI_PRODUCT_USR2_USR997902,
 	    RTK_8169,
 	    "US Robotics (3Com) USR997902 Gigabit Ethernet" },

Index: src/sys/dev/pci/xhci_pci.c
diff -u src/sys/dev/pci/xhci_pci.c:1.21 src/sys/dev/pci/xhci_pci.c:1.22
--- src/sys/dev/pci/xhci_pci.c:1.21	Wed Jan 23 06:56:19 2019
+++ src/sys/dev/pci/xhci_pci.c	Thu Nov 14 09:11:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci_pci.c,v 1.21 2019/01/23 06:56:19 msaitoh Exp $	*/
+/*	$NetBSD: xhci_pci.c,v 1.22 2019/11/14 09:11:35 msaitoh Exp $	*/
 /*	OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.21 2019/01/23 06:56:19 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.22 2019/11/14 09:11:35 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xhci_pci.h"
@@ -203,10 +203,17 @@ xhci_pci_attach(device_t parent, device_
 		       csr | PCI_COMMAND_MASTER_ENABLE);
 
 	/* Allocate and establish the interrupt. */
+#if 0
 	if (pci_intr_alloc(pa, &psc->sc_pihp, NULL, 0)) {
 		aprint_error_dev(self, "can't allocate handler\n");
 		goto fail;
 	}
+#else
+	if (pci_intx_alloc(pa, &psc->sc_pihp)) {
+		aprint_error_dev(self, "can't allocate handler\n");
+		goto fail;
+	}
+#endif
 	intrstr = pci_intr_string(pc, psc->sc_pihp[0], intrbuf,
 	    sizeof(intrbuf));
 	psc->sc_ih = pci_intr_establish_xname(pc, psc->sc_pihp[0], IPL_USB,

Reply via email to