Module Name: src
Committed By: simonb
Date: Wed Jun 10 07:34:19 UTC 2020
Modified Files:
src/sys/arch/evbmips/cavium: autoconf.c
src/sys/arch/mips/cavium/dev: if_cnmac.c
Log Message:
Update for proplib(3) API changes.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/cavium/autoconf.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mips/cavium/dev/if_cnmac.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbmips/cavium/autoconf.c
diff -u src/sys/arch/evbmips/cavium/autoconf.c:1.5 src/sys/arch/evbmips/cavium/autoconf.c:1.6
--- src/sys/arch/evbmips/cavium/autoconf.c:1.5 Sun May 31 04:56:35 2020
+++ src/sys/arch/evbmips/cavium/autoconf.c Wed Jun 10 07:34:19 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.5 2020/05/31 04:56:35 simonb Exp $ */
+/* $NetBSD: autoconf.c,v 1.6 2020/06/10 07:34:19 simonb Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2020/05/31 04:56:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2020/06/10 07:34:19 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -131,17 +131,17 @@ prop_set_cnmac(device_t dev)
enaddr[3] = (mac_lo >> 16) & 0xff;
enaddr[4] = (mac_lo >> 8) & 0xff;
enaddr[5] = mac_lo & 0xff;
- pd = prop_data_create_data(enaddr, ETHER_ADDR_LEN);
+ pd = prop_data_create_copy(enaddr, ETHER_ADDR_LEN);
KASSERT(pd != NULL);
prop_dictionary_set_and_rel(dict, "mac-address", pd);
/* ethernet phy address */
switch (octeon_btinfo.obt_board_type) {
case BOARD_TYPE_UBIQUITI_E100:
- pn = prop_number_create_integer(0x07 - unit);
+ pn = prop_number_create_signed(0x07 - unit);
break;
default:
- pn = prop_number_create_integer(-1);
+ pn = prop_number_create_signed(-1);
break;
}
KASSERT(pn != NULL);
@@ -157,12 +157,12 @@ prop_set_octeon_gmx(device_t dev)
/* ethernet rgmii phy dependent timing parameter. */
switch (octeon_btinfo.obt_board_type) {
case BOARD_TYPE_UBIQUITI_E100:
- tx = prop_number_create_integer(16);
- rx = prop_number_create_integer(0);
+ tx = prop_number_create_signed(16);
+ rx = prop_number_create_signed(0);
break;
default:
- tx = prop_number_create_integer(0);
- rx = prop_number_create_integer(0);
+ tx = prop_number_create_signed(0);
+ rx = prop_number_create_signed(0);
break;
}
KASSERT(tx != NULL);
Index: src/sys/arch/mips/cavium/dev/if_cnmac.c
diff -u src/sys/arch/mips/cavium/dev/if_cnmac.c:1.20 src/sys/arch/mips/cavium/dev/if_cnmac.c:1.21
--- src/sys/arch/mips/cavium/dev/if_cnmac.c:1.20 Fri Jun 5 09:18:35 2020
+++ src/sys/arch/mips/cavium/dev/if_cnmac.c Wed Jun 10 07:34:19 2020
@@ -1,8 +1,8 @@
-/* $NetBSD: if_cnmac.c,v 1.20 2020/06/05 09:18:35 simonb Exp $ */
+/* $NetBSD: if_cnmac.c,v 1.21 2020/06/10 07:34:19 simonb Exp $ */
#include <sys/cdefs.h>
#if 0
-__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.20 2020/06/05 09:18:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.21 2020/06/10 07:34:19 simonb Exp $");
#endif
#include "opt_octeon.h"
@@ -408,10 +408,10 @@ cnmac_attach(device_t parent, device_t s
clk = prop_dictionary_get(dict, "rgmii-tx");
KASSERT(clk != NULL);
- sc->sc_gmx_port->sc_clk_tx_setting = prop_number_integer_value(clk);
+ sc->sc_gmx_port->sc_clk_tx_setting = prop_number_signed_value(clk);
clk = prop_dictionary_get(dict, "rgmii-rx");
KASSERT(clk != NULL);
- sc->sc_gmx_port->sc_clk_rx_setting = prop_number_integer_value(clk);
+ sc->sc_gmx_port->sc_clk_rx_setting = prop_number_signed_value(clk);
}
/* ---- submodules */
@@ -505,7 +505,7 @@ cnmac_board_mac_addr(uint8_t *enaddr, si
KASSERT(dict != NULL);
ea = prop_dictionary_get(dict, "mac-address");
KASSERT(ea != NULL);
- memcpy(enaddr, prop_data_data_nocopy(ea), size);
+ memcpy(enaddr, prop_data_value(ea), size);
}
/* ---- media */
@@ -562,7 +562,7 @@ cnmac_mediainit(struct cnmac_softc *sc)
phy = prop_dictionary_get(device_properties(sc->sc_dev), "phy-addr");
KASSERT(phy != NULL);
- mii_attach(sc->sc_dev, mii, 0xffffffff, prop_number_integer_value(phy),
+ mii_attach(sc->sc_dev, mii, 0xffffffff, prop_number_signed_value(phy),
MII_OFFSET_ANY, MIIF_DOPAUSE);
/* XXX XXX XXX */