svn commit: r346634 - head/sys/dev/cadence

Ruslan Bukin br at FreeBSD.org
Tue Sep 3 14:07:47 UTC 2019


Author: br
Date: Wed Apr 24 13:44:30 2019
New Revision: 346634
URL: https://svnweb.freebsd.org/changeset/base/346634

Log:
  Add support for Cadence network controller found in HiFive Unleashed board.
  
  Reviewed by:	markj
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D19798

Modified:
  head/sys/dev/cadence/if_cgem.c

Modified: head/sys/dev/cadence/if_cgem.c
==============================================================================
--- head/sys/dev/cadence/if_cgem.c	Wed Apr 24 13:41:46 2019	(r346633)
+++ head/sys/dev/cadence/if_cgem.c	Wed Apr 24 13:44:30 2019	(r346634)
@@ -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-head mailing list