svn commit: r211682 - in user/imp/tbemd: contrib/top share/man/man4
sys/boot sys/boot/arm/uboot sys/dev/xl
Warner Losh
imp at FreeBSD.org
Mon Aug 23 02:37:59 UTC 2010
Author: imp
Date: Mon Aug 23 02:37:58 2010
New Revision: 211682
URL: http://svn.freebsd.org/changeset/base/211682
Log:
Merge head @211680 to loop back changes
Added:
user/imp/tbemd/sys/boot/Makefile.amd64
- copied unchanged from r211680, head/sys/boot/Makefile.amd64
user/imp/tbemd/sys/boot/Makefile.arm
- copied unchanged from r211680, head/sys/boot/Makefile.arm
user/imp/tbemd/sys/boot/Makefile.i386
- copied unchanged from r211680, head/sys/boot/Makefile.i386
user/imp/tbemd/sys/boot/Makefile.ia64
- copied unchanged from r211680, head/sys/boot/Makefile.ia64
user/imp/tbemd/sys/boot/Makefile.pc98
- copied unchanged from r211680, head/sys/boot/Makefile.pc98
user/imp/tbemd/sys/boot/Makefile.powerpc
- copied unchanged from r211680, head/sys/boot/Makefile.powerpc
user/imp/tbemd/sys/boot/Makefile.sparc64
- copied unchanged from r211680, head/sys/boot/Makefile.sparc64
Modified:
user/imp/tbemd/share/man/man4/rl.4
user/imp/tbemd/sys/boot/Makefile
user/imp/tbemd/sys/boot/arm/uboot/Makefile
user/imp/tbemd/sys/dev/xl/if_xl.c
Directory Properties:
user/imp/tbemd/ (props changed)
user/imp/tbemd/cddl/contrib/opensolaris/ (props changed)
user/imp/tbemd/contrib/bind9/ (props changed)
user/imp/tbemd/contrib/ee/ (props changed)
user/imp/tbemd/contrib/expat/ (props changed)
user/imp/tbemd/contrib/file/ (props changed)
user/imp/tbemd/contrib/gdb/ (props changed)
user/imp/tbemd/contrib/gdtoa/ (props changed)
user/imp/tbemd/contrib/gnu-sort/ (props changed)
user/imp/tbemd/contrib/groff/ (props changed)
user/imp/tbemd/contrib/less/ (props changed)
user/imp/tbemd/contrib/libpcap/ (props changed)
user/imp/tbemd/contrib/llvm/ (props changed)
user/imp/tbemd/contrib/llvm/tools/clang/ (props changed)
user/imp/tbemd/contrib/ncurses/ (props changed)
user/imp/tbemd/contrib/netcat/ (props changed)
user/imp/tbemd/contrib/ntp/ (props changed)
user/imp/tbemd/contrib/one-true-awk/ (props changed)
user/imp/tbemd/contrib/openbsm/ (props changed)
user/imp/tbemd/contrib/openpam/ (props changed)
user/imp/tbemd/contrib/pf/ (props changed)
user/imp/tbemd/contrib/sendmail/ (props changed)
user/imp/tbemd/contrib/tcpdump/ (props changed)
user/imp/tbemd/contrib/tcsh/ (props changed)
user/imp/tbemd/contrib/top/ (props changed)
user/imp/tbemd/contrib/top/install-sh (props changed)
user/imp/tbemd/contrib/tzcode/stdtime/ (props changed)
user/imp/tbemd/contrib/tzcode/zic/ (props changed)
user/imp/tbemd/contrib/tzdata/ (props changed)
user/imp/tbemd/contrib/wpa/ (props changed)
user/imp/tbemd/crypto/openssh/ (props changed)
user/imp/tbemd/crypto/openssl/ (props changed)
user/imp/tbemd/lib/libc/ (props changed)
user/imp/tbemd/lib/libc/stdtime/ (props changed)
user/imp/tbemd/lib/libutil/ (props changed)
user/imp/tbemd/lib/libz/ (props changed)
user/imp/tbemd/sbin/ (props changed)
user/imp/tbemd/sbin/ipfw/ (props changed)
user/imp/tbemd/share/zoneinfo/ (props changed)
user/imp/tbemd/sys/ (props changed)
user/imp/tbemd/sys/amd64/include/xen/ (props changed)
user/imp/tbemd/sys/cddl/contrib/opensolaris/ (props changed)
user/imp/tbemd/sys/contrib/dev/acpica/ (props changed)
user/imp/tbemd/sys/contrib/pf/ (props changed)
user/imp/tbemd/sys/contrib/x86emu/ (props changed)
user/imp/tbemd/sys/dev/xen/xenpci/ (props changed)
user/imp/tbemd/usr.bin/csup/ (props changed)
user/imp/tbemd/usr.bin/procstat/ (props changed)
user/imp/tbemd/usr.sbin/zic/ (props changed)
Modified: user/imp/tbemd/share/man/man4/rl.4
==============================================================================
--- user/imp/tbemd/share/man/man4/rl.4 Mon Aug 23 02:04:27 2010 (r211681)
+++ user/imp/tbemd/share/man/man4/rl.4 Mon Aug 23 02:37:58 2010 (r211682)
@@ -206,9 +206,9 @@ SOHO (PRAGMATIC) UE-1211C
.It Va dev.rl.%unit.prefer_iomap
This tunable controls which register mapping should be used on the
specified device.
-Non-zero value enables I/O space register mapping.
+A non-zero value enables I/O space register mapping.
For controllers that have no I/O space register mapping this tunable
-should be set to 0 to use I/O space register mapping.
+should be set to 0 to use memory space register mapping.
The default value is 1 to use I/O space register mapping.
.It Va dev.rl.%unit.twister_enable
Non-zero value enables the long cable tuning on the specified device.
Modified: user/imp/tbemd/sys/boot/Makefile
==============================================================================
--- user/imp/tbemd/sys/boot/Makefile Mon Aug 23 02:04:27 2010 (r211681)
+++ user/imp/tbemd/sys/boot/Makefile Mon Aug 23 02:37:58 2010 (r211682)
@@ -1,31 +1,13 @@
# $FreeBSD$
.include <bsd.own.mk>
+.include <bsd.arch.inc.mk>
.if ${MK_FORTH} != "no"
# Build the add-in FORTH interpreter.
SUBDIR+= ficl
.endif
-# Build EFI library.
-.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "ia64"
-SUBDIR+= efi
-.endif
-
-# Build Open Firmware library.
-.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64"
-SUBDIR+= ofw
-.endif
-
-# Build U-Boot library.
-.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm"
-SUBDIR+= uboot
-.endif
-
-.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE} == "i386"
-SUBDIR+= zfs
-.endif
-
.if ${MK_FDT} != "no"
SUBDIR+= fdt
.endif
Copied: user/imp/tbemd/sys/boot/Makefile.amd64 (from r211680, head/sys/boot/Makefile.amd64)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/imp/tbemd/sys/boot/Makefile.amd64 Mon Aug 23 02:37:58 2010 (r211682, copy of r211680, head/sys/boot/Makefile.amd64)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+SUBDIR+= efi
+SUBDIR+= zfs
Copied: user/imp/tbemd/sys/boot/Makefile.arm (from r211680, head/sys/boot/Makefile.arm)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/imp/tbemd/sys/boot/Makefile.arm Mon Aug 23 02:37:58 2010 (r211682, copy of r211680, head/sys/boot/Makefile.arm)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SUBDIR+= uboot
Copied: user/imp/tbemd/sys/boot/Makefile.i386 (from r211680, head/sys/boot/Makefile.i386)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/imp/tbemd/sys/boot/Makefile.i386 Mon Aug 23 02:37:58 2010 (r211682, copy of r211680, head/sys/boot/Makefile.i386)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+SUBDIR+= efi
+SUBDIR+= zfs
Copied: user/imp/tbemd/sys/boot/Makefile.ia64 (from r211680, head/sys/boot/Makefile.ia64)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/imp/tbemd/sys/boot/Makefile.ia64 Mon Aug 23 02:37:58 2010 (r211682, copy of r211680, head/sys/boot/Makefile.ia64)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SUBDIR+= efi
Copied: user/imp/tbemd/sys/boot/Makefile.pc98 (from r211680, head/sys/boot/Makefile.pc98)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/imp/tbemd/sys/boot/Makefile.pc98 Mon Aug 23 02:37:58 2010 (r211682, copy of r211680, head/sys/boot/Makefile.pc98)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+# Blank, to override Makefile.i386 since Makefile.$MACHINE is included before
+# Makefile.$MACHINE_ARCH
Copied: user/imp/tbemd/sys/boot/Makefile.powerpc (from r211680, head/sys/boot/Makefile.powerpc)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/imp/tbemd/sys/boot/Makefile.powerpc Mon Aug 23 02:37:58 2010 (r211682, copy of r211680, head/sys/boot/Makefile.powerpc)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+SUBDIR+= ofw
+SUBDIR+= uboot
Copied: user/imp/tbemd/sys/boot/Makefile.sparc64 (from r211680, head/sys/boot/Makefile.sparc64)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/imp/tbemd/sys/boot/Makefile.sparc64 Mon Aug 23 02:37:58 2010 (r211682, copy of r211680, head/sys/boot/Makefile.sparc64)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SUBDIR+= ofw
Modified: user/imp/tbemd/sys/boot/arm/uboot/Makefile
==============================================================================
--- user/imp/tbemd/sys/boot/arm/uboot/Makefile Mon Aug 23 02:04:27 2010 (r211681)
+++ user/imp/tbemd/sys/boot/arm/uboot/Makefile Mon Aug 23 02:37:58 2010 (r211682)
@@ -77,7 +77,7 @@ CLEANFILES+= vers.c loader.help
CFLAGS+= -ffreestanding
-LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_ARCH}
+LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
# Pull in common loader code
.PATH: ${.CURDIR}/../../uboot/common
Modified: user/imp/tbemd/sys/dev/xl/if_xl.c
==============================================================================
--- user/imp/tbemd/sys/dev/xl/if_xl.c Mon Aug 23 02:04:27 2010 (r211681)
+++ user/imp/tbemd/sys/dev/xl/if_xl.c Mon Aug 23 02:37:58 2010 (r211682)
@@ -2247,6 +2247,7 @@ xl_intr(void *arg)
if (status & XL_STAT_ADFAIL) {
xl_reset(sc);
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
}
@@ -2318,6 +2319,7 @@ xl_poll_locked(struct ifnet *ifp, enum p
if (status & XL_STAT_ADFAIL) {
xl_reset(sc);
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
}
@@ -2745,6 +2747,8 @@ xl_init_locked(struct xl_softc *sc)
XL_LOCK_ASSERT(sc);
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+ return;
/*
* Cancel pending I/O and free all RX/TX buffers.
*/
@@ -2993,6 +2997,7 @@ xl_ifmedia_upd(struct ifnet *ifp)
if (sc->xl_media & XL_MEDIAOPT_MII ||
sc->xl_media & XL_MEDIAOPT_BTX ||
sc->xl_media & XL_MEDIAOPT_BT4) {
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
} else {
xl_setmode(sc, ifm->ifm_media);
@@ -3083,7 +3088,7 @@ xl_ioctl(struct ifnet *ifp, u_long comma
{
struct xl_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *) data;
- int error = 0;
+ int error = 0, mask;
struct mii_data *mii = NULL;
u_int8_t rxfilt;
@@ -3108,10 +3113,8 @@ xl_ioctl(struct ifnet *ifp, u_long comma
CSR_WRITE_2(sc, XL_COMMAND,
XL_CMD_RX_SET_FILT|rxfilt);
XL_SEL_WIN(7);
- } else {
- if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
- xl_init_locked(sc);
- }
+ } else
+ xl_init_locked(sc);
} else {
if (ifp->if_drv_flags & IFF_DRV_RUNNING)
xl_stop(sc);
@@ -3143,40 +3146,47 @@ xl_ioctl(struct ifnet *ifp, u_long comma
&mii->mii_media, command);
break;
case SIOCSIFCAP:
+ mask = ifr->ifr_reqcap ^ ifp->if_capenable;
#ifdef DEVICE_POLLING
- if (ifr->ifr_reqcap & IFCAP_POLLING &&
- !(ifp->if_capenable & IFCAP_POLLING)) {
- error = ether_poll_register(xl_poll, ifp);
- if (error)
- return(error);
- XL_LOCK(sc);
- /* Disable interrupts */
- CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|0);
- ifp->if_capenable |= IFCAP_POLLING;
- XL_UNLOCK(sc);
- return (error);
- }
- if (!(ifr->ifr_reqcap & IFCAP_POLLING) &&
- ifp->if_capenable & IFCAP_POLLING) {
- error = ether_poll_deregister(ifp);
- /* Enable interrupts. */
- XL_LOCK(sc);
- CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK|0xFF);
- CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|XL_INTRS);
- if (sc->xl_flags & XL_FLAG_FUNCREG)
- bus_space_write_4(sc->xl_ftag, sc->xl_fhandle,
- 4, 0x8000);
- ifp->if_capenable &= ~IFCAP_POLLING;
- XL_UNLOCK(sc);
- return (error);
+ if ((mask & IFCAP_POLLING) != 0 &&
+ (ifp->if_capabilities & IFCAP_POLLING) != 0) {
+ ifp->if_capenable ^= IFCAP_POLLING;
+ if ((ifp->if_capenable & IFCAP_POLLING) != 0) {
+ error = ether_poll_register(xl_poll, ifp);
+ if (error)
+ break;
+ XL_LOCK(sc);
+ /* Disable interrupts */
+ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ENB|0);
+ ifp->if_capenable |= IFCAP_POLLING;
+ XL_UNLOCK(sc);
+ } else {
+ error = ether_poll_deregister(ifp);
+ /* Enable interrupts. */
+ XL_LOCK(sc);
+ CSR_WRITE_2(sc, XL_COMMAND,
+ XL_CMD_INTR_ACK | 0xFF);
+ CSR_WRITE_2(sc, XL_COMMAND,
+ XL_CMD_INTR_ENB | XL_INTRS);
+ if (sc->xl_flags & XL_FLAG_FUNCREG)
+ bus_space_write_4(sc->xl_ftag,
+ sc->xl_fhandle, 4, 0x8000);
+ XL_UNLOCK(sc);
+ }
}
#endif /* DEVICE_POLLING */
XL_LOCK(sc);
- ifp->if_capenable = ifr->ifr_reqcap;
- if (ifp->if_capenable & IFCAP_TXCSUM)
- ifp->if_hwassist = XL905B_CSUM_FEATURES;
- else
- ifp->if_hwassist = 0;
+ if ((mask & IFCAP_TXCSUM) != 0 &&
+ (ifp->if_capabilities & IFCAP_TXCSUM) != 0) {
+ ifp->if_capenable ^= IFCAP_TXCSUM;
+ if ((ifp->if_capenable & IFCAP_TXCSUM) != 0)
+ ifp->if_hwassist |= XL905B_CSUM_FEATURES;
+ else
+ ifp->if_hwassist &= ~XL905B_CSUM_FEATURES;
+ }
+ if ((mask & IFCAP_RXCSUM) != 0 &&
+ (ifp->if_capabilities & IFCAP_RXCSUM) != 0)
+ ifp->if_capenable ^= IFCAP_RXCSUM;
XL_UNLOCK(sc);
break;
default:
@@ -3227,6 +3237,7 @@ xl_watchdog(struct xl_softc *sc)
"no carrier - transceiver cable problem?\n");
xl_reset(sc);
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
@@ -3357,8 +3368,10 @@ xl_resume(device_t dev)
XL_LOCK(sc);
xl_reset(sc);
- if (ifp->if_flags & IFF_UP)
+ if (ifp->if_flags & IFF_UP) {
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
xl_init_locked(sc);
+ }
XL_UNLOCK(sc);
More information about the svn-src-user
mailing list