Index: head/sys/boot/arm/uboot/Makefile =================================================================== --- head/sys/boot/arm/uboot/Makefile +++ head/sys/boot/arm/uboot/Makefile @@ -77,8 +77,6 @@ LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif -CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE - .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes Index: head/sys/boot/common/dev_net.c =================================================================== --- head/sys/boot/common/dev_net.c +++ head/sys/boot/common/dev_net.c @@ -120,11 +120,9 @@ devname = va_arg(args, char*); va_end(args); -#ifdef NETIF_OPEN_CLOSE_ONCE /* Before opening another interface, close the previous one first. */ if (netdev_sock >= 0 && strcmp(devname, netdev_name) != 0) net_cleanup(); -#endif /* On first open, do netif open, mount, etc. */ if (netdev_opens == 0) { @@ -198,21 +196,6 @@ f->f_devdata = NULL; -#ifndef NETIF_OPEN_CLOSE_ONCE - /* Extra close call? */ - if (netdev_opens <= 0) - return (0); - netdev_opens--; - /* Not last close? */ - if (netdev_opens > 0) - return (0); - /* On last close, do netif close, etc. */ -#ifdef NETIF_DEBUG - if (debug) - printf("net_close: calling net_cleanup()\n"); -#endif - net_cleanup(); -#endif return (0); } Index: head/sys/boot/mips/uboot/Makefile =================================================================== --- head/sys/boot/mips/uboot/Makefile +++ head/sys/boot/mips/uboot/Makefile @@ -81,8 +81,6 @@ LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif -CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE - .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes Index: head/sys/boot/powerpc/kboot/Makefile =================================================================== --- head/sys/boot/powerpc/kboot/Makefile +++ head/sys/boot/powerpc/kboot/Makefile @@ -68,10 +68,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif -# Avoid the open-close-dance for every file access as some firmwares perform -# an auto-negotiation on every open of the network interface and thus causes -# netbooting to take horribly long. -CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE -mcpu=powerpc64 +CFLAGS+= -mcpu=powerpc64 # Always add MI sources .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern Index: head/sys/boot/powerpc/ofw/Makefile =================================================================== --- head/sys/boot/powerpc/ofw/Makefile +++ head/sys/boot/powerpc/ofw/Makefile @@ -67,11 +67,6 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif -# Avoid the open-close-dance for every file access as some firmwares perform -# an auto-negotiation on every open of the network interface and thus causes -# netbooting to take horribly long. -CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE - # Always add MI sources .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" Index: head/sys/boot/powerpc/ps3/Makefile =================================================================== --- head/sys/boot/powerpc/ps3/Makefile +++ head/sys/boot/powerpc/ps3/Makefile @@ -68,10 +68,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif -# Avoid the open-close-dance for every file access as some firmwares perform -# an auto-negotiation on every open of the network interface and thus causes -# netbooting to take horribly long. -CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE -mcpu=powerpc64 +CFLAGS+= -mcpu=powerpc64 # Always add MI sources .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern Index: head/sys/boot/sparc64/loader/Makefile =================================================================== --- head/sys/boot/sparc64/loader/Makefile +++ head/sys/boot/sparc64/loader/Makefile @@ -69,10 +69,6 @@ .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. -# Avoid the open-close-dance for every file access as some firmwares perform -# an auto-negotiation on every open of the network interface and thus causes -# netbooting to take horribly long. -CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE CLEANFILES+= vers.c loader.help