Date: Tue, 4 Jun 2019 15:26:02 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348618 - stable/12/sys/dev/cadence Message-ID: <201906041526.x54FQ23C032990@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Tue Jun 4 15:26:02 2019 New Revision: 348618 URL: https://svnweb.freebsd.org/changeset/base/348618 Log: MFC r346634: Add support for Cadence network controller found in HiFive Unleashed board. Sponsored by: DARPA, AFRL Modified: stable/12/sys/dev/cadence/if_cgem.c Modified: stable/12/sys/dev/cadence/if_cgem.c ============================================================================== --- stable/12/sys/dev/cadence/if_cgem.c Tue Jun 4 15:25:03 2019 (r348617) +++ stable/12/sys/dev/cadence/if_cgem.c Tue Jun 4 15:26:02 2019 (r348618) @@ -98,6 +98,12 @@ __FBSDID("$FreeBSD$"); #define CGEM_CKSUM_ASSIST (CSUM_IP | CSUM_TCP | CSUM_UDP | \ CSUM_TCP_IPV6 | CSUM_UDP_IPV6) +static struct ofw_compat_data compat_data[] = { + { "cadence,gem", 1 }, + { "cdns,macb", 1 }, + { NULL, 0 }, +}; + struct cgem_softc { if_t ifp; struct mtx sc_mtx; @@ -1635,7 +1641,7 @@ cgem_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "cadence,gem")) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(dev, "Cadence CGEM Gigabit Ethernet Interface");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906041526.x54FQ23C032990>