svn commit: r333666 - head/sys/dev/usb/input
Author: emaste Date: Wed May 16 03:17:37 2018 New Revision: 333666 URL: https://svnweb.freebsd.org/changeset/base/333666 Log: Attempt to fix build by removing EOF backslash-newline GCC complains: In file included from .../sys/dev/usb/input/uhid.c:77: .../usb_rdesc.h:280:37: error: backslash-newline at end of file Modified: head/sys/dev/usb/input/usb_rdesc.h Modified: head/sys/dev/usb/input/usb_rdesc.h == --- head/sys/dev/usb/input/usb_rdesc.h Wed May 16 03:08:06 2018 (r333665) +++ head/sys/dev/usb/input/usb_rdesc.h Wed May 16 03:17:37 2018 (r333666) @@ -303,4 +303,4 @@ 0x95, 0x0A, /* Report Count (10), */\ 0x81, 0x01, /* Input (Constant), */\ 0xC0, /* End Collection, */\ -0xC0/* End Collection */\ +0xC0/* End Collection */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333665 - head/tools/tools
Author: emaste Date: Wed May 16 03:08:06 2018 New Revision: 333665 URL: https://svnweb.freebsd.org/changeset/base/333665 Log: Add intel-ucode-split to tools README Modified: head/tools/tools/README Modified: head/tools/tools/README == --- head/tools/tools/README Wed May 16 02:58:05 2018(r333664) +++ head/tools/tools/README Wed May 16 03:08:06 2018(r333665) @@ -33,6 +33,7 @@ html-mv Rename HTML generated filenames to hum ifinfo Uses the interface MIB to print out all the information an interface exports in an ugly form. indent_wrapper Tool for style(9) checking SVN/GIT patches. +intel-ucode-split Tool to split Intel microcode into individual files. iso Tool to compare the iso3166 and iso639 files in /usr/share/misc with the data from the master sites. iwiTools specific to the Intel PRO/Wireless 2200BG/2225BG/2915ABG ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333664 - in head/usr.sbin/makefs: cd9660 ffs
Author: emaste Date: Wed May 16 02:58:05 2018 New Revision: 333664 URL: https://svnweb.freebsd.org/changeset/base/333664 Log: makefs: ANSIfy Modified: head/usr.sbin/makefs/cd9660/cd9660_debug.c head/usr.sbin/makefs/ffs/ffs_subr.c Modified: head/usr.sbin/makefs/cd9660/cd9660_debug.c == --- head/usr.sbin/makefs/cd9660/cd9660_debug.c Wed May 16 02:51:30 2018 (r333663) +++ head/usr.sbin/makefs/cd9660/cd9660_debug.c Wed May 16 02:58:05 2018 (r333664) @@ -59,8 +59,7 @@ print_n_tabs(int n) #if 0 void -debug_print_rrip_info(n) -cd9660node *n; +debug_print_rrip_info(cd9660node *n) { struct ISO_SUSP_ATTRIBUTES *t; TAILQ_FOREACH(t, >head, rr_ll) { Modified: head/usr.sbin/makefs/ffs/ffs_subr.c == --- head/usr.sbin/makefs/ffs/ffs_subr.c Wed May 16 02:51:30 2018 (r333663) +++ head/usr.sbin/makefs/ffs/ffs_subr.c Wed May 16 02:58:05 2018 (r333664) @@ -85,10 +85,7 @@ ffs_fragacct_swap(struct fs *fs, int fragmap, int32_t * returns false if any corresponding bit in the free map is 0 */ int -ffs_isblock(fs, cp, h) - struct fs *fs; - u_char *cp; - int32_t h; +ffs_isblock(struct fs *fs, u_char *cp, int32_t h) { u_char mask; @@ -116,10 +113,7 @@ ffs_isblock(fs, cp, h) * returns false if any corresponding bit in the free map is 1 */ int -ffs_isfreeblock(fs, cp, h) - struct fs *fs; - u_char *cp; - int32_t h; +ffs_isfreeblock(struct fs *fs, u_char *cp, int32_t h) { switch ((int)fs->fs_fragshift) { @@ -141,10 +135,7 @@ ffs_isfreeblock(fs, cp, h) * take a block out of the map */ void -ffs_clrblock(fs, cp, h) - struct fs *fs; - u_char *cp; - int32_t h; +ffs_clrblock(struct fs *fs, u_char *cp, int32_t h) { switch ((int)fs->fs_fragshift) { @@ -170,10 +161,7 @@ ffs_clrblock(fs, cp, h) * put a block into the map */ void -ffs_setblock(fs, cp, h) - struct fs *fs; - u_char *cp; - int32_t h; +ffs_setblock(struct fs *fs, u_char *cp, int32_t h) { switch ((int)fs->fs_fragshift) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333663 - head/usr.sbin
Author: emaste Date: Wed May 16 02:51:30 2018 New Revision: 333663 URL: https://svnweb.freebsd.org/changeset/base/333663 Log: Sort mlx5tool correctly in usr.sbin/Makefile Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile == --- head/usr.sbin/Makefile Wed May 16 02:15:18 2018(r333662) +++ head/usr.sbin/Makefile Wed May 16 02:51:30 2018(r333663) @@ -121,7 +121,6 @@ SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_CTM}+= ctm SUBDIR.${MK_CXGBETOOL}+= cxgbetool -SUBDIR.${MK_MLX5TOOL}+=mlx5tool SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_EFI}+= efivar efidp efibootmgr SUBDIR.${MK_FLOPPY}+= fdcontrol @@ -159,6 +158,7 @@ SUBDIR.${MK_NS_CACHING}+= nscd .endif SUBDIR.${MK_LPR}+= lpr SUBDIR.${MK_MAN_UTILS}+= manctl +SUBDIR.${MK_MLX5TOOL}+=mlx5tool SUBDIR.${MK_NAND}+=nandsim SUBDIR.${MK_NAND}+=nandtool SUBDIR.${MK_NETGRAPH}+=flowctl ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333662 - in head: sbin/reboot stand/man
Author: emaste Date: Wed May 16 02:15:18 2018 New Revision: 333662 URL: https://svnweb.freebsd.org/changeset/base/333662 Log: Clarify that boot_mute / boot -m mutes kernel console only Perhaps RB_MUTE could mute user startup (rc) output as well, but right now it mutes only kernel console output, so make the documentation match reality. PR: 228193 Sponsored by: The FreeBSD Foundation Modified: head/sbin/reboot/boot_i386.8 head/stand/man/loader.8 Modified: head/sbin/reboot/boot_i386.8 == --- head/sbin/reboot/boot_i386.8Wed May 16 01:55:52 2018 (r333661) +++ head/sbin/reboot/boot_i386.8Wed May 16 02:15:18 2018 (r333662) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 14, 2014 +.Dd May 15, 2018 .Dt BOOT 8 i386 .Os .Sh NAME @@ -233,7 +233,7 @@ regardless of the .Fl h option described here. .It Fl m -mute the console to suppress all console input and output during the +mute the console to suppress all kernel console input and output during the boot. .It Fl n ignore key press to interrupt boot before Modified: head/stand/man/loader.8 == --- head/stand/man/loader.8 Wed May 16 01:55:52 2018(r333661) +++ head/stand/man/loader.8 Wed May 16 02:15:18 2018(r333662) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2015 +.Dd May 15, 2018 .Dt LOADER 8 .Os .Sh NAME @@ -390,7 +390,7 @@ by the .Xr conscontrol 8 utility. .It Va boot_mute -All console output is suppressed when console is muted. +All kernel console output is suppressed when console is muted. In a running system, the state of console muting can be manipulated by the .Xr conscontrol 8 utility. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333661 - head/tools/tools/intel-ucode-split
Author: emaste Date: Wed May 16 01:55:52 2018 New Revision: 333661 URL: https://svnweb.freebsd.org/changeset/base/333661 Log: intel-ucode-split: list platform ids based on processor_flags The Intel CPU "Platform Id" is a 3-bit integer reported by a given MSR. Intel microcode updates have an 8-bit field to indicate Platform Id compatibility - one bit in the mask for each of the possible Platform Id values. To simplify interpretation, report the Platform Id mask also as a list. Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c == --- head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16 01:41:36 2018(r333660) +++ head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16 01:55:52 2018(r333661) @@ -77,6 +77,8 @@ static void dump_header(const struct microcode_update_header *hdr) { char buf[16]; + int i; + bool platformid_printed; printf("header version\t0x%x\n", hdr->header_version); printf("revision\t0x%x\n", hdr->update_revision); @@ -87,7 +89,15 @@ dump_header(const struct microcode_update_header *hdr) format_signature(buf, hdr->processor_signature)); printf("checksum\t0x%x\n", hdr->checksum); printf("loader revision\t0x%x\n", hdr->loader_revision); - printf("processor flags\t0x%x\n", hdr->processor_flags); + printf("processor flags\t0x%x", hdr->processor_flags); + platformid_printed = false; + for (i = 0; i < 8; i++) { + if (hdr->processor_flags & 1 << i) { + printf("%s%d", platformid_printed ? ", " : "\t\t", i); + platformid_printed = true; + } + } + printf("\n"); printf("datasize\t0x%x\t\t0x%x\n", hdr->data_size, hdr->data_size != 0 ? hdr->data_size : 2000); printf("size\t\t0x%x\t\t0x%x\n", hdr->total_size, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333660 - head/tools/tools/intel-ucode-split
Author: emaste Date: Wed May 16 01:41:36 2018 New Revision: 333660 URL: https://svnweb.freebsd.org/changeset/base/333660 Log: intel-ucode-split: exit on unknown ucode header version Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c == --- head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16 01:34:36 2018(r333659) +++ head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16 01:41:36 2018(r333660) @@ -78,7 +78,7 @@ dump_header(const struct microcode_update_header *hdr) { char buf[16]; - printf("version\t\t0x%x\n", hdr->header_version); + printf("header version\t0x%x\n", hdr->header_version); printf("revision\t0x%x\n", hdr->update_revision); printf("date\t\t0x%x\t%04x-%02x-%02x\n", hdr->date, hdr->date & 0x, (hdr->date & 0xff00) >> 24, @@ -147,6 +147,8 @@ main(int argc, char *argv[]) } else if (rv < (ssize_t)sizeof(hdr)) { errx(1, "invalid microcode header"); } + if (hdr.header_version != 1) + errx(1, "invalid header version"); if (vflag) dump_header(); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333659 - head/share/man/man5
Author: emaste Date: Wed May 16 01:34:36 2018 New Revision: 333659 URL: https://svnweb.freebsd.org/changeset/base/333659 Log: Regen src.conf.5 after r333658 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed May 16 01:33:48 2018 (r333658) +++ head/share/man/man5/src.conf.5 Wed May 16 01:34:36 2018 (r333659) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 14, 2018 +.Dd May 15, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1309,6 +1309,12 @@ and related programs. Set to not build or install .Xr portsnap 8 and related files. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_FREEBSD_UPDATE +.El .It Va WITHOUT_PPP Set to not build .Xr ppp 8 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333658 - head/share/mk
Author: emaste Date: Wed May 16 01:33:48 2018 New Revision: 333658 URL: https://svnweb.freebsd.org/changeset/base/333658 Log: Force WITHOUT_FREEBSD_UPDATE when WITHOUT_PORTSNAP is set freebsd-update depends on phttpget from portsnap. We could move phttpget out of portsnap and build it as long as WITHOUT_FREEBSD_UPDATE and WITHOUT_PORTSNAP are not both set, but for now just make the dependency explicit. PR: 228220 Reported by: Dries Michiels Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Wed May 16 01:08:11 2018(r333657) +++ head/share/mk/src.opts.mk Wed May 16 01:33:48 2018(r333658) @@ -424,6 +424,11 @@ MK_KERBEROS:= no MK_AUTHPF:=no .endif +.if ${MK_PORTSNAP} == "no" +# freebsd-update depends on phttpget from portsnap +MK_FREEBSD_UPDATE:=no +.endif + .if ${MK_TESTS} == "no" MK_DTRACE_TESTS:= no .endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333657 - head/tools/tools/intel-ucode-split
Author: emaste Date: Wed May 16 01:08:11 2018 New Revision: 333657 URL: https://svnweb.freebsd.org/changeset/base/333657 Log: intel-ucode-split: add a -v verbose flag And be quiet by default. Sponsored by: The FreeBSD Foundation Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c == --- head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16 00:57:42 2018(r333656) +++ head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16 01:08:11 2018(r333657) @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -97,7 +98,7 @@ static void usage(void) { - printf("ucode-split microcode_file\n"); + printf("ucode-split [-v] microcode_file\n"); exit(1); } @@ -109,12 +110,26 @@ main(int argc, char *argv[]) char *buf; size_t len, resid; ssize_t rv; - int ifd, ofd; + int c, ifd, ofd; + bool vflag; - if (argc != 2) + vflag = false; + while ((c = getopt(argc, argv, "v")) != -1) { + switch (c) { + case 'v': + vflag = true; + break; + default: + usage(); + } + } + argc -= optind; + argv += optind; + + if (argc != 1) usage(); - ifd = open(argv[1], O_RDONLY); + ifd = open(argv[0], O_RDONLY); if (ifd < 0) err(1, "open"); @@ -133,7 +148,8 @@ main(int argc, char *argv[]) errx(1, "invalid microcode header"); } - dump_header(); + if (vflag) + dump_header(); format_signature(output_file, hdr.processor_signature); sprintf(output_file + strlen(output_file), ".%02x", @@ -163,7 +179,8 @@ main(int argc, char *argv[]) err(1, "write"); resid -= len; } - printf("written to %s\n\n", output_file); + if (vflag) + printf("written to %s\n\n", output_file); close(ofd); } } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333655 - head/sys/sys
Author: gallatin Date: Tue May 15 23:55:38 2018 New Revision: 333655 URL: https://svnweb.freebsd.org/changeset/base/333655 Log: Unhook DEBUG_BUFRING from INVARIANTS Some of the DEBUG_BUFRING checks are racy, and can lead to spurious assertions when run under high load. Unhook these from INVARIANTS until the author can fix or remove them. Reviewed by: mmacy Sponsored by: Netflix Modified: head/sys/sys/buf_ring.h Modified: head/sys/sys/buf_ring.h == --- head/sys/sys/buf_ring.h Tue May 15 23:46:49 2018(r333654) +++ head/sys/sys/buf_ring.h Tue May 15 23:55:38 2018(r333655) @@ -34,10 +34,6 @@ #include -#if defined(INVARIANTS) && !defined(DEBUG_BUFRING) -#define DEBUG_BUFRING 1 -#endif - #ifdef DEBUG_BUFRING #include #include @@ -69,6 +65,12 @@ buf_ring_enqueue(struct buf_ring *br, void *buf) uint32_t prod_head, prod_next, cons_tail; #ifdef DEBUG_BUFRING int i; + + /* +* Note: It is possible to encounter an mbuf that was removed +* via drbr_peek(), and then re-added via drbr_putback() and +* trigger a spurious panic. +*/ for (i = br->br_cons_head; i != br->br_prod_head; i = ((i + 1) & br->br_cons_mask)) if(br->br_ring[i] == buf) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333654 - head/share/mk
Author: bdrewery Date: Tue May 15 23:46:49 2018 New Revision: 333654 URL: https://svnweb.freebsd.org/changeset/base/333654 Log: Fix stale dependencies on libcasper libraries. Libcasper and its modules have no static libraries so don't define paths to them. This fixes LIBADD automatically adding DPADD entries for casper. Reported by: sbruno Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Tue May 15 23:02:47 2018 (r333653) +++ head/share/mk/bsd.libnames.mk Tue May 15 23:46:49 2018 (r333654) @@ -33,13 +33,6 @@ LIBBZ2?= ${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a LIBC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc.a LIBCALENDAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a LIBCAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcam.a -LIBCAP_DNS?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_dns.a -LIBCAP_GRP?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_grp.a -LIBCAP_PWD?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_pwd.a -LIBCAP_RANDOM?=${LIBDESTDIR}${LIBDIR_BASE}/libcap_random.a -LIBCAP_SYSCTL?=${LIBDESTDIR}${LIBDIR_BASE}/libcap_sysctl.a -LIBCAP_SYSLOG?=${LIBDESTDIR}${LIBDIR_BASE}/libcap_syslog.a -LIBCASPER?=${LIBDESTDIR}${LIBDIR_BASE}/libcasper.a LIBCOMPAT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a LIBCOM_ERR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333652 - head/sys/dev/cxgbe/common
Author: np Date: Tue May 15 22:26:09 2018 New Revision: 333652 URL: https://svnweb.freebsd.org/changeset/base/333652 Log: cxgbe(4): Add support for two more flash parts. Obtained from:Chelsio Communications MFC after:2 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/t4_hw.c Modified: head/sys/dev/cxgbe/common/t4_hw.c == --- head/sys/dev/cxgbe/common/t4_hw.c Tue May 15 22:22:10 2018 (r333651) +++ head/sys/dev/cxgbe/common/t4_hw.c Tue May 15 22:26:09 2018 (r333652) @@ -7905,6 +7905,44 @@ int t4_get_flash_params(struct adapter *adapter) break; } + case 0x9d: { /* ISSI -- Integrated Silicon Solution, Inc. */ + /* +* This Density -> Size decoding table is taken from ISSI +* Data Sheets. +*/ + density = (flashid >> 16) & 0xff; + switch (density) { + case 0x16: size = 1 << 25; break; /* 32MB */ + case 0x17: size = 1 << 26; break; /* 64MB */ + + default: + CH_ERR(adapter, "ISSI Flash Part has bad size, " + "ID = %#x, Density code = %#x\n", + flashid, density); + return -EINVAL; + } + break; + } + + case 0xc2: { /* Macronix */ + /* +* This Density -> Size decoding table is taken from Macronix +* Data Sheets. +*/ + density = (flashid >> 16) & 0xff; + switch (density) { + case 0x17: size = 1 << 23; break; /* 8MB */ + case 0x18: size = 1 << 24; break; /* 16MB */ + + default: + CH_ERR(adapter, "Macronix Flash Part has bad size, " + "ID = %#x, Density code = %#x\n", + flashid, density); + return -EINVAL; + } + break; + } + case 0xef: { /* Winbond */ /* * This Density -> Size decoding table is taken from Winbond ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333651 - in head/sys/cam: ata mmc nvme
Author: imp Date: Tue May 15 22:22:10 2018 New Revision: 333651 URL: https://svnweb.freebsd.org/changeset/base/333651 Log: Hold the reference count until the CCB is released When a disk disappears and the periph is invalidated, any I/Os that are pending with the controller can cause a crash when they complete. Move to holding the softc reference count taken in dastart() until the I/O is complete rather than only until xpt_action() returns. (This approach was suggested by Ken Merry.) This extends the method used in da to ada, nda, and mda. Sponsored by: Netflix Submitted by: Chuck Silvers Modified: head/sys/cam/ata/ata_da.c head/sys/cam/mmc/mmc_da.c head/sys/cam/nvme/nvme_da.c Modified: head/sys/cam/ata/ata_da.c == --- head/sys/cam/ata/ata_da.c Tue May 15 21:54:59 2018(r333650) +++ head/sys/cam/ata/ata_da.c Tue May 15 22:22:10 2018(r333651) @@ -2458,7 +2458,6 @@ out: cam_periph_unlock(periph); xpt_action(start_ccb); cam_periph_lock(periph); - softc->refcount--; /* May have more work to do, so ensure we stay scheduled */ adaschedule(periph); @@ -2856,10 +2855,13 @@ adadone(struct cam_periph *periph, union ccb *done_ccb * We need to call cam_iosched before we call biodone so that we * don't measure any activity that happens in the completion * routine, which in the case of sendfile can be quite -* extensive. +* extensive. Release the periph refcount taken in adastart() +* for each CCB. */ cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb); xpt_release_ccb(done_ccb); + KASSERT(softc->refcount >= 1, ("adadone softc %p refcount %d", softc, softc->refcount)); + softc->refcount--; if (state == ADA_CCB_TRIM) { TAILQ_HEAD(, bio) queue; struct bio *bp1; Modified: head/sys/cam/mmc/mmc_da.c == --- head/sys/cam/mmc/mmc_da.c Tue May 15 21:54:59 2018(r333650) +++ head/sys/cam/mmc/mmc_da.c Tue May 15 22:22:10 2018(r333651) @@ -1357,7 +1357,6 @@ sddastart(struct cam_periph *periph, union ccb *start_ cam_periph_unlock(periph); xpt_action(start_ccb); cam_periph_lock(periph); - softc->refcount--; /* May have more work to do, so ensure we stay scheduled */ sddaschedule(periph); @@ -1418,6 +1417,11 @@ sddadone(struct cam_periph *periph, union ccb *done_cc softc->outstanding_cmds--; xpt_release_ccb(done_ccb); + /* +* Release the periph refcount taken in mdastart() for each CCB. +*/ + KASSERT(softc->refcount >= 1, ("mdadone softc %p refcount %d", softc, softc->refcount)); + softc->refcount--; biodone(bp); } Modified: head/sys/cam/nvme/nvme_da.c == --- head/sys/cam/nvme/nvme_da.c Tue May 15 21:54:59 2018(r333650) +++ head/sys/cam/nvme/nvme_da.c Tue May 15 22:22:10 2018(r333651) @@ -990,7 +990,6 @@ out: cam_periph_unlock(periph); xpt_action(start_ccb); cam_periph_lock(periph); - softc->refcount--; /* May have more work to do, so ensure we stay scheduled */ ndaschedule(periph); @@ -1101,6 +1100,11 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb biodone(bp2); } } + /* +* Release the periph refcount taken in mdastart() for each CCB. +*/ + KASSERT(softc->refcount >= 1, ("ndadone softc %p refcount %d", softc, softc->refcount)); + softc->refcount--; return; } case NDA_CCB_DUMP: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333650 - head/sys/dev/cxgbe
Author: np Date: Tue May 15 21:54:59 2018 New Revision: 333650 URL: https://svnweb.freebsd.org/changeset/base/333650 Log: cxgbe(4): Claim some more T5 and T6 boards. MFC after:2 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cTue May 15 21:51:29 2018 (r333649) +++ head/sys/dev/cxgbe/t4_main.cTue May 15 21:54:59 2018 (r333650) @@ -645,16 +645,10 @@ struct { {0x5412, "Chelsio T560-CR"}, /* 1 x 40G, 2 x 10G */ {0x5414, "Chelsio T580-LP-SO-CR"}, /* 2 x 40G, nomem */ {0x5415, "Chelsio T502-BT"}, /* 2 x 1G */ -#ifdef notyet - {0x5404, "Chelsio T520-BCH"}, - {0x5405, "Chelsio T540-BCH"}, - {0x5406, "Chelsio T540-CH"}, - {0x5408, "Chelsio T520-CX"}, - {0x540b, "Chelsio B520-SR"}, - {0x540c, "Chelsio B504-BT"}, - {0x540f, "Chelsio Amsterdam"}, - {0x5413, "Chelsio T580-CHR"}, -#endif + {0x5418, "Chelsio T540-BT"}, /* 4 x 10GBaseT */ + {0x5419, "Chelsio T540-LP-BT"},/* 4 x 10GBaseT */ + {0x541a, "Chelsio T540-SO-BT"},/* 4 x 10GBaseT, nomem */ + {0x541b, "Chelsio T540-SO-CR"},/* 4 x 10G, nomem */ }, t6_pciids[] = { {0xc006, "Chelsio Terminator 6 FPGA"}, /* T6 PE10K6 FPGA (PF0) */ {0x6400, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ @@ -674,9 +668,14 @@ struct { {0x6415, "Chelsio T6201-BT"}, /* 2 x 1000BASE-T */ /* Custom */ - {0x6480, "Chelsio T6225 80"}, - {0x6481, "Chelsio T62100 81"}, - {0x6484, "Chelsio T62100 84"}, + {0x6480, "Custom T6225-CR"}, + {0x6481, "Custom T62100-CR"}, + {0x6482, "Custom T6225-CR"}, + {0x6483, "Custom T62100-CR"}, + {0x6484, "Custom T64100-CR"}, + {0x6485, "Custom T6240-SO"}, + {0x6486, "Custom T6225-SO-CR"}, + {0x6487, "Custom T6225-CR"}, }; #ifdef TCP_OFFLOAD ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333649 - head/tools/tools/intel-ucode-split
Author: emaste Date: Tue May 15 21:51:29 2018 New Revision: 333649 URL: https://svnweb.freebsd.org/changeset/base/333649 Log: Add a tool to split Intel microcode into one file per Platform Id Intel now releases microcode updates in files named after --. In some cases a single file may include microcode for multiple Platform Ids for the same family, model, and stepping. Our current microcode update tooling (/usr/sbin/cpucontrol) only processes the first microcode update in the file. This tool splits combined files into individual files with one microcode update each, named as --.. Adding this to tools/ for experimentation and testing. In the future we'll want to have cpucontrol or other tooling work directly with the Intel-provided microcode files. Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D15433 Added: head/tools/tools/intel-ucode-split/ head/tools/tools/intel-ucode-split/Makefile (contents, props changed) head/tools/tools/intel-ucode-split/intel-ucode-split.c (contents, props changed) Added: head/tools/tools/intel-ucode-split/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/intel-ucode-split/Makefile Tue May 15 21:51:29 2018 (r333649) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +PROG= intel-ucode-split +MAN= + +.include Added: head/tools/tools/intel-ucode-split/intel-ucode-split.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/intel-ucode-split/intel-ucode-split.c Tue May 15 21:51:29 2018(r333649) @@ -0,0 +1,169 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 The FreeBSD Foundation. + * + * 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 +#include +#include +#include +#include +#include +#include + +static const size_t bufsize = 65536; + +/* SDM vol 3 9.11.1 Intel microcode header. */ +struct microcode_update_header { + uint32_t header_version; + uint32_t update_revision; + uint32_t date; /* BCD mmdd */ + uint32_t processor_signature; + uint32_t checksum; /* Over update data and header */ + uint32_t loader_revision; + uint32_t processor_flags; + uint32_t data_size; + uint32_t total_size; + uint32_t reserved[3]; +}; + +/* + * SDM vol 2A CPUID EAX = 01h Returns Model, Family, Stepping Information. + * 9 chars including the NUL terminator will be written to buf. + */ + +static char * +format_signature(char *buf, uint32_t signature) +{ + unsigned family, model, stepping; + + family = (signature & 0xf00) >> 8; + model = (signature & 0xf0) >> 4; + stepping = signature & 0xf; + if (family == 0x06 || family == 0x0f) + model += (signature & 0xf) >> 12; + if (family == 0x0f) + family += (signature & 0xff0) >> 20; + sprintf(buf, "%02x-%02x-%02x", family, model, stepping); + return (buf); +} + +static void +dump_header(const struct microcode_update_header *hdr) +{ + char buf[16]; + + printf("version\t\t0x%x\n", hdr->header_version); + printf("revision\t0x%x\n", hdr->update_revision); + printf("date\t\t0x%x\t%04x-%02x-%02x\n", hdr->date, + hdr->date & 0x, (hdr->date & 0xff00) >> 24, + (hdr->date & 0xff) >> 16); + printf("signature\t0x%x\t\t%s\n", hdr->processor_signature, + format_signature(buf,
svn commit: r333648 - head/sys/cam/scsi
Author: imp Date: Tue May 15 21:25:35 2018 New Revision: 333648 URL: https://svnweb.freebsd.org/changeset/base/333648 Log: Hold the reference count until the CCB is released When a disk disappears and the periph is invalidated, any I/Os that are pending with the controller can cause a crash when they complete. Move to holding the softc reference count taken in dastart() until the I/O is complete rather than only until xpt_action() returns. (This approach was suggested by Ken Merry.) Sponsored by: Netflix Submitted by: Chuck Silvers Differential Revision: https://reviews.freebsd.org/D15435 Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Tue May 15 21:15:09 2018(r333647) +++ head/sys/cam/scsi/scsi_da.c Tue May 15 21:25:35 2018(r333648) @@ -3300,7 +3300,6 @@ out: cam_periph_unlock(periph); xpt_action(start_ccb); cam_periph_lock(periph); - softc->refcount--; /* May have more work to do, so ensure we stay scheduled */ daschedule(periph); @@ -4443,13 +4442,15 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) softc->flags |= DA_FLAG_WAS_OTAG; /* -* We need to call cam_iosched before we call biodone so that we -* don't measure any activity that happens in the completion -* routine, which in the case of sendfile can be quite -* extensive. +* We need to call cam_iosched before we call biodone so that we don't +* measure any activity that happens in the completion routine, which in +* the case of sendfile can be quite extensive. Release the periph +* refcount taken in dastart() for each CCB. */ cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb); xpt_release_ccb(done_ccb); + KASSERT(softc->refcount >= 1, ("dadone softc %p refcount %d", softc, softc->refcount)); + softc->refcount--; if (state == DA_CCB_DELETE) { TAILQ_HEAD(, bio) queue; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333647 - head/sys/dev/mmc
Author: marius Date: Tue May 15 21:15:09 2018 New Revision: 333647 URL: https://svnweb.freebsd.org/changeset/base/333647 Log: - If present, take advantage of the R/W cache of eMMC revision 1.5 and later devices. These caches work akin to the ones found in HDDs/SSDs that ada(4)/da(4) also enable if existent, but likewise increase the likelihood of data loss in case of a sudden power outage etc. On the other hand, write performance is up to twice as high for e. g. 1 GiB files depending on the actual chip and transfer mode employed. For maximum data integrity, the usage of eMMC caches can be disabled via the hw.mmcsd.cache tunable. - Get rid of the NOP mmcsd_open(). Modified: head/sys/dev/mmc/mmcreg.h head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/mmcreg.h == --- head/sys/dev/mmc/mmcreg.h Tue May 15 21:07:11 2018(r333646) +++ head/sys/dev/mmc/mmcreg.h Tue May 15 21:15:09 2018(r333647) @@ -357,6 +357,8 @@ struct mmc_request { /* * EXT_CSD fields */ +#defineEXT_CSD_FLUSH_CACHE 32 /* W/E */ +#defineEXT_CSD_CACHE_CTRL 33 /* R/W/E */ #defineEXT_CSD_EXT_PART_ATTR 52 /* R/W, 2 bytes */ #defineEXT_CSD_ENH_START_ADDR 136 /* R/W, 4 bytes */ #defineEXT_CSD_ENH_SIZE_MULT 140 /* R/W, 3 bytes */ @@ -390,12 +392,19 @@ struct mmc_request { #defineEXT_CSD_PWR_CL_200_360 237 /* RO */ #defineEXT_CSD_PWR_CL_52_195_DDR 238 /* RO */ #defineEXT_CSD_PWR_CL_52_360_DDR 239 /* RO */ +#defineEXT_CSD_CACHE_FLUSH_POLICY 249 /* RO */ #defineEXT_CSD_GEN_CMD6_TIME 248 /* RO */ +#defineEXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */ #defineEXT_CSD_PWR_CL_200_360_DDR 253 /* RO */ /* * EXT_CSD field definitions */ +#defineEXT_CSD_FLUSH_CACHE_FLUSH 0x01 +#defineEXT_CSD_FLUSH_CACHE_BARRIER 0x02 + +#defineEXT_CSD_CACHE_CTRL_CACHE_EN 0x01 + #defineEXT_CSD_EXT_PART_ATTR_DEFAULT 0x0 #defineEXT_CSD_EXT_PART_ATTR_SYSTEMCODE0x1 #defineEXT_CSD_EXT_PART_ATTR_NPERSISTENT 0x2 @@ -474,6 +483,8 @@ struct mmc_request { #defineEXT_CSD_SEC_FEATURE_SUPPORT_BD_BLK_EN 0x04 #defineEXT_CSD_SEC_FEATURE_SUPPORT_GB_CL_EN0x10 #defineEXT_CSD_SEC_FEATURE_SUPPORT_SANITIZE0x40 + +#defineEXT_CSD_CACHE_FLUSH_POLICY_FIFO 0x01 /* * Vendor specific EXT_CSD fields Modified: head/sys/dev/mmc/mmcsd.c == --- head/sys/dev/mmc/mmcsd.cTue May 15 21:07:11 2018(r333646) +++ head/sys/dev/mmc/mmcsd.cTue May 15 21:15:09 2018(r333647) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -132,6 +133,8 @@ struct mmcsd_softc { uint32_t flags; #defineMMCSD_INAND_CMD38 0x0001 #defineMMCSD_USE_TRIM 0x0002 +#defineMMCSD_FLUSH_CACHE 0x0004 +#defineMMCSD_DIRTY 0x0008 uint32_t cmd6_time; /* Generic switch timeout [us] */ uint32_t part_time; /* Partition switch timeout [us] */ off_t enh_base; /* Enhanced user data area slice base ... */ @@ -152,12 +155,19 @@ static const char *errmsg[] = "NO MEMORY" }; +static SYSCTL_NODE(_hw, OID_AUTO, mmcsd, CTLFLAG_RD, NULL, "mmcsd driver"); + +static int mmcsd_cache = 1; +SYSCTL_INT(_hw_mmcsd, OID_AUTO, cache, CTLFLAG_RDTUN, _cache, 0, +"Device R/W cache enabled if present"); + #defineLOG_PPS 5 /* Log no more than 5 errors per second. */ /* bus entry points */ static int mmcsd_attach(device_t dev); static int mmcsd_detach(device_t dev); static int mmcsd_probe(device_t dev); +static int mmcsd_shutdown(device_t dev); /* disk routines */ static int mmcsd_close(struct disk *dp); @@ -166,7 +176,6 @@ static int mmcsd_dump(void *arg, void *virtual, vm_off static int mmcsd_getattr(struct bio *); static int mmcsd_ioctl_disk(struct disk *disk, u_long cmd, void *data, int fflag, struct thread *td); -static int mmcsd_open(struct disk *dp); static void mmcsd_strategy(struct bio *bp); static void mmcsd_task(void *arg); @@ -179,6 +188,7 @@ static void mmcsd_add_part(struct mmcsd_softc *sc, u_i static int mmcsd_bus_bit_width(device_t dev); static daddr_t mmcsd_delete(struct mmcsd_part *part, struct bio *bp); static const char *mmcsd_errmsg(int e); +static int mmcsd_flush_cache(struct mmcsd_softc *sc); static int mmcsd_ioctl(struct mmcsd_part *part, u_long cmd, void *data, int fflag, struct thread *td); static int mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_ioc_cmd *mic, @@ -297,6 +307,31 @@ mmcsd_attach(device_t dev) rev = ext_csd[EXT_CSD_REV]; /* +* With revision 1.5 (MMC
svn commit: r333646 - head/sys/dev/mmc
Author: marius Date: Tue May 15 21:07:11 2018 New Revision: 333646 URL: https://svnweb.freebsd.org/changeset/base/333646 Log: Restore style(9) conformance after r320844 (actually requested pre- commit) and bring the r320844 additions in line with existing bits. Modified: head/sys/dev/mmc/mmcreg.h Modified: head/sys/dev/mmc/mmcreg.h == --- head/sys/dev/mmc/mmcreg.h Tue May 15 20:28:50 2018(r333645) +++ head/sys/dev/mmc/mmcreg.h Tue May 15 21:07:11 2018(r333646) @@ -159,34 +159,35 @@ struct mmc_command { #defineR1_STATE_PRG7 #defineR1_STATE_DIS8 -/* R4 response (SDIO) */ -#define R4_IO_NUM_FUNCTIONS(ocr) (((ocr) >> 28) & 0x3) -#define R4_IO_MEM_PRESENT (0x1<<27) -#define R4_IO_OCR_MASK 0x00f0 +/* R4 responses (SDIO) */ +#defineR4_IO_NUM_FUNCTIONS(ocr)(((ocr) >> 28) & 0x3) +#defineR4_IO_MEM_PRESENT (0x1 << 27) +#defineR4_IO_OCR_MASK 0x00f0 /* * R5 responses * * Types (per SD 2.0 standard) - *e : error bit - *s : status bit - *r : detected and set for the actual command response - *x : Detected and set during command execution. The host can get - *the status by issuing a command with R1 response. + * e : error bit + * s : status bit + * r : detected and set for the actual command response + * x : Detected and set during command execution. The host can get + * the status by issuing a command with R1 response. * * Clear Condition (per SD 2.0 standard) - *a : according to the card current state. - *b : always related to the previous command. reception of a valid - *command will clear it (with a delay of one command). - *c : clear by read + * a : according to the card current state. + * b : always related to the previous command. reception of a valid + * command will clear it (with a delay of one command). + * c : clear by read */ -#define R5_COM_CRC_ERROR (1u << 15)/* er, b */ -#define R5_ILLEGAL_COMMAND (1u << 14)/* er, b */ -#define R5_IO_CURRENT_STATE_MASK (3u << 12)/* s, b */ -#define R5_IO_CURRENT_STATE(x) (((x) & R5_IO_CURRENT_STATE_MASK) >> 12) -#define R5_ERROR (1u << 11)/* erx, c */ -#define R5_FUNCTION_NUMBER (1u << 9)/* er, c */ -#define R5_OUT_OF_RANGE(1u << 8)/* er, c */ +#defineR5_COM_CRC_ERROR(1u << 15) /* er, b */ +#defineR5_ILLEGAL_COMMAND (1u << 14) /* er, b */ +#defineR5_IO_CURRENT_STATE_MASK(3u << 12) /* s, b */ +#defineR5_IO_CURRENT_STATE(x) (((x) & R5_IO_CURRENT_STATE_MASK) >> 12) +#defineR5_ERROR(1u << 11) /* erx, c */ +#defineR5_FUNCTION_NUMBER (1u << 9) /* er, c */ +#defineR5_OUT_OF_RANGE (1u << 8) /* er, c */ + struct mmc_data { size_t len; /* size of the data */ size_t xfer_len; @@ -219,7 +220,7 @@ struct mmc_request { #defineSD_SEND_RELATIVE_ADDR 3 #defineMMC_SET_DSR 4 #defineMMC_SLEEP_AWAKE 5 -#define IO_SEND_OP_COND5 +#defineIO_SEND_OP_COND 5 #defineMMC_SWITCH_FUNC 6 #define MMC_SWITCH_FUNC_CMDS0 #define MMC_SWITCH_FUNC_SET 1 @@ -310,30 +311,30 @@ struct mmc_request { /* Class 9: I/O cards (sd) */ #defineSD_IO_RW_DIRECT 52 /* CMD52 arguments */ -#define SD_ARG_CMD52_READ (0<<31) -#define SD_ARG_CMD52_WRITE(1<<31) -#define SD_ARG_CMD52_FUNC_SHIFT 28 -#define SD_ARG_CMD52_FUNC_MASK0x7 -#define SD_ARG_CMD52_EXCHANGE (1<<27) -#define SD_ARG_CMD52_REG_SHIFT9 -#define SD_ARG_CMD52_REG_MASK 0x1 -#define SD_ARG_CMD52_DATA_SHIFT 0 -#define SD_ARG_CMD52_DATA_MASK0xff -#define SD_R5_DATA(resp) ((resp)[0] & 0xff) +#define SD_ARG_CMD52_READ (0 << 31) +#define SD_ARG_CMD52_WRITE (1 << 31) +#define SD_ARG_CMD52_FUNC_SHIFT28 +#define SD_ARG_CMD52_FUNC_MASK 0x7 +#define SD_ARG_CMD52_EXCHANGE (1 << 27) +#define SD_ARG_CMD52_REG_SHIFT 9 +#define SD_ARG_CMD52_REG_MASK 0x1 +#define SD_ARG_CMD52_DATA_SHIFT0 +#define SD_ARG_CMD52_DATA_MASK 0xff +#define SD_R5_DATA(resp) ((resp)[0] & 0xff) #defineSD_IO_RW_EXTENDED 53 /* CMD53 arguments */ -#define SD_ARG_CMD53_READ (0<<31) -#define SD_ARG_CMD53_WRITE(1<<31) -#define SD_ARG_CMD53_FUNC_SHIFT 28 -#define
svn commit: r333645 - in head/sys/fs: nfs nfsserver
Author: rmacklem Date: Tue May 15 20:28:50 2018 New Revision: 333645 URL: https://svnweb.freebsd.org/changeset/base/333645 Log: End grace for the NFSv4 server if all mounts do ReclaimComplete. The NFSv4 protocol requires that the server only allow reclaim of state and not issue any new open/lock state for a grace period after booting. The NFSv4.0 protocol required this grace period to be greater than the lease duration (over 2minutes). For NFSv4.1, the client tells the server that it has done reclaiming state by doing a ReclaimComplete operation. If all NFSv4 clients are NFSv4.1, the grace period can end once all the clients have done ReclaimComplete, shortening the time period considerably. This patch does this. If there are any NFSv4.0 mounts, the grace period will still be over 2minutes. This change is only an optimization and does not affect correct operation. Tested by:andreas.n...@frequentis.com MFC after:2 months Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfs/nfsport.h == --- head/sys/fs/nfs/nfsport.h Tue May 15 20:14:38 2018(r333644) +++ head/sys/fs/nfs/nfsport.h Tue May 15 20:28:50 2018(r333645) @@ -590,6 +590,7 @@ struct nfst_rec { #defineNFSNST_NEWSTATE 0x1 #defineNFSNST_REVOKE 0x2 #defineNFSNST_GOTSTATE 0x4 +#defineNFSNST_RECLAIMED0x8 /* * This structure is linked onto nfsrv_stablefirst for the duration of Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c == --- head/sys/fs/nfsserver/nfs_nfsdstate.c Tue May 15 20:14:38 2018 (r333644) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Tue May 15 20:28:50 2018 (r333645) @@ -136,6 +136,7 @@ static int nfsrv_cbcallargs(struct nfsrv_descript *nd, static u_int32_t nfsrv_nextclientindex(void); static u_int32_t nfsrv_nextstateindex(struct nfsclient *clp); static void nfsrv_markstable(struct nfsclient *clp); +static void nfsrv_markreclaim(struct nfsclient *clp); static int nfsrv_checkstable(struct nfsclient *clp); static int nfsrv_clientconflict(struct nfsclient *clp, int *haslockp, struct vnode *vp, NFSPROC_T *p); @@ -4091,8 +4092,27 @@ static int nfsrv_checkgrace(struct nfsrv_descript *nd, struct nfsclient *clp, u_int32_t flags) { - int error = 0; + int error = 0, notreclaimed; + struct nfsrv_stable *sp; + if ((nfsrv_stablefirst.nsf_flags & (NFSNSF_UPDATEDONE | +NFSNSF_GRACEOVER)) == 0) { + /* +* First, check to see if all of the clients have done a +* ReclaimComplete. If so, grace can end now. +*/ + notreclaimed = 0; + LIST_FOREACH(sp, _stablefirst.nsf_head, nst_list) { + if ((sp->nst_flag & NFSNST_RECLAIMED) == 0) { + notreclaimed = 1; + break; + } + } + if (notreclaimed == 0) + nfsrv_stablefirst.nsf_flags |= (NFSNSF_GRACEOVER | + NFSNSF_NEEDLOCK); + } + if ((nfsrv_stablefirst.nsf_flags & NFSNSF_GRACEOVER) != 0) { if (flags & NFSLCK_RECLAIM) { error = NFSERR_NOGRACE; @@ -4749,6 +4769,32 @@ nfsrv_markstable(struct nfsclient *clp) } /* + * This function is called when a NFSv4.1 client does a ReclaimComplete. + * Very similar to nfsrv_markstable(), except for the flag being set. + */ +static void +nfsrv_markreclaim(struct nfsclient *clp) +{ + struct nfsrv_stable *sp; + + /* +* First find the client structure. +*/ + LIST_FOREACH(sp, _stablefirst.nsf_head, nst_list) { + if (sp->nst_len == clp->lc_idlen && + !NFSBCMP(sp->nst_client, clp->lc_id, sp->nst_len)) + break; + } + if (sp == LIST_END(_stablefirst.nsf_head)) + return; + + /* +* Now, just set the flag. +*/ + sp->nst_flag |= NFSNST_RECLAIMED; +} + +/* * This function is called for a reclaim, to see if it gets grace. * It returns 0 if a reclaim is allowed, 1 otherwise. */ @@ -5904,8 +5950,10 @@ nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd) /* Check to see if reclaim complete has already happened. */ if ((sep->sess_clp->lc_flags & LCL_RECLAIMCOMPLETE) != 0) error = NFSERR_COMPLETEALREADY; - else + else { sep->sess_clp->lc_flags |= LCL_RECLAIMCOMPLETE; + nfsrv_markreclaim(sep->sess_clp); + } NFSUNLOCKSESSION(shp); NFSUNLOCKSTATE(); return (error); ___ svn-src-all@freebsd.org
svn commit: r333644 - head/sys/netinet
Author: brooks Date: Tue May 15 20:14:38 2018 New Revision: 333644 URL: https://svnweb.freebsd.org/changeset/base/333644 Log: Unwrap a line that no longer requires wrapping. Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c == --- head/sys/netinet/in.c Tue May 15 20:13:00 2018(r333643) +++ head/sys/netinet/in.c Tue May 15 20:14:38 2018(r333644) @@ -1417,8 +1417,7 @@ in_lltable_dump_entry(struct lltable *llt, struct llen return (0); /* Skip if jailed and not a valid IP of the prison. */ lltable_fill_sa_entry(lle,(struct sockaddr *)); - if (prison_if(wr->td->td_ucred, - (struct sockaddr *)) != 0) + if (prison_if(wr->td->td_ucred, (struct sockaddr *)) != 0) return (0); /* * produce a msg made of: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333643 - head/sys/netinet
Author: brooks Date: Tue May 15 20:13:00 2018 New Revision: 333643 URL: https://svnweb.freebsd.org/changeset/base/333643 Log: Remove stray tabs from in_lltable_dump_entry(). Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c == --- head/sys/netinet/in.c Tue May 15 18:41:01 2018(r333642) +++ head/sys/netinet/in.c Tue May 15 20:13:00 2018(r333643) @@ -1412,52 +1412,52 @@ in_lltable_dump_entry(struct lltable *llt, struct llen int error; bzero(, sizeof(arpc)); - /* skip deleted entries */ - if ((lle->la_flags & LLE_DELETED) == LLE_DELETED) - return (0); - /* Skip if jailed and not a valid IP of the prison. */ - lltable_fill_sa_entry(lle,(struct sockaddr *)); - if (prison_if(wr->td->td_ucred, - (struct sockaddr *)) != 0) - return (0); - /* -* produce a msg made of: -* struct rt_msghdr; -* struct sockaddr_in; (IPv4) -* struct sockaddr_dl; -*/ - arpc.rtm.rtm_msglen = sizeof(arpc); - arpc.rtm.rtm_version = RTM_VERSION; - arpc.rtm.rtm_type = RTM_GET; - arpc.rtm.rtm_flags = RTF_UP; - arpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY; + /* skip deleted entries */ + if ((lle->la_flags & LLE_DELETED) == LLE_DELETED) + return (0); + /* Skip if jailed and not a valid IP of the prison. */ + lltable_fill_sa_entry(lle,(struct sockaddr *)); + if (prison_if(wr->td->td_ucred, + (struct sockaddr *)) != 0) + return (0); + /* +* produce a msg made of: +* struct rt_msghdr; +* struct sockaddr_in; (IPv4) +* struct sockaddr_dl; +*/ + arpc.rtm.rtm_msglen = sizeof(arpc); + arpc.rtm.rtm_version = RTM_VERSION; + arpc.rtm.rtm_type = RTM_GET; + arpc.rtm.rtm_flags = RTF_UP; + arpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY; - /* publish */ - if (lle->la_flags & LLE_PUB) - arpc.rtm.rtm_flags |= RTF_ANNOUNCE; + /* publish */ + if (lle->la_flags & LLE_PUB) + arpc.rtm.rtm_flags |= RTF_ANNOUNCE; - sdl = - sdl->sdl_family = AF_LINK; - sdl->sdl_len = sizeof(*sdl); - sdl->sdl_index = ifp->if_index; - sdl->sdl_type = ifp->if_type; - if ((lle->la_flags & LLE_VALID) == LLE_VALID) { - sdl->sdl_alen = ifp->if_addrlen; - bcopy(lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); - } else { - sdl->sdl_alen = 0; - bzero(LLADDR(sdl), ifp->if_addrlen); - } + sdl = + sdl->sdl_family = AF_LINK; + sdl->sdl_len = sizeof(*sdl); + sdl->sdl_index = ifp->if_index; + sdl->sdl_type = ifp->if_type; + if ((lle->la_flags & LLE_VALID) == LLE_VALID) { + sdl->sdl_alen = ifp->if_addrlen; + bcopy(lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); + } else { + sdl->sdl_alen = 0; + bzero(LLADDR(sdl), ifp->if_addrlen); + } - arpc.rtm.rtm_rmx.rmx_expire = - lle->la_flags & LLE_STATIC ? 0 : lle->la_expire; - arpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); - if (lle->la_flags & LLE_STATIC) - arpc.rtm.rtm_flags |= RTF_STATIC; - if (lle->la_flags & LLE_IFADDR) - arpc.rtm.rtm_flags |= RTF_PINNED; - arpc.rtm.rtm_index = ifp->if_index; - error = SYSCTL_OUT(wr, , sizeof(arpc)); + arpc.rtm.rtm_rmx.rmx_expire = + lle->la_flags & LLE_STATIC ? 0 : lle->la_expire; + arpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); + if (lle->la_flags & LLE_STATIC) + arpc.rtm.rtm_flags |= RTF_STATIC; + if (lle->la_flags & LLE_IFADDR) + arpc.rtm.rtm_flags |= RTF_PINNED; + arpc.rtm.rtm_index = ifp->if_index; + error = SYSCTL_OUT(wr, , sizeof(arpc)); return (error); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333642 - in stable/11/sys: conf dev/cxgbe dev/cxgbe/common dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware
Author: np Date: Tue May 15 18:41:01 2018 New Revision: 333642 URL: https://svnweb.freebsd.org/changeset/base/333642 Log: MFC r331340, r331342, r331472, r332050, r333276, r333448: r331340: cxgbe(4): Tunnel congestion drops on a port should be cleared when the stats for that port are cleared. r331342: cxgbe(4): Do not read MFG diags information from custom boards. r331472: cxgbe(4): Always initialize requested_speed to a valid value. This fixes an avoidable EINVAL when the user tries to disable AN after the port is initialized but l1cfg doesn't have a valid speed to use. r332050: cxgbe(4): Always display an error message if SIOCSIFFLAGS will leave IFF_UP and IFF_DRV_RUNNING out of sync. ifhwioctl in the kernel pays no attention to the return code from the driver ioctl during SIOCSIFFLAGS so these messages are the only indication that the ioctl was called but failed. r333276: cxgbe(4): Update all firmwares to 1.19.1.0. r333448: cxgbe(4): Disable write-combined doorbells by default. This had been the default behavior but was changed accidentally as part of the recent iw_cxgbe+OFED overhaul. Fix another bug in that change while here: the global knob affects all the adapters in the system and should be left alone by per-adapter code. Approved by: re@ (marius@) Sponsored by: Chelsio Communications Added: stable/11/sys/dev/cxgbe/firmware/t4fw-1.19.1.0.bin.uu - copied unchanged from r333276, head/sys/dev/cxgbe/firmware/t4fw-1.19.1.0.bin.uu stable/11/sys/dev/cxgbe/firmware/t5fw-1.19.1.0.bin.uu - copied unchanged from r333276, head/sys/dev/cxgbe/firmware/t5fw-1.19.1.0.bin.uu stable/11/sys/dev/cxgbe/firmware/t6fw-1.19.1.0.bin.uu - copied unchanged from r333276, head/sys/dev/cxgbe/firmware/t6fw-1.19.1.0.bin.uu Deleted: stable/11/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu stable/11/sys/dev/cxgbe/firmware/t5fw-1.16.63.0.bin.uu stable/11/sys/dev/cxgbe/firmware/t6fw-1.16.63.0.bin.uu Modified: stable/11/sys/conf/files stable/11/sys/dev/cxgbe/common/t4_hw.c stable/11/sys/dev/cxgbe/firmware/t4fw_interface.h stable/11/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/modules/cxgbe/t4_firmware/Makefile stable/11/sys/modules/cxgbe/t5_firmware/Makefile stable/11/sys/modules/cxgbe/t6_firmware/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files == --- stable/11/sys/conf/filesTue May 15 17:59:46 2018(r333641) +++ stable/11/sys/conf/filesTue May 15 18:41:01 2018(r333642) @@ -1381,7 +1381,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule\ clean "t4fw.fwo" t4fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.19.1.0.bin.uu"\ compile-with"${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1415,7 +1415,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule\ clean "t5fw.fwo" t5fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.16.63.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.19.1.0.bin.uu"\ compile-with"${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1449,7 +1449,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule\ clean "t6fw.fwo" t6fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.16.63.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.19.1.0.bin.uu"\ compile-with"${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c == --- stable/11/sys/dev/cxgbe/common/t4_hw.c Tue May 15 17:59:46 2018 (r333641) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Tue May 15 18:41:01 2018 (r333642) @@ -2958,7 +2958,7 @@ static int get_vpd_keyword_val(const u8 *vpd, const ch * Reads card parameters stored in VPD EEPROM. */ static
Re: svn commit: r333494 - head/share/man/man7
> On Sun, May 13, 2018 at 8:14 PM, Rodney W. Grimes < > free...@pdx.rh.cn85.dnsmgr.net> wrote: > > > > It did take me some time to track down this "crazy concept you all > > think I just invented", but it is infact in the GNU groff info > > documentaton (found on my 5.4 systems in /usr/share/info/groff.info.gz): > > Just to be clear, I don't think these rules apply to FreeBSD. We use > mandoc. See mandoc(1) for the rules that apply to us. That is a rather fine line. mandoc is a replacement set for groff -man, which is a replacement for troff/nroff man. What I found are helpful guidelines for anyone writting groff type input, they still apply to mandoc. > > And, again, just to be clear, I am also pretty sure the following rule > doesn't apply: > > >* In keeping with this, it is helpful to begin a new line after every ^^ Again, these are helpful things that have been around for a very decades, and for someone who has worked on a good deal of *roff input, it is truely helpful in many ways to do this. As one sample of helpful it makes it usually easier to find things in the *roff sources when trying to edit a manpage, Another is it minimizes diffs when making changes. > > comma or phrase, since common corrections are to add or delete > > sentences or phrases. > > OTOH, I believe we do have a rule about beginning each sentence on a new > line. (Again, see mandoc(1).) Yes > > And, it is easy to figure out whether your page complies with the style > using mandoc's checkers. Comply with and being of good style and design are not one and the same. > For example: > > $ mandoc -W all,stop /usr/share/man/man9/tcp_functions.9.gz > mandoc: /usr/share/man/man9/tcp_functions.9.gz:284:16: WARNING: new > sentence, new line > > Jonathan > > PS: I'm happy to be corrected by one of the man page experts, which I most > certainly am not. I would encoruage the man page expects to adopt this set of helpful guidelines, not necessarily making them hard rules, but at least suggesting one knows about them. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333641 - head/sys/netinet6
Author: brooks Date: Tue May 15 17:59:46 2018 New Revision: 333641 URL: https://svnweb.freebsd.org/changeset/base/333641 Log: Unwrap some not-so-long lines now that extra tabs been removed. Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Tue May 15 17:57:46 2018(r333640) +++ head/sys/netinet6/in6.c Tue May 15 17:59:46 2018(r333641) @@ -2354,10 +2354,8 @@ in6_lltable_dump_entry(struct lltable *llt, struct lle if ((lle->la_flags & LLE_DELETED) == LLE_DELETED) return (0); /* Skip if jailed and not a valid IP of the prison. */ - lltable_fill_sa_entry(lle, - (struct sockaddr *)); - if (prison_if(wr->td->td_ucred, - (struct sockaddr *)) != 0) + lltable_fill_sa_entry(lle, (struct sockaddr *)); + if (prison_if(wr->td->td_ucred, (struct sockaddr *)) != 0) return (0); /* * produce a msg made of: @@ -2384,16 +2382,14 @@ in6_lltable_dump_entry(struct lltable *llt, struct lle sdl->sdl_type = ifp->if_type; if ((lle->la_flags & LLE_VALID) == LLE_VALID) { sdl->sdl_alen = ifp->if_addrlen; - bcopy(lle->ll_addr, LLADDR(sdl), - ifp->if_addrlen); + bcopy(lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); } else { sdl->sdl_alen = 0; bzero(LLADDR(sdl), ifp->if_addrlen); } if (lle->la_expire != 0) ndpc.rtm.rtm_rmx.rmx_expire = lle->la_expire + - lle->lle_remtime / hz + - time_second - time_uptime; + lle->lle_remtime / hz + time_second - time_uptime; ndpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); if (lle->la_flags & LLE_STATIC) ndpc.rtm.rtm_flags |= RTF_STATIC; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333640 - head/sys/netinet6
Author: brooks Date: Tue May 15 17:57:46 2018 New Revision: 333640 URL: https://svnweb.freebsd.org/changeset/base/333640 Log: Remove stray tabs in in6_lltable_dump_entry(). NFC. Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Tue May 15 17:20:58 2018(r333639) +++ head/sys/netinet6/in6.c Tue May 15 17:57:46 2018(r333640) @@ -2350,62 +2350,62 @@ in6_lltable_dump_entry(struct lltable *llt, struct lle int error; bzero(, sizeof(ndpc)); - /* skip deleted entries */ - if ((lle->la_flags & LLE_DELETED) == LLE_DELETED) - return (0); - /* Skip if jailed and not a valid IP of the prison. */ - lltable_fill_sa_entry(lle, - (struct sockaddr *)); - if (prison_if(wr->td->td_ucred, - (struct sockaddr *)) != 0) - return (0); - /* -* produce a msg made of: -* struct rt_msghdr; -* struct sockaddr_in6 (IPv6) -* struct sockaddr_dl; -*/ - ndpc.rtm.rtm_msglen = sizeof(ndpc); - ndpc.rtm.rtm_version = RTM_VERSION; - ndpc.rtm.rtm_type = RTM_GET; - ndpc.rtm.rtm_flags = RTF_UP; - ndpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY; - if (V_deembed_scopeid) - sa6_recoverscope(); + /* skip deleted entries */ + if ((lle->la_flags & LLE_DELETED) == LLE_DELETED) + return (0); + /* Skip if jailed and not a valid IP of the prison. */ + lltable_fill_sa_entry(lle, + (struct sockaddr *)); + if (prison_if(wr->td->td_ucred, + (struct sockaddr *)) != 0) + return (0); + /* +* produce a msg made of: +* struct rt_msghdr; +* struct sockaddr_in6 (IPv6) +* struct sockaddr_dl; +*/ + ndpc.rtm.rtm_msglen = sizeof(ndpc); + ndpc.rtm.rtm_version = RTM_VERSION; + ndpc.rtm.rtm_type = RTM_GET; + ndpc.rtm.rtm_flags = RTF_UP; + ndpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY; + if (V_deembed_scopeid) + sa6_recoverscope(); - /* publish */ - if (lle->la_flags & LLE_PUB) - ndpc.rtm.rtm_flags |= RTF_ANNOUNCE; + /* publish */ + if (lle->la_flags & LLE_PUB) + ndpc.rtm.rtm_flags |= RTF_ANNOUNCE; - sdl = - sdl->sdl_family = AF_LINK; - sdl->sdl_len = sizeof(*sdl); - sdl->sdl_index = ifp->if_index; - sdl->sdl_type = ifp->if_type; - if ((lle->la_flags & LLE_VALID) == LLE_VALID) { - sdl->sdl_alen = ifp->if_addrlen; - bcopy(lle->ll_addr, LLADDR(sdl), - ifp->if_addrlen); - } else { - sdl->sdl_alen = 0; - bzero(LLADDR(sdl), ifp->if_addrlen); - } - if (lle->la_expire != 0) - ndpc.rtm.rtm_rmx.rmx_expire = lle->la_expire + - lle->lle_remtime / hz + - time_second - time_uptime; - ndpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); - if (lle->la_flags & LLE_STATIC) - ndpc.rtm.rtm_flags |= RTF_STATIC; - if (lle->la_flags & LLE_IFADDR) - ndpc.rtm.rtm_flags |= RTF_PINNED; - if (lle->ln_router != 0) - ndpc.rtm.rtm_flags |= RTF_GATEWAY; - ndpc.rtm.rtm_rmx.rmx_pksent = lle->la_asked; - /* Store state in rmx_weight value */ - ndpc.rtm.rtm_rmx.rmx_state = lle->ln_state; - ndpc.rtm.rtm_index = ifp->if_index; - error = SYSCTL_OUT(wr, , sizeof(ndpc)); + sdl = + sdl->sdl_family = AF_LINK; + sdl->sdl_len = sizeof(*sdl); + sdl->sdl_index = ifp->if_index; + sdl->sdl_type = ifp->if_type; + if ((lle->la_flags & LLE_VALID) == LLE_VALID) { + sdl->sdl_alen = ifp->if_addrlen; + bcopy(lle->ll_addr, LLADDR(sdl), + ifp->if_addrlen); + } else { + sdl->sdl_alen = 0; + bzero(LLADDR(sdl), ifp->if_addrlen); + } +
Re: svn commit: r333494 - head/share/man/man7
On Sun, May 13, 2018 at 8:14 PM, Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > > It did take me some time to track down this "crazy concept you all > think I just invented", but it is infact in the GNU groff info > documentaton (found on my 5.4 systems in /usr/share/info/groff.info.gz): Just to be clear, I don't think these rules apply to FreeBSD. We use mandoc. See mandoc(1) for the rules that apply to us. And, again, just to be clear, I am also pretty sure the following rule doesn't apply: >* In keeping with this, it is helpful to begin a new line after every > comma or phrase, since common corrections are to add or delete > sentences or phrases. OTOH, I believe we do have a rule about beginning each sentence on a new line. (Again, see mandoc(1).) And, it is easy to figure out whether your page complies with the style using mandoc's checkers. For example: $ mandoc -W all,stop /usr/share/man/man9/tcp_functions.9.gz mandoc: /usr/share/man/man9/tcp_functions.9.gz:284:16: WARNING: new sentence, new line Jonathan PS: I'm happy to be corrected by one of the man page experts, which I most certainly am not. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333639 - in head/sys/amd64: include vmm
Author: antoine Date: Tue May 15 17:20:58 2018 New Revision: 333639 URL: https://svnweb.freebsd.org/changeset/base/333639 Log: vmmdev: return EFAULT when trying to read beyond VM system memory max address Currently, when using dd(1) to take a VM memory image, the capture never ends, reading zeroes when it's beyond VM system memory max address. Return EFAULT when trying to read beyond VM system memory max address. Reviewed by: imp, grehan, anish Approved by: grehan Differential Revision:https://reviews.freebsd.org/D15156 Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_dev.c Modified: head/sys/amd64/include/vmm.h == --- head/sys/amd64/include/vmm.hTue May 15 16:56:30 2018 (r333638) +++ head/sys/amd64/include/vmm.hTue May 15 17:20:58 2018 (r333639) @@ -212,6 +212,7 @@ int vm_mmap_getnext(struct vm *vm, vm_paddr_t *gpa, in vm_ooffset_t *segoff, size_t *len, int *prot, int *flags); int vm_get_memseg(struct vm *vm, int ident, size_t *len, bool *sysmem, struct vm_object **objptr); +vm_paddr_t vmm_sysmem_maxaddr(struct vm *vm); void *vm_gpa_hold(struct vm *, int vcpuid, vm_paddr_t gpa, size_t len, int prot, void **cookie); void vm_gpa_release(void *cookie); Modified: head/sys/amd64/vmm/vmm.c == --- head/sys/amd64/vmm/vmm.cTue May 15 16:56:30 2018(r333638) +++ head/sys/amd64/vmm/vmm.cTue May 15 17:20:58 2018(r333639) @@ -821,8 +821,8 @@ sysmem_mapping(struct vm *vm, struct mem_map *mm) return (false); } -static vm_paddr_t -sysmem_maxaddr(struct vm *vm) +vm_paddr_t +vmm_sysmem_maxaddr(struct vm *vm) { struct mem_map *mm; vm_paddr_t maxaddr; @@ -931,7 +931,7 @@ vm_assign_pptdev(struct vm *vm, int bus, int slot, int if (ppt_assigned_devices(vm) == 0) { KASSERT(vm->iommu == NULL, ("vm_assign_pptdev: iommu must be NULL")); - maxaddr = sysmem_maxaddr(vm); + maxaddr = vmm_sysmem_maxaddr(vm); vm->iommu = iommu_create_domain(maxaddr); if (vm->iommu == NULL) return (ENXIO); Modified: head/sys/amd64/vmm/vmm_dev.c == --- head/sys/amd64/vmm/vmm_dev.cTue May 15 16:56:30 2018 (r333638) +++ head/sys/amd64/vmm/vmm_dev.cTue May 15 17:20:58 2018 (r333639) @@ -173,7 +173,7 @@ static int vmmdev_rw(struct cdev *cdev, struct uio *uio, int flags) { int error, off, c, prot; - vm_paddr_t gpa; + vm_paddr_t gpa, maxaddr; void *hpa, *cookie; struct vmmdev_softc *sc; @@ -189,6 +189,7 @@ vmmdev_rw(struct cdev *cdev, struct uio *uio, int flag return (error); prot = (uio->uio_rw == UIO_WRITE ? VM_PROT_WRITE : VM_PROT_READ); + maxaddr = vmm_sysmem_maxaddr(sc->vm); while (uio->uio_resid > 0 && error == 0) { gpa = uio->uio_offset; off = gpa & PAGE_MASK; @@ -204,7 +205,7 @@ vmmdev_rw(struct cdev *cdev, struct uio *uio, int flag */ hpa = vm_gpa_hold(sc->vm, VM_MAXCPU - 1, gpa, c, prot, ); if (hpa == NULL) { - if (uio->uio_rw == UIO_READ) + if (uio->uio_rw == UIO_READ && gpa < maxaddr) error = uiomove(__DECONST(void *, zero_region), c, uio); else ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333638 - head/sys/x86/x86
Author: avg Date: Tue May 15 16:56:30 2018 New Revision: 333638 URL: https://svnweb.freebsd.org/changeset/base/333638 Log: calibrate lapic timer in native_lapic_setup The idea is to calibrate the LAPIC timer just once and only on boot, given that [at present] the timer constants are global and shared between all processors. My primary motivation is to fix a panic that can happen when dynamically switching to lapic timer. The panic is caused by a recursion on et_hw_mtx when printing the calibration results to console. See the review for the details of the panic. Also, the code should become slightly simpler and easier to read. The previous code was racy too. Multiple processors could start calibrating the global constants concurrently, although that seems to have been benign. Reviewed by: kib, mav, jhb MFC after:3 weeks Differential Revision: https://reviews.freebsd.org/D15422 Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c == --- head/sys/x86/x86/local_apic.c Tue May 15 16:54:41 2018 (r333637) +++ head/sys/x86/x86/local_apic.c Tue May 15 16:56:30 2018 (r333638) @@ -206,6 +206,9 @@ SYSCTL_INT(_hw_apic, OID_AUTO, eoi_suppression, CTLFLA SYSCTL_INT(_hw_apic, OID_AUTO, timer_tsc_deadline, CTLFLAG_RD, _timer_tsc_deadline, 0, ""); +static void lapic_calibrate_initcount(struct lapic *la); +static void lapic_calibrate_deadline(struct lapic *la); + static uint32_t lapic_read32(enum LAPIC_REGISTERS reg) { @@ -787,6 +790,13 @@ native_lapic_setup(int boot) intrcnt_add(buf, >la_timer_count); } + /* Calibrate the timer parameters using BSP. */ + if (boot && IS_BSP()) { + lapic_calibrate_initcount(la); + if (lapic_timer_tsc_deadline) + lapic_calibrate_deadline(la); + } + /* Setup the timer if configured. */ if (la->la_timer_mode != LAT_MODE_UNDEF) { KASSERT(la->la_timer_period != 0, ("lapic%u: zero divisor", @@ -921,7 +931,7 @@ native_lapic_disable_pmc(void) } static void -lapic_calibrate_initcount(struct eventtimer *et, struct lapic *la) +lapic_calibrate_initcount(struct lapic *la) { u_long value; @@ -947,7 +957,7 @@ lapic_calibrate_initcount(struct eventtimer *et, struc } static void -lapic_calibrate_deadline(struct eventtimer *et, struct lapic *la __unused) +lapic_calibrate_deadline(struct lapic *la __unused) { if (bootverbose) { @@ -989,11 +999,6 @@ lapic_et_start(struct eventtimer *et, sbintime_t first struct lapic *la; la = [PCPU_GET(apic_id)]; - if (et->et_frequency == 0) { - lapic_calibrate_initcount(et, la); - if (lapic_timer_tsc_deadline) - lapic_calibrate_deadline(et, la); - } if (period != 0) { lapic_change_mode(et, la, LAT_MODE_PERIODIC); la->la_timer_period = ((uint32_t)et->et_frequency * period) >> ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333637 - head/sys/netinet
Author: shurd Date: Tue May 15 16:54:41 2018 New Revision: 333637 URL: https://svnweb.freebsd.org/changeset/base/333637 Log: Check that ifma_protospec != NULL in inm_lookup If ifma_protospec is NULL when inm_lookup() is called, there is a dereference in a NULL struct pointer. This ensures that struct is not NULL before comparing the address. Reported by: dumbbell Reviewed by: sbruno Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D15440 Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Tue May 15 16:44:35 2018(r333636) +++ head/sys/netinet/in_mcast.c Tue May 15 16:54:41 2018(r333637) @@ -344,12 +344,13 @@ inm_lookup_locked(struct ifnet *ifp, const struct in_a inm = NULL; TAILQ_FOREACH(ifma, &((ifp)->if_multiaddrs), ifma_link) { - if (ifma->ifma_addr->sa_family == AF_INET) { - inm = (struct in_multi *)ifma->ifma_protospec; - if (inm->inm_addr.s_addr == ina.s_addr) - break; - inm = NULL; - } + if (ifma->ifma_addr->sa_family != AF_INET || + ifma->ifma_protospec == NULL) + continue; + inm = (struct in_multi *)ifma->ifma_protospec; + if (inm->inm_addr.s_addr == ina.s_addr) + break; + inm = NULL; } return (inm); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333636 - head/sys/arm64/arm64
Author: andrew Date: Tue May 15 16:44:35 2018 New Revision: 333636 URL: https://svnweb.freebsd.org/changeset/base/333636 Log: Increase the number of pages we allocate in the arm64 early boot. We are already close to the limit so increasing the kernel size may cause it to fail to boot when it runs past the end of allocated memory. Reported by: manu Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/locore.S == --- head/sys/arm64/arm64/locore.S Tue May 15 16:24:58 2018 (r333635) +++ head/sys/arm64/arm64/locore.S Tue May 15 16:44:35 2018 (r333636) @@ -354,8 +354,8 @@ create_pagetables: mov x6, #(KERNBASE) /* Find modulep - begin */ sub x8, x0, x6 - /* Add a 2MiB page for the module data and round up */ - ldr x7, =(2 * L2_SIZE - 1) + /* Add two 2MiB pages for the module data and round up */ + ldr x7, =(3 * L2_SIZE - 1) add x8, x8, x7 /* Get the number of l2 pages to allocate, rounded down */ lsr x10, x8, #(L2_SHIFT) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r333345 - head/sys/dev/e1000
See r333631 On Tue, May 15, 2018 at 09:18 Mark Johnstonwrote: > On Tue, May 08, 2018 at 01:39:45AM +, Matt Macy wrote: > > Author: mmacy > > Date: Tue May 8 01:39:45 2018 > > New Revision: 45 > > URL: https://svnweb.freebsd.org/changeset/base/45 > > > > Log: > > Sleep rather than spin in e1000 when doing long running config > operations. > > > > With r333218 it is now possible for drivers to use an sx lock and thus > sleep while > > waiting on long running operations rather than DELAY(). > > > > Reported by:gallatin > > Reviewed by:sbruno > > Approved by:sbruno > > MFC after: 1 month > > Sponsored by: Limelight Networks > > Differential Revision: https://reviews.freebsd.org/D14984 > > This commit causes igb to fail to attach to one of the ports on an I210: > > igb0@pci0:5:0:0:class=0x02 card=0x153315d9 chip=0x15338086 > rev=0x03 hdr=0x00 > vendor = 'Intel Corporation' > device = 'I210 Gigabit Network Connection' > class = network > subclass = ethernet > igb1@pci0:6:0:0:class=0x02 card=0x153315d9 chip=0x15338086 > rev=0x03 hdr=0x00 > vendor = 'Intel Corporation' > device = 'I210 Gigabit Network Connection' > class = network > subclass = ethernet > > In the dmesg I see: > > igb0: port 0xd000-0xd01f > mem 0xf830-0xf837,0xf838-0xf8383fff irq 18 at device 0.0 > numa-domain 0 on pci6 > igb0: attach_pre capping queues at 4 > igb0: Setup of Shared code failed, error -2 > igb0: IFDI_ATTACH_PRE failed 6 > device_attach: igb0 attach returned 6 > pcib7: irq 19 at device 28.3 numa-domain 0 on pci1 > pci7: numa-domain 0 on pcib7 > igb0: port 0xc000-0xc01f > mem 0xf820-0xf827,0xf828-0xf8283fff irq 19 at device 0.0 > numa-domain 0 on pci7 > igb0: attach_pre capping queues at 4 > igb0: using 1024 tx descriptors and 1024 rx descriptors > igb0: msix_init qsets capped at 4 > igb0: pxm cpus: 8 queue msgs: 4 admincnt: 1 > igb0: using 4 rx queues 4 tx queues > igb0: Using MSIX interrupts with 5 vectors > igb0: allocated for 4 tx_queues > igb0: allocated for 4 rx_queues > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333635 - head/sys/compat/freebsd32
Author: brooks Date: Tue May 15 16:24:58 2018 New Revision: 333635 URL: https://svnweb.freebsd.org/changeset/base/333635 Log: Allow freebsd32 __sysctl(2) to return ENOMEM. This is required by programs like sockstat that read variably sized sysctls such as kern.file. The normal path has no such restriction and the restriction was added without comment along with initial support for freebsd32 in 2002 (r100384). Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D15438 Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c == --- head/sys/compat/freebsd32/freebsd32_misc.c Tue May 15 15:56:52 2018 (r333634) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue May 15 16:24:58 2018 (r333635) @@ -2263,7 +2263,7 @@ freebsd32_sysctl(struct thread *td, struct freebsd32_s error = userland_sysctl(td, name, uap->namelen, uap->old, , 1, uap->new, uap->newlen, , SCTL_MASK32); - if (error && error != ENOMEM) + if (error) return (error); if (uap->oldlenp) suword32(uap->oldlenp, j); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r333345 - head/sys/dev/e1000
On Tue, May 08, 2018 at 01:39:45AM +, Matt Macy wrote: > Author: mmacy > Date: Tue May 8 01:39:45 2018 > New Revision: 45 > URL: https://svnweb.freebsd.org/changeset/base/45 > > Log: > Sleep rather than spin in e1000 when doing long running config operations. > > With r333218 it is now possible for drivers to use an sx lock and thus > sleep while > waiting on long running operations rather than DELAY(). > > Reported by:gallatin > Reviewed by:sbruno > Approved by:sbruno > MFC after: 1 month > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D14984 This commit causes igb to fail to attach to one of the ports on an I210: igb0@pci0:5:0:0:class=0x02 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet igb1@pci0:6:0:0:class=0x02 card=0x153315d9 chip=0x15338086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'I210 Gigabit Network Connection' class = network subclass = ethernet In the dmesg I see: igb0:port 0xd000-0xd01f mem 0xf830-0xf837,0xf838-0xf8383fff irq 18 at device 0.0 numa-domain 0 on pci6 igb0: attach_pre capping queues at 4 igb0: Setup of Shared code failed, error -2 igb0: IFDI_ATTACH_PRE failed 6 device_attach: igb0 attach returned 6 pcib7: irq 19 at device 28.3 numa-domain 0 on pci1 pci7: numa-domain 0 on pcib7 igb0: port 0xc000-0xc01f mem 0xf820-0xf827,0xf828-0xf8283fff irq 19 at device 0.0 numa-domain 0 on pci7 igb0: attach_pre capping queues at 4 igb0: using 1024 tx descriptors and 1024 rx descriptors igb0: msix_init qsets capped at 4 igb0: pxm cpus: 8 queue msgs: 4 admincnt: 1 igb0: using 4 rx queues 4 tx queues igb0: Using MSIX interrupts with 5 vectors igb0: allocated for 4 tx_queues igb0: allocated for 4 rx_queues ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
RE: svn commit: r333612 - head/sys/net
Indeed, thank you. It replaced a patch I used to address a panic, due to a missing lock, when restarting my WiFi connection here at Vancouver Island Tech Park. I failover bge0 to wlan0. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubertor The need of the many outweighs the greed of the few. --- -Original Message- From: Renato Botelho Sent: 15/05/2018 07:17 To: Stephen Hurd; src-committ...@freebsd.org; svn-src-all@freebsd.org; svn-src-h...@freebsd.org Subject: Re: svn commit: r333612 - head/sys/net On 14/05/18 17:06, Stephen Hurd wrote: > Author: shurd > Date: Mon May 14 20:06:49 2018 > New Revision: 333612 > URL: https://svnweb.freebsd.org/changeset/base/333612 > > Log: > Replace rmlock with epoch in lagg > > Use the new epoch based reclamation API. Now the hot paths will not > block at all, and the sx lock is used for the softc data. This fixes LORs > reported where the rwlock was obtained when the sxlock was held. > > Submitted by: mmacy > Reported by:Harry Schmalzbauer > Reviewed by:sbruno > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D15355 Thanks! This fixed my (wlan0+em0) failover lagg interface. -- Renato Botelho ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333633 - in head/sys: conf dev/usb/input modules/usb modules/usb/uhid_snes
Author: hselasky Date: Tue May 15 15:36:34 2018 New Revision: 333633 URL: https://svnweb.freebsd.org/changeset/base/333633 Log: Add new USB HID driver for Super Nintendo gamepads. Differential Revision:https://reviews.freebsd.org/D15385 Submitted by: joha...@gmail.com (Johannes Lundberg) Sponsored by: Mellanox Technologies Added: head/sys/dev/usb/input/uhid_snes.c (contents, props changed) head/sys/modules/usb/uhid_snes/ head/sys/modules/usb/uhid_snes/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/dev/usb/input/usb_rdesc.h head/sys/modules/usb/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Tue May 15 15:11:52 2018(r333632) +++ head/sys/conf/files Tue May 15 15:36:34 2018(r333633) @@ -3387,6 +3387,7 @@ dev/usb/misc/uled.c optional uled dev/usb/input/atp.coptional atp dev/usb/input/uep.coptional uep dev/usb/input/uhid.c optional uhid +dev/usb/input/uhid_snes.c optional uhid_snes dev/usb/input/ukbd.c optional ukbd dev/usb/input/ums.coptional ums dev/usb/input/wmt.coptional wmt Added: head/sys/dev/usb/input/uhid_snes.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/input/uhid_snes.c Tue May 15 15:36:34 2018 (r333633) @@ -0,0 +1,644 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2013, Michael Terrell+ * Copyright 2018, Johannes Lundberg + * 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. + * 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 +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "usb_rdesc.h" + +#defineUHID_SNES_IFQ_MAX_LEN 8 + +#defineUREQ_GET_PORT_STATUS 0x01 +#defineUREQ_SOFT_RESET 0x02 + +#defineUP 0x7f00 +#defineDOWN0x7fff +#defineLEFT0x00ff +#defineRIGHT 0xff7f +#defineX 0x1f +#defineY 0x8f +#defineA 0x2f +#defineB 0x4f +#defineSELECT 0x10 +#defineSTART 0x20 +#defineLEFT_T 0x01 +#defineRIGHT_T 0x02 + +static const uint8_t uhid_snes_report_descr[] = { UHID_SNES_REPORT_DESCR() }; + +#defineSNES_DEV(v,p,i) { USB_VPI(v,p,i) } + +static const STRUCT_USB_HOST_ID snes_devs[] = { + SNES_DEV(0x0810, 0xe501, 0), /* GeeekPi K-0161 */ + SNES_DEV(0x0079, 0x0011, 0) /* Dragonrise */ +}; + +enum { + UHID_SNES_INTR_DT_RD, + UHID_SNES_STATUS_DT_RD, + UHID_SNES_N_TRANSFER +}; + +struct uhid_snes_softc { + device_t sc_dev; + struct usb_device *sc_usb_device; + struct mtx sc_mutex; + struct usb_callout sc_watchdog; + uint8_t sc_iface_num; + struct usb_xfer *sc_transfer[UHID_SNES_N_TRANSFER]; + struct usb_fifo_sc sc_fifo; + struct usb_fifo_sc sc_fifo_no_reset; + int sc_fflags; + struct usb_fifo *sc_fifo_open[2]; + uint8_t sc_zero_length_packets; + uint8_t sc_previous_status; + uint8_t sc_iid; + uint8_t sc_oid; + uint8_t sc_fid; + uint8_t sc_iface_index; + + uint32_t sc_isize; + uint32_t sc_osize; + uint32_t sc_fsize; + + void *sc_repdesc_ptr; + + uint16_t sc_repdesc_size; + + struct usb_device *sc_udev; +#defineUHID_FLAG_IMMED
svn commit: r333632 - head/sys/dev/usb/template
Author: trasz Date: Tue May 15 15:11:52 2018 New Revision: 333632 URL: https://svnweb.freebsd.org/changeset/base/333632 Log: Fix sysctl description. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/template/usb_template_serialnet.c Modified: head/sys/dev/usb/template/usb_template_serialnet.c == --- head/sys/dev/usb/template/usb_template_serialnet.c Tue May 15 13:30:59 2018(r333631) +++ head/sys/dev/usb/template/usb_template_serialnet.c Tue May 15 15:11:52 2018(r333632) @@ -405,7 +405,7 @@ serialnet_init(void *arg __unused) parent = SYSCTL_ADD_NODE(_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, parent_name, CTLFLAG_RW, - 0, "USB Mass Storage device side template"); + 0, "USB CDC Serial/Ethernet device side template"); SYSCTL_ADD_U16(_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, _template_serialnet.idVendor, 1, "Vendor identifier"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
RE: Display Week 2018.
Hi, I hope you're doing good. Did you get a chance to review the below email.? Regards, Elsa Jean| Trade show specialist From: Elsa Jean [mailto:globaltrad...@globaltradez.us] Sent: 08 May 2018 14:44 To: 'svn-src-all@freebsd.org' Subject: Display Week 2018. Hi, Would you be interested to getting access to Attendees Email list of Display Week Expo 2018.? List includes: Name, Phone number, Email address and other fields on excel sheet. If you are interested please get back to me so that I will assist you further with counts and pricing details. Could you please let me know your thoughts? so that I can update my CRM accordingly. Looking forward for your email. Regards, Elsa Jean| Trade show specialist Note: If you do not wish to receive further email please reply us with "Exclude" in the subject line. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r333612 - head/sys/net
On 14/05/18 17:06, Stephen Hurd wrote: > Author: shurd > Date: Mon May 14 20:06:49 2018 > New Revision: 333612 > URL: https://svnweb.freebsd.org/changeset/base/333612 > > Log: > Replace rmlock with epoch in lagg > > Use the new epoch based reclamation API. Now the hot paths will not > block at all, and the sx lock is used for the softc data. This fixes LORs > reported where the rwlock was obtained when the sxlock was held. > > Submitted by: mmacy > Reported by:Harry Schmalzbauer> Reviewed by:sbruno > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D15355 Thanks! This fixed my (wlan0+em0) failover lagg interface. -- Renato Botelho ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333631 - head/sys/dev/e1000
Author: sbruno Date: Tue May 15 13:30:59 2018 New Revision: 333631 URL: https://svnweb.freebsd.org/changeset/base/333631 Log: igb(4): I210 restore functionality if pxeboot rom is enabled on this device. r45 attempted to determine if this code was needed or it was some kind of work around for a problem. Turns out, its definitely a work around for hardware locking and synchronization that manifests itself if the option Rom is enabled and is selected as a boot device (there was a PXE attempt). Reviewed by: mmacy Differential Revision:https://reviews.freebsd.org/D15439 Modified: head/sys/dev/e1000/e1000_mac.c Modified: head/sys/dev/e1000/e1000_mac.c == --- head/sys/dev/e1000/e1000_mac.c Tue May 15 13:27:29 2018 (r333630) +++ head/sys/dev/e1000/e1000_mac.c Tue May 15 13:30:59 2018 (r333631) @@ -2192,11 +2192,12 @@ s32 e1000_write_8bit_ctrl_reg_generic(struct e1000_hw s32 e1000_get_hw_semaphore(struct e1000_hw *hw) { u32 swsm; - s32 timeout = hw->nvm.word_size + 1; + s32 fw_timeout = hw->nvm.word_size + 1; + s32 sw_timeout = hw->nvm.word_size + 1; s32 i = 0; DEBUGFUNC("e1000_get_hw_semaphore"); -#ifdef notyet + /* _82571 */ /* If we have timedout 3 times on trying to acquire * the inter-port SMBI semaphore, there is old code @@ -2208,9 +2209,9 @@ s32 e1000_get_hw_semaphore(struct e1000_hw *hw) if (hw->dev_spec._82571.smb_counter > 2) sw_timeout = 1; -#endif + /* Get the SW semaphore */ - while (i < timeout) { + while (i < sw_timeout) { swsm = E1000_READ_REG(hw, E1000_SWSM); if (!(swsm & E1000_SWSM_SMBI)) break; @@ -2219,34 +2220,28 @@ s32 e1000_get_hw_semaphore(struct e1000_hw *hw) i++; } - if (i == timeout) { -#ifdef notyet - /* -* XXX This sounds more like a driver bug whereby we either -* recursed accidentally or missed clearing it previously -*/ - /* In rare circumstances, the SW semaphore may already be held -* unintentionally. Clear the semaphore once before giving up. -*/ - if (hw->dev_spec._82575.clear_semaphore_once) { - hw->dev_spec._82575.clear_semaphore_once = FALSE; - e1000_put_hw_semaphore_generic(hw); - for (i = 0; i < timeout; i++) { - swsm = E1000_READ_REG(hw, E1000_SWSM); - if (!(swsm & E1000_SWSM_SMBI)) - break; - - usec_delay(50); - } - } -#endif - + if (i == sw_timeout) { DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); - return -E1000_ERR_NVM; + hw->dev_spec._82571.smb_counter++; } + /* In rare circumstances, the SW semaphore may already be held +* unintentionally. Clear the semaphore once before giving up. +*/ + if (hw->dev_spec._82575.clear_semaphore_once) { + hw->dev_spec._82575.clear_semaphore_once = FALSE; + e1000_put_hw_semaphore(hw); + for (i = 0; i < fw_timeout; i++) { + swsm = E1000_READ_REG(hw, E1000_SWSM); + if (!(swsm & E1000_SWSM_SMBI)) + break; + + usec_delay(50); + } + } + /* Get the FW semaphore. */ - for (i = 0; i < timeout; i++) { + for (i = 0; i < fw_timeout; i++) { swsm = E1000_READ_REG(hw, E1000_SWSM); E1000_WRITE_REG(hw, E1000_SWSM, swsm | E1000_SWSM_SWESMBI); @@ -2257,7 +2252,7 @@ s32 e1000_get_hw_semaphore(struct e1000_hw *hw) usec_delay(50); } - if (i == timeout) { + if (i == fw_timeout) { /* Release semaphores */ e1000_put_hw_semaphore(hw); DEBUGOUT("Driver can't access the NVM\n"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333630 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue May 15 13:27:29 2018 New Revision: 333630 URL: https://svnweb.freebsd.org/changeset/base/333630 Log: Fix 'zpool create -t ' Creating a pool with a temporary name fails when we also specify custom dataset properties: this is because we mistakenly call zfs_set_prop_nvlist() on the "real" pool name which, as expected, cannot be found because the SPA is present in the namespace with the temporary name. Fix this by specifying the correct pool name when setting the dataset properties. Author: loli10KReviewed-by: Prakash Surya Reviewed-by: Brian Behlendorf Obtained from:ZFS on Linux, zfsonlinux/zfs@4ceb8dd6fdfdde MFC after:1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 15 13:19:00 2018(r333629) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 15 13:27:29 2018(r333630) @@ -1556,6 +1556,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) nvlist_t *config, *props = NULL; nvlist_t *rootprops = NULL; nvlist_t *zplprops = NULL; + char *spa_name = zc->zc_name; if (error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size, zc->zc_iflags, )) @@ -1571,6 +1572,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) if (props) { nvlist_t *nvl = NULL; uint64_t version = SPA_VERSION; + char *tname; (void) nvlist_lookup_uint64(props, zpool_prop_to_name(ZPOOL_PROP_VERSION), ); @@ -1593,6 +1595,10 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) zplprops, NULL); if (error != 0) goto pool_props_bad; + + if (nvlist_lookup_string(props, + zpool_prop_to_name(ZPOOL_PROP_TNAME), ) == 0) + spa_name = tname; } error = spa_create(zc->zc_name, config, props, zplprops); @@ -1600,9 +1606,9 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) /* * Set the remaining root properties */ - if (!error && (error = zfs_set_prop_nvlist(zc->zc_name, + if (!error && (error = zfs_set_prop_nvlist(spa_name, ZPROP_SRC_LOCAL, rootprops, NULL)) != 0) - (void) spa_destroy(zc->zc_name); + (void) spa_destroy(spa_name); pool_props_bad: nvlist_free(rootprops); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333629 - stable/10/sys/netgraph
Author: sbruno Date: Tue May 15 13:19:00 2018 New Revision: 333629 URL: https://svnweb.freebsd.org/changeset/base/333629 Log: MFC r303848 Repair trivial panic in ng_uncallout. Fixes bugzilla #211031 PR: 211031 Modified: stable/10/sys/netgraph/ng_base.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netgraph/ng_base.c == --- stable/10/sys/netgraph/ng_base.cTue May 15 12:11:52 2018 (r333628) +++ stable/10/sys/netgraph/ng_base.cTue May 15 13:19:00 2018 (r333629) @@ -3813,7 +3813,7 @@ ng_uncallout(struct callout *c, node_p node) item = c->c_arg; /* Do an extra check */ if ((rval > 0) && (c->c_func == _callout_trampoline) && - (NGI_NODE(item) == node)) { + (item != NULL) && (NGI_NODE(item) == node)) { /* * We successfully removed it from the queue before it ran * So now we need to unreference everything that was ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333628 - stable/11/lib/libc/sys
Author: kib Date: Tue May 15 12:11:52 2018 New Revision: 333628 URL: https://svnweb.freebsd.org/changeset/base/333628 Log: MFC r333521: PROC_PDEATHSIG_CTL will appear first in 11.2. Approved by: re (marius) Modified: stable/11/lib/libc/sys/procctl.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/procctl.2 == --- stable/11/lib/libc/sys/procctl.2Tue May 15 11:43:05 2018 (r333627) +++ stable/11/lib/libc/sys/procctl.2Tue May 15 12:11:52 2018 (r333628) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 20, 2018 +.Dd May 12, 2018 .Dt PROCCTL 2 .Os .Sh NAME @@ -550,4 +550,4 @@ The .Dv PROC_PDEATHSIG_CTL facility is based on the prctl(PR_SET_PDEATHSIG, ...) feature of Linux, and first appeared in -.Fx 12.0 . +.Fx 11.2 . ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333627 - stable/11/sys/netinet
Author: ae Date: Tue May 15 11:43:05 2018 New Revision: 333627 URL: https://svnweb.freebsd.org/changeset/base/333627 Log: MFC r333244: Immediately propagate EACCES error code to application from tcp_output. In r309610 and r315514 the behavior of handling EACCES was changed, and tcp_output() now returns zero when EACCES happens. The reason of this change was a hesitation that applications that use TCP-MD5 will be affected by changes in project/ipsec. TCP-MD5 code returns EACCES when security assocition for given connection is not configured. But the same error code can return pfil(9), and this change has affected connections blocked by pfil(9). E.g. application doesn't return immediately when SYN segment is blocked, instead it waits when several tries will be failed. Actually, for TCP-MD5 application it doesn't matter will it get EACCES after first SYN, or after several tries. Security associtions must be configured before initiating TCP connection. I left the EACCES in the switch() to show that it has special handling. Reported by:Andreas Longwitz Approved by: re (marius) Modified: stable/11/sys/netinet/tcp_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_output.c == --- stable/11/sys/netinet/tcp_output.c Tue May 15 11:25:10 2018 (r333626) +++ stable/11/sys/netinet/tcp_output.c Tue May 15 11:43:05 2018 (r333627) @@ -1579,8 +1579,6 @@ timer: SOCKBUF_UNLOCK_ASSERT(>so_snd); /* Check gotos. */ switch (error) { case EACCES: - tp->t_softerror = error; - return (0); case EPERM: tp->t_softerror = error; return (error); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333626 - stable/11/sys/i386/include
Author: kib Date: Tue May 15 11:25:10 2018 New Revision: 333626 URL: https://svnweb.freebsd.org/changeset/base/333626 Log: MFC r333504: Remove dead declaration. Approved by: re (marius) Modified: stable/11/sys/i386/include/pcb_ext.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/include/pcb_ext.h == --- stable/11/sys/i386/include/pcb_ext.hTue May 15 10:10:14 2018 (r333625) +++ stable/11/sys/i386/include/pcb_ext.hTue May 15 11:25:10 2018 (r333626) @@ -44,10 +44,7 @@ struct pcb_ext { }; #ifdef _KERNEL -extern int private_tss; - int i386_extend_pcb(struct thread *); - #endif #endif /* _I386_PCB_EXT_H_ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333625 - stable/11/tests/sys/kern
Author: kib Date: Tue May 15 10:10:14 2018 New Revision: 333625 URL: https://svnweb.freebsd.org/changeset/base/333625 Log: Handle the difference between HEAD and stable/11 tests build. This is a direct commit to stable/11. PR: 228018, 228233 Tested by:Helge OldachSponsored by: The FreeBSD Foundation Approved by: re (marius) Modified: stable/11/tests/sys/kern/Makefile Modified: stable/11/tests/sys/kern/Makefile == --- stable/11/tests/sys/kern/Makefile Tue May 15 09:40:52 2018 (r333624) +++ stable/11/tests/sys/kern/Makefile Tue May 15 10:10:14 2018 (r333625) @@ -4,6 +4,7 @@ TESTSRC=${SRCTOP}/contrib/netbsd-tests/kernel .PATH: ${SRCTOP}/sys/kern TESTSDIR= ${TESTSBASE}/sys/kern +BINDIR=${TESTSDIR} ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333624 - stable/11/sys/netinet6
Author: hselasky Date: Tue May 15 09:40:52 2018 New Revision: 333624 URL: https://svnweb.freebsd.org/changeset/base/333624 Log: MFC r62: Fix for missing network interface address event when adding the default IPv6 based link-local address. The default link local address for IPv6 is added as part of bringing the network interface up. Move the call to "EVENTHANDLER_INVOKE(ifaddr_event,)" from the SIOCAIFADDR_IN6 ioctl(2) handler to in6_notify_ifa() which should catch all the cases of adding IPv6 based addresses to a network interface. Add a witness warning in case the event handler is not allowed to sleep. Approved by: re (marius) Reviewed by: network (ae), kib Differential Revision:https://reviews.freebsd.org/D13407 Sponsored by: Mellanox Technologies Modified: stable/11/sys/netinet6/in6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/in6.c == --- stable/11/sys/netinet6/in6.cTue May 15 07:46:24 2018 (r333623) +++ stable/11/sys/netinet6/in6.cTue May 15 09:40:52 2018 (r333624) @@ -677,7 +677,6 @@ aifaddr_out: * The failure means address duplication was detected. */ } - EVENTHANDLER_INVOKE(ifaddr_event, ifp); break; } @@ -1364,7 +1363,7 @@ in6_notify_ifa(struct ifnet *ifp, struct in6_ifaddr *i if (ifacount <= 1 && ifp->if_ioctl) { error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia); if (error) - return (error); + goto done; } /* @@ -1404,7 +1403,7 @@ in6_notify_ifa(struct ifnet *ifp, struct in6_ifaddr *i ia->ia_flags |= IFA_RTSELF; error = rtinit(>ia_ifa, RTM_ADD, ia->ia_flags | rtflags); if (error) - return (error); + goto done; ia->ia_flags |= IFA_ROUTE; } @@ -1417,6 +1416,11 @@ in6_notify_ifa(struct ifnet *ifp, struct in6_ifaddr *i if (error == 0) ia->ia_flags |= IFA_RTSELF; } +done: + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "Invoking IPv6 network device address event may sleep"); + + EVENTHANDLER_INVOKE(ifaddr_event, ifp); return (error); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r333623 - head/sys/contrib/rdma/krping
Author: hselasky Date: Tue May 15 07:46:24 2018 New Revision: 333623 URL: https://svnweb.freebsd.org/changeset/base/333623 Log: Add support for setting type of service, TOS, for outgoing RDMA connections in the krping kernel test utility. MFC after:3 days Sponsored by: Mellanox Technologies Modified: head/sys/contrib/rdma/krping/krping.c Modified: head/sys/contrib/rdma/krping/krping.c == --- head/sys/contrib/rdma/krping/krping.c Tue May 15 05:55:29 2018 (r333622) +++ head/sys/contrib/rdma/krping/krping.c Tue May 15 07:46:24 2018 (r333623) @@ -96,6 +96,7 @@ static const struct krping_option krping_opts[] = { {"rlat", OPT_NOPARAM, 'L'}, {"bw", OPT_NOPARAM, 'B'}, {"duplex", OPT_NOPARAM, 'd'}, + {"tos", OPT_INT, 't'}, {"txdepth", OPT_INT, 'T'}, {"poll", OPT_NOPARAM, 'P'}, {"local_dma_lkey", OPT_NOPARAM, 'Z'}, @@ -234,6 +235,7 @@ struct krping_cb { int txdepth;/* SQ depth */ int local_dma_lkey; /* use 0 for lkey */ int frtest; /* reg test */ + int tos;/* type of service */ /* CM stuff */ struct rdma_cm_id *cm_id; /* connection on client side,*/ @@ -1918,6 +1920,10 @@ static void krping_run_client(struct krping_cb *cb) struct ib_recv_wr *bad_wr; int ret; + /* set type of service, if any */ + if (cb->tos != 0) + rdma_set_service_type(cb->cm_id, cb->tos); + ret = krping_bind_client(cb); if (ret) return; @@ -2096,6 +2102,10 @@ int krping_doit(char *cmd) break; case 'I': cb->server_invalidate = 1; + break; + case 't': + cb->tos = optint; + DEBUG_LOG("type of service, tos=%d\n", (int) cb->tos); break; case 'T': cb->txdepth = optint; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"