From a9f34b79757de68cdd3f951077be0dd65da6354c Mon Sep 17 00:00:00 2001 From: cvs2git Date: Sun, 7 Mar 2010 17:11:24 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'R_20100307_p0'. Sprout from base 2009-04-22 22:06:58 UTC Till Straumann ' - importing updated version from SLAC as of 20090422' Cherrypick from master 2010-03-07 17:11:23 UTC Till Straumann '2010-03-07 Till Straumann ': bsd_eth_drivers/.cvsignore bsd_eth_drivers/ChangeLog bsd_eth_drivers/Makefile.am bsd_eth_drivers/if_bge/.cvsignore bsd_eth_drivers/if_bge/Makefile.am bsd_eth_drivers/if_bge/if_bge.c bsd_eth_drivers/if_bge/if_bgereg.h bsd_eth_drivers/if_em/.cvsignore bsd_eth_drivers/if_em/Makefile.am bsd_eth_drivers/if_em/e1000_manage.c bsd_eth_drivers/if_em/e1000_manage.h bsd_eth_drivers/if_em/e1000_osdep.h bsd_eth_drivers/if_em/if_em.c bsd_eth_drivers/if_fxp/.cvsignore bsd_eth_drivers/if_fxp/Makefile.am bsd_eth_drivers/if_fxp/if_fxp.c bsd_eth_drivers/if_fxp/if_fxpvar.h bsd_eth_drivers/if_le/.cvsignore bsd_eth_drivers/if_pcn/.cvsignore bsd_eth_drivers/if_pcn/if_pcn.c bsd_eth_drivers/if_re/.cvsignore bsd_eth_drivers/if_re/Makefile.am bsd_eth_drivers/if_re/if_re.c bsd_eth_drivers/if_re/if_rl.c bsd_eth_drivers/if_re/if_rlreg.h bsd_eth_drivers/libbsdport/.cvsignore bsd_eth_drivers/libbsdport/Makefile.am bsd_eth_drivers/libbsdport/alldrv.c bsd_eth_drivers/libbsdport/bus.h bsd_eth_drivers/libbsdport/callout.h bsd_eth_drivers/libbsdport/devicet.c bsd_eth_drivers/libbsdport/ifmedia.c bsd_eth_drivers/libbsdport/libbsdport.h bsd_eth_drivers/libbsdport/libbsdport_api.h bsd_eth_drivers/libbsdport/libbsdport_post.h bsd_eth_drivers/libbsdport/miistuff.c bsd_eth_drivers/libbsdport/misc.c bsd_eth_drivers/libbsdport/mutex.h bsd_eth_drivers/libbsdport/rtems_callout.c bsd_eth_drivers/libbsdport/sysbus.c bsd_eth_drivers/libbsdport/taskqueue.h bsd_eth_drivers/links.am Cherrypick from freebsd_orig 2009-04-23 04:52:05 UTC Till Straumann ' - importing original 'releng_7_1' version of FXP driver from FreeBSD.': bsd_eth_drivers/if_fxp/if_fxpreg.h bsd_eth_drivers/if_fxp/rcvbundl.h Delete: INSTALL Makefile.am bootstrap config.h.in configure.ac m4/acinclude.m4 m4/config-if-present.m4 m4/cvstag.m4 m4/multilib-fix.m4 m4/multilib-installdir.m4 m4/rtems-bsp-postlink.m4 m4/rtems-bsplist.m4 m4/rtems-check-libargs.m4 m4/rtems-checkprog.m4 m4/rtems-checktool.m4 m4/rtems-checktop.m4 m4/rtems-fixup-prefix.m4 m4/rtems-isml.m4 m4/rtems-ismultibsp.m4 m4/rtems-isrtems.m4 m4/rtems-makevars.m4 m4/rtems-multilib.m4 m4/rtems-options.m4 m4/rtems-setup-recurse.m4 m4/rtems-tools.m4 m4/rtems-trim-builddir.m4 m4/rtems-verscheck.m4 makefile.top.am makefile.top.in rtems-pre.am rtems.am ssrlApps.components.in --- bsd_eth_drivers/if_pcn/if_pcn.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'bsd_eth_drivers/if_pcn/if_pcn.c') diff --git a/bsd_eth_drivers/if_pcn/if_pcn.c b/bsd_eth_drivers/if_pcn/if_pcn.c index 7dde188..b116265 100644 --- a/bsd_eth_drivers/if_pcn/if_pcn.c +++ b/bsd_eth_drivers/if_pcn/if_pcn.c @@ -1509,7 +1509,6 @@ pcn_init_locked(sc) #ifndef __rtems__ mii = device_get_softc(sc->pcn_miibus); ife = mii->mii_media.ifm_cur; -#endif /* Set MAC address */ { unsigned tmp; @@ -1521,6 +1520,22 @@ pcn_init_locked(sc) tmp = htole16(((u_int16_t *)IF_LLADDR(sc->pcn_ifp))[2]); pcn_csr_write(sc, PCN_CSR_PAR2, tmp); } +#else + /* Set MAC address */ + { unsigned tmp; + u_int16_t s; + /* fix endinanness; LLADDR gets swapped on a BE machine */ + memcpy(&s, IF_LLADDR(sc->pcn_ifp) + 0, sizeof(s)); + tmp = htole16(s); + pcn_csr_write(sc, PCN_CSR_PAR0, tmp); + memcpy(&s, IF_LLADDR(sc->pcn_ifp) + 2, sizeof(s)); + tmp = htole16(s); + pcn_csr_write(sc, PCN_CSR_PAR1, tmp); + memcpy(&s, IF_LLADDR(sc->pcn_ifp) + 4, sizeof(s)); + tmp = htole16(s); + pcn_csr_write(sc, PCN_CSR_PAR2, tmp); + } +#endif /* Init circular RX list. */ if (pcn_list_rx_init(sc) == ENOBUFS) { -- cgit v1.2.3