freebsd-dev/sys
Michal Meloun 7a5750fd2d diff --git a/sys/dev/pci/pci_dw_mv.c b/sys/dev/pci/pci_dw_mv.c
index 06a29fefbdd..571fc00f6c1 100644
--- a/sys/dev/pci/pci_dw_mv.c
+++ b/sys/dev/pci/pci_dw_mv.c
@@ -64,15 +64,11 @@ __FBSDID("$FreeBSD$");

 #define MV_GLOBAL_CONTROL_REG		0x8000
 #define PCIE_APP_LTSSM_EN		(1 << 2)
-//#define PCIE_DEVICE_TYPE_SHIFT		4
-//#define PCIE_DEVICE_TYPE_MASK		0xF
-//#define PCIE_DEVICE_TYPE_RC		0x4/

 #define MV_GLOBAL_STATUS_REG		0x8008
 #define	 MV_STATUS_RDLH_LINK_UP			(1 << 1)
 #define  MV_STATUS_PHY_LINK_UP			(1 << 9)

-
 #define MV_INT_CAUSE1			0x801C
 #define MV_INT_MASK1			0x8020
 #define  INT_A_ASSERT_MASK			(1 <<  9)
@@ -90,11 +86,7 @@ __FBSDID("$FreeBSD$");
 #define MV_ARUSER_REG			0x805C
 #define MV_AWUSER_REG			0x8060

-
-
 #define	MV_MAX_LANES	8
-
-
 struct pci_mv_softc {
 	struct pci_dw_softc	dw_sc;
 	device_t		dev;
@@ -112,7 +104,6 @@ static struct ofw_compat_data compat_data[] = {
 	{NULL,		 	  0},
 };

-
 static int
 pci_mv_phy_init(struct pci_mv_softc *sc)
 {
@@ -121,18 +112,23 @@ pci_mv_phy_init(struct pci_mv_softc *sc)
 	for (i = 0; i < MV_MAX_LANES; i++) {
 		rv =  phy_get_by_ofw_idx(sc->dev, sc->node, i, &(sc->phy[i]));
 		if (rv != 0 && rv != ENOENT) {
-	  		device_printf(sc->dev, "Cannot get phy[%d]\n", i);
-	  		goto fail;
-	  	}
-	  	if (sc->phy[i] == NULL)
-	  		continue;
-	  	rv = phy_enable(sc->phy[i]);
-	  	if (rv != 0) {
-	  		device_printf(sc->dev, "Cannot enable phy[%d]\n", i);
-	  		goto fail;
-	  	}
-	  }
-	  return (0);
+			device_printf(sc->dev, "Cannot get phy[%d]\n", i);
+/* XXX revert when phy driver will be implemented */
+#if 0
+		goto fail;
+#else
+		continue;
+#endif
+		}
+		if (sc->phy[i] == NULL)
+			continue;
+		rv = phy_enable(sc->phy[i]);
+		if (rv != 0) {
+			device_printf(sc->dev, "Cannot enable phy[%d]\n", i);
+			goto fail;
+		}
+	}
+	return (0);

 fail:
 	for (i = 0; i < MV_MAX_LANES; i++) {
@@ -173,13 +169,14 @@ pci_mv_init(struct pci_mv_softc *sc)
 	/* Enable local interrupts */
 	pci_dw_dbi_wr4(sc->dev, DW_MSI_INTR0_MASK, 0xFFFFFFFF);
 	pci_dw_dbi_wr4(sc->dev, MV_INT_MASK1, 0xFFFFFFFF);
-	pci_dw_dbi_wr4(sc->dev, MV_INT_MASK2, 0xFFFFFFFF);
+	pci_dw_dbi_wr4(sc->dev, MV_INT_MASK2, 0xFFFFFFFD);
 	pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE1, 0xFFFFFFFF);
 	pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE2, 0xFFFFFFFF);

 	/* Errors have own interrupt, not yet populated in DTt */
 	pci_dw_dbi_wr4(sc->dev, MV_ERR_INT_MASK, 0);
 }
+
 static int pci_mv_intr(void *arg)
 {
 	struct pci_mv_softc *sc = arg;
@@ -188,8 +185,6 @@ static int pci_mv_intr(void *arg)
 	/* Ack all interrups */
 	cause1 = pci_dw_dbi_rd4(sc->dev, MV_INT_CAUSE1);
 	cause2 = pci_dw_dbi_rd4(sc->dev, MV_INT_CAUSE2);
-	if (cause1 == 0 || cause2 == 0)
-		return(FILTER_STRAY);

 	pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE1, cause1);
 	pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE2, cause2);
2020-06-19 17:25:54 +00:00
..
amd64 Control for Special Register Buffer Data Sampling mitigation. 2020-06-12 22:14:45 +00:00
arm Add specific stub for ARMADA 8k SoC to Marvell RTC driver. 2020-06-19 15:32:55 +00:00
arm64 Use native-sized accesses when accessing memory from kdb. 2020-06-19 16:26:42 +00:00
bsm bsm: add AUE_CLOSERANGE 2020-04-24 01:27:25 +00:00
cam Implement zero-copy iSCSI target transmission/read. 2020-06-08 20:53:57 +00:00
cddl Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
compat Add a helper function for validating VA ranges. 2020-06-19 03:32:04 +00:00
conf Add specialized gpio driver for ARMADA 8k SoC. 2020-06-19 15:21:33 +00:00
contrib Document upgrade procedure in FREEBSD-upgrade 2020-06-04 20:48:57 +00:00
crypto Fix AES-CCM requests with an AAD size smaller than a single block. 2020-06-12 21:33:02 +00:00
ddb kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00
dev diff --git a/sys/dev/pci/pci_dw_mv.c b/sys/dev/pci/pci_dw_mv.c 2020-06-19 17:25:54 +00:00
dts Remove licenses 2020-06-04 17:20:58 +00:00
fs Remove vfs_statfs and vnode_mount macros from NFS 2020-06-17 16:20:19 +00:00
gdb
geom Move the pointers stored in the superblock into a separate 2020-06-19 01:02:53 +00:00
gnu dts: patch the am33xx dts for upcoming clock support 2020-06-05 20:14:54 +00:00
i386 FPU init: allocate initial state from UMA to ensure alignment 2020-06-12 21:17:56 +00:00
isa
kern hw.bus.info: rework handler 2020-06-18 21:42:54 +00:00
kgssapi Add support for optional separate output buffers to in-kernel crypto. 2020-05-25 22:12:04 +00:00
libkern libkern: Add arc4random_uniform 2020-05-23 17:51:06 +00:00
mips Various fixes to TLS for MIPS. 2020-06-12 21:21:18 +00:00
modules Add DTB files for ARMADA 8040 based boards. 2020-06-19 14:28:56 +00:00
net iflib: netmap: enter/exit netmap mode after device stops 2020-06-14 21:07:12 +00:00
net80211 [net80211] Add missing commit to previous-1 uapsd commit. 2020-06-16 00:28:45 +00:00
netgraph Update event masks constant to Bluetooth core spec V5.2 2020-06-15 14:58:40 +00:00
netinet Remove last argument of sctp_addr_mgmt_ep_sa(), since it is not used. 2020-06-19 12:35:29 +00:00
netinet6 Add the SCTP_SUPPORT kernel option. 2020-06-18 19:32:34 +00:00
netipsec Add the SCTP_SUPPORT kernel option. 2020-06-18 19:32:34 +00:00
netpfil Add the SCTP_SUPPORT kernel option. 2020-06-18 19:32:34 +00:00
netsmb
nfs Use epoch(9) for rtentries to simplify control plane operations. 2020-05-23 10:21:02 +00:00
nfsclient
nfsserver
nlm Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
ofed
opencrypto Various optimizations to software AES-CCM and AES-GCM. 2020-06-12 23:10:30 +00:00
powerpc powerpc/pmap: Fix pte_find_next() iterators for booke64 pmap 2020-06-10 23:03:35 +00:00
riscv riscv: Use SBI shutdown call to implement RB_POWEROFF 2020-06-08 17:57:21 +00:00
rpc Add the .h file that describes the operations for the rpctls_syscall. 2020-05-31 01:12:52 +00:00
security mac_veriexec_fingerprint_check_vnode: v_writecount > 0 means active writers 2020-06-12 21:51:20 +00:00
sys hw.bus.info: rework handler 2020-06-18 21:42:54 +00:00
teken
tests
tools
ufs The binary representation of the superblock (the fs structure) is written 2020-06-19 01:04:25 +00:00
vm Revert r362360. 2020-06-19 11:04:49 +00:00
x86 Control for Special Register Buffer Data Sampling mitigation. 2020-06-12 22:14:45 +00:00
xdr
xen
Makefile