diff options
| author | Rafal Jaworowski <raj@FreeBSD.org> | 2008-03-12 16:32:08 +0000 |
|---|---|---|
| committer | Rafal Jaworowski <raj@FreeBSD.org> | 2008-03-12 16:32:08 +0000 |
| commit | ecb1ab17614fdc090c1d9924dfcf7f49160bb17b (patch) | |
| tree | bee3dfa13f4fb01fa9d5de6630099aac13d777f4 /sys/powerpc/mpc85xx | |
| parent | 7cc9e5030ed3d47bc1daa14506dfaeed1449fc93 (diff) | |
Notes
Diffstat (limited to 'sys/powerpc/mpc85xx')
| -rw-r--r-- | sys/powerpc/mpc85xx/ocpbus.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/powerpc/mpc85xx/ocpbus.c b/sys/powerpc/mpc85xx/ocpbus.c index a62e78b8bcaf..cf86eed0cce4 100644 --- a/sys/powerpc/mpc85xx/ocpbus.c +++ b/sys/powerpc/mpc85xx/ocpbus.c @@ -555,6 +555,8 @@ static int ocpbus_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) { struct ocp_devinfo *dinfo; + struct bi_eth_addr *eth; + int unit; if (device_get_parent(child) != dev) return (EINVAL); @@ -571,6 +573,13 @@ ocpbus_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) case OCPBUS_IVAR_HWUNIT: *result = dinfo->ocp_unit; return (0); + case OCPBUS_IVAR_MACADDR: + unit = device_get_unit(child); + if (unit > bootinfo->bi_eth_addr_no - 1) + return (EINVAL); + eth = bootinfo_eth() + unit; + *result = (uintptr_t)eth; + return (0); } return (EINVAL); |
