freebsd-dev/sys/dev/pci
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
..
controller Add PCI Express driver for the ARM Neoverse N1 System Development 2020-02-11 15:12:09 +00:00
fixup_pci.c
hostb_pci.c Remove "All rights reserved" phrase from copyright notes. 2019-12-04 08:03:33 +00:00
ignore_pci.c
isa_pci.c
pci_dw_if.m Add driver for DesignWare PCIE core, and its Armada 8K specific attachement. 2019-10-20 11:11:32 +00:00
pci_dw_mv.c 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
pci_dw.c Improve DesignWare PCIe driver: 2020-06-19 16:15:06 +00:00
pci_dw.h Add driver for DesignWare PCIE core, and its Armada 8K specific attachement. 2019-10-20 11:11:32 +00:00
pci_host_generic_acpi.c Clean up the pci host generic driver 2020-06-17 19:56:17 +00:00
pci_host_generic_acpi.h Add PCI Express driver for the ARM Neoverse N1 System Development 2020-02-11 15:12:09 +00:00
pci_host_generic_fdt.c Clean up the pci host generic driver 2020-06-17 19:56:17 +00:00
pci_host_generic_fdt.h
pci_host_generic.c Stop assuming we can print rman_res_t with %lx 2020-06-18 06:21:00 +00:00
pci_host_generic.h Clean up the pci host generic driver 2020-06-17 19:56:17 +00:00
pci_if.m
pci_iov_if.m
pci_iov_private.h
pci_iov_schema.c
pci_iov.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
pci_iov.h
pci_pci.c pci: loosen PCIe hot-plug requirements 2020-06-10 20:12:45 +00:00
pci_private.h Export pci_attach() and pci_detach(). 2019-10-15 18:58:01 +00:00
pci_subr.c
pci_user.c Remove "All rights reserved" phrase from copyright notes. 2019-12-04 08:03:33 +00:00
pci.c do not enable pci bridge decoding on resume until I/O windows are restored 2020-05-29 07:50:55 +00:00
pcib_if.m
pcib_private.h Abstract the locking for PCIe hotplug. It still uses Giant so there's 2019-12-26 21:00:06 +00:00
pcib_support.c
pcireg.h Add more values for PCI capabilities, PCIe extended capabilities, and subclasses. 2020-02-20 17:08:52 +00:00
pcivar.h Remove "All rights reserved" phrase from copyright notes. 2019-12-04 08:03:33 +00:00
schema_private.h
vga_pci.c Fix the build after r350570. 2019-08-04 19:47:02 +00:00