svn commit: r348618 - stable/12/sys/dev/cadence
Ruslan Bukin
br at FreeBSD.org
Tue Jun 4 15:26:03 UTC 2019
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");
More information about the svn-src-stable-12
mailing list