7a5750fd2d
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); |
||
---|---|---|
bin | ||
cddl | ||
contrib | ||
crypto | ||
etc | ||
gnu | ||
include | ||
kerberos5 | ||
lib | ||
libexec | ||
release | ||
rescue | ||
sbin | ||
secure | ||
share | ||
stand | ||
sys | ||
targets | ||
tests | ||
tools | ||
usr.bin | ||
usr.sbin | ||
.arcconfig | ||
.arclint | ||
.cirrus.yml | ||
.clang-format | ||
.gitattributes | ||
.gitignore | ||
COPYRIGHT | ||
LOCKS | ||
MAINTAINERS | ||
Makefile | ||
Makefile.inc1 | ||
Makefile.libcompat | ||
Makefile.sys.inc | ||
ObsoleteFiles.inc | ||
README | ||
README.md | ||
RELNOTES | ||
UPDATING |
FreeBSD Source:
This is the top level of the FreeBSD source directory. This file
was last revised on:
FreeBSD
FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.
For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.
The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables.
Source Roadmap:
bin System/user commands.
cddl Various commands and libraries under the Common Development
and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Various commands and libraries under the GNU Public License.
Please see gnu/COPYING* for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources.
sys/<arch>/conf Kernel configuration files. GENERIC is the configuration
used in release builds. NOTES contains documentation of
all possible entries.
tests Regression tests which can be run by Kyua. See tests/README
for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.
For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html