svn commit: r317869 - head/sys/dev/etherswitch/e6000sw
Adrian Chadd
adrian at FreeBSD.org
Sat May 6 06:07:46 UTC 2017
Author: adrian
Date: Sat May 6 06:07:44 2017
New Revision: 317869
URL: https://svnweb.freebsd.org/changeset/base/317869
Log:
[etherswitch] [e6000sw] fix compile issue under clang/arm
Submitted by: Hiroki Mori <yamori813 at yahoo.co.jp>
Approved by: mizhka
Differential Revision: https://reviews.freebsd.org/D10563
Modified:
head/sys/dev/etherswitch/e6000sw/e6060sw.c
Modified: head/sys/dev/etherswitch/e6000sw/e6060sw.c
==============================================================================
--- head/sys/dev/etherswitch/e6000sw/e6060sw.c Sat May 6 06:06:11 2017 (r317868)
+++ head/sys/dev/etherswitch/e6000sw/e6060sw.c Sat May 6 06:07:44 2017 (r317869)
@@ -169,6 +169,7 @@ e6060sw_probe(device_t dev)
sc = device_get_softc(dev);
bzero(sc, sizeof(*sc));
+ devid = 0;
for (i = 0; i < 2; ++i) {
data = MDIO_READREG(device_get_parent(dev),
CORE_REGISTER + i * 0x10, SWITCH_ID);
@@ -184,8 +185,6 @@ e6060sw_probe(device_t dev)
break;
}
}
- if (i == 2)
- return (ENXIO);
if (devid == E6060)
devname = "88E6060";
@@ -193,6 +192,9 @@ e6060sw_probe(device_t dev)
devname = "88E6063";
else if (devid == E6065)
devname = "88E6065";
+ else
+ return (ENXIO);
+
sprintf(desc, "Marvell %s MDIO switch driver at 0x%02x",
devname, sc->smi_offset);
device_set_desc_copy(dev, desc);
More information about the svn-src-head
mailing list