svn commit: r244924 - head/tools/regression/bin/sh/errors
Author: jilles Date: Tue Jan 1 12:48:24 2013 New Revision: 244924 URL: http://svnweb.freebsd.org/changeset/base/244924 Log: sh: Fix a Subversion property. Test scripts should have keywords; only pure output that must match exactly should have keywords disabled. Modified: Directory Properties: head/tools/regression/bin/sh/errors/write-error1.0 (props changed) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244925 - in head/sys: kern sys ufs/ffs
Author: kib Date: Tue Jan 1 16:14:48 2013 New Revision: 244925 URL: http://svnweb.freebsd.org/changeset/base/244925 Log: The process_deferred_inactive() function locks the vnodes of the ufs mount, which means that is must not be called while the snaplock is owned. The vfs_write_resume(9) does call the function as the VFS_SUSP_CLEAN() method, which is too early and falls into the region still protected by snaplock. Add yet another flag for the vfs_write_resume_flags() to avoid calling suspension cleanup handler after the suspend is lifted, and use it in the ffs_snapshot() call to vfs_write_resume. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_snapshot.c Modified: head/sys/kern/vfs_vnops.c == --- head/sys/kern/vfs_vnops.c Tue Jan 1 12:48:24 2013(r244924) +++ head/sys/kern/vfs_vnops.c Tue Jan 1 16:14:48 2013(r244925) @@ -1667,7 +1667,8 @@ vfs_write_resume_flags(struct mount *mp, mp->mnt_writeopcount++; } MNT_IUNLOCK(mp); - VFS_SUSP_CLEAN(mp); + if ((flags & VR_NO_SUSPCLR) == 0) + VFS_SUSP_CLEAN(mp); } else if ((flags & VR_START_WRITE) != 0) { MNT_REF(mp); vn_start_write_locked(mp, 0); Modified: head/sys/sys/vnode.h == --- head/sys/sys/vnode.hTue Jan 1 12:48:24 2013(r244924) +++ head/sys/sys/vnode.hTue Jan 1 16:14:48 2013(r244925) @@ -393,6 +393,7 @@ extern int vttoif_tab[]; #defineV_XSLEEP0x0004 /* vn_start_write: just return after sleep */ #defineVR_START_WRITE 0x0001 /* vfs_write_resume: start write atomically */ +#defineVR_NO_SUSPCLR 0x0002 /* vfs_write_resume: do not clear suspension */ #defineVREF(vp)vref(vp) Modified: head/sys/ufs/ffs/ffs_snapshot.c == --- head/sys/ufs/ffs/ffs_snapshot.c Tue Jan 1 12:48:24 2013 (r244924) +++ head/sys/ufs/ffs/ffs_snapshot.c Tue Jan 1 16:14:48 2013 (r244925) @@ -687,7 +687,7 @@ out1: /* * Resume operation on filesystem. */ - vfs_write_resume_flags(vp->v_mount, VR_START_WRITE); + vfs_write_resume_flags(vp->v_mount, VR_START_WRITE | VR_NO_SUSPCLR); if (collectsnapstats && starttime.tv_sec > 0) { nanotime(&endtime); timespecsub(&endtime, &starttime); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244926 - head/sys/dev/agp
Author: antoine Date: Tue Jan 1 18:16:49 2013 New Revision: 244926 URL: http://svnweb.freebsd.org/changeset/base/244926 Log: Remove unneeded semicolons. Reviewed by: md5 of the object files Modified: head/sys/dev/agp/agp_ali.c head/sys/dev/agp/agp_amd.c head/sys/dev/agp/agp_amd64.c head/sys/dev/agp/agp_ati.c head/sys/dev/agp/agp_intel.c head/sys/dev/agp/agp_sis.c head/sys/dev/agp/agp_via.c Modified: head/sys/dev/agp/agp_ali.c == --- head/sys/dev/agp/agp_ali.c Tue Jan 1 16:14:48 2013(r244925) +++ head/sys/dev/agp/agp_ali.c Tue Jan 1 18:16:49 2013(r244926) @@ -69,7 +69,7 @@ agp_ali_match(device_t dev) return ("Ali M1541 host to AGP bridge"); case 0x162110b9: return ("Ali M1621 host to AGP bridge"); - }; + } return NULL; } Modified: head/sys/dev/agp/agp_amd.c == --- head/sys/dev/agp/agp_amd.c Tue Jan 1 16:14:48 2013(r244925) +++ head/sys/dev/agp/agp_amd.c Tue Jan 1 18:16:49 2013(r244926) @@ -191,7 +191,7 @@ agp_amd_match(device_t dev) return ("AMD 761 host to AGP bridge"); case 0x700c1022: return ("AMD 762 host to AGP bridge"); - }; + } return NULL; } Modified: head/sys/dev/agp/agp_amd64.c == --- head/sys/dev/agp/agp_amd64.cTue Jan 1 16:14:48 2013 (r244925) +++ head/sys/dev/agp/agp_amd64.cTue Jan 1 18:16:49 2013 (r244926) @@ -113,7 +113,7 @@ agp_amd64_match(device_t dev) return ("VIA K8T800Pro host to PCI bridge"); case 0x31881106: return ("VIA 8385 host to PCI bridge"); - }; + } return (NULL); } Modified: head/sys/dev/agp/agp_ati.c == --- head/sys/dev/agp/agp_ati.c Tue Jan 1 16:14:48 2013(r244925) +++ head/sys/dev/agp/agp_ati.c Tue Jan 1 18:16:49 2013(r244926) @@ -99,7 +99,7 @@ agp_ati_match(device_t dev) return ("ATI RS300_166 AGP bridge"); case 0x58331002: return ("ATI RS300_200 AGP bridge"); - }; + } return NULL; } @@ -199,7 +199,7 @@ agp_ati_attach(device_t dev) default: /* Unknown chipset */ return EINVAL; - }; + } rid = ATI_GART_MMADDR; sc->regs = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); Modified: head/sys/dev/agp/agp_intel.c == --- head/sys/dev/agp/agp_intel.cTue Jan 1 16:14:48 2013 (r244925) +++ head/sys/dev/agp/agp_intel.cTue Jan 1 18:16:49 2013 (r244926) @@ -105,7 +105,7 @@ agp_intel_match(device_t dev) return ("Intel 82845G host to AGP bridge"); case 0x35808086: return ("Intel 82855GM host to AGP bridge"); - }; + } return (NULL); } Modified: head/sys/dev/agp/agp_sis.c == --- head/sys/dev/agp/agp_sis.c Tue Jan 1 16:14:48 2013(r244925) +++ head/sys/dev/agp/agp_sis.c Tue Jan 1 18:16:49 2013(r244926) @@ -101,7 +101,7 @@ agp_sis_match(device_t dev) return ("SiS 745 host to AGP bridge"); case 0x07461039: return ("SiS 746 host to AGP bridge"); - }; + } return NULL; } Modified: head/sys/dev/agp/agp_via.c == --- head/sys/dev/agp/agp_via.c Tue Jan 1 16:14:48 2013(r244925) +++ head/sys/dev/agp/agp_via.c Tue Jan 1 18:16:49 2013(r244926) @@ -135,7 +135,7 @@ agp_via_match(device_t dev) return ("VIA PT880 host to PCI bridge"); case 0xb1981106: return ("VIA VT83xx/VT87xx/KTxxx/Px8xx host to PCI bridge"); - }; + } return NULL; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244927 - head/usr.bin/m4
Author: antoine Date: Tue Jan 1 18:25:14 2013 New Revision: 244927 URL: http://svnweb.freebsd.org/changeset/base/244927 Log: Add missing DPADD. Modified: head/usr.bin/m4/Makefile Modified: head/usr.bin/m4/Makefile == --- head/usr.bin/m4/MakefileTue Jan 1 18:16:49 2013(r244926) +++ head/usr.bin/m4/MakefileTue Jan 1 18:25:14 2013(r244927) @@ -6,6 +6,7 @@ PROG= m4 CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib +DPADD= ${LIBY} ${LIBL} ${LIBM} LDADD= -ly -ll -lm # clang needs 1 while with gcc we can use 2 #WARNS=1 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244929 - head/sbin/pflogd
Author: antoine Date: Tue Jan 1 18:28:21 2013 New Revision: 244929 URL: http://svnweb.freebsd.org/changeset/base/244929 Log: pflogd does not depend on libutil Modified: head/sbin/pflogd/Makefile Modified: head/sbin/pflogd/Makefile == --- head/sbin/pflogd/Makefile Tue Jan 1 18:26:12 2013(r244928) +++ head/sbin/pflogd/Makefile Tue Jan 1 18:28:21 2013(r244929) @@ -9,7 +9,7 @@ MAN=pflogd.8 CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h LDADD= -lpcap -DPADD= ${LIBPCAP} ${LIBUTIL} +DPADD= ${LIBPCAP} WARNS?=2 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244931 - head/lib/libbsnmp/libbsnmp
Author: antoine Date: Tue Jan 1 18:29:25 2013 New Revision: 244931 URL: http://svnweb.freebsd.org/changeset/base/244931 Log: Add missing DPADD Modified: head/lib/libbsnmp/libbsnmp/Makefile Modified: head/lib/libbsnmp/libbsnmp/Makefile == --- head/lib/libbsnmp/libbsnmp/Makefile Tue Jan 1 18:29:04 2013 (r244930) +++ head/lib/libbsnmp/libbsnmp/Makefile Tue Jan 1 18:29:25 2013 (r244931) @@ -15,6 +15,7 @@ CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES .if ${MK_OPENSSL} != "no" CFLAGS+= -DHAVE_LIBCRYPTO +DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244933 - head/gnu/usr.bin/dialog
Author: antoine Date: Tue Jan 1 18:31:21 2013 New Revision: 244933 URL: http://svnweb.freebsd.org/changeset/base/244933 Log: Fix a dependency Modified: head/gnu/usr.bin/dialog/Makefile Modified: head/gnu/usr.bin/dialog/Makefile == --- head/gnu/usr.bin/dialog/MakefileTue Jan 1 18:30:57 2013 (r244932) +++ head/gnu/usr.bin/dialog/MakefileTue Jan 1 18:31:21 2013 (r244933) @@ -3,7 +3,7 @@ DIALOG=${.CURDIR}/../../../contrib/dialog PROG= dialog -DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBM} +DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM} LDADD= -ldialog -lncursesw -lm CFLAGS+= -I${.CURDIR} -I${DIALOG} .PATH: ${DIALOG} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r244899 - head/sys/mips/beri
On Mon, Dec 31, 2012 at 3:06 AM, Robert Watson wrote: > Author: rwatson > Date: Mon Dec 31 11:06:37 2012 > New Revision: 244899 > URL: http://svnweb.freebsd.org/changeset/base/244899 > > Log: > If FDT is compiled into a FreeBSD/beri kernel, initialise OpenFirmware. > > Sponsored by: DARPA, AFRL This broke the mips:mips64 tinderbox: /obj/src/make.amd64/make -V CFILES_NOZFS -V SYSTEM_CFILES -V GEN_CFILES | MKDEP_CPP="cc -E" CC="cc" xargs mkdep -a -f .newdep -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/ipfilter -I/src/sys/dev/ath -I/src/sys/dev/ath/ath_hal -I/src/sys/contrib/ngatm -I/src/sys/dev/twa -I/src/sys/dev/cxgb -I/src/sys/dev/cxgbe -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=1 --param large-function-growth=10 --param max-inline-insns-single=1 -fno-pic -mno-abicalls -G0 -DKERNLOADADDR=0x8010 -march=mips64 -mabi=64 -msoft-float -ffreestanding In file included from /src/sys/dev/fdt/fdt_common.h:37, from /src/sys/mips/beri/beri_machdep.c:58: /src/sys/dev/ofw/ofw_bus.h:36:24: error: ofw_bus_if.h: No such file or directory mkdep: compile failed *** [.depend] Error code 1 The patch I committed to my git repo fixes that by adding ofw_bus_if.m to files.beri ( https://github.com/yaneurabeya/freebsd/commit/ac9221dc567c67822b6f61cadbfac3fc1e32df04 ). Thanks! -Garrett [gcooper@bayonetta /scratch/git/github/yaneurabeya-freebsd-head]$ make KERNCONF=BERI_DE4_MDROOT TARGET=mips TARGET_ARCH=mips64 buildkernel ... cc -shared -fno-pic -mno-abicalls -G0 -DKERNLOADADDR=0x8010 -march=mips64 -mabi=64 -nostdlib hack.c -o hack.So rm -f hack.c sed s/KERNLOADADDR/0x8010/g /scratch/git/github/yaneurabeya-freebsd-head/sys/conf/ldscript.mips > ldscript.mips MAKE=make sh /scratch/git/github/yaneurabeya-freebsd-head/sys/conf/newvers.sh BERI_DE4_MDROOT cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/scratch/git/github/yaneurabeya-freebsd-head/sys -I/scratch/git/github/yaneurabeya-freebsd-head/sys/contrib/altq -I/scratch/git/github/yaneurabeya-freebsd-head/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=1 --param large-function-growth=10 --param max-inline-insns-single=1 -fno-pic -mno-abicalls -G0 -DKERNLOADADDR=0x8010 -march=mips64 -mabi=64 -msoft-float -ffreestanding -Werror vers.c linking kernel.debug textdata bss dec hex filename 4108957 8653440 283024 13045421 c70ead kernel.debug objcopy --only-keep-debug kernel.debug kernel.symbols objcopy --strip-debug --add-gnu-debuglink=kernel.symbols kernel.debug kernel objcopy --strip-symbol '$d' --strip-symbol '$a' -g --strip-symbol '$t' kernel.debug kernel.tmp sed -e s/0x8010/0x807963c0/ -e s/" + SIZEOF_HEADERS"// ldscript.mips > ldscript.mips.tramp.noheader cc -O -nostdlib -I. -I/scratch/git/github/yaneurabeya-freebsd-head/sys -fno-pic -mno-abicalls -G0 -DKERNLOADADDR=0x8010 -march=mips64 -mabi=64 -Xlinker -T -Xlinker ldscript.mips.tramp.noheader -DKERNNAME="\"kernel.tmp\"" -DELFSIZE=64 /scratch/git/github/yaneurabeya-freebsd-head/sys/mips/mips/elf_trampoline.c /scratch/git/github/yaneurabeya-freebsd-head/sys/mips/mips/inckern.S -o kernel.tramp.elf objcopy -S -O binary kernel.tramp.elf kernel.tramp.bin cd /scratch/git/github/yaneurabeya-freebsd-head/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/mips.mips64/scratch/git/github/yaneurabeya-freebsd-head/sys/BERI_DE4_MDROOT/modules KMODDIR=/boot/kernel MACHINE_CPUARCH=mips MODULES_OVERRIDE= DEBUG_FLAGS="-g" MACHINE=mips MACHINE_ARCH=mips64 KERNBUILDDIR="/usr/obj/mips.mips64/scratch/git/github/yaneurabeya-freebsd-head/sys/BERI_DE4_MDROOT" SYSDIR="/scratch/git/github/yaneurabeya-freebsd-head/sys" make all -- >>> Kernel build for BERI_DE4_MDROOT completed on Tue Jan 1 10:31:25 PST 2013 -- ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244939 - head/sys/arm/ti/cpsw
Author: kientzle Date: Tue Jan 1 18:55:04 2013 New Revision: 244939 URL: http://svnweb.freebsd.org/changeset/base/244939 Log: Overhauled CPSW driver for TI CPSW Ethernet module (as used in AM335x SoC for BeagleBone). Among other things: * Watchdog reset doesn't hang the driver. * Disconnecting cable doesn't hang the driver. * ifconfig up/down doesn't hang the driver * Out-of-memory no longer panics the driver. Known issues: * Doesn't have good support for fragmented packets (calls m_defrag() on TX, assumes RX packets are never fragmented) * Promisc and allmulti still unimplimented * addmulti and delmulti still unimplemented * TX queue still stalls (but watchdog now consistently recovers in ~5s) * No sysctl monitoring * Only supports port0 * No switch configuration support * Not tested on anything but BeagleBone Committed from: BeagleBone Modified: head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h head/sys/arm/ti/cpsw/if_cpswvar.h Modified: head/sys/arm/ti/cpsw/if_cpsw.c == --- head/sys/arm/ti/cpsw/if_cpsw.c Tue Jan 1 18:54:55 2013 (r244938) +++ head/sys/arm/ti/cpsw/if_cpsw.c Tue Jan 1 18:55:04 2013 (r244939) @@ -95,9 +95,9 @@ static void cpsw_start(struct ifnet *ifp static void cpsw_start_locked(struct ifnet *ifp); static void cpsw_stop_locked(struct cpsw_softc *sc); static int cpsw_ioctl(struct ifnet *ifp, u_long command, caddr_t data); -static int cpsw_allocate_dma(struct cpsw_softc *sc); -static int cpsw_free_dma(struct cpsw_softc *sc); -static int cpsw_new_rxbuf(struct cpsw_softc *sc, uint32_t i, uint32_t next); +static int cpsw_init_slot_lists(struct cpsw_softc *sc); +static void cpsw_free_slot(struct cpsw_softc *sc, struct cpsw_slot *slot); +static void cpsw_fill_rx_queue_locked(struct cpsw_softc *sc); static void cpsw_watchdog(struct cpsw_softc *sc); static void cpsw_intr_rx_thresh(void *arg); @@ -156,10 +156,10 @@ static struct { driver_intr_t *handler; char * description; } cpsw_intrs[CPSW_INTR_COUNT + 1] = { - { cpsw_intr_rx_thresh,"CPSW RX threshold interrupt" }, + { cpsw_intr_rx_thresh, "CPSW RX threshold interrupt" }, { cpsw_intr_rx, "CPSW RX interrupt" }, { cpsw_intr_tx, "CPSW TX interrupt" }, - { cpsw_intr_misc,"CPSW misc interrupt" }, + { cpsw_intr_misc, "CPSW misc interrupt" }, }; /* Locking macros */ @@ -199,6 +199,34 @@ static struct { } while (0) +#include +static void +cpsw_debugf_head(const char *funcname) +{ + int t = (int)(time_second % (24 * 60 * 60)); + + printf("%02d:%02d:%02d %s ", t / (60 * 60), (t / 60) % 60, t % 60, funcname); +} + +static void +cpsw_debugf(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); + printf("\n"); + +} + +#define CPSW_DEBUGF(a) do {\ + if (sc->cpsw_if_flags & IFF_DEBUG) {\ + cpsw_debugf_head(__func__); \ + cpsw_debugf a; \ + } \ +} while (0) + static int cpsw_probe(device_t dev) { @@ -213,18 +241,20 @@ cpsw_probe(device_t dev) static int cpsw_attach(device_t dev) { - struct cpsw_softc *sc; + struct cpsw_softc *sc = device_get_softc(dev); struct mii_softc *miisc; struct ifnet *ifp; + void *phy_sc; int i, error, phy; uint32_t reg; - sc = device_get_softc(dev); + CPSW_DEBUGF(("")); + sc->dev = dev; sc->node = ofw_bus_get_node(dev); /* Get phy address from fdt */ - if (fdt_get_phyaddr(sc->node, sc->dev, &phy, (void **)&sc->phy_sc) != 0) { + if (fdt_get_phyaddr(sc->node, sc->dev, &phy, &phy_sc) != 0) { device_printf(dev, "failed to get PHY address from FDT\n"); return (ENXIO); } @@ -246,14 +276,32 @@ cpsw_attach(device_t dev) device_printf(dev, "Version %d.%d (%d)\n", (reg >> 8 & 0x7), reg & 0xFF, (reg >> 11) & 0x1F); - /* Allocate DMA, buffers, buffer descriptors */ - error = cpsw_allocate_dma(sc); + //cpsw_add_sysctls(sc); TODO + + /* Allocate a busdma tag and DMA safe memory for mbufs. */ + error = bus_dma_tag_create( + bus_get_dma_tag(sc->dev), /* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filtfunc, filtfuncarg */ + MCLBYTES, 1,/* maxsize, nsegments */ + MCLBYTES, 0,/*
svn commit: r244941 - head/lib/libedit
Author: pfg Date: Tue Jan 1 19:20:51 2013 New Revision: 244941 URL: http://svnweb.freebsd.org/changeset/base/244941 Log: libedit: bind the correct command when using "bind -k". "ed-argument-digit" (i. e. command 0) was incorrectly used instead. This bug comes from the original sources imported in 1994 and has been confirmed in upstream NetBSD. Reported by: Yamagi Burmeister Submitted by: Christoph Mallon MFC after:3 days Modified: head/lib/libedit/map.c Modified: head/lib/libedit/map.c == --- head/lib/libedit/map.c Tue Jan 1 18:55:49 2013(r244940) +++ head/lib/libedit/map.c Tue Jan 1 19:20:51 2013(r244941) @@ -1250,7 +1250,7 @@ map_bind(EditLine *el, int argc, const c char inbuf[EL_BUFSIZ]; char outbuf[EL_BUFSIZ]; const char *in = NULL; - char *out = NULL; + char *out; el_bindings_t *bp, *ep; int cmd; int key; @@ -1368,7 +1368,7 @@ map_bind(EditLine *el, int argc, const c return (-1); } if (key) - term_set_arrow(el, in, key_map_str(el, out), ntype); + term_set_arrow(el, in, key_map_cmd(el, cmd), ntype); else { if (in[1]) { key_add(el, in, key_map_cmd(el, cmd), ntype); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r244899 - head/sys/mips/beri
On Mon, 31 Dec 2012 11:06:38 + (UTC) Robert Watson wrote: > Author: rwatson > Date: Mon Dec 31 11:06:37 2012 > New Revision: 244899 > URL: http://svnweb.freebsd.org/changeset/base/244899 > > Log: > If FDT is compiled into a FreeBSD/beri kernel, initialise > OpenFirmware. > Sponsored by: DARPA, AFRL > > Modified: > head/sys/mips/beri/beri_machdep.c > > Modified: head/sys/mips/beri/beri_machdep.c > == > --- head/sys/mips/beri/beri_machdep.c Mon Dec 31 07:50:02 > 2012 (r244898) +++ head/sys/mips/beri/beri_machdep.c > Mon Dec 31 11:06:37 2012 (r244899) @@ -1,7 +1,12 @@ > /*- > * Copyright (c) 2006 Wojciech A. Koszek > + * Copyright (c) 2012 Robert N. M. Watson > * All rights reserved. > * > + * This software was developed by SRI International and the > University of > + * Cambridge Computer Laboratory under DARPA/AFRL contract > (FA8750-10-C-0237) > + * ("CTSRD"), as part of the DARPA CRASH research programme. > + * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > @@ -27,6 +32,7 @@ > __FBSDID("$FreeBSD$"); > > #include "opt_ddb.h" > +#include "opt_platform.h" > > #include > #include > @@ -49,6 +55,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > +#include > + > #include > #include > #include > @@ -76,6 +85,17 @@ mips_init(void) > { > int i; > > +#ifdef FDT > +#ifndef FDT_DTB_STATIC > +#error "mips_init with FDT requires FDT_DTB_STATIC" > +#endif > + > + if (OF_install(OFW_FDT, 0) == FALSE) > + while (1); > + if (OF_init(&fdt_static_dtb) != 0) > + while (1); > +#endif > + > for (i = 0; i < 10; i++) { > phys_avail[i] = 0; > } > > This looks like it is too late in the boot process. If you are using FDT you will need to use the FDT uart which is initialised in cninit. You will also need a patch similar to the untested one attached to fix the build. AndrewIndex: beri/beri_machdep.c === --- beri/beri_machdep.c (revision 244940) +++ beri/beri_machdep.c (working copy) @@ -55,8 +55,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT #include #include +#endif #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244942 - head/sys/mips/beri
Author: rwatson Date: Tue Jan 1 19:42:06 2013 New Revision: 244942 URL: http://svnweb.freebsd.org/changeset/base/244942 Log: Merge @219932 from Perforce: FDT headers can't be included if the kernel is compiled without FDT support, due to dependence on generated kobj headers. BERI supports both FDT and non-FDT kernels. Spotted by: bz Modified: head/sys/mips/beri/beri_machdep.c Modified: head/sys/mips/beri/beri_machdep.c == --- head/sys/mips/beri/beri_machdep.c Tue Jan 1 19:20:51 2013 (r244941) +++ head/sys/mips/beri/beri_machdep.c Tue Jan 1 19:42:06 2013 (r244942) @@ -55,8 +55,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT #include #include +#endif #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r244899 - head/sys/mips/beri
Hi Garrett: Thanks for the report -- I didn't realise tinderbox was now building all kernels, or I would have merged my fix from P4 more quickly. The patch you've attached isn't quite the right one -- BERI supports both FDT and non-FDT kernels, so we shouldn't build the Openfirmware headers in the non-FDT case. Instead, I've ifdef'd inclusion of the headers. However, as is probably clear from my breaking the non-FDT kernel configuration, I have been working only with FDT kernels. :-) Thanks, Robert On 1 Jan 2013, at 18:34, Garrett Cooper wrote: > On Mon, Dec 31, 2012 at 3:06 AM, Robert Watson wrote: >> Author: rwatson >> Date: Mon Dec 31 11:06:37 2012 >> New Revision: 244899 >> URL: http://svnweb.freebsd.org/changeset/base/244899 >> >> Log: >> If FDT is compiled into a FreeBSD/beri kernel, initialise OpenFirmware. >> >> Sponsored by: DARPA, AFRL > >This broke the mips:mips64 tinderbox: > > /obj/src/make.amd64/make -V CFILES_NOZFS -V SYSTEM_CFILES -V > GEN_CFILES | MKDEP_CPP="cc -E" CC="cc" xargs mkdep -a -f .newdep -O > -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs > -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline > -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions > -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. > -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/ipfilter > -I/src/sys/dev/ath -I/src/sys/dev/ath/ath_hal -I/src/sys/contrib/ngatm > -I/src/sys/dev/twa -I/src/sys/dev/cxgb -I/src/sys/dev/cxgbe > -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > -include opt_global.h -fno-common -finline-limit=8000 --param > inline-unit-growth=1 --param large-function-growth=10 --param > max-inline-insns-single=1 -fno-pic -mno-abicalls -G0 > -DKERNLOADADDR=0x8010 -march=mips64 -mabi=64 -msoft-float > -ffreestanding > In file included from /src/sys/dev/fdt/fdt_common.h:37, > from /src/sys/mips/beri/beri_machdep.c:58: > /src/sys/dev/ofw/ofw_bus.h:36:24: error: ofw_bus_if.h: No such file or > directory > mkdep: compile failed > *** [.depend] Error code 1 > >The patch I committed to my git repo fixes that by adding > ofw_bus_if.m to files.beri ( > https://github.com/yaneurabeya/freebsd/commit/ac9221dc567c67822b6f61cadbfac3fc1e32df04 > ). > Thanks! > -Garrett > > > [gcooper@bayonetta /scratch/git/github/yaneurabeya-freebsd-head]$ make > KERNCONF=BERI_DE4_MDROOT TARGET=mips TARGET_ARCH=mips64 buildkernel > ... > cc -shared -fno-pic -mno-abicalls -G0 > -DKERNLOADADDR=0x8010 -march=mips64 -mabi=64 -nostdlib > hack.c -o hack.So > rm -f hack.c > sed s/KERNLOADADDR/0x8010/g > /scratch/git/github/yaneurabeya-freebsd-head/sys/conf/ldscript.mips > > ldscript.mips > MAKE=make sh /scratch/git/github/yaneurabeya-freebsd-head/sys/conf/newvers.sh > BERI_DE4_MDROOT > cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs > -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline > -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions > -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. > -I/scratch/git/github/yaneurabeya-freebsd-head/sys > -I/scratch/git/github/yaneurabeya-freebsd-head/sys/contrib/altq > -I/scratch/git/github/yaneurabeya-freebsd-head/sys/contrib/libfdt > -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h > -fno-common -finline-limit=8000 --param inline-unit-growth=1 > --param large-function-growth=10 --param > max-inline-insns-single=1 -fno-pic -mno-abicalls -G0 > -DKERNLOADADDR=0x8010 -march=mips64 -mabi=64 -msoft-float > -ffreestanding -Werror vers.c > linking kernel.debug > textdata bss dec hex filename > 4108957 8653440 283024 13045421 c70ead kernel.debug > objcopy --only-keep-debug kernel.debug kernel.symbols > objcopy --strip-debug --add-gnu-debuglink=kernel.symbols kernel.debug kernel > objcopy --strip-symbol '$d' --strip-symbol '$a' -g --strip-symbol > '$t' kernel.debug kernel.tmp > sed -e s/0x8010/0x807963c0/ -e s/" + SIZEOF_HEADERS"// > ldscript.mips > ldscript.mips.tramp.noheader > cc -O -nostdlib -I. -I/scratch/git/github/yaneurabeya-freebsd-head/sys > -fno-pic -mno-abicalls -G0 -DKERNLOADADDR=0x8010 > -march=mips64 -mabi=64 -Xlinker -T -Xlinker > ldscript.mips.tramp.noheader -DKERNNAME="\"kernel.tmp\"" -DELFSIZE=64 > /scratch/git/github/yaneurabeya-freebsd-head/sys/mips/mips/elf_trampoline.c > /scratch/git/github/yaneurabeya-freebsd-head/sys/mips/mips/inckern.S > -o kernel.tramp.elf > objcopy -S -O binary kernel.tramp.elf kernel.tramp.bin > cd /scratch/git/github/yaneurabeya-freebsd-head/sys/modules; > MAKEOBJDIRPREFIX=/usr/obj/mips.mips64/scratch/git/github/yaneurabeya-freebsd-head/sys/BERI_DE4_MDROOT/modules > KMODDIR=/boot/kernel MACHINE_CPUARCH=mips MODULES_OVERRIDE= > DEBUG_FLAGS="-g" MACHINE=mips MACHINE_ARCH=mips64 > KERNBUILDDIR="/usr/obj/mips.mips64/scratch/git/github/yaneurabeya-
Re: svn commit: r244899 - head/sys/mips/beri
On 1 Jan 2013, at 19:17, Andrew Turner wrote: >> @@ -76,6 +85,17 @@ mips_init(void) >> { >> int i; >> >> +#ifdef FDT >> +#ifndef FDT_DTB_STATIC >> +#error "mips_init with FDT requires FDT_DTB_STATIC" >> +#endif >> + >> +if (OF_install(OFW_FDT, 0) == FALSE) >> +while (1); >> +if (OF_init(&fdt_static_dtb) != 0) >> +while (1); >> +#endif >> + >> for (i = 0; i < 10; i++) { >> phys_avail[i] = 0; >> } >> >> > > This looks like it is too late in the boot process. If you are using > FDT you will need to use the FDT uart which is initialised in cninit. Hi Andrew: The current BERI low-level UART, as with several others in MIPS-space, has excessively intimate knowledge of the location of the console UART instance. Once we fix the console driver, you're right -- it will need to move to platform_init() or similar. > You will also need a patch similar to the untested one attached to fix the > build. Thanks -- I had actually committed an identical patch to Perforce this morning, but failed to merge it to head. It would be nice if we didn't have to conditionally include headers. Robert ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r244899 - head/sys/mips/beri
On 1 Jan 2013, at 19:17, Andrew Turner wrote: > This looks like it is too late in the boot process. If you are using > FDT you will need to use the FDT uart which is initialised in cninit. On a semi-related note: the current obstacle to moving more devices over to using FDT on BERI is that our FDT implementation appears to require a PIC to be configured. We're not actually using a PIC on BERI currently. It works fine attached to nexus, as the implied fallback for not having a PIC is to simply use the suitably numbered interrupt wires direct into the MIPS. However, trying the same setup described using FDT leads to an interrupt-related warning at boot, and no interrupt being provided to the driver. I suspect I need to provide a PIC-alike software component as a fall-back for the non-PIC case. From a brief e-mail exchange with JC, it sounds like the XLP FDT setup is actually not using interrupts either, currently. Robert ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r244899 - head/sys/mips/beri
On Tue, 1 Jan 2013 20:56:15 + "Robert N. M. Watson" wrote: > > On 1 Jan 2013, at 19:17, Andrew Turner wrote: > > > This looks like it is too late in the boot process. If you are using > > FDT you will need to use the FDT uart which is initialised in > > cninit. > > On a semi-related note: the current obstacle to moving more devices > over to using FDT on BERI is that our FDT implementation appears to > require a PIC to be configured. We're not actually using a PIC on > BERI currently. It works fine attached to nexus, as the implied > fallback for not having a PIC is to simply use the suitably numbered > interrupt wires direct into the MIPS. However, trying the same setup > described using FDT leads to an interrupt-related warning at boot, > and no interrupt being provided to the driver. I suspect I need to > provide a PIC-alike software component as a fall-back for the non-PIC > case. From a brief e-mail exchange with JC, it sounds like the XLP > FDT setup is actually not using interrupts either, currently. I'm not sure if a PIC is required. From my reading of the code it appears not. By the look of it if you are using the nexus to handle interrupts you need to put an interrupts property in the device and "#interrupt-cells = <1>;" in the soc node. You will also need to implement an interrupt decode function and add it to the fdt_pic_table array. ARM has a number of almost identical copies of this function you can use for inspration. Andrew ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244943 - in head/sys/dev/ath/ath_hal: ar5416 ar9002
Author: adrian Date: Wed Jan 2 00:38:01 2013 New Revision: 244943 URL: http://svnweb.freebsd.org/changeset/base/244943 Log: Bring over the basic spectral scan framework code from Qualcomm Atheros. This includes the HAL routines to setup, enable/activate/disable spectral scan and configure the relevant registers. This still requires driver interaction to enable spectral scan reporting. Specifically: * call ah_spectralConfigure() to configure and enable spectral scan; * .. there's currently no way to disable spectral scan... that will have to follow. * call ah_spectralStart() to force start a spectral report; * call ah_spectralStop() to force stop an active spectral report. The spectral scan results appear as PHY errors (type 0x5 on the AR9280, same as radar) but with the spectral scan bit set (0x10 in the last byte of the frame) identifying it as a spectral report rather than a radar FFT report. Caveats: * It's likely quite difficult to run spectral _and_ radar at the same time. Enabling spectral scan disables the radar thresholds but leaves radar enabled. Thus, the driver (for now) needs to ensure that only one or the other is enabled. * .. it needs testing on HT40 mode. Tested: * AR9280 in STA mode, HT/20 only TODO: * Test on AR9285, AR9287; * Test in both HT20 and HT40 modes; * .. all the driver glue. Obtained from:Qualcomm Atheros Added: head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h == --- head/sys/dev/ath/ath_hal/ar5416/ar5416.hTue Jan 1 19:42:06 2013 (r244942) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.hWed Jan 2 00:38:01 2013 (r244943) @@ -265,6 +265,16 @@ extern HAL_BOOL ar5416ProcessRadarEvent( HAL_DFS_EVENT *event); extern HAL_BOOL ar5416IsFastClockEnabled(struct ath_hal *ah); +/* ar9280_spectral.c */ +extern void ar5416ConfigureSpectralScan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss); +extern void ar5416GetSpectralParams(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss); +extern HAL_BOOL ar5416IsSpectralActive(struct ath_hal *ah); +extern HAL_BOOL ar5416IsSpectralEnabled(struct ath_hal *ah); +extern void ar5416StartSpectralScan(struct ath_hal *ah); +extern void ar5416StopSpectralScan(struct ath_hal *ah); +extern uint32_t ar5416GetSpectralConfig(struct ath_hal *ah); +extern void ar5416RestoreSpectralConfig(struct ath_hal *ah, uint32_t restoreval); + extern HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip); extern HAL_POWER_MODE ar5416GetPowerMode(struct ath_hal *ah); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jan 1 19:42:06 2013(r244942) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Jan 2 00:38:01 2013(r244943) @@ -161,6 +161,14 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_procRadarEvent = ar5416ProcessRadarEvent; ah->ah_isFastClockEnabled = ar5416IsFastClockEnabled; + /* Spectral Scan Functions */ + ah->ah_spectralConfigure= ar5416ConfigureSpectralScan; + ah->ah_spectralGetConfig= ar5416GetSpectralParams; + ah->ah_spectralStart= ar5416StartSpectralScan; + ah->ah_spectralStop = ar5416StopSpectralScan; + ah->ah_spectralIsEnabled= ar5416IsSpectralEnabled; + ah->ah_spectralIsActive = ar5416IsSpectralActive; + /* Power Management Functions */ ah->ah_setPowerMode = ar5416SetPowerMode; @@ -918,6 +926,7 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halMcastKeySrchSupport = AH_TRUE; /* Works on AR5416 and later */ pCap->halTsfAddSupport = AH_TRUE; pCap->hal4AddrAggrSupport = AH_FALSE; /* Broken in Owl */ + pCap->halSpectralScanSupport = AH_FALSE;/* AR9280 and later */ if (ath_hal_eepromGet(ah, AR_EEP_MAXQCU, &val) == HAL_OK) pCap->halTotalQueues = val; Added: head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c Wed Jan 2 00:38:01 2013(r244943) @@ -0,0 +1,244 @@ +/* + * Copyright (c)
svn commit: r244945 - in head/sys: conf modules/ath
Author: adrian Date: Wed Jan 2 01:24:36 2013 New Revision: 244945 URL: http://svnweb.freebsd.org/changeset/base/244945 Log: Add missing update to link ar5416_spectral.c into the build. Modified: head/sys/conf/files head/sys/modules/ath/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Wed Jan 2 01:07:08 2013(r244944) +++ head/sys/conf/files Wed Jan 2 01:24:36 2013(r244945) @@ -918,6 +918,10 @@ dev/ath/ath_hal/ar5416/ar5416_reset.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +dev/ath/ath_hal/ar5416/ar5416_spectral.c \ + optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ + ath_ar9287 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_xmit.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ Modified: head/sys/modules/ath/Makefile == --- head/sys/modules/ath/Makefile Wed Jan 2 01:07:08 2013 (r244944) +++ head/sys/modules/ath/Makefile Wed Jan 2 01:24:36 2013 (r244945) @@ -89,7 +89,7 @@ SRCS+=ah_eeprom_v14.c ah_eeprom_v4k.c \ ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_btcoex.c \ ar5416_cal.c ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \ ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \ - ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_radar.c \ + ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_radar.c ar5416_spectral.c \ ar5416_recv.c ar5416_reset.c ar5416_xmit.c # RF backend for 5416, 9130 and 9160 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244946 - in head/sys/dev/ath: . ath_dfs/null
Author: adrian Date: Wed Jan 2 01:36:10 2013 New Revision: 244946 URL: http://svnweb.freebsd.org/changeset/base/244946 Log: Add a method to explicitly disable radar reporting if required. Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c head/sys/dev/ath/if_athdfs.h Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c == --- head/sys/dev/ath/ath_dfs/null/dfs_null.cWed Jan 2 01:24:36 2013 (r244945) +++ head/sys/dev/ath/ath_dfs/null/dfs_null.cWed Jan 2 01:36:10 2013 (r244946) @@ -146,6 +146,26 @@ ath_dfs_radar_enable(struct ath_softc *s } /* + * Explicity disable radar reporting. + * + * Return 0 if it was disabled, < 0 on error. + */ +int +ath_dfs_radar_disable(struct ath_softc *sc) +{ +#if 0 + HAL_PHYERR_PARAM pe; + + (void) ath_hal_getdfsthresh(sc->sc_ah, &pe); + pe.pe_enabled = 0; + (void) ath_hal_enabledfs(sc->sc_ah, &pe); + return (0); +#else + return (0); +#endif +} + +/* * Process DFS related PHY errors * * The mbuf is not "ours" and if we want a copy, we have Modified: head/sys/dev/ath/if_athdfs.h == --- head/sys/dev/ath/if_athdfs.hWed Jan 2 01:24:36 2013 (r244945) +++ head/sys/dev/ath/if_athdfs.hWed Jan 2 01:36:10 2013 (r244946) @@ -35,6 +35,7 @@ externint ath_dfs_attach(struct ath_sof extern int ath_dfs_detach(struct ath_softc *sc); extern int ath_dfs_radar_enable(struct ath_softc *, struct ieee80211_channel *chan); +extern int ath_dfs_radar_disable(struct ath_softc *sc); extern void ath_dfs_process_phy_err(struct ath_softc *sc, struct mbuf *m, uint64_t tsf, struct ath_rx_status *rxstat); extern int ath_dfs_process_radar_event(struct ath_softc *sc, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244947 - head/sys/dev/ath
Author: adrian Date: Wed Jan 2 01:40:23 2013 New Revision: 244947 URL: http://svnweb.freebsd.org/changeset/base/244947 Log: Add spectral HAL accessor methods. Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h == --- head/sys/dev/ath/if_athvar.hWed Jan 2 01:36:10 2013 (r244946) +++ head/sys/dev/ath/if_athvar.hWed Jan 2 01:40:23 2013 (r244947) @@ -1299,4 +1299,13 @@ void ath_intr(void *); #defineath_hal_get_chan_ext_busy(_ah) \ ((*(_ah)->ah_get11nExtBusy)((_ah))) +#defineath_hal_spectral_get_config(_ah, _p) \ + ((*(_ah)->ah_spectralGetConfig)((_ah), (_p))) +#defineath_hal_spectral_configure(_ah, _p) \ + ((*(_ah)->ah_spectralConfigure)((_ah), (_p))) +#defineath_hal_spectral_start(_ah) \ + ((*(_ah)->ah_spectralStart)((_ah))) +#defineath_hal_spectral_stop(_ah) \ + ((*(_ah)->ah_spectralStop)((_ah))) + #endif /* _DEV_ATH_ATHVAR_H */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244950 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Wed Jan 2 03:56:20 2013 New Revision: 244950 URL: http://svnweb.freebsd.org/changeset/base/244950 Log: Fix the short repeat option code to not flip the option to 0 when we call this w/ NOVAL set. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c Wed Jan 2 02:44:54 2013(r244949) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c Wed Jan 2 03:56:20 2013(r244950) @@ -113,7 +113,7 @@ ar5416ConfigureSpectralScan(struct ath_h if (ss->ss_short_report == AH_TRUE) { val |= AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT; - } else { + } else if (ss->ss_short_report != HAL_SPECTRAL_PARAM_NOVAL) { val &= ~AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT; } } else { @@ -130,7 +130,7 @@ ar5416ConfigureSpectralScan(struct ath_h if (ss->ss_short_report == AH_TRUE) { val |= AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI; - } else { + } else if (ss->ss_short_report != HAL_SPECTRAL_PARAM_NOVAL) { val &= ~AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244951 - head/sys/dev/ath
Author: adrian Date: Wed Jan 2 03:59:02 2013 New Revision: 244951 URL: http://svnweb.freebsd.org/changeset/base/244951 Log: Add a new (skeleton) spectral mode manager module. Added: head/sys/dev/ath/if_ath_spectral.c (contents, props changed) head/sys/dev/ath/if_ath_spectral.h (contents, props changed) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athioctl.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Wed Jan 2 03:56:20 2013(r244950) +++ head/sys/dev/ath/if_ath.c Wed Jan 2 03:59:02 2013(r244951) @@ -111,6 +111,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef ATH_TX99_DIAG @@ -510,6 +511,14 @@ ath_attach(u_int16_t devid, struct ath_s goto bad2; } + /* Attach spectral module */ + if (ath_spectral_attach(sc) < 0) { + device_printf(sc->sc_dev, + "%s: unable to attach spectral\n", __func__); + error = EIO; + goto bad2; + } + /* Start DFS processing tasklet */ TASK_INIT(&sc->sc_dfstask, 0, ath_dfs_tasklet, sc); @@ -967,6 +976,7 @@ ath_detach(struct ath_softc *sc) if_ath_alq_tidyup(&sc->sc_alq); #endif + ath_spectral_detach(sc); ath_dfs_detach(sc); ath_desc_free(sc); ath_txdma_teardown(sc); @@ -1489,6 +1499,9 @@ ath_resume(struct ath_softc *sc) /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, ic->ic_curchan); + /* Let spectral at in case spectral is enabled */ + ath_spectral_enable(sc, ic->ic_curchan); + /* Restore the LED configuration */ ath_led_config(sc); ath_hal_setledstate(ah, HAL_LED_INIT); @@ -1918,6 +1931,9 @@ ath_init(void *arg) /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, ic->ic_curchan); + /* Let spectral at in case spectral is enabled */ + ath_spectral_enable(sc, ic->ic_curchan); + /* * Likewise this is set during reset so update * state cached in the driver. @@ -2226,6 +2242,9 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, ic->ic_curchan); + /* Let spectral at in case spectral is enabled */ + ath_spectral_enable(sc, ic->ic_curchan); + if (ath_startrecv(sc) != 0) /* restart recv */ if_printf(ifp, "%s: unable to start recv logic\n", __func__); /* @@ -4402,6 +4421,9 @@ ath_chan_set(struct ath_softc *sc, struc /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, chan); + /* Let spectral at in case spectral is enabled */ + ath_spectral_enable(sc, chan); + /* * Re-enable rx framework. */ @@ -5384,6 +5406,9 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, error = ath_ioctl_phyerr(sc,(struct ath_diag*) ifr); break; #endif + case SIOCGATHSPECTRAL: + error = ath_ioctl_spectral(sc,(struct ath_diag*) ifr); + break; case SIOCGATHNODERATESTATS: error = ath_ioctl_ratestats(sc, (struct ath_rateioctl *) ifr); break; Added: head/sys/dev/ath/if_ath_spectral.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_spectral.c Wed Jan 2 03:59:02 2013 (r244951) @@ -0,0 +1,224 @@ +/*- + * Copyright (c) 2013 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer, + *without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + *similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + *redistribution must be conditioned upon including a substantially + *similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +
svn commit: r244952 - in head/sys: conf modules/ath
Author: adrian Date: Wed Jan 2 04:00:54 2013 New Revision: 244952 URL: http://svnweb.freebsd.org/changeset/base/244952 Log: Link if_ath_spectral.c into the build. Modified: head/sys/conf/files head/sys/modules/ath/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Wed Jan 2 03:59:02 2013(r244951) +++ head/sys/conf/files Wed Jan 2 04:00:54 2013(r244952) @@ -726,6 +726,8 @@ dev/ath/if_ath_rx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_rx_edma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/if_ath_spectral.c optional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ah_osdep.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # Modified: head/sys/modules/ath/Makefile == --- head/sys/modules/ath/Makefile Wed Jan 2 03:59:02 2013 (r244951) +++ head/sys/modules/ath/Makefile Wed Jan 2 04:00:54 2013 (r244952) @@ -37,7 +37,7 @@ ATH_RATE?=sample # tx rate control alg KMOD= if_ath SRCS= if_ath.c if_ath_alq.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c SRCS+= if_ath_tx.c if_ath_tx_ht.c if_ath_led.c if_ath_rx.c if_ath_tdma.c -SRCS+= if_ath_beacon.c if_ath_rx_edma.c if_ath_tx_edma.c +SRCS+= if_ath_beacon.c if_ath_rx_edma.c if_ath_tx_edma.c if_ath_spectral.c # NB: v3 eeprom support used by both AR5211 and AR5212; just include it SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h opt_wlan.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244953 - in head/tools/tools/ath: . athspectral
Author: adrian Date: Wed Jan 2 04:02:27 2013 New Revision: 244953 URL: http://svnweb.freebsd.org/changeset/base/244953 Log: Add a very skeletal spectral scan control application. The main use for this is to manually trigger spectral scan operations (athspectral -i athX start) whilst doing debugging. Added: head/tools/tools/ath/athspectral/ head/tools/tools/ath/athspectral/Makefile (contents, props changed) head/tools/tools/ath/athspectral/athspectral.c (contents, props changed) Modified: head/tools/tools/ath/Makefile Modified: head/tools/tools/ath/Makefile == --- head/tools/tools/ath/Makefile Wed Jan 2 04:00:54 2013 (r244952) +++ head/tools/tools/ath/Makefile Wed Jan 2 04:02:27 2013 (r244953) @@ -3,6 +3,6 @@ SUBDIR=arcode athdebug athdecode athkey athpoke athprom athrd athregs SUBDIR+= athstats ath_prom_read athradar athaggrstats SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print -SUBDIR+= athsurvey athratestats +SUBDIR+= athsurvey athratestats athspectral .include Added: head/tools/tools/ath/athspectral/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athspectral/Makefile Wed Jan 2 04:02:27 2013 (r244953) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +PROG= athspectral + +.include <../Makefile.inc> + +SRCS= athspectral.c +SRCS+= opt_ah.h +CLEANFILES+= opt_ah.h + +opt_ah.h: + echo "#define AH_DEBUG 1" > opt_ah.h + echo "#define AH_DEBUG_COUNTRY 1" >> opt_ah.h + echo "#define AH_SUPPORT_AR5416 1" >> opt_ah.h + +.include Added: head/tools/tools/ath/athspectral/athspectral.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athspectral/athspectral.c Wed Jan 2 04:02:27 2013(r244953) @@ -0,0 +1,323 @@ +/* + * Copyright (c) 2013 Adrian Chadd + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include "diag.h" + +#include "ah.h" +#include "ah_internal.h" + +#ifndefATH_DEFAULT +#defineATH_DEFAULT "ath0" +#endif + +#include +#include +#include +#include +#include +#include +#include + +struct spectralhandler { + struct ath_diag atd; + int s; + struct ifreqifr; + int ah_devid; +}; + +int +spectral_opendev(struct spectralhandler *spectral, const char *devid) +{ + HAL_REVS revs; + + spectral->s = socket(AF_INET, SOCK_DGRAM, 0); + if (spectral->s < 0) { + warn("socket"); + return 0; + } + + strncpy(spectral->atd.ad_name, devid, sizeof (spectral->atd.ad_name)); + + /* Get the hardware revision, just to verify things are working */ + spectral->atd.ad_id = HAL_DIAG_REVS; + spectral->atd.ad_out_data = (caddr_t) &revs; + spectral->atd.ad_out_size = sizeof(revs); + if (ioctl(spectral->s, SIOCGATHDIAG, &spectral->atd) < 0) { + warn(spectral->atd.ad_name); + return 0; + } + spectral->ah_devid = revs.ah_devid; + return 1; +} + +void +spectral_closedev(struct spectralhandler *spectral) +{ + close(spectral->s); + spectral->s = -1; +} + +void +spectralset(struct spectralhandler *spectral, int op, u_int32_t param) +{ + HAL_SPECTRAL_PARAM pe; + + pe.ss_fft_period = HAL_SPECTRAL_PARAM_NOVAL; + pe.ss_period = HAL_SPECTRAL_PARAM_NOVAL; + pe.ss_count = HAL_SPEC
svn commit: r244957 - head/sys/conf
Author: hselasky Date: Wed Jan 2 07:33:43 2013 New Revision: 244957 URL: http://svnweb.freebsd.org/changeset/base/244957 Log: Add missing dependancy. Submitted by: Michael Butler MFC after:1 week Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Wed Jan 2 07:33:19 2013(r244956) +++ head/sys/conf/files Wed Jan 2 07:33:43 2013(r244957) @@ -2188,7 +2188,7 @@ dev/usb/net/if_udav.c optional udav dev/usb/net/if_usie.c optional usie dev/usb/net/ruephy.c optional rue dev/usb/net/usb_ethernet.c optional aue | axe | cdce | cue | kue | mos | \ -rue | smsc | udav +rue | smsc | udav | ipheth dev/usb/net/uhso.c optional uhso # # USB WLAN drivers ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"