svn commit: r283189 - stable/10/sys/cam/scsi
Author: hselasky Date: Thu May 21 07:41:03 2015 New Revision: 283189 URL: https://svnweb.freebsd.org/changeset/base/283189 Log: MFC r279726: Add DA_Q_NO_RC16 quirk for USB mass storage device. PR: 194062 Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c == --- stable/10/sys/cam/scsi/scsi_da.cThu May 21 07:35:20 2015 (r283188) +++ stable/10/sys/cam/scsi/scsi_da.cThu May 21 07:41:03 2015 (r283189) @@ -1177,6 +1177,13 @@ static struct da_quirk_entry da_quirk_ta }, { /* +* Hama Innostor USB-Stick +*/ + { T_DIRECT, SIP_MEDIA_REMOVABLE, Innostor, Innostor*, * }, + /*quirks*/DA_Q_NO_RC16 + }, + { + /* * MX-ES USB Drive by Mach Xtreme */ { T_DIRECT, SIP_MEDIA_REMOVABLE, MX, MXUB3*, *}, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283195 - head/usr.bin/soelim
Author: bapt Date: Thu May 21 08:20:42 2015 New Revision: 283195 URL: https://svnweb.freebsd.org/changeset/base/283195 Log: sort headers Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cThu May 21 07:50:56 2015 (r283194) +++ head/usr.bin/soelim/soelim.cThu May 21 08:20:42 2015 (r283195) @@ -29,15 +29,15 @@ __FBSDID($FreeBSD$); #include sys/param.h +#include ctype.h +#include err.h +#include stdbool.h #define _WITH_GETLINE #include stdio.h -#include unistd.h #include stdlib.h -#include stdbool.h #include string.h #include stringlist.h -#include err.h -#include ctype.h +#include unistd.h #define C_OPTION 0x1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283196 - head/usr.bin/soelim
Author: bapt Date: Thu May 21 08:23:45 2015 New Revision: 283196 URL: https://svnweb.freebsd.org/changeset/base/283196 Log: Use the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN Submitted by: schwarze at OpenBSD Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cThu May 21 08:20:42 2015 (r283195) +++ head/usr.bin/soelim/soelim.cThu May 21 08:23:45 2015 (r283196) @@ -27,10 +27,9 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); -#include sys/param.h - #include ctype.h #include err.h +#include limits.h #include stdbool.h #define _WITH_GETLINE #include stdio.h @@ -56,7 +55,7 @@ static FILE * soelim_fopen(const char *name) { FILE *f; - char path[MAXPATHLEN]; + char path[PATH_MAX]; size_t i; if (strcmp(name, -) == 0) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283199 - head/usr.bin/soelim
Author: bapt Date: Thu May 21 08:28:48 2015 New Revision: 283199 URL: https://svnweb.freebsd.org/changeset/base/283199 Log: * fix roff terminology in .Nd * remove .Xr to self * add AUTHORS section Submitted by: schwarze at OpenBSD Modified: head/usr.bin/soelim/soelim.1 Modified: head/usr.bin/soelim/soelim.1 == --- head/usr.bin/soelim/soelim.1Thu May 21 08:28:35 2015 (r283198) +++ head/usr.bin/soelim/soelim.1Thu May 21 08:28:48 2015 (r283199) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm soelim -.Nd interpret .so directive in manpages +.Nd interpret .so requests in manpages .Sh SYNOPSIS .Nm .Op Fl Crtv @@ -78,5 +78,9 @@ The files are always searched first in t A file specified with an absolute path will be opened directly without performing a search. .Sh SEE ALSO -.Xr mandoc 1 , -.Xr soelim 1 +.Xr mandoc 1 +.Sh AUTHORS +This version of the +.Nm +utility was written by +.An Baptiste Daroussin Aq Mt b...@freebsd.org . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283198 - stable/10/sys/kern
Author: ae Date: Thu May 21 08:28:35 2015 New Revision: 283198 URL: https://svnweb.freebsd.org/changeset/base/283198 Log: MFC r282594: m_dup() is supposed to give a writable copy of an mbuf chain. It uses m_dup_pkthdr(), that uses M_COPYFLAGS mask to copy m_flags field. If original mbuf chain has M_RDONLY flag, its copy also will have it. Reset this flag explicitly. Modified: stable/10/sys/kern/uipc_mbuf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_mbuf.c == --- stable/10/sys/kern/uipc_mbuf.c Thu May 21 08:26:24 2015 (r283197) +++ stable/10/sys/kern/uipc_mbuf.c Thu May 21 08:28:35 2015 (r283198) @@ -934,6 +934,7 @@ m_dup(struct mbuf *m, int how) } if ((n-m_flags M_EXT) == 0) nsize = MHLEN; + n-m_flags = ~M_RDONLY; } n-m_len = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283188 - head/sys/arm/amlogic/aml8726
Author: ganbold Date: Thu May 21 07:35:20 2015 New Revision: 283188 URL: https://svnweb.freebsd.org/changeset/base/283188 Log: Add missing break statement. Submitted by: John Wehle Modified: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c Modified: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c == --- head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c Thu May 21 07:34:08 2015(r283187) +++ head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c Thu May 21 07:35:20 2015(r283188) @@ -181,8 +181,10 @@ aml8726_usb_phy_attach(device_t dev) sc-pwr_en[i].pin = prop[i * 3 + 1]; sc-pwr_en[i].pol = prop[i * 3 + 2]; - if (sc-pwr_en[i].dev == NULL) + if (sc-pwr_en[i].dev == NULL) { err = 1; + break; + } } free(prop, M_OFWPROP); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283193 - in stable/10/sys/dev/usb: . serial
Author: hselasky Date: Thu May 21 07:49:44 2015 New Revision: 283193 URL: https://svnweb.freebsd.org/changeset/base/283193 Log: MFC r282505: Add new USB ID. PR: 199843 Modified: stable/10/sys/dev/usb/serial/uftdi.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uftdi.c == --- stable/10/sys/dev/usb/serial/uftdi.cThu May 21 07:48:06 2015 (r283192) +++ stable/10/sys/dev/usb/serial/uftdi.cThu May 21 07:49:44 2015 (r283193) @@ -497,6 +497,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(FTDI, SCS_DEVICE_5, 0), UFTDI_DEV(FTDI, SCS_DEVICE_6, 0), UFTDI_DEV(FTDI, SCS_DEVICE_7, 0), + UFTDI_DEV(FTDI, SCX8_USB_PHOENIX, 0), UFTDI_DEV(FTDI, SDMUSBQSS, 0), UFTDI_DEV(FTDI, SEMC_DSS20, 0), UFTDI_DEV(FTDI, SERIAL_2232C, UFTDI_JTAG_CHECK_STRING), Modified: stable/10/sys/dev/usb/usbdevs == --- stable/10/sys/dev/usb/usbdevs Thu May 21 07:48:06 2015 (r283192) +++ stable/10/sys/dev/usb/usbdevs Thu May 21 07:49:44 2015 (r283193) @@ -1851,6 +1851,7 @@ product FREECOM HDD 0xfc05 Classic SL H product FSC E5400 0x1009 PrismGT USB 2.0 WLAN /* Future Technology Devices products */ +product FTDI SCX8_USB_PHOENIX 0x5259 SCx8 USB Phoenix interface product FTDI SERIAL_8U100AX0x8372 8U100AX Serial product FTDI SERIAL_8U232AM0x6001 8U232AM Serial product FTDI SERIAL_8U232AM4 0x6004 8U232AM Serial ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283197 - head/usr.bin/soelim
Author: bapt Date: Thu May 21 08:26:24 2015 New Revision: 283197 URL: https://svnweb.freebsd.org/changeset/base/283197 Log: add an include on sys/types.h because we do explicitly use size_t remove unused stdbool.h Suggested by: schwarze at OpenBSD Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cThu May 21 08:23:45 2015 (r283196) +++ head/usr.bin/soelim/soelim.cThu May 21 08:26:24 2015 (r283197) @@ -27,10 +27,11 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); +#include sys/types.h + #include ctype.h #include err.h #include limits.h -#include stdbool.h #define _WITH_GETLINE #include stdio.h #include stdlib.h ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283200 - stable/9/sys/kern
Author: ae Date: Thu May 21 08:32:52 2015 New Revision: 283200 URL: https://svnweb.freebsd.org/changeset/base/283200 Log: MFC r282594: m_dup() is supposed to give a writable copy of an mbuf chain. It uses m_dup_pkthdr(), that uses M_COPYFLAGS mask to copy m_flags field. If original mbuf chain has M_RDONLY flag, its copy also will have it. Reset this flag explicitly. Modified: stable/9/sys/kern/uipc_mbuf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_mbuf.c == --- stable/9/sys/kern/uipc_mbuf.c Thu May 21 08:28:48 2015 (r283199) +++ stable/9/sys/kern/uipc_mbuf.c Thu May 21 08:32:52 2015 (r283200) @@ -867,6 +867,7 @@ m_dup(struct mbuf *m, int how) } if ((n-m_flags M_EXT) == 0) nsize = MHLEN; + n-m_flags = ~M_RDONLY; } n-m_len = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283190 - stable/9/sys/cam/scsi
Author: hselasky Date: Thu May 21 07:42:46 2015 New Revision: 283190 URL: https://svnweb.freebsd.org/changeset/base/283190 Log: MFC r279726: Add DA_Q_NO_RC16 quirk for USB mass storage device. PR: 194062 Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c == --- stable/9/sys/cam/scsi/scsi_da.c Thu May 21 07:41:03 2015 (r283189) +++ stable/9/sys/cam/scsi/scsi_da.c Thu May 21 07:42:46 2015 (r283190) @@ -1144,6 +1144,13 @@ static struct da_quirk_entry da_quirk_ta { T_DIRECT, SIP_MEDIA_FIXED, ATA, SG9XCS2D*, * }, /*quirks*/DA_Q_4K }, + { + /* +* Hama Innostor USB-Stick +*/ + { T_DIRECT, SIP_MEDIA_REMOVABLE, Innostor, Innostor*, * }, + /*quirks*/DA_Q_NO_RC16 + }, }; static disk_strategy_t dastrategy; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283191 - stable/9/sys/dev/sound/pcm
Author: hselasky Date: Thu May 21 07:46:01 2015 New Revision: 283191 URL: https://svnweb.freebsd.org/changeset/base/283191 Log: MFC r282017: Allow DSP basename cloning to be disabled or enabled at boot and runtime. This is useful when implementing OSS sound stacks in userspace via libcuse for example. Modified: stable/9/sys/dev/sound/pcm/dsp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pcm/dsp.c == --- stable/9/sys/dev/sound/pcm/dsp.cThu May 21 07:42:46 2015 (r283190) +++ stable/9/sys/dev/sound/pcm/dsp.cThu May 21 07:46:01 2015 (r283191) @@ -46,6 +46,12 @@ SYSCTL_INT(_hw_snd, OID_AUTO, compat_lin dsp_mmap_allow_prot_exec, 0, linux mmap compatibility (-1=force disable 0=auto 1=force enable)); +static int dsp_basename_clone = 1; +SYSCTL_INT(_hw_snd, OID_AUTO, basename_clone, CTLFLAG_RWTUN, +dsp_basename_clone, 0, +DSP basename cloning (0: Disable; 1: Enabled)); +TUNABLE_INT(hw.snd.basename_clone, dsp_basename_clone); + struct dsp_cdevinfo { struct pcm_channel *rdch, *wrch; struct pcm_channel *volch; @@ -2357,9 +2363,10 @@ dsp_clone(void *arg, devname = devcmp; devhw = dsp_cdevs[i].hw; devcmax = dsp_cdevs[i].max - 1; - if (strcmp(name, devcmp) == 0) - unit = snd_unit; - else if (dsp_stdclone(name, devcmp, devsep, + if (strcmp(name, devcmp) == 0) { + if (dsp_basename_clone != 0) + unit = snd_unit; + } else if (dsp_stdclone(name, devcmp, devsep, dsp_cdevs[i].use_sep, unit, cunit) != 0) { unit = -1; cunit = -1; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283192 - stable/10/sys/dev/sound/pcm
Author: hselasky Date: Thu May 21 07:48:06 2015 New Revision: 283192 URL: https://svnweb.freebsd.org/changeset/base/283192 Log: MFC r282017: Allow DSP basename cloning to be disabled or enabled at boot and runtime. This is useful when implementing OSS sound stacks in userspace via libcuse for example. Modified: stable/10/sys/dev/sound/pcm/dsp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/dsp.c == --- stable/10/sys/dev/sound/pcm/dsp.c Thu May 21 07:46:01 2015 (r283191) +++ stable/10/sys/dev/sound/pcm/dsp.c Thu May 21 07:48:06 2015 (r283192) @@ -48,6 +48,12 @@ SYSCTL_INT(_hw_snd, OID_AUTO, compat_lin dsp_mmap_allow_prot_exec, 0, linux mmap compatibility (-1=force disable 0=auto 1=force enable)); +static int dsp_basename_clone = 1; +SYSCTL_INT(_hw_snd, OID_AUTO, basename_clone, CTLFLAG_RWTUN, +dsp_basename_clone, 0, +DSP basename cloning (0: Disable; 1: Enabled)); +TUNABLE_INT(hw.snd.basename_clone, dsp_basename_clone); + struct dsp_cdevinfo { struct pcm_channel *rdch, *wrch; struct pcm_channel *volch; @@ -2359,9 +2365,10 @@ dsp_clone(void *arg, devname = devcmp; devhw = dsp_cdevs[i].hw; devcmax = dsp_cdevs[i].max - 1; - if (strcmp(name, devcmp) == 0) - unit = snd_unit; - else if (dsp_stdclone(name, devcmp, devsep, + if (strcmp(name, devcmp) == 0) { + if (dsp_basename_clone != 0) + unit = snd_unit; + } else if (dsp_stdclone(name, devcmp, devsep, dsp_cdevs[i].use_sep, unit, cunit) != 0) { unit = -1; cunit = -1; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283194 - in stable/9/sys/dev/usb: . serial
Author: hselasky Date: Thu May 21 07:50:56 2015 New Revision: 283194 URL: https://svnweb.freebsd.org/changeset/base/283194 Log: MFC r282505: Add new USB ID. PR: 199843 Modified: stable/9/sys/dev/usb/serial/uftdi.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/uftdi.c == --- stable/9/sys/dev/usb/serial/uftdi.c Thu May 21 07:49:44 2015 (r283193) +++ stable/9/sys/dev/usb/serial/uftdi.c Thu May 21 07:50:56 2015 (r283194) @@ -497,6 +497,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(FTDI, SCS_DEVICE_5, 0), UFTDI_DEV(FTDI, SCS_DEVICE_6, 0), UFTDI_DEV(FTDI, SCS_DEVICE_7, 0), + UFTDI_DEV(FTDI, SCX8_USB_PHOENIX, 0), UFTDI_DEV(FTDI, SDMUSBQSS, 0), UFTDI_DEV(FTDI, SEMC_DSS20, 0), UFTDI_DEV(FTDI, SERIAL_2232C, UFTDI_JTAG_CHECK_STRING), Modified: stable/9/sys/dev/usb/usbdevs == --- stable/9/sys/dev/usb/usbdevsThu May 21 07:49:44 2015 (r283193) +++ stable/9/sys/dev/usb/usbdevsThu May 21 07:50:56 2015 (r283194) @@ -1851,6 +1851,7 @@ product FREECOM HDD 0xfc05 Classic SL H product FSC E5400 0x1009 PrismGT USB 2.0 WLAN /* Future Technology Devices products */ +product FTDI SCX8_USB_PHOENIX 0x5259 SCx8 USB Phoenix interface product FTDI SERIAL_8U100AX0x8372 8U100AX Serial product FTDI SERIAL_8U232AM0x6001 8U232AM Serial product FTDI SERIAL_8U232AM4 0x6004 8U232AM Serial ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283179 - stable/9/sys/ofed/drivers/net/mlx4
Author: hselasky Date: Thu May 21 06:58:19 2015 New Revision: 283179 URL: https://svnweb.freebsd.org/changeset/base/283179 Log: MFC r282817: Apply proper locking when iterating the multicast addresses and add a missing check for NULL from a non-blocking kzalloc() function call. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c == --- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Thu May 21 06:58:08 2015(r283178) +++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Thu May 21 06:58:19 2015(r283179) @@ -650,6 +650,7 @@ static void mlx4_en_cache_mclist(struct struct mlx4_en_mc_list *tmp; struct mlx4_en_priv *priv = netdev_priv(dev); +if_maddr_rlock(dev); TAILQ_FOREACH(ifma, dev-if_multiaddrs, ifma_link) { if (ifma-ifma_addr-sa_family != AF_LINK) continue; @@ -658,10 +659,13 @@ static void mlx4_en_cache_mclist(struct continue; /* Make sure the list didn't grow. */ tmp = kzalloc(sizeof(struct mlx4_en_mc_list), GFP_ATOMIC); + if (tmp == NULL) + break; memcpy(tmp-addr, LLADDR((struct sockaddr_dl *)ifma-ifma_addr), ETH_ALEN); list_add_tail(tmp-list, priv-mc_list); } +if_maddr_runlock(dev); } static void update_mclist_flags(struct mlx4_en_priv *priv, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283178 - in vendor/clang/dist: include/clang/Basic include/clang/Sema lib/AST lib/Analysis lib/Basic lib/CodeGen lib/Driver lib/Frontend lib/Sema test/CodeGen test/CodeGenCXX test/Driv...
Author: dim Date: Thu May 21 06:58:08 2015 New Revision: 283178 URL: https://svnweb.freebsd.org/changeset/base/283178 Log: Vendor import of clang RELEASE_361/final tag r237755 (effectively, 3.6.1 release): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_361/final@237755 Added: vendor/clang/dist/test/CodeGen/invalid_global_asm.c (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/ vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbeginS.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtbeginT.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_android_tree/lib/gcc/mipsel-linux-android/4.4.3/mips-r6/crtendS.o (contents, props changed) vendor/clang/dist/test/Sema/builtin-longjmp.c (contents, props changed) vendor/clang/dist/test/SemaCXX/cxx0x-noexcept-expression.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/thread-safety-reference-handling.cpp (contents, props changed) vendor/clang/dist/test/SemaTemplate/overloaded-functions.cpp (contents, props changed) Deleted: vendor/clang/dist/test/CodeGen/2003-08-06-BuiltinSetjmpLongjmp.c Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/TargetCXXABI.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Sema/Template.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDiagnostic.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/Analysis/ThreadSafety.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Sema/DeclSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/test/CodeGen/builtins.c vendor/clang/dist/test/CodeGen/mangle-windows.c vendor/clang/dist/test/CodeGen/mcount.c vendor/clang/dist/test/CodeGenCXX/inline-functions.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/trivial-constructor-init.cpp vendor/clang/dist/test/Driver/android-standalone.cpp vendor/clang/dist/test/Misc/diag-template-diffing.cpp vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/SemaCXX/warn-thread-safety-negative.cpp Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td == --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.tdThu May 21 06:57:51 2015(r283177) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.tdThu May 21 06:58:08 2015(r283178) @@ -6972,6 +6972,11 @@ def note_neon_vector_initializer_non_por vcombine_%0%1(vcreate_%0%1(), vcreate_%0%1()) to initialize from integer constants; +def err_builtin_longjmp_unsupported : Error + __builtin_longjmp is not supported for the current target; +def err_builtin_setjmp_unsupported : Error + __builtin_setjmp is not supported for the current target; + def err_builtin_longjmp_invalid_val : Error argument to __builtin_longjmp must be a constant 1; def err_builtin_requires_language : Error'%0' is only available in %1; Modified: vendor/clang/dist/include/clang/Basic/TargetCXXABI.h == --- vendor/clang/dist/include/clang/Basic/TargetCXXABI.hThu May 21 06:57:51 2015(r283177) +++ vendor/clang/dist/include/clang/Basic/TargetCXXABI.hThu May 21 06:58:08 2015(r283178) @@ -79,6 +79,12 @@ public: /// - guard variables are smaller. GenericAArch64, +/// The generic Mips ABI is a modified version of the Itanium ABI. +/// +/// At the moment, only change from the generic ABI in this case is: +/// - representation of member function pointers adjusted as in ARM. +GenericMIPS, + /// The Microsoft ABI is the ABI used by Microsoft Visual Studio (and /// compatible compilers). /// @@ -114,6 +120,7 @@ public: case
svn commit: r283177 - vendor/llvm/llvm-release_361-r237755
Author: dim Date: Thu May 21 06:57:51 2015 New Revision: 283177 URL: https://svnweb.freebsd.org/changeset/base/283177 Log: Tag llvm tags/RELEASE_361/final r237755 (effectively, 3.6.1 release). Added: - copied from r283176, vendor/llvm/dist/ Directory Properties: vendor/llvm/llvm-release_361-r237755/ (props changed) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283180 - vendor/clang/clang-release_361-r237755
Author: dim Date: Thu May 21 06:58:50 2015 New Revision: 283180 URL: https://svnweb.freebsd.org/changeset/base/283180 Log: Tag clang tags/RELEASE_361/final r237755 (effectively, 3.6.1 release). Added: - copied from r283179, vendor/clang/dist/ Directory Properties: vendor/clang/clang-release_361-r237755/ (props changed) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283181 - in head/sys: arm/amlogic/aml8726 boot/fdt/dts/arm
Author: ganbold Date: Thu May 21 07:01:08 2015 New Revision: 283181 URL: https://svnweb.freebsd.org/changeset/base/283181 Log: The RTC initialization values are based on the SoC which can be determined at runtime so there's no need to set the values in each DTS. Tested on YYHD18 (aml8726-m3), VSATV102 (aml8726-m6), and ODROIDC1 (aml8726-m8b). Differential Revision:https://reviews.freebsd.org/D2588 Submitted by: John Wehle Modified: head/sys/arm/amlogic/aml8726/aml8726_rtc.c head/sys/boot/fdt/dts/arm/odroidc1.dts head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Modified: head/sys/arm/amlogic/aml8726/aml8726_rtc.c == --- head/sys/arm/amlogic/aml8726/aml8726_rtc.c Thu May 21 06:58:50 2015 (r283180) +++ head/sys/arm/amlogic/aml8726/aml8726_rtc.c Thu May 21 07:01:08 2015 (r283181) @@ -51,6 +51,8 @@ __FBSDID($FreeBSD$); #include dev/ofw/ofw_bus.h #include dev/ofw/ofw_bus_subr.h +#include arm/amlogic/aml8726/aml8726_soc.h + #include clock_if.h /* @@ -372,44 +374,27 @@ static int aml8726_rtc_attach(device_t dev) { struct aml8726_rtc_softc *sc = device_get_softc(dev); - boolean_t init_always_valid; - char *init_always; - pcell_t prop; - phandle_t node; - ssize_t len; sc-dev = dev; - node = ofw_bus_get_node(dev); - - len = OF_getprop_alloc(node, init-always, - sizeof(char), (void **)init_always); - sc-init.always = FALSE; - init_always_valid = FALSE; - if (len 0) { - if (strncmp(init_always, true, len) == 0) { - sc-init.always = TRUE; - init_always_valid = TRUE; - } else if (strncmp(init_always, false, len) == 0) - init_always_valid = TRUE; - free(init_always, M_OFWPROP); - } - if (init_always_valid == FALSE) { - device_printf(dev, missing init-always attribute in FDT\n); - return (ENXIO); - } - - if (OF_getencprop(node, xo-init, prop, sizeof(prop)) = 0) { - device_printf(dev, missing xo-init attribute in FDT\n); - return (ENXIO); - } - sc-init.xo = prop; - - if (OF_getencprop(node, gpo-init, prop, sizeof(prop)) = 0) { - device_printf(dev, missing gpo-init attribute in FDT\n); + switch (aml8726_soc_hw_rev) { + case AML_SOC_HW_REV_M3: + sc-init.always = true; + sc-init.xo = 0x3c0a; + sc-init.gpo = 0x10; + break; + case AML_SOC_HW_REV_M6: + case AML_SOC_HW_REV_M8: + case AML_SOC_HW_REV_M8B: + sc-init.always = false; + sc-init.xo = 0x180a; + sc-init.gpo = 0x50; + break; + default: + device_printf(dev, unsupported SoC\n); return (ENXIO); + /* NOTREACHED */ } - sc-init.gpo = prop; if (bus_alloc_resources(dev, aml8726_rtc_spec, sc-res)) { device_printf(dev, can not allocate resources for device\n); Modified: head/sys/boot/fdt/dts/arm/odroidc1.dts == --- head/sys/boot/fdt/dts/arm/odroidc1.dts Thu May 21 06:58:50 2015 (r283180) +++ head/sys/boot/fdt/dts/arm/odroidc1.dts Thu May 21 07:01:08 2015 (r283181) @@ -194,10 +194,6 @@ compatible = amlogic,aml8726-rtc; reg = 0xc8100740 20; /* aobus 0x1d0 */ interrupts = 0 72 1; - - init-always = false; - xo-init = 0x180a; - gpo-init = 0x50; }; clkmsr: clkmsr@c1108758 { Modified: head/sys/boot/fdt/dts/arm/vsatv102-m6.dts == --- head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Thu May 21 06:58:50 2015 (r283180) +++ head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Thu May 21 07:01:08 2015 (r283181) @@ -153,10 +153,6 @@ compatible = amlogic,aml8726-rtc; reg = 0xda004340 20; /* secbus2 0xd0 */ interrupts = 0 72 1; /* AM_IRQ2(8) */ - - init-always = false; - xo-init = 0x180a; - gpo-init = 0x50; }; clkmsr: clkmsr@c1108758 { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283182 - stable/9/sys/dev/sound/usb
Author: hselasky Date: Thu May 21 07:07:28 2015 New Revision: 283182 URL: https://svnweb.freebsd.org/changeset/base/283182 Log: MFC r282652: Ensure the USB audio driver doesn't attach twice on the same USB device by grabbing all the USB audio device interfaces. Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c == --- stable/9/sys/dev/sound/usb/uaudio.c Thu May 21 07:01:08 2015 (r283181) +++ stable/9/sys/dev/sound/usb/uaudio.c Thu May 21 07:07:28 2015 (r283182) @@ -1574,6 +1574,19 @@ uaudio_chan_fill_info_sub(struct uaudio_ asf1d.v1 = NULL; ed1 = NULL; sed.v1 = NULL; + + /* +* There can only be one USB audio instance +* per USB device. Grab all USB audio +* interfaces on this USB device so that we +* don't attach USB audio twice: +*/ + if (alt_index == 0 curidx != sc-sc_mixer_iface_index + (id-bInterfaceClass == UICLASS_AUDIO || audio_if != 0 || + midi_if != 0)) { + usbd_set_parent_iface(sc-sc_udev, curidx, + sc-sc_mixer_iface_index); + } } if (audio_if == 0) { @@ -1809,9 +1822,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt-iface_index = curidx; chan_alt-iface_alt_index = alt_index; - usbd_set_parent_iface(sc-sc_udev, curidx, - sc-sc_mixer_iface_index); - if (ep_dir == UE_DIR_IN) chan_alt-usb_cfg = uaudio_cfg_record; else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283186 - head/sys/arm/amlogic/aml8726
Author: ganbold Date: Thu May 21 07:23:50 2015 New Revision: 283186 URL: https://svnweb.freebsd.org/changeset/base/283186 Log: Add driver for usbclock generator for earlier amlogic chip. Differential Revision:https://reviews.freebsd.org/D2590 Submitted by: John Wehle Added: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c (contents, props changed) Modified: head/sys/arm/amlogic/aml8726/files.aml8726 Added: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c Thu May 21 07:23:50 2015(r283186) @@ -0,0 +1,428 @@ +/*- + * Copyright 2014-2015 John Wehle j...@feith.com + * 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. + */ + +/* + * Amlogic aml8726-m3 USB physical layer driver. + * + * Both USB physical interfaces share the same configuration register. + */ + +#include sys/cdefs.h +__FBSDID($FreeBSD$); + +#include sys/param.h +#include sys/systm.h +#include sys/conf.h +#include sys/bus.h +#include sys/kernel.h +#include sys/module.h +#include sys/lock.h +#include sys/mutex.h +#include sys/resource.h +#include sys/rman.h + +#include sys/gpio.h + +#include machine/bus.h +#include machine/cpu.h + +#include dev/fdt/fdt_common.h +#include dev/ofw/ofw_bus.h +#include dev/ofw/ofw_bus_subr.h + +#include gpio_if.h + +struct aml8726_usb_phy_gpio { + device_tdev; + uint32_tpin; + uint32_tpol; +}; + +struct aml8726_usb_phy_softc { + device_tdev; + struct resource *res[1]; + uint32_tnpwr_en; + struct aml8726_usb_phy_gpio *pwr_en; +}; + +static struct resource_spec aml8726_usb_phy_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +#defineAML_USB_PHY_CFG_REG 0 +#defineAML_USB_PHY_CFG_A_CLK_DETECTED (1U 31) +#defineAML_USB_PHY_CFG_CLK_DIV_MASK(0x7f 24) +#defineAML_USB_PHY_CFG_CLK_DIV_SHIFT 24 +#defineAML_USB_PHY_CFG_B_CLK_DETECTED (1 22) +#defineAML_USB_PHY_CFG_A_PLL_RST (1 19) +#defineAML_USB_PHY_CFG_A_PHYS_RST (1 18) +#defineAML_USB_PHY_CFG_A_RST (1 17) +#defineAML_USB_PHY_CFG_B_PLL_RST (1 13) +#defineAML_USB_PHY_CFG_B_PHYS_RST (1 12) +#defineAML_USB_PHY_CFG_B_RST (1 11) +#defineAML_USB_PHY_CFG_CLK_EN (1 8) +#defineAML_USB_PHY_CFG_CLK_SEL_MASK(7 5) +#defineAML_USB_PHY_CFG_CLK_SEL_XTAL(0 5) +#defineAML_USB_PHY_CFG_CLK_SEL_XTAL_DIV2 (1 5) +#defineAML_USB_PHY_CFG_B_POR (1 1) +#defineAML_USB_PHY_CFG_A_POR (1 0) + +#defineAML_USB_PHY_CFG_CLK_DETECTED \ +(AML_USB_PHY_CFG_A_CLK_DETECTED | AML_USB_PHY_CFG_B_CLK_DETECTED) + +#defineAML_USB_PHY_MISC_A_REG 12 +#defineAML_USB_PHY_MISC_B_REG 16 +#defineAML_USB_PHY_MISC_ID_OVERIDE_EN (1 23) +#defineAML_USB_PHY_MISC_ID_OVERIDE_DEVICE (1 22) +#defineAML_USB_PHY_MISC_ID_OVERIDE_HOST(0 22) + +#defineCSR_WRITE_4(sc, reg, val) bus_write_4((sc)-res[0], reg, (val)) +#defineCSR_READ_4(sc, reg) bus_read_4((sc)-res[0], reg) +#defineCSR_BARRIER(sc, reg)bus_barrier((sc)-res[0], reg, 4, \ +
svn commit: r283172 - stable/9/sys/kern
Author: hselasky Date: Thu May 21 06:34:06 2015 New Revision: 283172 URL: https://svnweb.freebsd.org/changeset/base/283172 Log: MFC r280495: Implement a simple OID number garbage collector. Given the increasing number of dynamically created and destroyed SYSCTLs during runtime it is very likely that the current new OID number limit of 0x7fff can be reached. Especially if dynamic OID creation and destruction results from automatic tests. Additional changes: - Optimize the typical use case by decrementing the next automatic OID sequence number instead of incrementing it. This saves searching time when inserting new OIDs into a fresh parent OID node. - Add simple check for duplicate non-automatic OID numbers. Modified: stable/9/sys/kern/kern_sysctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_sysctl.c == --- stable/9/sys/kern/kern_sysctl.c Thu May 21 06:30:44 2015 (r283171) +++ stable/9/sys/kern/kern_sysctl.c Thu May 21 06:34:06 2015 (r283172) @@ -142,6 +142,8 @@ sysctl_register_oid(struct sysctl_oid *o struct sysctl_oid_list *parent = oidp-oid_parent; struct sysctl_oid *p; struct sysctl_oid *q; + int oid_number; + int timeout = 2; /* * First check if another oid with the same name already @@ -158,37 +160,66 @@ sysctl_register_oid(struct sysctl_oid *o return; } } + /* get current OID number */ + oid_number = oidp-oid_number; + +#if (OID_AUTO = 0) +#error OID_AUTO is expected to be a negative value +#endif /* -* If this oid has a number OID_AUTO, give it a number which -* is greater than any current oid. +* Any negative OID number qualifies as OID_AUTO. Valid OID +* numbers should always be positive. +* * NOTE: DO NOT change the starting value here, change it in * sys/sysctl.h, and make sure it is at least 256 to * accomodate e.g. net.inet.raw as a static sysctl node. */ - if (oidp-oid_number == OID_AUTO) { - static int newoid = CTL_AUTO_START; + if (oid_number 0) { + static int newoid; + + /* +* By decrementing the next OID number we spend less +* time inserting the OIDs into a sorted list. +*/ + if (--newoid CTL_AUTO_START) + newoid = 0x7fff; - oidp-oid_number = newoid++; - if (newoid == 0x7fff) - panic(out of oids); - } -#if 0 - else if (oidp-oid_number = CTL_AUTO_START) { - /* do not panic; this happens when unregistering sysctl sets */ - printf(static sysctl oid too high: %d, oidp-oid_number); + oid_number = newoid; } -#endif /* -* Insert the oid into the parent's list in order. +* Insert the OID into the parent's list sorted by OID number. */ +retry: q = NULL; SLIST_FOREACH(p, parent, oid_link) { - if (oidp-oid_number p-oid_number) + /* check if the current OID number is in use */ + if (oid_number == p-oid_number) { + /* get the next valid OID number */ + if (oid_number CTL_AUTO_START || + oid_number == 0x7fff) { + /* wraparound - restart */ + oid_number = CTL_AUTO_START; + /* don't loop forever */ + if (!timeout--) + panic(sysctl: Out of OID numbers\n); + goto retry; + } else { + oid_number++; + } + } else if (oid_number p-oid_number) break; q = p; } - if (q) + /* check for non-auto OID number collision */ + if (oidp-oid_number = 0 oidp-oid_number CTL_AUTO_START + oid_number = CTL_AUTO_START) { + printf(sysctl: OID number(%d) is already in use for '%s'\n, + oidp-oid_number, oidp-oid_name); + } + /* update the OID number, if any */ + oidp-oid_number = oid_number; + if (q != NULL) SLIST_INSERT_AFTER(q, oidp, oid_link); else SLIST_INSERT_HEAD(parent, oidp, oid_link); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r283166 - vendor/atf/dist/atf-sh
On Wed, May 20, 2015 at 10:11 PM, Garrett Cooper yaneurab...@gmail.com wrote: Craig, et al, Thank you. I’m sorry it took me so long to get to this — especially because it . I’ll try to do better next time. Now all that remains is fixing the port (which is where the bulk majority of the errors come from in the first place, not the test in the base system :(..!!!). Thanks, -NGie Thanks, unfortunately since you have been the main person in terms of importing more ATF tests into the FreeBSD tree from various sources like NetBSD and getting them to work, we depend on you. Have you managed to get any of your colleagues at your current job, or any other open source developers interested in ATF and FreeBSD tests, so that we can pull in more people and distribute the load? In the place that I am currently working in, I completely failed in my attempts to be a proponent for ATF and kyua and attract new developers. :( The documentation and examples for ATF/kyua were not as good as for other frameworks like CUnit and pytest, so that was the main blocker for me. Also, every person who talked to me couldn't figure out how to pronounce kyua. So I had to give up and move on. :( -- Craig ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283173 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/quirk
Author: hselasky Date: Thu May 21 06:47:20 2015 New Revision: 283173 URL: https://svnweb.freebsd.org/changeset/base/283173 Log: MFC r282577: Add support for DYMO LabelWriter PnP. Modified: stable/10/share/man/man4/usb_quirk.4 stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/quirk/usb_quirk.h stable/10/sys/dev/usb/usb_device.c stable/10/sys/dev/usb/usb_msctest.c stable/10/sys/dev/usb/usb_msctest.h stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/usb_quirk.4 == --- stable/10/share/man/man4/usb_quirk.4Thu May 21 06:34:06 2015 (r283172) +++ stable/10/share/man/man4/usb_quirk.4Thu May 21 06:47:20 2015 (r283173) @@ -16,7 +16,7 @@ .\ .\ $FreeBSD$ .\ -.Dd April 21, 2013 +.Dd May 7, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -170,6 +170,9 @@ ejects after Huawei SCSI command .It UQ_MSC_EJECT_TCT ejects after TCT SCSI command .Dv 0x06f504025270 +.It UQ_MSC_DYMO_EJECT +ejects after HID command +.Dv 0x1b5a01 .El .Pp See Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c == --- stable/10/sys/dev/usb/quirk/usb_quirk.c Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Thu May 21 06:47:20 2015 (r283173) @@ -523,6 +523,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(FEIYA, DUMMY, 0x, 0x, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x, 0x, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x, 0x, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), + + /* DYMO LabelManager Pnp */ + USB_QUIRK(DYMO, LABELMANAGERPNP, 0x, 0x, UQ_MSC_DYMO_EJECT), }; #undef USB_QUIRK_VP #undef USB_QUIRK @@ -592,6 +595,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_BAD_MIDI] = UQ_BAD_MIDI, [UQ_AU_VENDOR_CLASS]= UQ_AU_VENDOR_CLASS, [UQ_SINGLE_CMD_MIDI]= UQ_SINGLE_CMD_MIDI, + [UQ_MSC_DYMO_EJECT] = UQ_MSC_DYMO_EJECT, }; /** Modified: stable/10/sys/dev/usb/quirk/usb_quirk.h == --- stable/10/sys/dev/usb/quirk/usb_quirk.h Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/quirk/usb_quirk.h Thu May 21 06:47:20 2015 (r283173) @@ -108,6 +108,7 @@ enum { UQ_BAD_MIDI,/* device claims MIDI class, but isn't */ UQ_AU_VENDOR_CLASS, /* audio device uses vendor and not audio class */ UQ_SINGLE_CMD_MIDI, /* at most one command per USB packet */ + UQ_MSC_DYMO_EJECT, /* ejects Dymo MSC device */ USB_QUIRK_MAX }; Modified: stable/10/sys/dev/usb/usb_device.c == --- stable/10/sys/dev/usb/usb_device.c Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/usb_device.c Thu May 21 06:47:20 2015 (r283173) @@ -1346,6 +1346,12 @@ usb_probe_and_attach(struct usb_device * */ if (iface_index == USB_IFACE_INDEX_ANY) { + if (usb_test_quirk(uaa, UQ_MSC_DYMO_EJECT) != 0 + usb_dymo_eject(udev, 0) == 0) { + /* success, mark the udev as disappearing */ + uaa.dev_state = UAA_DEV_EJECTING; + } + EVENTHANDLER_INVOKE(usb_dev_configured, udev, uaa); if (uaa.dev_state != UAA_DEV_READY) { Modified: stable/10/sys/dev/usb/usb_msctest.c == --- stable/10/sys/dev/usb/usb_msctest.c Thu May 21 06:34:06 2015 (r283172) +++ stable/10/sys/dev/usb/usb_msctest.c Thu May 21 06:47:20 2015 (r283173) @@ -177,6 +177,7 @@ static usb_callback_t bbb_data_rd_cs_cal static usb_callback_t bbb_data_write_callback; static usb_callback_t bbb_data_wr_cs_callback; static usb_callback_t bbb_status_callback; +static usb_callback_t bbb_raw_write_callback; static voidbbb_done(struct bbb_transfer *, int); static voidbbb_transfer_start(struct bbb_transfer *, uint8_t); @@ -184,7 +185,7 @@ static void bbb_data_clear_stall_callbac uint8_t); static int bbb_command_start(struct bbb_transfer *, uint8_t, uint8_t, void *, size_t, void *, size_t, usb_timeout_t); -static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t); +static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t, uint8_t); static voidbbb_detach(struct bbb_transfer *); static const struct usb_config bbb_config[ST_MAX] = { @@ -247,6 +248,19 @@ static const
svn commit: r283185 - stable/10/sys/dev/sound/usb
Author: hselasky Date: Thu May 21 07:10:49 2015 New Revision: 283185 URL: https://svnweb.freebsd.org/changeset/base/283185 Log: MFC r282652: Ensure the USB audio driver doesn't attach twice on the same USB device by grabbing all the USB audio device interfaces. Modified: stable/10/sys/dev/sound/usb/uaudio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c == --- stable/10/sys/dev/sound/usb/uaudio.cThu May 21 07:09:19 2015 (r283184) +++ stable/10/sys/dev/sound/usb/uaudio.cThu May 21 07:10:49 2015 (r283185) @@ -1574,6 +1574,19 @@ uaudio_chan_fill_info_sub(struct uaudio_ asf1d.v1 = NULL; ed1 = NULL; sed.v1 = NULL; + + /* +* There can only be one USB audio instance +* per USB device. Grab all USB audio +* interfaces on this USB device so that we +* don't attach USB audio twice: +*/ + if (alt_index == 0 curidx != sc-sc_mixer_iface_index + (id-bInterfaceClass == UICLASS_AUDIO || audio_if != 0 || + midi_if != 0)) { + usbd_set_parent_iface(sc-sc_udev, curidx, + sc-sc_mixer_iface_index); + } } if (audio_if == 0) { @@ -1809,9 +1822,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt-iface_index = curidx; chan_alt-iface_alt_index = alt_index; - usbd_set_parent_iface(sc-sc_udev, curidx, - sc-sc_mixer_iface_index); - if (ep_dir == UE_DIR_IN) chan_alt-usb_cfg = uaudio_cfg_record; else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283174 - in stable/9: share/man/man4 sys/dev/usb sys/dev/usb/quirk
Author: hselasky Date: Thu May 21 06:53:55 2015 New Revision: 283174 URL: https://svnweb.freebsd.org/changeset/base/283174 Log: MFC r282577: Add support for DYMO LabelWriter PnP. Modified: stable/9/share/man/man4/usb_quirk.4 stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/quirk/usb_quirk.h stable/9/sys/dev/usb/usb_device.c stable/9/sys/dev/usb/usb_msctest.c stable/9/sys/dev/usb/usb_msctest.h stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/usb_quirk.4 == --- stable/9/share/man/man4/usb_quirk.4 Thu May 21 06:47:20 2015 (r283173) +++ stable/9/share/man/man4/usb_quirk.4 Thu May 21 06:53:55 2015 (r283174) @@ -16,7 +16,7 @@ .\ .\ $FreeBSD$ .\ -.Dd February 8, 2012 +.Dd May 7, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -170,6 +170,9 @@ ejects after Huawei SCSI command .It UQ_MSC_EJECT_TCT ejects after TCT SCSI command .Dv 0x06f504025270 +.It UQ_MSC_DYMO_EJECT +ejects after HID command +.Dv 0x1b5a01 .El .Pp See Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c == --- stable/9/sys/dev/usb/quirk/usb_quirk.c Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Thu May 21 06:53:55 2015 (r283174) @@ -522,6 +522,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(FEIYA, DUMMY, 0x, 0x, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x, 0x, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x, 0x, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), + + /* DYMO LabelManager Pnp */ + USB_QUIRK(DYMO, LABELMANAGERPNP, 0x, 0x, UQ_MSC_DYMO_EJECT), }; #undef USB_QUIRK_VP #undef USB_QUIRK @@ -592,6 +595,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_BAD_MIDI] = UQ_BAD_MIDI, [UQ_AU_VENDOR_CLASS]= UQ_AU_VENDOR_CLASS, [UQ_SINGLE_CMD_MIDI]= UQ_SINGLE_CMD_MIDI, + [UQ_MSC_DYMO_EJECT] = UQ_MSC_DYMO_EJECT, }; /** Modified: stable/9/sys/dev/usb/quirk/usb_quirk.h == --- stable/9/sys/dev/usb/quirk/usb_quirk.h Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/quirk/usb_quirk.h Thu May 21 06:53:55 2015 (r283174) @@ -109,6 +109,7 @@ enum { UQ_BAD_MIDI,/* device claims MIDI class, but isn't */ UQ_AU_VENDOR_CLASS, /* audio device uses vendor and not audio class */ UQ_SINGLE_CMD_MIDI, /* at most one command per USB packet */ + UQ_MSC_DYMO_EJECT, /* ejects Dymo MSC device */ USB_QUIRK_MAX }; Modified: stable/9/sys/dev/usb/usb_device.c == --- stable/9/sys/dev/usb/usb_device.c Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/usb_device.c Thu May 21 06:53:55 2015 (r283174) @@ -1313,6 +1313,12 @@ usb_probe_and_attach(struct usb_device * */ if (iface_index == USB_IFACE_INDEX_ANY) { + if (usb_test_quirk(uaa, UQ_MSC_DYMO_EJECT) != 0 + usb_dymo_eject(udev, 0) == 0) { + /* success, mark the udev as disappearing */ + uaa.dev_state = UAA_DEV_EJECTING; + } + EVENTHANDLER_INVOKE(usb_dev_configured, udev, uaa); if (uaa.dev_state != UAA_DEV_READY) { Modified: stable/9/sys/dev/usb/usb_msctest.c == --- stable/9/sys/dev/usb/usb_msctest.c Thu May 21 06:47:20 2015 (r283173) +++ stable/9/sys/dev/usb/usb_msctest.c Thu May 21 06:53:55 2015 (r283174) @@ -173,6 +173,7 @@ static usb_callback_t bbb_data_rd_cs_cal static usb_callback_t bbb_data_write_callback; static usb_callback_t bbb_data_wr_cs_callback; static usb_callback_t bbb_status_callback; +static usb_callback_t bbb_raw_write_callback; static voidbbb_done(struct bbb_transfer *, int); static voidbbb_transfer_start(struct bbb_transfer *, uint8_t); @@ -180,7 +181,7 @@ static void bbb_data_clear_stall_callbac uint8_t); static int bbb_command_start(struct bbb_transfer *, uint8_t, uint8_t, void *, size_t, void *, size_t, usb_timeout_t); -static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t); +static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t, uint8_t); static
svn commit: r283183 - head/sys/arm/amlogic/aml8726
Author: ganbold Date: Thu May 21 07:09:01 2015 New Revision: 283183 URL: https://svnweb.freebsd.org/changeset/base/283183 Log: Remove unnecessary break statements. Submitted by:John Wehle Modified: head/sys/arm/amlogic/aml8726/aml8726_ccm.c head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Modified: head/sys/arm/amlogic/aml8726/aml8726_ccm.c == --- head/sys/arm/amlogic/aml8726/aml8726_ccm.c Thu May 21 07:07:28 2015 (r283182) +++ head/sys/arm/amlogic/aml8726/aml8726_ccm.c Thu May 21 07:09:01 2015 (r283183) @@ -185,7 +185,6 @@ aml8726_ccm_attach(device_t dev) device_printf(dev, unsupported SoC\n); return (ENXIO); /* NOTREACHED */ - break; } if (bus_alloc_resources(dev, aml8726_ccm_spec, sc-res)) { Modified: head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c == --- head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c Thu May 21 07:07:28 2015(r283182) +++ head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c Thu May 21 07:09:01 2015(r283183) @@ -146,7 +146,6 @@ aml8726_pinctrl_attach(device_t dev) device_printf(dev, unsupported SoC\n); return (ENXIO); /* NOTREACHED */ - break; } if (bus_alloc_resources(dev, aml8726_pinctrl_spec, sc-res)) { Modified: head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c == --- head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu May 21 07:07:28 2015(r283182) +++ head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu May 21 07:09:01 2015(r283183) @@ -758,7 +758,6 @@ aml8726_sdxc_attach(device_t dev) device_printf(dev, unsupported SoC\n); return (ENXIO); /* NOTREACHED */ - break; } node = ofw_bus_get_node(dev); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283184 - stable/8/sys/dev/sound/usb
Author: hselasky Date: Thu May 21 07:09:19 2015 New Revision: 283184 URL: https://svnweb.freebsd.org/changeset/base/283184 Log: MFC r282652: Ensure the USB audio driver doesn't attach twice on the same USB device by grabbing all the USB audio device interfaces. Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c == --- stable/8/sys/dev/sound/usb/uaudio.c Thu May 21 07:09:01 2015 (r283183) +++ stable/8/sys/dev/sound/usb/uaudio.c Thu May 21 07:09:19 2015 (r283184) @@ -1574,6 +1574,19 @@ uaudio_chan_fill_info_sub(struct uaudio_ asf1d.v1 = NULL; ed1 = NULL; sed.v1 = NULL; + + /* +* There can only be one USB audio instance +* per USB device. Grab all USB audio +* interfaces on this USB device so that we +* don't attach USB audio twice: +*/ + if (alt_index == 0 curidx != sc-sc_mixer_iface_index + (id-bInterfaceClass == UICLASS_AUDIO || audio_if != 0 || + midi_if != 0)) { + usbd_set_parent_iface(sc-sc_udev, curidx, + sc-sc_mixer_iface_index); + } } if (audio_if == 0) { @@ -1809,9 +1822,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt-iface_index = curidx; chan_alt-iface_alt_index = alt_index; - usbd_set_parent_iface(sc-sc_udev, curidx, - sc-sc_mixer_iface_index); - if (ep_dir == UE_DIR_IN) chan_alt-usb_cfg = uaudio_cfg_record; else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283171 - stable/10/sys/kern
Author: hselasky Date: Thu May 21 06:30:44 2015 New Revision: 283171 URL: https://svnweb.freebsd.org/changeset/base/283171 Log: MFC r280495: Implement a simple OID number garbage collector. Given the increasing number of dynamically created and destroyed SYSCTLs during runtime it is very likely that the current new OID number limit of 0x7fff can be reached. Especially if dynamic OID creation and destruction results from automatic tests. Additional changes: - Optimize the typical use case by decrementing the next automatic OID sequence number instead of incrementing it. This saves searching time when inserting new OIDs into a fresh parent OID node. - Add simple check for duplicate non-automatic OID numbers. Modified: stable/10/sys/kern/kern_sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sysctl.c == --- stable/10/sys/kern/kern_sysctl.cThu May 21 05:06:08 2015 (r283170) +++ stable/10/sys/kern/kern_sysctl.cThu May 21 06:30:44 2015 (r283171) @@ -142,6 +142,8 @@ sysctl_register_oid(struct sysctl_oid *o struct sysctl_oid_list *parent = oidp-oid_parent; struct sysctl_oid *p; struct sysctl_oid *q; + int oid_number; + int timeout = 2; /* * First check if another oid with the same name already @@ -158,37 +160,66 @@ sysctl_register_oid(struct sysctl_oid *o return; } } + /* get current OID number */ + oid_number = oidp-oid_number; + +#if (OID_AUTO = 0) +#error OID_AUTO is expected to be a negative value +#endif /* -* If this oid has a number OID_AUTO, give it a number which -* is greater than any current oid. +* Any negative OID number qualifies as OID_AUTO. Valid OID +* numbers should always be positive. +* * NOTE: DO NOT change the starting value here, change it in * sys/sysctl.h, and make sure it is at least 256 to * accomodate e.g. net.inet.raw as a static sysctl node. */ - if (oidp-oid_number == OID_AUTO) { - static int newoid = CTL_AUTO_START; + if (oid_number 0) { + static int newoid; + + /* +* By decrementing the next OID number we spend less +* time inserting the OIDs into a sorted list. +*/ + if (--newoid CTL_AUTO_START) + newoid = 0x7fff; - oidp-oid_number = newoid++; - if (newoid == 0x7fff) - panic(out of oids); - } -#if 0 - else if (oidp-oid_number = CTL_AUTO_START) { - /* do not panic; this happens when unregistering sysctl sets */ - printf(static sysctl oid too high: %d, oidp-oid_number); + oid_number = newoid; } -#endif /* -* Insert the oid into the parent's list in order. +* Insert the OID into the parent's list sorted by OID number. */ +retry: q = NULL; SLIST_FOREACH(p, parent, oid_link) { - if (oidp-oid_number p-oid_number) + /* check if the current OID number is in use */ + if (oid_number == p-oid_number) { + /* get the next valid OID number */ + if (oid_number CTL_AUTO_START || + oid_number == 0x7fff) { + /* wraparound - restart */ + oid_number = CTL_AUTO_START; + /* don't loop forever */ + if (!timeout--) + panic(sysctl: Out of OID numbers\n); + goto retry; + } else { + oid_number++; + } + } else if (oid_number p-oid_number) break; q = p; } - if (q) + /* check for non-auto OID number collision */ + if (oidp-oid_number = 0 oidp-oid_number CTL_AUTO_START + oid_number = CTL_AUTO_START) { + printf(sysctl: OID number(%d) is already in use for '%s'\n, + oidp-oid_number, oidp-oid_name); + } + /* update the OID number, if any */ + oidp-oid_number = oid_number; + if (q != NULL) SLIST_INSERT_AFTER(q, oidp, oid_link); else SLIST_INSERT_HEAD(parent, oidp, oid_link); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283176 - in vendor/llvm/dist: . autoconf cmake docs include/llvm/Config include/llvm/Target lib/Analysis lib/CodeGen lib/CodeGen/SelectionDAG lib/ExecutionEngine/RuntimeDyld lib/IR lib...
Author: dim Date: Thu May 21 06:57:07 2015 New Revision: 283176 URL: https://svnweb.freebsd.org/changeset/base/283176 Log: Vendor import of llvm RELEASE_361/final tag r237755 (effectively, 3.6.1 release): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_361/final@237755 Added: vendor/llvm/dist/test/Analysis/ScalarEvolution/pr22856.ll vendor/llvm/dist/test/CodeGen/AArch64/implicit-sret.ll vendor/llvm/dist/test/CodeGen/AArch64/machine-copy-prop.ll vendor/llvm/dist/test/CodeGen/AArch64/tailcall-explicit-sret.ll vendor/llvm/dist/test/CodeGen/AArch64/tailcall-implicit-sret.ll vendor/llvm/dist/test/CodeGen/Mips/adjust-callstack-sp.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-small-structures-bigger-than-32bits.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll vendor/llvm/dist/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-multiple-args.ll vendor/llvm/dist/test/CodeGen/Mips/check-adde-redundant-moves.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/add.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/and.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/ashr.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/lshr.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/or.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/sdiv.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/shl.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/srem.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/sub.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/udiv.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/urem.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/xor.ll vendor/llvm/dist/test/CodeGen/Mips/mips64signextendsesf.ll vendor/llvm/dist/test/CodeGen/Mips/mips64sinttofpsf.ll vendor/llvm/dist/test/CodeGen/Mips/no-odd-spreg-msa.ll vendor/llvm/dist/test/CodeGen/R600/extload-private.ll vendor/llvm/dist/test/CodeGen/R600/fdiv.f64.ll vendor/llvm/dist/test/CodeGen/R600/fmax3.f64.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.flbit.i32.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.fs.interp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sendmsg-m0.ll vendor/llvm/dist/test/CodeGen/R600/si-annotate-cf.ll vendor/llvm/dist/test/CodeGen/X86/and-load-fold.ll vendor/llvm/dist/test/CodeGen/X86/dag-optnone.ll vendor/llvm/dist/test/CodeGen/X86/getelementptr.ll vendor/llvm/dist/test/CodeGen/X86/lower-vec-shuffle-bug.ll vendor/llvm/dist/test/CodeGen/X86/pr22774.ll vendor/llvm/dist/test/CodeGen/X86/scheduler-backtracking.ll vendor/llvm/dist/test/CodeGen/X86/setcc-combine.ll vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-xfail-mips32r6.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/valid-mips64-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/valid-mips64-xfail.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64/valid-mips64.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/valid-mips64r2-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/valid-mips64r2.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r2/valid-xfail-mips64r2.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-xfail-mips64r6.txt (contents, props changed) vendor/llvm/dist/test/Transforms/ConstProp/shift.ll vendor/llvm/dist/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcda (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/test_exit_block_arcs.gcno (contents, props changed) Deleted: vendor/llvm/dist/test/CodeGen/R600/fdiv64.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.fs.interp.constant.ll vendor/llvm/dist/test/CodeGen/X86/fastmath-optnone.ll Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/Target/TargetCallingConv.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h
svn commit: r283175 - stable/10/sys/ofed/drivers/net/mlx4
Author: hselasky Date: Thu May 21 06:56:35 2015 New Revision: 283175 URL: https://svnweb.freebsd.org/changeset/base/283175 Log: MFC r282817: Apply proper locking when iterating the multicast addresses and add a missing check for NULL from a non-blocking kzalloc() function call. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c == --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Thu May 21 06:53:55 2015(r283174) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Thu May 21 06:56:35 2015(r283175) @@ -650,6 +650,7 @@ static void mlx4_en_cache_mclist(struct struct mlx4_en_mc_list *tmp; struct mlx4_en_priv *priv = netdev_priv(dev); +if_maddr_rlock(dev); TAILQ_FOREACH(ifma, dev-if_multiaddrs, ifma_link) { if (ifma-ifma_addr-sa_family != AF_LINK) continue; @@ -658,10 +659,13 @@ static void mlx4_en_cache_mclist(struct continue; /* Make sure the list didn't grow. */ tmp = kzalloc(sizeof(struct mlx4_en_mc_list), GFP_ATOMIC); + if (tmp == NULL) + break; memcpy(tmp-addr, LLADDR((struct sockaddr_dl *)ifma-ifma_addr), ETH_ALEN); list_add_tail(tmp-list, priv-mc_list); } +if_maddr_runlock(dev); } static void update_mclist_flags(struct mlx4_en_priv *priv, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283187 - stable/10/sys/dev/vt
Author: hselasky Date: Thu May 21 07:34:08 2015 New Revision: 283187 URL: https://svnweb.freebsd.org/changeset/base/283187 Log: MFC r282645, r282646 and r282730: * Prevent switching to NULL or own window in the vt_proc_window_switch function. This fixes an issue where X11 keyboard input can appear stuck. The cause of the problem is a duplicate TTY device window switch IOCTL during boot, which leaves the vt_switch_timer running, because the current window is already selected. While at it factor out some NULL checks. * The SYSCTL_INT() default value is only used for read only SYSCTLs and is not applicable unless the integer pointer is NULL. Set it to zero to avoid confusion. While at it remove extra semicolon at the end of the VT_SYSCTL_INT() macro. * Ensure the result from signed subtraction under modulus does not become negative. PR: 200032 Modified: stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h == --- stable/10/sys/dev/vt/vt.h Thu May 21 07:23:50 2015(r283186) +++ stable/10/sys/dev/vt/vt.h Thu May 21 07:34:08 2015(r283187) @@ -83,10 +83,10 @@ #defineISSIGVALID(sig) ((sig) 0 (sig) NSIG) #defineVT_SYSCTL_INT(_name, _default, _descr) \ -static int vt_##_name = _default; \ -SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RW, vt_##_name, _default,\ +static int vt_##_name = (_default);\ +SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RWTUN, vt_##_name, 0, \ _descr);\ -TUNABLE_INT(kern.vt. #_name, vt_##_name); +TUNABLE_INT(kern.vt. #_name, vt_##_name) struct vt_driver; Modified: stable/10/sys/dev/vt/vt_core.c == --- stable/10/sys/dev/vt/vt_core.c Thu May 21 07:23:50 2015 (r283186) +++ stable/10/sys/dev/vt/vt_core.c Thu May 21 07:34:08 2015 (r283187) @@ -448,12 +448,35 @@ vt_proc_window_switch(struct vt_window * struct vt_device *vd; int ret; + /* Prevent switching to NULL */ + if (vw == NULL) { + DPRINTF(30, %s: Cannot switch: vw is NULL., __func__); + return (EINVAL); + } vd = vw-vw_device; curvw = vd-vd_curwindow; + /* Check if virtual terminal is locked */ if (curvw-vw_flags VWF_VTYLOCK) return (EBUSY); + /* Check if switch already in progress */ + if (curvw-vw_flags VWF_SWWAIT_REL) { + /* Check if switching to same window */ + if (curvw-vw_switch_to == vw) { + DPRINTF(30, %s: Switch in progress to same vw., __func__); + return (0); /* success */ + } + DPRINTF(30, %s: Switch in progress to different vw., __func__); + return (EBUSY); + } + + /* Avoid switching to already selected window */ + if (vw == curvw) { + DPRINTF(30, %s: Cannot switch: vw == curvw., __func__); + return (0); /* success */ + } + /* Ask current process permission to switch away. */ if (curvw-vw_smode.mode == VT_PROCESS) { DPRINTF(30, %s: VT_PROCESS , __func__); @@ -661,8 +684,7 @@ vt_scrollmode_kbdevent(struct vt_window if (console == 0) { if (c = F_SCR c = MIN(L_SCR, F_SCR + VT_MAXWINDOWS - 1)) { vw = vd-vd_windows[c - F_SCR]; - if (vw != NULL) - vt_proc_window_switch(vw); + vt_proc_window_switch(vw); return; } VT_LOCK(vd); @@ -747,8 +769,7 @@ vt_processkey(keyboard_t *kbd, struct vt if (c = F_SCR c = MIN(L_SCR, F_SCR + VT_MAXWINDOWS - 1)) { vw = vd-vd_windows[c - F_SCR]; - if (vw != NULL) - vt_proc_window_switch(vw); + vt_proc_window_switch(vw); return (0); } @@ -757,15 +778,13 @@ vt_processkey(keyboard_t *kbd, struct vt /* Switch to next VT. */ c = (vw-vw_number + 1) % VT_MAXWINDOWS; vw = vd-vd_windows[c]; - if (vw != NULL) - vt_proc_window_switch(vw); + vt_proc_window_switch(vw); return (0); case PREV: /* Switch to previous VT. */ - c = (vw-vw_number - 1) % VT_MAXWINDOWS; +
svn commit: r283203 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 08:59:03 2015 New Revision: 283203 URL: https://svnweb.freebsd.org/changeset/base/283203 Log: MFC: r282899 sfxge: add local variable with Rx descriptor flags Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 08:55:06 2015 (r283202) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 08:59:03 2015 (r283203) @@ -322,16 +322,17 @@ static void sfxge_rx_deliver(struct sfxge_softc *sc, struct sfxge_rx_sw_desc *rx_desc) { struct mbuf *m = rx_desc-mbuf; + int flags = rx_desc-flags; int csum_flags; /* Convert checksum flags */ - csum_flags = (rx_desc-flags EFX_CKSUM_IPV4) ? + csum_flags = (flags EFX_CKSUM_IPV4) ? (CSUM_IP_CHECKED | CSUM_IP_VALID) : 0; - if (rx_desc-flags EFX_CKSUM_TCPUDP) + if (flags EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; /* The hash covers a 4-tuple for TCP only */ - if (rx_desc-flags EFX_PKT_TCP) { + if (flags EFX_PKT_TCP) { m-m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283205 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:03:18 2015 New Revision: 283205 URL: https://svnweb.freebsd.org/changeset/base/283205 Log: MFC: r282903 sfxge: advertise IPv6 Rx and Tx checksum offload support Tx checksum offload may be enabled/disabled. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:00:45 2015 (r283204) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:03:18 2015 (r283205) @@ -60,10 +60,12 @@ __FBSDID($FreeBSD$); #defineSFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO |\ + IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \ IFCAP_JUMBO_MTU | IFCAP_LRO |\ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #defineSFXGE_CAP_ENABLE SFXGE_CAP #defineSFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ +IFCAP_RXCSUM_IPV6 |\ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, sfxge, Solarflare 10GigE driver); @@ -275,6 +277,10 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp-if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP); else ifp-if_hwassist = ~(CSUM_IP | CSUM_TCP | CSUM_UDP); + if (ifp-if_capenable IFCAP_TXCSUM_IPV6) + ifp-if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); + else + ifp-if_hwassist = ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); if (ifp-if_capenable IFCAP_TSO) ifp-if_hwassist |= CSUM_TSO; else @@ -325,7 +331,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp-if_capabilities = SFXGE_CAP; ifp-if_capenable = SFXGE_CAP_ENABLE; - ifp-if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; + ifp-if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | + CSUM_TCP_IPV6 | CSUM_UDP_IPV6; ether_ifattach(ifp, encp-enc_mac_addr); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:00:45 2015 (r283204) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:03:18 2015 (r283205) @@ -699,7 +699,8 @@ sfxge_if_transmit(struct ifnet *ifp, str (interface not up)); /* Pick the desired transmit queue. */ - if (m-m_pkthdr.csum_flags (CSUM_DELAY_DATA | CSUM_TSO)) { + if (m-m_pkthdr.csum_flags + (CSUM_DELAY_DATA | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_TSO)) { int index = 0; /* check if flowid is set */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283208 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:08:10 2015 New Revision: 283208 URL: https://svnweb.freebsd.org/changeset/base/283208 Log: MFC: r282942 sfxge: split sfxge_tx_qdpl_put() into *_locked() and *_unlocked() It simplifies understanding of the sfxge_tx_packet_add() logic and avoids passing of 'locked' to called function. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:06:41 2015 (r283207) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:08:10 2015 (r283208) @@ -521,18 +521,10 @@ sfxge_tx_qdpl_service(struct sfxge_txq * } /* - * Put a packet on the deferred packet list. - * - * If we are called with the txq lock held, we put the packet on the get - * list, otherwise we atomically push it on the put list. The swizzle - * function takes care of ordering. - * - * The length of the put list is bounded by SFXGE_TX_MAX_DEFERRED. We - * overload the csum_data field in the mbuf to keep track of this length - * because there is no cheap alternative to avoid races. + * Put a packet on the deferred packet get-list. */ static int -sfxge_tx_qdpl_put(struct sfxge_txq *txq, struct mbuf *mbuf, int locked) +sfxge_tx_qdpl_put_locked(struct sfxge_txq *txq, struct mbuf *mbuf) { struct sfxge_tx_dpl *stdp; @@ -540,52 +532,66 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, KASSERT(mbuf-m_nextpkt == NULL, (mbuf-m_nextpkt != NULL)); - if (locked) { - SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); - - sfxge_tx_qdpl_swizzle(txq); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); - if (stdp-std_get_count = stdp-std_get_max) { - txq-get_overflow++; + if (stdp-std_get_count = stdp-std_get_max) { + txq-get_overflow++; + return (ENOBUFS); + } + if (sfxge_is_mbuf_non_tcp(mbuf)) { + if (stdp-std_get_non_tcp_count = + stdp-std_get_non_tcp_max) { + txq-get_non_tcp_overflow++; return (ENOBUFS); } - if (sfxge_is_mbuf_non_tcp(mbuf)) { - if (stdp-std_get_non_tcp_count = - stdp-std_get_non_tcp_max) { - txq-get_non_tcp_overflow++; - return (ENOBUFS); - } - stdp-std_get_non_tcp_count++; - } - - *(stdp-std_getp) = mbuf; - stdp-std_getp = mbuf-m_nextpkt; - stdp-std_get_count++; - } else { - volatile uintptr_t *putp; - uintptr_t old; - uintptr_t new; - unsigned old_len; - - putp = stdp-std_put; - new = (uintptr_t)mbuf; - - do { - old = *putp; - if (old != 0) { - struct mbuf *mp = (struct mbuf *)old; - old_len = mp-m_pkthdr.csum_data; - } else - old_len = 0; - if (old_len = stdp-std_put_max) { - atomic_add_long(txq-put_overflow, 1); - return (ENOBUFS); - } - mbuf-m_pkthdr.csum_data = old_len + 1; - mbuf-m_nextpkt = (void *)old; - } while (atomic_cmpset_ptr(putp, old, new) == 0); + stdp-std_get_non_tcp_count++; } + *(stdp-std_getp) = mbuf; + stdp-std_getp = mbuf-m_nextpkt; + stdp-std_get_count++; + + return (0); +} + +/* + * Put a packet on the deferred packet put-list. + * + * We overload the csum_data field in the mbuf to keep track of this length + * because there is no cheap alternative to avoid races. + */ +static int +sfxge_tx_qdpl_put_unlocked(struct sfxge_txq *txq, struct mbuf *mbuf) +{ + struct sfxge_tx_dpl *stdp; + volatile uintptr_t *putp; + uintptr_t old; + uintptr_t new; + unsigned old_len; + + KASSERT(mbuf-m_nextpkt == NULL, (mbuf-m_nextpkt != NULL)); + + SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); + + stdp = txq-dpl; + putp = stdp-std_put; + new = (uintptr_t)mbuf; + + do { + old = *putp; + if (old != 0) { + struct mbuf *mp = (struct mbuf *)old; + old_len = mp-m_pkthdr.csum_data; + } else + old_len = 0; + if (old_len = stdp-std_put_max) { + atomic_add_long(txq-put_overflow, 1); +
svn commit: r283210 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:11:03 2015 New Revision: 283210 URL: https://svnweb.freebsd.org/changeset/base/283210 Log: MFC: r282997 sfxge: get rid of locked variable in sfxge_tx_packet_add() Now each branch has one and only one possible TxQ lock state. It simplifies understanding of the code. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:09:51 2015 (r283209) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:11:03 2015 (r283210) @@ -602,7 +602,6 @@ sfxge_tx_qdpl_put_unlocked(struct sfxge_ int sfxge_tx_packet_add(struct sfxge_txq *txq, struct mbuf *m) { - int locked; int rc; if (!SFXGE_LINK_UP(txq-sc)) { @@ -616,9 +615,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * the packet will be appended to the get list of the deferred * packet list. Otherwise, it will be pushed on the put list. */ - locked = SFXGE_TXQ_TRYLOCK(txq); - - if (locked) { + if (SFXGE_TXQ_TRYLOCK(txq)) { /* First swizzle put-list to get-list to keep order */ sfxge_tx_qdpl_swizzle(txq); @@ -627,6 +624,10 @@ sfxge_tx_packet_add(struct sfxge_txq *tx SFXGE_TXQ_UNLOCK(txq); goto fail; } + + /* Try to service the list. */ + sfxge_tx_qdpl_service(txq); + /* Lock has been dropped. */ } else { rc = sfxge_tx_qdpl_put_unlocked(txq, m); if (rc != 0) @@ -639,14 +640,13 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * the deferred packet list. If we are not able to get * the lock, another thread is processing the list. */ - locked = SFXGE_TXQ_TRYLOCK(txq); + if (SFXGE_TXQ_TRYLOCK(txq)) { + sfxge_tx_qdpl_service(txq); + /* Lock has been dropped. */ + } } - if (locked) { - /* Try to service the list. */ - sfxge_tx_qdpl_service(txq); - /* Lock has been dropped. */ - } + SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); return (0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283212 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:13:47 2015 New Revision: 283212 URL: https://svnweb.freebsd.org/changeset/base/283212 Log: MFC: r283000 sfxge: add local variable with changed capabilities mask It is required for the next patch which adds dependency of TSO capabilities from Tx checksum offloads. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:12:25 2015 (r283211) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:13:47 2015 (r283212) @@ -257,26 +257,36 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign sfxge_mac_filter_set(sc); break; case SIOCSIFCAP: + { + int reqcap = ifr-ifr_reqcap; + int capchg_mask; + SFXGE_ADAPTER_LOCK(sc); + /* Capabilities to be changed in accordance with request */ + capchg_mask = ifp-if_capenable ^ reqcap; + /* * The networking core already rejects attempts to * enable capabilities we don't have. We still have * to reject attempts to disable capabilities that we * can't (yet) disable. */ - if (~ifr-ifr_reqcap SFXGE_CAP_FIXED) { + KASSERT((reqcap ~ifp-if_capabilities) == 0, + (Unsupported capabilities %x requested %x vs %x, +reqcap ~ifp-if_capabilities, +reqcap , ifp-if_capabilities)); + if (capchg_mask SFXGE_CAP_FIXED) { error = EINVAL; SFXGE_ADAPTER_UNLOCK(sc); break; } - ifp-if_capenable = ifr-ifr_reqcap; - if (ifp-if_capenable IFCAP_TXCSUM) + if (reqcap IFCAP_TXCSUM) ifp-if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP); else ifp-if_hwassist = ~(CSUM_IP | CSUM_TCP | CSUM_UDP); - if (ifp-if_capenable IFCAP_TXCSUM_IPV6) + if (reqcap IFCAP_TXCSUM_IPV6) ifp-if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); else ifp-if_hwassist = ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); @@ -289,8 +299,11 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign * but both bits are set in IPv4 and IPv6 mbufs. */ + ifp-if_capenable = reqcap; + SFXGE_ADAPTER_UNLOCK(sc); break; + } case SIOCSIFMEDIA: case SIOCGIFMEDIA: error = ifmedia_ioctl(ifp, ifr, sc-media, command); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283215 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:22:15 2015 New Revision: 283215 URL: https://svnweb.freebsd.org/changeset/base/283215 Log: MFC: r283049 sfxge: allow to disable checksum offloads over VLAN It just affects capabilities of the created VLAN interface. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:21:05 2015 (r283214) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:22:15 2015 (r283215) @@ -64,7 +64,7 @@ __FBSDID($FreeBSD$); IFCAP_JUMBO_MTU | IFCAP_LRO |\ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #defineSFXGE_CAP_ENABLE SFXGE_CAP -#defineSFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ +#defineSFXGE_CAP_FIXED (IFCAP_VLAN_MTU | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, sfxge, Solarflare 10GigE driver); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283217 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:24:35 2015 New Revision: 283217 URL: https://svnweb.freebsd.org/changeset/base/283217 Log: MFC: r283051 sfxge: do not advertise LRO capability if LRO is compiled out Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:23:28 2015 (r283216) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:24:35 2015 (r283217) @@ -62,7 +62,7 @@ __FBSDID($FreeBSD$); IFCAP_RXCSUM | IFCAP_TXCSUM |\ IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \ IFCAP_TSO4 | IFCAP_TSO6 |\ - IFCAP_JUMBO_MTU | IFCAP_LRO |\ + IFCAP_JUMBO_MTU |\ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #defineSFXGE_CAP_ENABLE SFXGE_CAP #defineSFXGE_CAP_FIXED (IFCAP_VLAN_MTU | \ @@ -88,7 +88,6 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, sfxge_tx_ring_entries, 0, Maximum number of descriptors in a transmit ring); - static void sfxge_reset(void *arg, int npending); @@ -376,6 +375,12 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp-if_capabilities = SFXGE_CAP; ifp-if_capenable = SFXGE_CAP_ENABLE; + +#ifdef SFXGE_LRO + ifp-if_capabilities |= IFCAP_LRO; + ifp-if_capenable |= IFCAP_LRO; +#endif + ifp-if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_TCP_IPV6 | CSUM_UDP_IPV6; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283202 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 08:55:06 2015 New Revision: 283202 URL: https://svnweb.freebsd.org/changeset/base/283202 Log: MFC: r282897 sfxge: add missing const qualifier to sfxge_link_mode Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c == --- stable/10/sys/dev/sfxge/sfxge_port.cThu May 21 08:38:25 2015 (r283201) +++ stable/10/sys/dev/sfxge/sfxge_port.cThu May 21 08:55:06 2015 (r283202) @@ -624,7 +624,7 @@ fail: return (rc); } -static int sfxge_link_mode[EFX_PHY_MEDIA_NTYPES][EFX_LINK_NMODES] = { +static const int sfxge_link_mode[EFX_PHY_MEDIA_NTYPES][EFX_LINK_NMODES] = { [EFX_PHY_MEDIA_CX4] = { [EFX_LINK_1FDX] = IFM_ETHER | IFM_FDX | IFM_10G_CX4, }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283204 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:00:45 2015 New Revision: 283204 URL: https://svnweb.freebsd.org/changeset/base/283204 Log: MFC: r282900 sfxge: IPv4 Tx checksum offload may be disabled in fact Split IFCAP_HWCSUM to IFCAP_RXCSUM and IFCAP_TXCSUM to highlight Tx and Rx. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 08:59:03 2015 (r283203) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:00:45 2015 (r283204) @@ -58,12 +58,12 @@ __FBSDID($FreeBSD$); #include sfxge_rx.h #include sfxge_version.h -#defineSFXGE_CAP (IFCAP_VLAN_MTU | \ - IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ +#defineSFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ + IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO |\ IFCAP_JUMBO_MTU | IFCAP_LRO |\ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #defineSFXGE_CAP_ENABLE SFXGE_CAP -#defineSFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \ +#defineSFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, sfxge, Solarflare 10GigE driver); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283207 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:06:41 2015 New Revision: 283207 URL: https://svnweb.freebsd.org/changeset/base/283207 Log: MFC: r282941 sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed It is simply not required since the kernel checks corresponding IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads. Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits are set in IPv4 and IPv6 mbufs. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:05:13 2015 (r283206) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:06:41 2015 (r283207) @@ -281,10 +281,14 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp-if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); else ifp-if_hwassist = ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); - if (ifp-if_capenable IFCAP_TSO) - ifp-if_hwassist |= CSUM_TSO; - else - ifp-if_hwassist = ~CSUM_TSO; + + /* +* The kernel takes both IFCAP_TSOx and CSUM_TSO into +* account before using TSO. So, we do not touch +* checksum flags when IFCAP_TSOx is modified. +* Note that CSUM_TSO is (CSUM_IP_TSO|CSUM_IP6_TSO), +* but both bits are set in IPv4 and IPv6 mbufs. +*/ SFXGE_ADAPTER_UNLOCK(sc); break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283206 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:05:13 2015 New Revision: 283206 URL: https://svnweb.freebsd.org/changeset/base/283206 Log: MFC: r282940 sfxge: LRO may be done only if checksums are OK Also it is cheaper to check Rx descriptor flags than TCP protocol in IP header. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 09:03:18 2015 (r283205) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 09:05:13 2015 (r283206) @@ -681,15 +681,18 @@ sfxge_lro(struct sfxge_rxq *rxq, struct */ if (l3_proto == htons(ETHERTYPE_IP)) { struct ip *iph = nh; - if ((iph-ip_p - IPPROTO_TCP) | - (iph-ip_hl - (sizeof(*iph) 2u)) | + + KASSERT(iph-ip_p == IPPROTO_TCP, + (IPv4 protocol is not TCP, but packet marker is set)); + if ((iph-ip_hl - (sizeof(*iph) 2u)) | (iph-ip_off htons(IP_MF | IP_OFFMASK))) goto deliver_now; th = (struct tcphdr *)(iph + 1); } else if (l3_proto == htons(ETHERTYPE_IPV6)) { struct ip6_hdr *iph = nh; - if (iph-ip6_nxt != IPPROTO_TCP) - goto deliver_now; + + KASSERT(iph-ip6_nxt == IPPROTO_TCP, + (IPv6 next header is not TCP, but packet marker is set)); l2_id |= SFXGE_LRO_L2_ID_IPV6; th = (struct tcphdr *)(iph + 1); } else { @@ -834,7 +837,9 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq /* Pass packet up the stack or into LRO (pipelined) */ if (prev != NULL) { - if (lro_enabled) + if (lro_enabled + ((prev-flags (EFX_PKT_TCP | EFX_CKSUM_TCPUDP)) == +(EFX_PKT_TCP | EFX_CKSUM_TCPUDP))) sfxge_lro(rxq, prev); else sfxge_rx_deliver(sc, prev); @@ -853,7 +858,9 @@ discard: /* Pass last packet up the stack or into LRO */ if (prev != NULL) { - if (lro_enabled) + if (lro_enabled + ((prev-flags (EFX_PKT_TCP | EFX_CKSUM_TCPUDP)) == +(EFX_PKT_TCP | EFX_CKSUM_TCPUDP))) sfxge_lro(rxq, prev); else sfxge_rx_deliver(sc, prev); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283209 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:09:51 2015 New Revision: 283209 URL: https://svnweb.freebsd.org/changeset/base/283209 Log: MFC: r282996 sfxge: support Rx checksum offloads disabling We can't disable it in HW, but we can ignore result. Discard Rx descriptor checksum flags if Rx checksum offload is off. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:08:10 2015 (r283208) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:09:51 2015 (r283209) @@ -64,8 +64,7 @@ __FBSDID($FreeBSD$); IFCAP_JUMBO_MTU | IFCAP_LRO |\ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #defineSFXGE_CAP_ENABLE SFXGE_CAP -#defineSFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ -IFCAP_RXCSUM_IPV6 |\ +#defineSFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, sfxge, Solarflare 10GigE driver); Modified: stable/10/sys/dev/sfxge/sfxge_rx.c == --- stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 09:08:10 2015 (r283208) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Thu May 21 09:09:51 2015 (r283209) @@ -788,7 +788,8 @@ void sfxge_rx_qcomplete(struct sfxge_rxq *rxq, boolean_t eop) { struct sfxge_softc *sc = rxq-sc; - int lro_enabled = sc-ifnet-if_capenable IFCAP_LRO; + int if_capenable = sc-ifnet-if_capenable; + int lro_enabled = if_capenable IFCAP_LRO; unsigned int index; struct sfxge_evq *evq; unsigned int completed; @@ -818,21 +819,37 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq prefetch_read_many(mtod(m, caddr_t)); - /* Check for loopback packets */ - if (!(rx_desc-flags EFX_PKT_IPV4) - !(rx_desc-flags EFX_PKT_IPV6)) { - struct ether_header *etherhp; - - /*LINTED*/ - etherhp = mtod(m, struct ether_header *); - - if (etherhp-ether_type == - htons(SFXGE_ETHERTYPE_LOOPBACK)) { - EFSYS_PROBE(loopback); - - rxq-loopback++; - goto discard; + switch (rx_desc-flags (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { + case EFX_PKT_IPV4: + if (~if_capenable IFCAP_RXCSUM) + rx_desc-flags = + ~(EFX_CKSUM_IPV4 | EFX_CKSUM_TCPUDP); + break; + case EFX_PKT_IPV6: + if (~if_capenable IFCAP_RXCSUM_IPV6) + rx_desc-flags = ~EFX_CKSUM_TCPUDP; + break; + case 0: + /* Check for loopback packets */ + { + struct ether_header *etherhp; + + /*LINTED*/ + etherhp = mtod(m, struct ether_header *); + + if (etherhp-ether_type == + htons(SFXGE_ETHERTYPE_LOOPBACK)) { + EFSYS_PROBE(loopback); + + rxq-loopback++; + goto discard; + } } + break; + default: + KASSERT(B_FALSE, + (Rx descriptor with both IPv4 and IPv6 flags)); + goto discard; } /* Pass packet up the stack or into LRO (pipelined) */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283211 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:12:25 2015 New Revision: 283211 URL: https://svnweb.freebsd.org/changeset/base/283211 Log: MFC: r282998 sfxge: move mbuf free to sfxge_if_transmit() It is a preparation to the next patch which will service packet queue even if packet addtion fails. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:11:03 2015 (r283210) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:12:25 2015 (r283211) @@ -605,9 +605,8 @@ sfxge_tx_packet_add(struct sfxge_txq *tx int rc; if (!SFXGE_LINK_UP(txq-sc)) { - rc = ENETDOWN; atomic_add_long(txq-netdown_drops, 1); - goto fail; + return (ENETDOWN); } /* @@ -622,7 +621,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx rc = sfxge_tx_qdpl_put_locked(txq, m); if (rc != 0) { SFXGE_TXQ_UNLOCK(txq); - goto fail; + return (rc); } /* Try to service the list. */ @@ -631,7 +630,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx } else { rc = sfxge_tx_qdpl_put_unlocked(txq, m); if (rc != 0) - goto fail; + return (rc); /* * Try to grab the lock again. @@ -649,10 +648,6 @@ sfxge_tx_packet_add(struct sfxge_txq *tx SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); return (0); - -fail: - m_freem(m); - return (rc); } static void @@ -730,6 +725,8 @@ sfxge_if_transmit(struct ifnet *ifp, str } rc = sfxge_tx_packet_add(txq, m); + if (rc != 0) + m_freem(m); return (rc); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283213 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:15:19 2015 New Revision: 283213 URL: https://svnweb.freebsd.org/changeset/base/283213 Log: MFC: r283007 sfxge: avoid usage of ifm_data The driver uses ifm_data to save capabilities mask calculated during initialization when supported phy modes are discovered. The patch simply calculates it when either media or options are changed. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c == --- stable/10/sys/dev/sfxge/sfxge_port.cThu May 21 09:13:47 2015 (r283212) +++ stable/10/sys/dev/sfxge/sfxge_port.cThu May 21 09:15:19 2015 (r283213) @@ -39,6 +39,8 @@ __FBSDID($FreeBSD$); #include sfxge.h +static int sfxge_phy_cap_mask(struct sfxge_softc *, int, uint32_t *); + static int sfxge_mac_stat_update(struct sfxge_softc *sc) { @@ -381,6 +383,7 @@ sfxge_port_start(struct sfxge_softc *sc) efx_nic_t *enp; size_t pdu; int rc; + uint32_t phy_cap_mask; port = sc-port; enp = sc-enp; @@ -421,10 +424,13 @@ sfxge_port_start(struct sfxge_softc *sc) if ((rc = efx_mac_drain(enp, B_FALSE)) != 0) goto fail3; - if ((rc = efx_phy_adv_cap_set(sc-enp, sc-media.ifm_cur-ifm_data)) - != 0) + if ((rc = sfxge_phy_cap_mask(sc, sc-media.ifm_cur-ifm_media, +phy_cap_mask)) != 0) goto fail4; + if ((rc = efx_phy_adv_cap_set(sc-enp, phy_cap_mask)) != 0) + goto fail5; + port-init_state = SFXGE_PORT_STARTED; /* Single poll in case there were missing initial events */ @@ -433,6 +439,7 @@ sfxge_port_start(struct sfxge_softc *sc) return (0); +fail5: fail4: (void)efx_mac_drain(enp, B_TRUE); fail3: @@ -676,12 +683,95 @@ sfxge_media_status(struct ifnet *ifp, st SFXGE_ADAPTER_UNLOCK(sc); } +static efx_phy_cap_type_t +sfxge_link_mode_to_phy_cap(efx_link_mode_t mode) +{ + switch (mode) { + case EFX_LINK_10HDX: + return (EFX_PHY_CAP_10HDX); + case EFX_LINK_10FDX: + return (EFX_PHY_CAP_10FDX); + case EFX_LINK_100HDX: + return (EFX_PHY_CAP_100HDX); + case EFX_LINK_100FDX: + return (EFX_PHY_CAP_100FDX); + case EFX_LINK_1000HDX: + return (EFX_PHY_CAP_1000HDX); + case EFX_LINK_1000FDX: + return (EFX_PHY_CAP_1000FDX); + case EFX_LINK_1FDX: + return (EFX_PHY_CAP_1FDX); + default: + EFSYS_ASSERT(B_FALSE); + return (EFX_PHY_CAP_INVALID); + } +} + +static int +sfxge_phy_cap_mask(struct sfxge_softc *sc, int ifmedia, uint32_t *phy_cap_mask) +{ + efx_phy_media_type_t medium_type; + boolean_t mode_found = B_FALSE; + uint32_t cap_mask, mode_cap_mask; + efx_link_mode_t mode; + efx_phy_cap_type_t phy_cap; + + efx_phy_media_type_get(sc-enp, medium_type); + if (medium_type = nitems(sfxge_link_mode)) { + if_printf(sc-ifnet, unexpected media type %d\n, medium_type); + return (EINVAL); + } + + efx_phy_adv_cap_get(sc-enp, EFX_PHY_CAP_PERM, cap_mask); + + for (mode = EFX_LINK_10HDX; mode EFX_LINK_NMODES; mode++) { + if (ifmedia == sfxge_link_mode[medium_type][mode]) { + mode_found = B_TRUE; + break; + } + } + + if (!mode_found) { + /* +* If media is not in the table, it must be IFM_AUTO. +*/ + KASSERT((cap_mask (1 EFX_PHY_CAP_AN)) + ifmedia == (IFM_ETHER | IFM_AUTO), + (%s: no mode for media %d, __func__, ifmedia)); + *phy_cap_mask = (cap_mask ~(1 EFX_PHY_CAP_ASYM)); + return (0); + } + + phy_cap = sfxge_link_mode_to_phy_cap(mode); + if (phy_cap == EFX_PHY_CAP_INVALID) { + if_printf(sc-ifnet, + cannot map link mode %d to phy capability\n, + mode); + return (EINVAL); + } + + mode_cap_mask = (1 phy_cap); + mode_cap_mask |= cap_mask (1 EFX_PHY_CAP_AN); +#ifdef SFXGE_HAVE_PAUSE_MEDIAOPTS + if (ifmedia IFM_ETH_RXPAUSE) + mode_cap_mask |= cap_mask (1 EFX_PHY_CAP_PAUSE); + if (!(ifmedia IFM_ETH_TXPAUSE)) + mode_cap_mask |= cap_mask (1 EFX_PHY_CAP_ASYM); +#else + mode_cap_mask |= cap_mask (1 EFX_PHY_CAP_PAUSE); +#endif + + *phy_cap_mask = mode_cap_mask; + return (0); +} + static int sfxge_media_change(struct ifnet *ifp) { struct sfxge_softc *sc; struct ifmedia_entry *ifm;
svn commit: r283214 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:21:05 2015 New Revision: 283214 URL: https://svnweb.freebsd.org/changeset/base/283214 Log: MFC: r283048 sfxge: fix overflow queue freeze If TxQ lock is obtained, deferred packet list shold be serviced even if the packet addition fails because of overflow. Without the patch freeze happens if: - queue is not blocked (i.e. completion does not trigger unblock and service) - put-list overflow (1024 entries) - sfxge_tx_packet_add() acquires TxQ lock just as it is released it in sfxge_tx_qdpl_service() on the second CPU but before pending check - sfxge_tx_packet_add() swizzles put-list to get-list, fails because of non-tcp get-list overflow and returns without packet list service - sfxge_tx_qdpl_service() on the second CPU checks that there are no pending packets in the put-list and returns Other possible solution is to guaranee that maximum length of the put-list is less than maximum length of any get-list. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:15:19 2015 (r283213) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu May 21 09:21:05 2015 (r283214) @@ -619,18 +619,12 @@ sfxge_tx_packet_add(struct sfxge_txq *tx sfxge_tx_qdpl_swizzle(txq); rc = sfxge_tx_qdpl_put_locked(txq, m); - if (rc != 0) { - SFXGE_TXQ_UNLOCK(txq); - return (rc); - } /* Try to service the list. */ sfxge_tx_qdpl_service(txq); /* Lock has been dropped. */ } else { rc = sfxge_tx_qdpl_put_unlocked(txq, m); - if (rc != 0) - return (rc); /* * Try to grab the lock again. @@ -639,7 +633,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * the deferred packet list. If we are not able to get * the lock, another thread is processing the list. */ - if (SFXGE_TXQ_TRYLOCK(txq)) { + if ((rc == 0) SFXGE_TXQ_TRYLOCK(txq)) { sfxge_tx_qdpl_service(txq); /* Lock has been dropped. */ } @@ -647,7 +641,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); - return (0); + return (rc); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283216 - stable/10/sys/dev/sfxge
Author: arybchik Date: Thu May 21 09:23:28 2015 New Revision: 283216 URL: https://svnweb.freebsd.org/changeset/base/283216 Log: MFC: r283050 sfxge: automatically turn off TSO when Tx checksum offload is disabled Also return error if TSO is requested without Tx checksum offload. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c == --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:22:15 2015 (r283215) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:23:28 2015 (r283216) @@ -59,8 +59,9 @@ __FBSDID($FreeBSD$); #include sfxge_version.h #defineSFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ - IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO |\ + IFCAP_RXCSUM | IFCAP_TXCSUM |\ IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \ + IFCAP_TSO4 | IFCAP_TSO6 |\ IFCAP_JUMBO_MTU | IFCAP_LRO |\ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #defineSFXGE_CAP_ENABLE SFXGE_CAP @@ -282,14 +283,42 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign break; } - if (reqcap IFCAP_TXCSUM) + /* Check request before any changes */ + if ((capchg_mask IFCAP_TSO4) + (reqcap (IFCAP_TSO4 | IFCAP_TXCSUM)) == IFCAP_TSO4) { + error = EAGAIN; + SFXGE_ADAPTER_UNLOCK(sc); + if_printf(ifp, enable txcsum before tso4\n); + break; + } + if ((capchg_mask IFCAP_TSO6) + (reqcap (IFCAP_TSO6 | IFCAP_TXCSUM_IPV6)) == IFCAP_TSO6) { + error = EAGAIN; + SFXGE_ADAPTER_UNLOCK(sc); + if_printf(ifp, enable txcsum6 before tso6\n); + break; + } + + if (reqcap IFCAP_TXCSUM) { ifp-if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP); - else + } else { ifp-if_hwassist = ~(CSUM_IP | CSUM_TCP | CSUM_UDP); - if (reqcap IFCAP_TXCSUM_IPV6) + if (reqcap IFCAP_TSO4) { + reqcap = ~IFCAP_TSO4; + if_printf(ifp, + tso4 disabled due to -txcsum\n); + } + } + if (reqcap IFCAP_TXCSUM_IPV6) { ifp-if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); - else + } else { ifp-if_hwassist = ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); + if (reqcap IFCAP_TSO6) { + reqcap = ~IFCAP_TSO6; + if_printf(ifp, + tso6 disabled due to -txcsum6\n); + } + } /* * The kernel takes both IFCAP_TSOx and CSUM_TSO into ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283255 - head/sys/amd64/vmm
Author: neel Date: Thu May 21 18:23:37 2015 New Revision: 283255 URL: https://svnweb.freebsd.org/changeset/base/283255 Log: Emulate the CMP r/m, reg instruction (opcode 39H). Reported and tested by: Leon Dang (ld...@nahannisys.com) MFC after:1 week Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c == --- head/sys/amd64/vmm/vmm_instruction_emul.c Thu May 21 17:40:53 2015 (r283254) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Thu May 21 18:23:37 2015 (r283255) @@ -113,6 +113,10 @@ static const struct vie_op one_byte_opco .op_byte = 0x2B, .op_type = VIE_OP_TYPE_SUB, }, + [0x39] = { + .op_byte = 0x39, + .op_type = VIE_OP_TYPE_CMP, + }, [0x3B] = { .op_byte = 0x3B, .op_type = VIE_OP_TYPE_CMP, @@ -1050,34 +1054,46 @@ emulate_cmp(void *vm, int vcpuid, uint64 mem_region_read_t memread, mem_region_write_t memwrite, void *arg) { int error, size; - uint64_t op1, op2, rflags, rflags2; + uint64_t regop, memop, op1, op2, rflags, rflags2; enum vm_reg_name reg; size = vie-opsize; switch (vie-op.op_byte) { + case 0x39: case 0x3B: /* +* 39/r CMP r/m16, r16 +* 39/r CMP r/m32, r32 +* REX.W 39/r CMP r/m64, r64 +* * 3B/r CMP r16, r/m16 * 3B/r CMP r32, r/m32 * REX.W + 3B/r CMP r64, r/m64 * -* Compare first operand (reg) with second operand (r/m) and +* Compare the first operand with the second operand and * set status flags in EFLAGS register. The comparison is * performed by subtracting the second operand from the first * operand and then setting the status flags. */ - /* Get the first operand */ + /* Get the register operand */ reg = gpr_map[vie-reg]; - error = vie_read_register(vm, vcpuid, reg, op1); + error = vie_read_register(vm, vcpuid, reg, regop); if (error) return (error); - /* Get the second operand */ - error = memread(vm, vcpuid, gpa, op2, size, arg); + /* Get the memory operand */ + error = memread(vm, vcpuid, gpa, memop, size, arg); if (error) return (error); + if (vie-op.op_byte == 0x3B) { + op1 = regop; + op2 = memop; + } else { + op1 = memop; + op2 = regop; + } rflags2 = getcc(size, op1, op2); break; case 0x80: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283254 - head/sys/sys
Author: dim Date: Thu May 21 17:40:53 2015 New Revision: 283254 URL: https://svnweb.freebsd.org/changeset/base/283254 Log: Ensure that the static structs emitted by the MODULE_DEPEND() and MODULE_VERSION() macros don't end up as .comm symbols, when all the version fields are zero. Normally, such symbols will end up in .bss, but for kernel module version objects, this can lead to garbage version numbers. Fix this by instructing the compiler to always put these structs in the .data segment instead. Reported by: delphij, ae MFC after:1 week Modified: head/sys/sys/module.h Modified: head/sys/sys/module.h == --- head/sys/sys/module.h Thu May 21 17:39:42 2015(r283253) +++ head/sys/sys/module.h Thu May 21 17:40:53 2015(r283254) @@ -107,7 +107,8 @@ struct mod_metadata { DATA_SET(modmetadata_set, _mod_metadata##uniquifier) #defineMODULE_DEPEND(module, mdepend, vmin, vpref, vmax) \ - static struct mod_depend _##module##_depend_on_##mdepend = {\ + static struct mod_depend _##module##_depend_on_##mdepend\ + __section(.data) = { \ vmin, \ vpref, \ vmax\ @@ -147,7 +148,8 @@ struct mod_metadata { DECLARE_MODULE_WITH_MAXVER(name, data, sub, order, __FreeBSD_version) #defineMODULE_VERSION(module, version) \ - static struct mod_version _##module##_version = { \ + static struct mod_version _##module##_version \ + __section(.data) = { \ version \ }; \ MODULE_METADATA(_##module##_version, MDT_VERSION, \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283256 - head/usr.sbin/bhyvectl
Author: neel Date: Thu May 21 18:29:11 2015 New Revision: 283256 URL: https://svnweb.freebsd.org/changeset/base/283256 Log: Add an option --get-vmcs-exit-inst-length to display the instruction length of the instruction that caused the VM-exit. MFC after:1 week Modified: head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/usr.sbin/bhyvectl/bhyvectl.c == --- head/usr.sbin/bhyvectl/bhyvectl.c Thu May 21 18:23:37 2015 (r283255) +++ head/usr.sbin/bhyvectl/bhyvectl.c Thu May 21 18:29:11 2015 (r283256) @@ -293,6 +293,7 @@ static int get_guest_pat, get_host_pat; static int get_guest_sysenter, get_vmcs_link; static int get_exit_reason, get_vmcs_exit_qualification; static int get_vmcs_exit_interruption_info, get_vmcs_exit_interruption_error; +static int get_vmcs_exit_inst_length; static uint64_t desc_base; static uint32_t desc_limit, desc_access; @@ -1145,7 +1146,15 @@ get_misc_vmcs(struct vmctx *ctx, int vcp vcpu, u64); } } - + + if (!error (get_vmcs_exit_inst_length || get_all)) { + error = vm_get_vmcs_field(ctx, vcpu, + VMCS_EXIT_INSTRUCTION_LENGTH, u64); + if (error == 0) + printf(vmcs_exit_inst_length[%d]\t0x%08x\n, vcpu, + (uint32_t)u64); + } + if (!error (get_vmcs_exit_qualification || get_all)) { error = vm_get_vmcs_field(ctx, vcpu, VMCS_EXIT_QUALIFICATION, u64); @@ -1405,6 +1414,8 @@ setup_options(bool cpu_intel) REQ_ARG, 0, SET_VMCS_ENTRY_INTERRUPTION_INFO }, { get-vmcs-exit-qualification, NO_ARG, get_vmcs_exit_qualification, 1 }, + { get-vmcs-exit-inst-length, + NO_ARG, get_vmcs_exit_inst_length, 1 }, { get-vmcs-interruptibility, NO_ARG, get_vmcs_interruptibility, 1 }, { get-vmcs-exit-interruption-error, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283257 - head/bin/pax
Author: delphij Date: Thu May 21 18:29:36 2015 New Revision: 283257 URL: https://svnweb.freebsd.org/changeset/base/283257 Log: Eliminate unneeded includes. MFC after:2 weeks Modified: head/bin/pax/ar_subs.c head/bin/pax/buf_subs.c head/bin/pax/cache.c head/bin/pax/cpio.c head/bin/pax/file_subs.c head/bin/pax/gen_subs.c head/bin/pax/getoldopt.c head/bin/pax/pat_rep.c head/bin/pax/pax.c head/bin/pax/sel_subs.c head/bin/pax/tar.c head/bin/pax/tty_subs.c Modified: head/bin/pax/ar_subs.c == --- head/bin/pax/ar_subs.c Thu May 21 18:29:11 2015(r283256) +++ head/bin/pax/ar_subs.c Thu May 21 18:29:36 2015(r283257) @@ -48,7 +48,6 @@ __FBSDID($FreeBSD$); #include fcntl.h #include errno.h #include unistd.h -#include stdlib.h #include pax.h #include extern.h Modified: head/bin/pax/buf_subs.c == --- head/bin/pax/buf_subs.c Thu May 21 18:29:11 2015(r283256) +++ head/bin/pax/buf_subs.c Thu May 21 18:29:36 2015(r283257) @@ -44,7 +44,6 @@ __FBSDID($FreeBSD$); #include errno.h #include unistd.h #include stdio.h -#include stdlib.h #include string.h #include pax.h #include extern.h Modified: head/bin/pax/cache.c == --- head/bin/pax/cache.cThu May 21 18:29:11 2015(r283256) +++ head/bin/pax/cache.cThu May 21 18:29:36 2015(r283257) @@ -45,7 +45,6 @@ __FBSDID($FreeBSD$); #include stdio.h #include pwd.h #include grp.h -#include unistd.h #include stdlib.h #include pax.h #include cache.h Modified: head/bin/pax/cpio.c == --- head/bin/pax/cpio.c Thu May 21 18:29:11 2015(r283256) +++ head/bin/pax/cpio.c Thu May 21 18:29:36 2015(r283257) @@ -45,8 +45,6 @@ __FBSDID($FreeBSD$); #include string.h #include stdint.h #include stdio.h -#include unistd.h -#include stdlib.h #include pax.h #include cpio.h #include extern.h Modified: head/bin/pax/file_subs.c == --- head/bin/pax/file_subs.cThu May 21 18:29:11 2015(r283256) +++ head/bin/pax/file_subs.cThu May 21 18:29:36 2015(r283257) @@ -48,7 +48,6 @@ __FBSDID($FreeBSD$); #include stdio.h #include errno.h #include sys/uio.h -#include stdlib.h #include pax.h #include options.h #include extern.h Modified: head/bin/pax/gen_subs.c == --- head/bin/pax/gen_subs.c Thu May 21 18:29:11 2015(r283256) +++ head/bin/pax/gen_subs.c Thu May 21 18:29:36 2015(r283257) @@ -45,8 +45,6 @@ __FBSDID($FreeBSD$); #include langinfo.h #include stdint.h #include stdio.h -#include unistd.h -#include stdlib.h #include string.h #include pax.h #include extern.h Modified: head/bin/pax/getoldopt.c == --- head/bin/pax/getoldopt.cThu May 21 18:29:11 2015(r283256) +++ head/bin/pax/getoldopt.cThu May 21 18:29:36 2015(r283257) @@ -19,8 +19,7 @@ __FBSDID($FreeBSD$); #include string.h #include unistd.h -#include pax.h -#include extern.h +int getoldopt(int, char **, const char *); int getoldopt(int argc, char **argv, const char *optstring) Modified: head/bin/pax/pat_rep.c == --- head/bin/pax/pat_rep.c Thu May 21 18:29:11 2015(r283256) +++ head/bin/pax/pat_rep.c Thu May 21 18:29:36 2015(r283257) @@ -43,9 +43,7 @@ __FBSDID($FreeBSD$); #include sys/stat.h #include stdio.h #include string.h -#include unistd.h #include stdlib.h -#include errno.h #ifdef NET2_REGEX #include regexp.h #else Modified: head/bin/pax/pax.c == --- head/bin/pax/pax.c Thu May 21 18:29:11 2015(r283256) +++ head/bin/pax/pax.c Thu May 21 18:29:36 2015(r283257) @@ -58,7 +58,6 @@ __FBSDID($FreeBSD$); #include stdio.h #include stdlib.h #include string.h -#include unistd.h #include pax.h #include extern.h static int gen_init(void); Modified: head/bin/pax/sel_subs.c == --- head/bin/pax/sel_subs.c Thu May 21 18:29:11 2015(r283256) +++ head/bin/pax/sel_subs.c Thu May 21 18:29:36 2015(r283257) @@ -47,7 +47,6 @@ __FBSDID($FreeBSD$); #include stdio.h #include string.h #include strings.h -#include unistd.h #include stdlib.h #include pax.h #include sel_subs.h Modified: head/bin/pax/tar.c == --- head/bin/pax/tar.c Thu May
svn commit: r283221 - in head/usr.bin: . demandoc
Author: bapt Date: Thu May 21 13:02:43 2015 New Revision: 283221 URL: https://svnweb.freebsd.org/changeset/base/283221 Log: Remove demandoc(1) from the build Deleted: head/usr.bin/demandoc/ Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Thu May 21 12:51:56 2015(r283220) +++ head/usr.bin/Makefile Thu May 21 13:02:43 2015(r283221) @@ -37,7 +37,6 @@ SUBDIR= ${_addr2line} \ ctlstat \ cut \ ${_cxxfilt} \ - demandoc \ dirname \ dpv \ du \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283220 - in head: lib lib/libmandoc share/mk usr.bin/mandoc
Author: bapt Date: Thu May 21 12:51:56 2015 New Revision: 283220 URL: https://svnweb.freebsd.org/changeset/base/283220 Log: Drop libmandoc and incorporate it into the main mandoc Makefile This simplifies maintainance of mandoc(1). Note that the same direction was taken on OpenBSD Deleted: head/lib/libmandoc/ Modified: head/lib/Makefile head/share/mk/src.libnames.mk head/usr.bin/mandoc/Makefile Modified: head/lib/Makefile == --- head/lib/Makefile Thu May 21 10:40:18 2015(r283219) +++ head/lib/Makefile Thu May 21 12:51:56 2015(r283220) @@ -65,7 +65,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libldns} \ liblzma \ ${_libmagic} \ - libmandoc \ libmemstat \ libmd \ ${_libmilter} \ Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Thu May 21 10:40:18 2015 (r283219) +++ head/share/mk/src.libnames.mk Thu May 21 12:51:56 2015 (r283220) @@ -32,7 +32,6 @@ _INTERNALLIBS=\ fifolog \ ipf \ lpr \ - mandoc \ netbsd \ ntp \ ntpevent \ @@ -108,7 +107,6 @@ _LIBRARIES= \ lzma \ m \ magic \ - mandoc \ md \ memstat \ mp \ @@ -314,9 +312,6 @@ LIBREADLINE?= ${LIBREADLINEDIR}/libreadl LIBOHASHDIR= ${ROOTOBJDIR}/lib/libohash LIBOHASH?= ${LIBOHASHDIR}/libohash.a -LIBMANDOCDIR= ${ROOTOBJDIR}/lib/libmandoc -LIBMANDOC?=${LIBMANDOCDIR}/libmandoc.a - LIBSMDIR= ${ROOTOBJDIR}/lib/libsm LIBSM?=${LIBSMDIR}/libsm.a Modified: head/usr.bin/mandoc/Makefile == --- head/usr.bin/mandoc/MakefileThu May 21 10:40:18 2015 (r283219) +++ head/usr.bin/mandoc/MakefileThu May 21 12:51:56 2015 (r283220) @@ -9,6 +9,37 @@ FILESDIR= ${SHAREDIR}/mdocml MAN= mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 # roff.7 MLINKS= mandoc.1 mdocml.1 +LIBMAN_SRCS= man.c \ + man_hash.c \ + man_macro.c \ + man_validate.c + +LIBMDOC_SRCS= att.c \ + lib.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_hash.c \ + mdoc_macro.c \ + mdoc_validate.c \ + st.c \ + +LIBROFF_SRCS= eqn.c \ + roff.c \ + tbl.c \ + tbl_data.c \ + tbl_layout.c \ + tbl_opts.c \ + +LIB_SRCS= ${LIBMAN_SRCS} \ + ${LIBMDOC_SRCS} \ + ${LIBROFF_SRCS} \ + chars.c \ + mandoc.c \ + mandoc_aux.c \ + msec.c \ + preconv.c \ + read.c + HTML_SRCS= eqn_html.c \ html.c \ man_html.c \ @@ -30,7 +61,8 @@ DB_SRCS= mandocdb.c \ mansearch_const.c \ manpath.c -SRCS= ${HTML_SRCS} \ +SRCS= ${LIB_SRCS} \ + ${HTML_SRCS} \ ${MAN_SRCS} \ ${TERM_SRCS} \ main.c \ @@ -43,6 +75,6 @@ WARNS?= 2 CFLAGS+= -DHAVE_CONFIG_H \ -I${.CURDIR}/../../lib/libohash/ \ -I${.CURDIR}/../../contrib/sqlite3 -LIBADD=mandoc ohash sqlite3 +LIBADD=ohash sqlite3 .include bsd.prog.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283223 - in stable/10: etc etc/autofs usr.sbin/autofs
Author: trasz Date: Thu May 21 13:08:30 2015 New Revision: 283223 URL: https://svnweb.freebsd.org/changeset/base/283223 Log: MFC r275681: Add -media autofs map, to access data on removable media, such as CD drives or flash keys. It can be enabled by uncommenting a single entry in default /etc/auto_master. It can also be easily modified to use fuse-based filesystems instead of in-kernel ones. There is still one deficiency - the mountpoints are permanent, they don't disappear when user removes the media. Fixing it needs some autofs changes. Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/etc/autofs/special_media - copied unchanged from r275681, head/etc/autofs/special_media Modified: stable/10/etc/auto_master stable/10/etc/autofs/Makefile stable/10/etc/devd.conf stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master == --- stable/10/etc/auto_master Thu May 21 13:04:14 2015(r283222) +++ stable/10/etc/auto_master Thu May 21 13:08:30 2015(r283223) @@ -3,3 +3,6 @@ # Automounter master map, see auto_master(5) for details. # /net -hosts -nobrowse,nosuid +# When using the -media special map, make sure to edit devd.conf(5) +# to move the call to automount -c out of the comments section. +#/media-media -nosuid Modified: stable/10/etc/autofs/Makefile == --- stable/10/etc/autofs/Makefile Thu May 21 13:04:14 2015 (r283222) +++ stable/10/etc/autofs/Makefile Thu May 21 13:08:30 2015 (r283223) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= include_ldap special_hosts special_null +FILES= include_ldap special_hosts special_media special_null NO_OBJ= FILESDIR= /etc/autofs Copied: stable/10/etc/autofs/special_media (from r275681, head/etc/autofs/special_media) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/autofs/special_media Thu May 21 13:08:30 2015 (r283223, copy of r275681, head/etc/autofs/special_media) @@ -0,0 +1,93 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Print newline-separated list of devices available for mounting. +# If there is a filesystem label - use it, otherwise use device name. +print_available() { + local _fstype _fstype_and_label _label _p + + for _p in ${providers}; do + _fstype_and_label=$(fstyp -l /dev/${_p} 2 /dev/null) + if [ $? -ne 0 ]; then + # Ignore devices for which we were unable + # to determine filesystem type. + continue + fi + + _fstype=${_fstype_and_label%% *} + if [ ${_fstype} != ${_fstype_and_label} ]; then + _label=${_fstype_and_label#* } + echo ${_label} + continue + fi + + echo ${_p} + done +} + +# Print a single map entry. +print_one() { + local _fstype _fstype_and_label _label _key _p + + _key=$1 + + _fstype=$(fstyp /dev/${_key} 2 /dev/null) + if [ $? -eq 0 ]; then + echo -fstype=${_fstype},nosuid :/dev/${_key} + return + fi + + for _p in ${providers}; do + _fstype_and_label=$(fstyp -l /dev/${_p} 2 /dev/null) + if [ $? -ne 0 ]; then + # Ignore devices for which we were unable + # to determine filesystem type. + continue + fi + + _fstype=${_fstype_and_label%% *} + if [ ${_fstype} = ${_fstype_and_label} ]; then + # No label, try another device. + continue + fi + + _label=${_fstype_and_label#* } + if [ ${_label} != ${_key} ]; then + # Labels don't match, try another device. + continue + fi + + echo -fstype=${_fstype},nosuid :/dev/${_p} + done + + # No matching device - don't print anything, autofs will handle it. +} + +# Obtain a list of (geom-provider-name, access-count) pairs, turning this: +# +# z0xf80005085d00 [shape=hexagon,label=ada0\nr2w2e3\nerr#0\nsector=512\nstripe=0]; +# +# Into this: +# +# ada0 r2w2e3 +# +# XXX: It would be easier to use kern.geom.conftxt instead, but it lacks +# access counts. +pairs=$(sysctl kern.geom.confdot | sed -n 's/^.*hexagon,label=\([^\]*\)\\n\([^\]*\).*/\1 \2/p') + +# Obtain a list of GEOM providers that are not already open - not mounted, +# and without other GEOM class, such as gpart, attached. In
svn commit: r283229 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:21:03 2015 New Revision: 283229 URL: https://svnweb.freebsd.org/changeset/base/283229 Log: MFC r279808: Fix memory leak. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:19:44 2015 (r283228) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:21:03 2015 (r283229) @@ -615,9 +615,11 @@ node_options_x(const struct node *n, cha { char *options; + if (n == NULL) + return (x); + options = separated_concat(x, n-n_options, ','); - if (n-n_parent == NULL) - return (options); + free(x); return (node_options_x(n-n_parent, options)); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283222 - head
Author: bapt Date: Thu May 21 13:04:14 2015 New Revision: 283222 URL: https://svnweb.freebsd.org/changeset/base/283222 Log: Removed files not installed anymore with mandoc Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu May 21 13:02:43 2015(r283221) +++ head/ObsoleteFiles.inc Thu May 21 13:04:14 2015(r283222) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20150521 +OLD_FILES+=usr/bin/demandoc +OLD_FILES+=usr/share/man/man1/demandoc.1.gz +OLD_FILES+=usr/share/man/man3/mandoc.3.gz +OLD_FILES+=usr/share/man/man3/mandoc_headers.3.gz # 20150520 OLD_FILES+=usr/lib/libheimsqlite.a OLD_FILES+=usr/lib/libheimsqlite.so ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283225 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:11:48 2015 New Revision: 283225 URL: https://svnweb.freebsd.org/changeset/base/283225 Log: MFC r276883: Improve documentation for autofs variables and executable maps; also some markup fixes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/auto_master.5 == --- stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:10:08 2015 (r283224) +++ stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:11:48 2015 (r283225) @@ -27,7 +27,7 @@ .\ .\ $FreeBSD$ .\ -.Dd November 22, 2014 +.Dd January 9, 2015 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -172,6 +172,42 @@ This is typically used with wildcards, l .Li * 192.168.1.1:/share/ .Ed .Pp +The +.Ar location +field may contain references to variables, like: +.Bd -literal -offset indent +.Li sys192.168.1.1:/sys/${OSNAME} +.Ed +.Pp +Defined variables are: +.Pp +.Bl -tag -width -OSNAME -compact +.It Li ARCH +Expands to the output of +.Li uname -p . +.It Li CPU +Same as ARCH. +.It Li HOST +Expands to the output of +.Li uname -n . +.It Li OSNAME +Expands to the output of +.Li uname -s . +.It Li OSREL +Expands to the output of +.Li uname -r . +.It Li OSVERS +Expands to the output of +.Li uname -v . +.El +.Pp +Additional variables can be defined with the +.Fl D +option of +.Xr automount 8 +and +.Xr automountd 8 . +.Pp To pass a location that begins with .Li / , prefix it with a colon. @@ -217,8 +253,10 @@ Query the remote NFS server and map expo This map is traditionally mounted on .Pa /net . Access to files on a remote NFS server is provided through the -.Pa /net/nfs-server-ip/share-name/ +.Pf /net/ Ar nfs-server-ip Ns / Ns Ar share-name Ns/ directory without any additional configuration. +Directories for individual NFS servers are not present until the first access, +when they are automatically created. .It Li -media Query devices that are not yet mounted, but contain valid filesystems. Generally used to access files on removable media. @@ -227,13 +265,27 @@ Prevent .Xr automountd 8 from mounting anything on the mountpoint. .El +.Pp +It is possible to add custom special maps by adding them, as executable +maps named +.Pa special_foo , +to the +.Pa /etc/autofs/ +directory. .Sh EXECUTABLE MAPS If the map file specified in .Nm -has execute bit set, the +has the execute bit set, .Xr automountd 8 will execute it and parse the standard output instead of parsing the file contents. +When called without command line arguments, the executable is +expected to output a list of available map keys separated by +newline characters. +Otherwise, the executable will be called with a key name as +a command line argument. +Output from the executable is expected to be the entry for that key, +not including the key itself. .Sh INDIRECT VERSUS DIRECT MAPS Indirect maps are referred to in .Nm @@ -300,6 +352,9 @@ It can be symlinked to The default location of the .Pa auto_master file. +.It Pa /etc/autofs/ +Directory containing shell scripts to implement special maps and directory +services. .El .Sh SEE ALSO .Xr autofs 5 , ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283227 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:18:02 2015 New Revision: 283227 URL: https://svnweb.freebsd.org/changeset/base/283227 Log: MFC r279806: Minor optimization/cleanup in node_path(); no functional changes. Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:13:56 2015 (r283226) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:18:02 2015 (r283227) @@ -561,7 +561,6 @@ static char * node_path_x(const struct node *n, char *x) { char *path; - size_t len; if (n-n_parent == NULL) return (x); @@ -580,14 +579,6 @@ node_path_x(const struct node *n, char * path = separated_concat(n-n_key, x, '/'); free(x); - /* -* Strip trailing slash. -*/ - len = strlen(path); - assert(len 0); - if (path[len - 1] == '/') - path[len - 1] = '\0'; - return (node_path_x(n-n_parent, path)); } @@ -598,8 +589,19 @@ node_path_x(const struct node *n, char * char * node_path(const struct node *n) { + char *path; + size_t len; + + path = node_path_x(n, checked_strdup()); + + /* +* Strip trailing slash, unless the whole path is /. +*/ + len = strlen(path); + if (len 1 path[len - 1] == '/') + path[len - 1] = '\0'; - return (node_path_x(n, checked_strdup())); + return (path); } static char * ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283228 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:19:44 2015 New Revision: 283228 URL: https://svnweb.freebsd.org/changeset/base/283228 Log: MFC r279807: Improve separated_concat() to properly handle the case of concatenating / and /foo. Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:18:02 2015 (r283227) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:19:44 2015 (r283228) @@ -136,8 +136,14 @@ separated_concat(const char *s1, const c assert(s1 != NULL); assert(s2 != NULL); - if (s1[0] == '\0' || s2[0] == '\0' || - s1[strlen(s1) - 1] == separator || s2[0] == separator) { + /* +* If s2 starts with separator - skip it; otherwise concatenating +* / and /foo would end up returning //foo. +*/ + if (s2[0] == separator) + s2++; + + if (s1[0] == '\0' || s2[0] == '\0' || s1[strlen(s1) - 1] == separator) { ret = asprintf(result, %s%s, s1, s2); } else { ret = asprintf(result, %s%c%s, s1, separator, s2); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283224 - stable/10/etc
Author: trasz Date: Thu May 21 13:10:08 2015 New Revision: 283224 URL: https://svnweb.freebsd.org/changeset/base/283224 Log: MFC r276833: Make /net use -intr by default. Linux does that, and it seems a good idea. Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/auto_master Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master == --- stable/10/etc/auto_master Thu May 21 13:08:30 2015(r283223) +++ stable/10/etc/auto_master Thu May 21 13:10:08 2015(r283224) @@ -2,7 +2,7 @@ # # Automounter master map, see auto_master(5) for details. # -/net -hosts -nobrowse,nosuid +/net -hosts -nobrowse,nosuid,intr # When using the -media special map, make sure to edit devd.conf(5) # to move the call to automount -c out of the comments section. #/media-media -nosuid ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283226 - stable/10/etc
Author: trasz Date: Thu May 21 13:13:56 2015 New Revision: 283226 URL: https://svnweb.freebsd.org/changeset/base/283226 Log: MFC r277171: Use newly added GEOM notifications to discard autofs caches. Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/devd.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd.conf == --- stable/10/etc/devd.conf Thu May 21 13:11:48 2015(r283225) +++ stable/10/etc/devd.conf Thu May 21 13:13:56 2015(r283226) @@ -318,16 +318,11 @@ notify 0 { action /usr/local/etc/rc.d/postgresql restart; }; -# Discard autofs caches, useful for the -media special map. The one -# second delay is for GEOM to finish tasting. -# -# XXX: We should probably have a devctl(4) event that fires after GEOM -# tasting. -# +# Discard autofs caches, useful for the -media special map. notify 100 { - match system DEVFS; - match cdev (da|mmcsd)[0-9]+; - action sleep 1 /usr/sbin/automount -c; + match system GEOM; + match subsystem DEV; + action /usr/sbin/automount -c; }; */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283264 - head/usr.sbin/bhyve
Author: tychon Date: Thu May 21 20:11:52 2015 New Revision: 283264 URL: https://svnweb.freebsd.org/changeset/base/283264 Log: The 'hostbridge' device exists to allow guests to infer msi/msix capablity by advertising pcie capability. Since the 'hostbridge' device isn't a true pci-to-pci bridge, and doesn't actaully use the bridge configuration space layout, change the header-type from type 1 to type 0 to avoid confusion. Reviewed by: neel Modified: head/usr.sbin/bhyve/pci_hostbridge.c Modified: head/usr.sbin/bhyve/pci_hostbridge.c == --- head/usr.sbin/bhyve/pci_hostbridge.cThu May 21 20:09:36 2015 (r283263) +++ head/usr.sbin/bhyve/pci_hostbridge.cThu May 21 20:11:52 2015 (r283264) @@ -38,7 +38,7 @@ pci_hostbridge_init(struct vmctx *ctx, s /* config space */ pci_set_cfgdata16(pi, PCIR_VENDOR, 0x1275); /* NetApp */ pci_set_cfgdata16(pi, PCIR_DEVICE, 0x1275); /* NetApp */ - pci_set_cfgdata8(pi, PCIR_HDRTYPE, PCIM_HDRTYPE_BRIDGE); + pci_set_cfgdata8(pi, PCIR_HDRTYPE, PCIM_HDRTYPE_NORMAL); pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_BRIDGE); pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_BRIDGE_HOST); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283270 - stable/10/contrib/netcat
Author: delphij Date: Thu May 21 21:45:37 2015 New Revision: 283270 URL: https://svnweb.freebsd.org/changeset/base/283270 Log: MFC r282613: MFV r282611: netcat from OpenBSD 5.7. Modified: stable/10/contrib/netcat/netcat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netcat/netcat.c == --- stable/10/contrib/netcat/netcat.c Thu May 21 20:47:19 2015 (r283269) +++ stable/10/contrib/netcat/netcat.c Thu May 21 21:45:37 2015 (r283270) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.122 2014/07/20 01:38:40 guenther Exp $ */ +/* $OpenBSD: netcat.c,v 1.127 2015/02/14 22:40:22 jca Exp $ */ /* * Copyright (c) 2001 Eric Jackson er...@monkey.org * @@ -42,7 +42,6 @@ #include sys/un.h #include netinet/in.h -#include netinet/in_systm.h #ifdef IPSEC #include netipsec/ipsec.h #endif @@ -73,6 +72,12 @@ #define PORT_MAX_LEN 6 #define UNIX_DG_TMP_SOCKET_SIZE19 +#define POLL_STDIN 0 +#define POLL_NETOUT 1 +#define POLL_NETIN 2 +#define POLL_STDOUT 3 +#define BUFSIZE 16384 + /* Command Line Options */ intdflag; /* detached, no stdin */ intFflag; /* fdpass sock to stdout */ @@ -117,10 +122,12 @@ int udptest(int); intunix_bind(char *); intunix_connect(char *); intunix_listen(char *); -void set_common_sockopts(int); +void set_common_sockopts(int, int); intmap_tos(char *, int *); void report_connect(const struct sockaddr *, socklen_t); void usage(int); +ssize_t drainbuf(int, unsigned char *, size_t *); +ssize_t fillbuf(int, unsigned char *, size_t *); #ifdef IPSEC void add_ipsec_policy(int, char *); @@ -436,7 +443,7 @@ main(int argc, char *argv[]) len); if (connfd == -1) { /* For now, all errnos are fatal */ - err(1, accept); + err(1, accept); } if (vflag) report_connect((struct sockaddr *)cliaddr, len); @@ -663,7 +670,7 @@ remote_connect(const char *host, const c freeaddrinfo(ares); } - set_common_sockopts(s); + set_common_sockopts(s, res0-ai_family); if (timeout_connect(s, res0-ai_addr, res0-ai_addrlen) == 0) break; @@ -767,6 +774,8 @@ local_listen(char *host, char *port, str err(1, disable TCP options); } + set_common_sockopts(s, res0-ai_family); + if (bind(s, (struct sockaddr *)res0-ai_addr, res0-ai_addrlen) == 0) break; @@ -790,68 +799,224 @@ local_listen(char *host, char *port, str * Loop that polls on the network file descriptor and stdin. */ void -readwrite(int nfd) +readwrite(int net_fd) { - struct pollfd pfd[2]; - unsigned char buf[16 * 1024]; - int n, wfd = fileno(stdin); - int lfd = fileno(stdout); - int plen; - - plen = sizeof(buf); - - /* Setup Network FD */ - pfd[0].fd = nfd; - pfd[0].events = POLLIN; - - /* Set up STDIN FD. */ - pfd[1].fd = wfd; - pfd[1].events = POLLIN; + struct pollfd pfd[4]; + int stdin_fd = STDIN_FILENO; + int stdout_fd = STDOUT_FILENO; + unsigned char netinbuf[BUFSIZE]; + size_t netinbufpos = 0; + unsigned char stdinbuf[BUFSIZE]; + size_t stdinbufpos = 0; + int n, num_fds; + ssize_t ret; + + /* don't read from stdin if requested */ + if (dflag) + stdin_fd = -1; + + /* stdin */ + pfd[POLL_STDIN].fd = stdin_fd; + pfd[POLL_STDIN].events = POLLIN; + + /* network out */ + pfd[POLL_NETOUT].fd = net_fd; + pfd[POLL_NETOUT].events = 0; + + /* network in */ + pfd[POLL_NETIN].fd = net_fd; + pfd[POLL_NETIN].events = POLLIN; + + /* stdout */ + pfd[POLL_STDOUT].fd = stdout_fd; + pfd[POLL_STDOUT].events = 0; + + while (1) { + /* both inputs are gone, buffers are empty, we are done */ + if (pfd[POLL_STDIN].fd == -1 pfd[POLL_NETIN].fd == -1 +stdinbufpos == 0 netinbufpos == 0) { + close(net_fd); + return; + } + /* both outputs are gone, we can't continue */ + if (pfd[POLL_NETOUT].fd == -1 pfd[POLL_STDOUT].fd == -1) { + close(net_fd); + return; + } + /* listen and net in gone, queues empty, done */ + if (lflag pfd[POLL_NETIN].fd == -1 +stdinbufpos == 0
svn commit: r283268 - head/release
Author: gjb Date: Thu May 21 20:43:02 2015 New Revision: 283268 URL: https://svnweb.freebsd.org/changeset/base/283268 Log: Remove the arm/armv6 bits from Makefile.mirrors, which needs some re-thinking. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors == --- head/release/Makefile.mirrors Thu May 21 20:39:39 2015 (r283267) +++ head/release/Makefile.mirrors Thu May 21 20:43:02 2015 (r283268) @@ -23,14 +23,7 @@ STAGE_TARGETS?= iso-images-stage SNAPSHOT= 1 TLD?= ${FTPDIR}/snapshots BUILDDATE!=cd ${.CURDIR} date -j -f '%s' $$(stat -f %c ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d -. if ${TARGET} == arm ${TARGET_ARCH} == armv6 -. if !defined(BOARDNAME) || empty(BOARDNAME) -BOARDNAME= ${KERNCONF} -. endif -_SNAP_SUFFIX:= -${BOARDNAME}-${BUILDDATE} -. else # not arm/armv6 _SNAP_SUFFIX:= -${BUILDDATE} -. endif . for _D in /usr/bin /usr/local/bin . for _S in svnversion svnliteversion . if exists(${_D}/${_S}) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r283136 - head/sys/netinet
On 05/21/15 at 03:27P, Lawrence Stewart wrote: On 05/20/15 23:19, Eric van Gyzen wrote: On 05/20/2015 02:33, Lawrence Stewart wrote: On 05/20/15 14:24, Hiren Panchasara wrote: On 05/20/15 at 02:13P, Lawrence Stewart wrote: Hi Hiren, On 05/20/15 11:08, Hiren Panchasara wrote: Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire and purge all entries in hostcache immediately. In collaboration with: bz, rwatson MFC after: 1 week Relnotes: yes Sponsored by: Limelight Networks Why introduce a new sysctl and not change the existing behaviour of net.inet.tcp.hostcache.purge? I thought it'd make more sense to keep the existing behavior as is and provide new knob for the new behavior. Don't think so - why would deferring a purge to the next purge run be useful compared to purging immediately? I'd strongly suggest you adapt this change to the existing purge sysctl. I can't see why anyone would miss the old functionality. I am generally wary of a question such as Why would anyone want..., because as soon as the code is released, someone answers it. That being said, I have always wanted Hiren's purgenow behavior, and I've always been annoyed by the lazy-purge behavior. I would suggest implementing Lawrence's suggestion, but NOT MFC'ing it, since that would be a disruptive change. Thanks for your work, Hiren. I see no reason not to MFC it - it's not a POLA violation for a stable branch. When the user requests a purge, it's surely equally as good (and I think anyone of right mind would argue better ;) to purge immediately than some number of seconds n in the future, where n is between 1 and the value of net.inet.tcp.hostcache.prune. I *do* want to MFC the change. And if there are no major objections, I'll go ahead with what Lawrence is suggesting: changing current purge behavior in -head and 10. cheers, Hiren pgp6X7mRWX5yO.pgp Description: PGP signature
svn commit: r283263 - head/sys/dev/sdhci
Author: loos Date: Thu May 21 20:09:36 2015 New Revision: 283263 URL: https://svnweb.freebsd.org/changeset/base/283263 Log: Raise the SDHCI timeout to 10 seconds and add a sysctl to allow changing this value at runtime. The SD card specification says that a block write or a block erase can take up to 250ms to complete and thus, under some circumstances, the existent 2 seconds timeout was triggering with normal usage. This change fixes the sporadic controller timeout that happens on RPi and RPi 2. Discussed with: ian (some time ago) Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.c == --- head/sys/dev/sdhci/sdhci.c Thu May 21 19:40:31 2015(r283262) +++ head/sys/dev/sdhci/sdhci.c Thu May 21 20:09:36 2015(r283263) @@ -615,10 +615,16 @@ sdhci_init_slot(device_t dev, struct sdh (slot-opt SDHCI_HAVE_DMA) ? DMA : PIO); sdhci_dumpregs(slot); } - + + slot-timeout = 10; + SYSCTL_ADD_INT(device_get_sysctl_ctx(slot-bus), + SYSCTL_CHILDREN(device_get_sysctl_tree(slot-bus)), OID_AUTO, + timeout, CTLFLAG_RW, slot-timeout, 0, + Maximum timeout for SDHCI transfers (in secs)); TASK_INIT(slot-card_task, 0, sdhci_card_task, slot); callout_init(slot-card_callout, 1); callout_init_mtx(slot-timeout_callout, slot-mtx, 0); + return (0); } @@ -872,7 +878,8 @@ sdhci_start_command(struct sdhci_slot *s /* Start command. */ WR2(slot, SDHCI_COMMAND_FLAGS, (cmd-opcode 8) | (flags 0xff)); /* Start timeout callout. */ - callout_reset(slot-timeout_callout, 2*hz, sdhci_timeout, slot); + callout_reset(slot-timeout_callout, slot-timeout * hz, + sdhci_timeout, slot); } static void Modified: head/sys/dev/sdhci/sdhci.h == --- head/sys/dev/sdhci/sdhci.h Thu May 21 19:40:31 2015(r283262) +++ head/sys/dev/sdhci/sdhci.h Thu May 21 20:09:36 2015(r283263) @@ -271,6 +271,7 @@ struct sdhci_slot { #define SDHCI_HAVE_DMA 1 #define SDHCI_PLATFORM_TRANSFER2 u_char version; + int timeout;/* Transfer timeout */ uint32_tmax_clk;/* Max possible freq */ uint32_ttimeout_clk;/* Timeout freq */ bus_dma_tag_t dmatag; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283265 - head/release
Author: gjb Date: Thu May 21 20:18:13 2015 New Revision: 283265 URL: https://svnweb.freebsd.org/changeset/base/283265 Log: cd(1) to .CURDIR before calling stat(1) to fix the path to sh(1). Include xz(1)-compressed images when renaming snapshot builds. Use OSRELEASE in place of REVISION-BRANCH for checksum filenames. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors == --- head/release/Makefile.mirrors Thu May 21 20:11:52 2015 (r283264) +++ head/release/Makefile.mirrors Thu May 21 20:18:13 2015 (r283265) @@ -22,7 +22,7 @@ STAGE_TARGETS?= iso-images-stage .if ${BRANCH} == STABLE || ${BRANCH} == CURRENT SNAPSHOT= 1 TLD?= ${FTPDIR}/snapshots -BUILDDATE!=date -j -f '%s' $$(stat -f %c ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d +BUILDDATE!=cd ${.CURDIR} date -j -f '%s' $$(stat -f %c ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d . if ${TARGET} == arm ${TARGET_ARCH} == armv6 . if !defined(BOARDNAME) || empty(BOARDNAME) BOARDNAME= ${KERNCONF} @@ -70,10 +70,8 @@ iso-images-stage: . for IMAGE in ${IMAGES} cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ ${ISO_DIR}/${OSRELEASE}-${IMAGE} -. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz -. endif . if exists(${RELEASEDIR}/CHECKSUM.${CHECKSUM}) cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM} \ ${ISO_DIR}/CHECKSUM.${CHECKSUM} @@ -85,25 +83,30 @@ iso-images-stage: . for IMAGE in ${IMAGES} cd ${ISO_DIR} mv ${OSRELEASE}-${IMAGE} \ ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + cd ${ISO_DIR} mv ${OSRELEASE}-${IMAGE}.xz \ + ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz cd ${TLD}/ISO-IMAGES/${REVISION} \ ln -s \ ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + cd ${TLD}/ISO-IMAGES/${REVISION} \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz . endfor . for CHECKSUM in ${CHECKSUM_FILES} . if exists(${ISO_DIR}/CHECKSUM.${CHECKSUM}) rm -f ${ISO_DIR}/CHECKSUM.${CHECKSUM} . endif cd ${ISO_DIR} ${CHECKSUM:tl} ${OSRELEASE}* \ - CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} cd ${TLD}/ISO-IMAGES/${REVISION} \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} . endfor .else # !snapshot cd ${TLD}/ISO-IMAGES/${REVISION} ln -s \ ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} . cd ${ISO_DIR} ${CHECKSUM:tl} ${OSRELEASE}* \ - CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} .endif .if exists(${RELEASEDIR}/ftp) mkdir -p ${FTP_DIR} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283266 - head/release
Author: gjb Date: Thu May 21 20:22:55 2015 New Revision: 283266 URL: https://svnweb.freebsd.org/changeset/base/283266 Log: Include xz(1)-compressed images when not a snapshot build. Do not suffix non-snapshot checksum files with SNAP_SUFFIX. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors == --- head/release/Makefile.mirrors Thu May 21 20:18:13 2015 (r283265) +++ head/release/Makefile.mirrors Thu May 21 20:22:55 2015 (r283266) @@ -104,9 +104,11 @@ iso-images-stage: . endfor .else # !snapshot cd ${TLD}/ISO-IMAGES/${REVISION} ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} . + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} + cd ${TLD}/ISO-IMAGES/${REVISION} ln -s \ + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE}.xz cd ${ISO_DIR} ${CHECKSUM:tl} ${OSRELEASE}* \ - CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} + CHECKSUM.${CHECKSUM}-${OSRELEASE} .endif .if exists(${RELEASEDIR}/ftp) mkdir -p ${FTP_DIR} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283267 - stable/10/sys/sys
Author: pfg Date: Thu May 21 20:39:39 2015 New Revision: 283267 URL: https://svnweb.freebsd.org/changeset/base/283267 Log: MFC r282863: Adjust visibility macros. The GCC visibility attributes were introduced in GCC 4.0. Apparently the protected attribute was introduced only until GCC 4.2, but we are not currently using it. Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/cdefs.h == --- stable/10/sys/sys/cdefs.h Thu May 21 20:22:55 2015(r283266) +++ stable/10/sys/sys/cdefs.h Thu May 21 20:39:39 2015(r283267) @@ -439,7 +439,7 @@ #define __predict_false(exp)(exp) #endif -#if __GNUC_PREREQ__(4, 2) +#if __GNUC_PREREQ__(4, 0) #define__hidden__attribute__((__visibility__(hidden))) #define__exported __attribute__((__visibility__(default))) #else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283269 - head/sys/dev/bxe
Author: davidcs Date: Thu May 21 20:47:19 2015 New Revision: 283269 URL: https://svnweb.freebsd.org/changeset/base/283269 Log: Limit the size of the posted receive buffers in Rx Rings to MJUMPAGESIZE. Previously for jumbo MTUs, the rx ring buffers were MTU + any required pad. Now when this size greater than MJUMPAGESIZE, the packet is spanned across multiple buffers and the mbufs are stiched together. Submitted by:gary.zambr...@qlogic.com Approved by:davi...@freebsd.org Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c == --- head/sys/dev/bxe/bxe.c Thu May 21 20:43:02 2015(r283268) +++ head/sys/dev/bxe/bxe.c Thu May 21 20:47:19 2015(r283269) @@ -3100,7 +3100,7 @@ static inline void bxe_update_sge_prod(struct bxe_softc *sc, struct bxe_fastpath *fp, uint16_t sge_len, -struct eth_end_agg_rx_cqe *cqe) +union eth_sgl_or_raw_data *cqe) { uint16_t last_max, last_elem, first_elem; uint16_t delta = 0; @@ -3113,17 +3113,17 @@ bxe_update_sge_prod(struct bxe_softc /* first mark all used pages */ for (i = 0; i sge_len; i++) { BIT_VEC64_CLEAR_BIT(fp-sge_mask, -RX_SGE(le16toh(cqe-sgl_or_raw_data.sgl[i]))); +RX_SGE(le16toh(cqe-sgl[i]))); } BLOGD(sc, DBG_LRO, fp[%02d] fp_cqe-sgl[%d] = %d\n, fp-index, sge_len - 1, - le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1])); + le16toh(cqe-sgl[sge_len - 1])); /* assume that the last SGE index is the biggest */ bxe_update_last_max_sge(fp, -le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1])); +le16toh(cqe-sgl[sge_len - 1])); last_max = RX_SGE(fp-last_max_sge); last_elem = last_max BIT_VEC64_ELEM_SHIFT; @@ -3239,6 +3239,53 @@ bxe_tpa_stop_exit: } static uint8_t +bxe_service_rxsgl( + struct bxe_fastpath *fp, + uint16_t len, + uint16_t lenonbd, + struct mbuf *m, + struct eth_fast_path_rx_cqe *cqe_fp) +{ +struct mbuf *m_frag; +uint16_t frags, frag_len; +uint16_t sge_idx = 0; +uint16_t j; +uint8_t i, rc = 0; +uint32_t frag_size; + +/* adjust the mbuf */ +m-m_len = lenonbd; + +frag_size = len - lenonbd; +frags = SGE_PAGE_ALIGN(frag_size) SGE_PAGE_SHIFT; + +for (i = 0, j = 0; i frags; i += PAGES_PER_SGE, j++) { +sge_idx = RX_SGE(le16toh(cqe_fp-sgl_or_raw_data.sgl[j])); + +m_frag = fp-rx_sge_mbuf_chain[sge_idx].m; +frag_len = min(frag_size, (uint32_t)(SGE_PAGE_SIZE)); +m_frag-m_len = frag_len; + + /* allocate a new mbuf for the SGE */ +rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx); +if (rc) { +/* Leave all remaining SGEs in the ring! */ +return (rc); +} +fp-eth_q_stats.mbuf_alloc_sge--; + +/* concatenate the fragment to the head mbuf */ +m_cat(m, m_frag); + +frag_size -= frag_len; +} + +bxe_update_sge_prod(fp-sc, fp, frags, cqe_fp-sgl_or_raw_data); + +return rc; +} + +static uint8_t bxe_rxeof(struct bxe_softc*sc, struct bxe_fastpath *fp) { @@ -3278,7 +3325,7 @@ bxe_rxeof(struct bxe_softc*sc, struct eth_fast_path_rx_cqe *cqe_fp; uint8_t cqe_fp_flags; enum eth_rx_cqe_type cqe_fp_type; -uint16_t len, pad; +uint16_t len, lenonbd, pad; struct mbuf *m = NULL; comp_ring_cons = RCQ(sw_cq_cons); @@ -3293,7 +3340,7 @@ bxe_rxeof(struct bxe_softc*sc, BLOGD(sc, DBG_RX, fp[%02d] Rx hw_cq_cons=%d hw_sw_cons=%d BD prod=%d cons=%d CQE type=0x%x err=0x%x - status=0x%x rss_hash=0x%x vlan=0x%x len=%u\n, + status=0x%x rss_hash=0x%x vlan=0x%x len=%u lenonbd=%u\n, fp-index, hw_cq_cons, sw_cq_cons, @@ -3304,7 +3351,8 @@ bxe_rxeof(struct bxe_softc*sc, cqe_fp-status_flags, le32toh(cqe_fp-rss_hash_result), le16toh(cqe_fp-vlan_tag), - le16toh(cqe_fp-pkt_len_or_gro_seg_len)); + le16toh(cqe_fp-pkt_len_or_gro_seg_len), + le16toh(cqe_fp-len_on_bd)); /* is this a slowpath msg? */ if (__predict_false(CQE_TYPE_SLOW(cqe_fp_type))) { @@ -3351,7 +3399,7 @@ bxe_rxeof(struct bxe_softc*sc, bxe_tpa_stop(sc, fp, tpa_info, queue, pages, cqe-end_agg_cqe, comp_ring_cons); -bxe_update_sge_prod(sc, fp, pages, cqe-end_agg_cqe); +bxe_update_sge_prod(sc, fp, pages, cqe-end_agg_cqe.sgl_or_raw_data); goto next_cqe; } @@ -3367,6 +3415,7 @@
Re: svn commit: r283136 - head/sys/netinet
On 05/21/2015 16:03, Hiren Panchasara wrote: On 05/21/15 at 03:27P, Lawrence Stewart wrote: On 05/20/15 23:19, Eric van Gyzen wrote: On 05/20/2015 02:33, Lawrence Stewart wrote: On 05/20/15 14:24, Hiren Panchasara wrote: On 05/20/15 at 02:13P, Lawrence Stewart wrote: Hi Hiren, On 05/20/15 11:08, Hiren Panchasara wrote: Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire and purge all entries in hostcache immediately. In collaboration with: bz, rwatson MFC after: 1 week Relnotes: yes Sponsored by: Limelight Networks Why introduce a new sysctl and not change the existing behaviour of net.inet.tcp.hostcache.purge? I thought it'd make more sense to keep the existing behavior as is and provide new knob for the new behavior. Don't think so - why would deferring a purge to the next purge run be useful compared to purging immediately? I'd strongly suggest you adapt this change to the existing purge sysctl. I can't see why anyone would miss the old functionality. I am generally wary of a question such as Why would anyone want..., because as soon as the code is released, someone answers it. That being said, I have always wanted Hiren's purgenow behavior, and I've always been annoyed by the lazy-purge behavior. I would suggest implementing Lawrence's suggestion, but NOT MFC'ing it, since that would be a disruptive change. Thanks for your work, Hiren. I see no reason not to MFC it - it's not a POLA violation for a stable branch. When the user requests a purge, it's surely equally as good (and I think anyone of right mind would argue better ;) to purge immediately than some number of seconds n in the future, where n is between 1 and the value of net.inet.tcp.hostcache.prune. I *do* want to MFC the change. And if there are no major objections, I'll go ahead with what Lawrence is suggesting: changing current purge behavior in -head and 10. I don't strongly object. I like the new behavior, and I expect most people would, as long as it's clearly stated in the Release Notes (as it will be, since you tagged it thus). Thanks for your work, Eric signature.asc Description: OpenPGP digital signature
Re: svn commit: r283136 - head/sys/netinet
On 21 May 2015 at 16:03, Hiren Panchasara hi...@freebsd.org wrote: I *do* want to MFC the change. And if there are no major objections, I'll go ahead with what Lawrence is suggesting: changing current purge behavior in -head and 10. For the record, that sounds reasonable to me. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283218 - stable/10/sys/dev/xen/netfront
Author: royger Date: Thu May 21 10:28:33 2015 New Revision: 283218 URL: https://svnweb.freebsd.org/changeset/base/283218 Log: MFC: r282908 netfront: wait for backend to connect before sending ARP Sponsored by: Citrix Systems RD Modified: stable/10/sys/dev/xen/netfront/netfront.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/xen/netfront/netfront.c == --- stable/10/sys/dev/xen/netfront/netfront.c Thu May 21 09:24:35 2015 (r283217) +++ stable/10/sys/dev/xen/netfront/netfront.c Thu May 21 10:28:33 2015 (r283218) @@ -683,7 +683,6 @@ netfront_backend_changed(device_t dev, X switch (newstate) { case XenbusStateInitialising: case XenbusStateInitialised: - case XenbusStateConnected: case XenbusStateUnknown: case XenbusStateClosed: case XenbusStateReconfigured: @@ -695,13 +694,15 @@ netfront_backend_changed(device_t dev, X if (network_connect(sc) != 0) break; xenbus_set_state(dev, XenbusStateConnected); -#ifdef INET - netfront_send_fake_arp(dev, sc); -#endif break; case XenbusStateClosing: xenbus_set_state(dev, XenbusStateClosed); break; + case XenbusStateConnected: +#ifdef INET + netfront_send_fake_arp(dev, sc); +#endif + break; } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r283197 - head/usr.bin/soelim
On Thu, 21 May 2015, Baptiste Daroussin wrote: Log: add an include on sys/types.h because we do explicitly use size_t remove unused stdbool.h sys/types.h may be needed for some other typedef, but not for size_t. size_t is already declared in at least 3 other of the included headers: - stdlib.h and string.h (C90 standard) - unistd.h (POSIX.1-2001 standard) sys/types.h is a prerequisite for unistd.h in POSIX.1-1990, and most section 2 man pages still document it as a prerequiste for their syscalls. They place it before the include of unistd.h but are too fuzzy to document if it is a prerequisite for unistd.h or their syscalls. But it have never actually been a prerequisite in any version of FreeBSD. In FreeBSD-1 and 4.4BSD-Lite2, unistd.h includes sys/types.h and thus gets size_t and lots of pollution. unistd.h was cleaned up a bit in 2002, but the ifdefs for things like _SIZE_T_DECLARED in this cleanup are still nonsense, because unistd.h still includes sys/types.h before these ifdefs and thus gets size_t and lots of pollution, much the same as in FreeBSD-1. Some of the section 2 headers were bogusly changed to say that sys/types.h is a prerequisite for their syscalls _after_ POSIX.1-2001 standardized it not being a prerequisite for unistd.h for the syscalls declared there. It is needed for portability to pre-POSIX.1-2001 systems that are not polluted like FreeBSD, if any. IIRC, even POSIX.1-1990 permits unistd.h (or any POSIX header) to declare any typedef ending in _t, so unistd.h can declare size_t for itself and might even work without its prerequisite. Applications just cannot depend on this. In the previous change, the use of MAXPATHLEN regressed to use of PATH_MAX. MAXPATHLEN was honestly unportable. It defined in all (?) BSD systems. PATH_MAX only defined if {PATH_MAX} is constant. It is better to be honestly unportable than to use PATH_MAX incorrectly. MAXPATHLEN required the include of sys/param.h. That gave sys/types.h and lots of undocumented pollution. Apparently, none of the pollution was needed, not even sys/types.h. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283219 - in stable/10/sys: conf dev/atkbdc
Author: royger Date: Thu May 21 10:40:18 2015 New Revision: 283219 URL: https://svnweb.freebsd.org/changeset/base/283219 Log: MFC: r282269, r282277 atkbd: remove usage of x86bios Remove leftover from r282269. Modified: stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.i386 stable/10/sys/dev/atkbdc/atkbd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.amd64 == --- stable/10/sys/conf/files.amd64 Thu May 21 10:28:33 2015 (r283218) +++ stable/10/sys/conf/files.amd64 Thu May 21 10:40:18 2015 (r283219) @@ -531,10 +531,10 @@ compat/ndis/winx64_wrap.S optionalndisa libkern/memmove.c standard libkern/memset.c standard # -# x86 real mode BIOS emulator, required by atkbdc/dpms/vesa +# x86 real mode BIOS emulator, required by dpms/vesa # -compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa -contrib/x86emu/x86emu.coptional x86bios | atkbd | dpms | vesa +compat/x86bios/x86bios.c optional x86bios | dpms | vesa +contrib/x86emu/x86emu.coptional x86bios | dpms | vesa # # bvm console # Modified: stable/10/sys/conf/files.i386 == --- stable/10/sys/conf/files.i386 Thu May 21 10:28:33 2015 (r283218) +++ stable/10/sys/conf/files.i386 Thu May 21 10:40:18 2015 (r283219) @@ -552,9 +552,9 @@ i386/xbox/xboxfb.c optional xboxfb dev/fb/boot_font.c optional xboxfb i386/xbox/pic16l.s optional xbox # -# x86 real mode BIOS support, required by atkbdc/dpms/vesa +# x86 real mode BIOS support, required by dpms/vesa # -compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa +compat/x86bios/x86bios.c optional x86bios | dpms | vesa # # x86 shared code between IA32, AMD64 and PC98 architectures # Modified: stable/10/sys/dev/atkbdc/atkbd.c == --- stable/10/sys/dev/atkbdc/atkbd.cThu May 21 10:28:33 2015 (r283218) +++ stable/10/sys/dev/atkbdc/atkbd.cThu May 21 10:40:18 2015 (r283219) @@ -44,19 +44,6 @@ __FBSDID($FreeBSD$); #include machine/bus.h #include machine/resource.h -#if defined(__i386__) || defined(__amd64__) -#include machine/md_var.h -#include machine/psl.h -#include compat/x86bios/x86bios.h -#include machine/pc/bios.h - -#include vm/vm.h -#include vm/pmap.h -#include vm/vm_param.h - -#include isa/isareg.h -#endif /* __i386__ || __amd64__ */ - #include sys/kbio.h #include dev/kbd/kbdreg.h #include dev/atkbdc/atkbdreg.h @@ -65,6 +52,9 @@ __FBSDID($FreeBSD$); static timeout_t atkbd_timeout; static voidatkbd_shutdown_final(void *v); +#define DEFAULT_DELAY 0x1 /* 500ms */ +#define DEFAULT_RATE 0x10 /* 14Hz */ + int atkbd_probe_unit(device_t dev, int irq, int flags) { @@ -239,7 +229,7 @@ static keyboard_switch_t atkbdsw = { KEYBOARD_DRIVER(atkbd, atkbdsw, atkbd_configure); /* local functions */ -static int get_typematic(keyboard_t *kbd); +static int set_typematic(keyboard_t *kbd); static int setup_kbd_port(KBDC kbdc, int port, int intr); static int get_kbd_echo(KBDC kbdc); static int probe_keyboard(KBDC kbdc, int flags); @@ -433,7 +423,7 @@ atkbd_init(int unit, keyboard_t **kbdp, goto bad; } atkbd_ioctl(kbd, KDSETLED, (caddr_t)state-ks_state); - get_typematic(kbd); + set_typematic(kbd); delay[0] = kbd-kb_delay1; delay[1] = kbd-kb_delay2; atkbd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); @@ -490,7 +480,7 @@ atkbd_intr(keyboard_t *kbd, void *arg) init_keyboard(state-kbdc, kbd-kb_type, kbd-kb_config); KBD_FOUND_DEVICE(kbd); atkbd_ioctl(kbd, KDSETLED, (caddr_t)state-ks_state); - get_typematic(kbd); + set_typematic(kbd); delay[0] = kbd-kb_delay1; delay[1] = kbd-kb_delay2; atkbd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); @@ -1089,57 +1079,19 @@ atkbd_shutdown_final(void *v) /* local functions */ static int -get_typematic(keyboard_t *kbd) +set_typematic(keyboard_t *kbd) { -#if defined(__i386__) || defined(__amd64__) - /* -* Only some systems allow us to retrieve the keyboard repeat -* rate previously set via the BIOS... -*/ - x86regs_t regs; - uint8_t *p; + int val, error; + atkbd_state_t *state = kbd-kb_data; - /* -* Traditional entry points of int 0x15 and 0x16 are fixed -* and later BIOSes follow them. (U)EFI CSM specification -* also mandates these fixed entry points. -
svn commit: r283248 - in head/sys: amd64/amd64 arm/arm arm64/arm64 ddb i386/i386 kern mips/mips powerpc/powerpc sparc64/sparc64
Author: pfg Date: Thu May 21 15:16:18 2015 New Revision: 283248 URL: https://svnweb.freebsd.org/changeset/base/283248 Log: ddb: finish converting boolean values. The replacement started at r283088 was necessarily incomplete without replacing boolean_t with bool. This also involved cleaning some type mismatches and ansifying old C function declarations. Pointed out by: bde Discussed with: bde, ian, jhb Modified: head/sys/amd64/amd64/db_disasm.c head/sys/arm/arm/db_disasm.c head/sys/arm64/arm64/db_disasm.c head/sys/ddb/db_access.c head/sys/ddb/db_access.h head/sys/ddb/db_break.c head/sys/ddb/db_capture.c head/sys/ddb/db_command.c head/sys/ddb/db_examine.c head/sys/ddb/db_expr.c head/sys/ddb/db_main.c head/sys/ddb/db_print.c head/sys/ddb/db_ps.c head/sys/ddb/db_run.c head/sys/ddb/db_script.c head/sys/ddb/db_sym.c head/sys/ddb/db_sym.h head/sys/ddb/db_textdump.c head/sys/ddb/db_thread.c head/sys/ddb/db_variables.c head/sys/ddb/db_watch.c head/sys/ddb/db_write_cmd.c head/sys/ddb/ddb.h head/sys/i386/i386/db_disasm.c head/sys/kern/subr_turnstile.c head/sys/kern/subr_witness.c head/sys/mips/mips/db_disasm.c head/sys/mips/mips/pmap.c head/sys/mips/mips/vm_machdep.c head/sys/powerpc/powerpc/db_disasm.c head/sys/sparc64/sparc64/db_disasm.c Modified: head/sys/amd64/amd64/db_disasm.c == --- head/sys/amd64/amd64/db_disasm.cThu May 21 15:05:46 2015 (r283247) +++ head/sys/amd64/amd64/db_disasm.cThu May 21 15:16:18 2015 (r283248) @@ -1223,9 +1223,7 @@ db_disasm_esc(loc, inst, rex, short_addr * next instruction. */ db_addr_t -db_disasm(loc, altfmt) - db_addr_t loc; - boolean_t altfmt; +db_disasm(db_addr_t loc, bool altfmt) { int inst; int size; Modified: head/sys/arm/arm/db_disasm.c == --- head/sys/arm/arm/db_disasm.cThu May 21 15:05:46 2015 (r283247) +++ head/sys/arm/arm/db_disasm.cThu May 21 15:16:18 2015 (r283248) @@ -70,7 +70,7 @@ db_disasm_printaddr(u_int address) } vm_offset_t -db_disasm(vm_offset_t loc, boolean_t altfmt) +db_disasm(vm_offset_t loc, bool altfmt) { return disasm(db_disasm_interface, loc, altfmt); Modified: head/sys/arm64/arm64/db_disasm.c == --- head/sys/arm64/arm64/db_disasm.cThu May 21 15:05:46 2015 (r283247) +++ head/sys/arm64/arm64/db_disasm.cThu May 21 15:16:18 2015 (r283248) @@ -33,7 +33,7 @@ __FBSDID($FreeBSD$); #include ddb/ddb.h vm_offset_t -db_disasm(vm_offset_t loc, boolean_t altfmt) +db_disasm(vm_offset_t loc, bool altfmt) { return 0; } Modified: head/sys/ddb/db_access.c == --- head/sys/ddb/db_access.cThu May 21 15:05:46 2015(r283247) +++ head/sys/ddb/db_access.cThu May 21 15:16:18 2015(r283248) @@ -54,7 +54,7 @@ static unsigned db_extend[] = { /* table #endif db_expr_t -db_get_value(db_addr_t addr, int size, boolean_t is_signed) +db_get_value(db_addr_t addr, int size, bool is_signed) { chardata[sizeof(u_int64_t)]; register db_expr_t value; Modified: head/sys/ddb/db_access.h == --- head/sys/ddb/db_access.hThu May 21 15:05:46 2015(r283247) +++ head/sys/ddb/db_access.hThu May 21 15:16:18 2015(r283248) @@ -36,7 +36,7 @@ /* * Data access functions for debugger. */ -db_expr_t db_get_value(db_addr_t addr, int size, boolean_t is_signed); +db_expr_t db_get_value(db_addr_t addr, int size, bool is_signed); void db_put_value(db_addr_t addr, int size, db_expr_t value); #endif /* !_DDB_DB_ACCESS_H_ */ Modified: head/sys/ddb/db_break.c == --- head/sys/ddb/db_break.c Thu May 21 15:05:46 2015(r283247) +++ head/sys/ddb/db_break.c Thu May 21 15:16:18 2015(r283248) @@ -155,7 +155,7 @@ db_find_breakpoint_here(db_addr_t addr) return db_find_breakpoint(db_map_addr(addr), addr); } -static boolean_t db_breakpoints_inserted = true; +static booldb_breakpoints_inserted = true; #ifndef BKPT_WRITE #defineBKPT_WRITE(addr, storage) \ @@ -267,7 +267,7 @@ db_list_breakpoints(void) /* Delete breakpoint */ /*ARGSUSED*/ void -db_delete_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) +db_delete_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { db_delete_breakpoint(db_map_addr(addr), (db_addr_t)addr); } @@ -275,8 +275,7 @@ db_delete_cmd(db_expr_t addr, boolean_t /*
svn commit: r283243 - head/lib/libufs
Author: imp Date: Thu May 21 14:36:11 2015 New Revision: 283243 URL: https://svnweb.freebsd.org/changeset/base/283243 Log: Remove the stray DEBUG_FLAGS=-g line that snuck in with the soft-updates journaling project merge in r207141. Modified: head/lib/libufs/Makefile Modified: head/lib/libufs/Makefile == --- head/lib/libufs/MakefileThu May 21 13:42:37 2015(r283242) +++ head/lib/libufs/MakefileThu May 21 14:36:11 2015(r283243) @@ -21,7 +21,6 @@ MLINKS+= ufs_disk_close.3 ufs_disk_write WARNS?=2 -DEBUG_FLAGS = -g CFLAGS+= -D_LIBUFS .if defined(LIBUFS_DEBUG) CFLAGS+= -D_LIBUFS_DEBUGGING ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283247 - head/tools/build/mk
Author: bapt Date: Thu May 21 15:05:46 2015 New Revision: 283247 URL: https://svnweb.freebsd.org/changeset/base/283247 Log: Mark libgomp.so.1 as an old lib not an old file Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 21 14:36:15 2015(r283246) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 21 15:05:46 2015(r283247) @@ -1751,7 +1751,7 @@ OLD_FILES+=usr/include/omp.h OLD_FILES+=usr/lib/libgcov.a OLD_FILES+=usr/lib/libgomp.a OLD_FILES+=usr/lib/libgomp.so -OLD_FILES+=usr/lib/libgomp.so.1 +OLD_LIBS+=usr/lib/libgomp.so.1 OLD_FILES+=usr/lib/libgomp_p.a OLD_FILES+=usr/libexec/cc1 OLD_FILES+=usr/libexec/cc1plus ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283246 - head/usr.sbin/bluetooth/bthidd
Author: imp Date: Thu May 21 14:36:15 2015 New Revision: 283246 URL: https://svnweb.freebsd.org/changeset/base/283246 Log: Remove stray DEBUG_FLAGS=-g that snuck in with r137868 Modified: head/usr.sbin/bluetooth/bthidd/Makefile Modified: head/usr.sbin/bluetooth/bthidd/Makefile == --- head/usr.sbin/bluetooth/bthidd/Makefile Thu May 21 14:36:14 2015 (r283245) +++ head/usr.sbin/bluetooth/bthidd/Makefile Thu May 21 14:36:15 2015 (r283246) @@ -8,7 +8,6 @@ SRCS= bthidd.c client.c hid.c kbd.c lex session.c CFLAGS+= -I${.CURDIR} -DEBUG_FLAGS= -g LIBADD+= bluetooth usbhid ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283245 - head/usr.bin/tar
Author: imp Date: Thu May 21 14:36:14 2015 New Revision: 283245 URL: https://svnweb.freebsd.org/changeset/base/283245 Log: Remove stray DEBUG_FLAGS=-g that snuck in with r184761. Modified: head/usr.bin/tar/Makefile Modified: head/usr.bin/tar/Makefile == --- head/usr.bin/tar/Makefile Thu May 21 14:36:12 2015(r283244) +++ head/usr.bin/tar/Makefile Thu May 21 14:36:14 2015(r283245) @@ -31,7 +31,6 @@ CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBA CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar MLINKS=bsdtar.1 tar.1 -DEBUG_FLAGS=-g .PHONY: check test clean-test check test: $(PROG) bsdtar.1.gz ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283244 - head/cddl/usr.bin/ctfconvert
Author: imp Date: Thu May 21 14:36:12 2015 New Revision: 283244 URL: https://svnweb.freebsd.org/changeset/base/283244 Log: Remove stray DEBUG_FLAGS=-g that's been here since the initial import. Modified: head/cddl/usr.bin/ctfconvert/Makefile Modified: head/cddl/usr.bin/ctfconvert/Makefile == --- head/cddl/usr.bin/ctfconvert/Makefile Thu May 21 14:36:11 2015 (r283243) +++ head/cddl/usr.bin/ctfconvert/Makefile Thu May 21 14:36:12 2015 (r283244) @@ -3,8 +3,6 @@ .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt -DEBUG_FLAGS= -g - PROG= ctfconvert SRCS= alist.c \ ctf.c \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283232 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:26:52 2015 New Revision: 283232 URL: https://svnweb.freebsd.org/changeset/base/283232 Log: MFC r279843: Refactor. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:25:28 2015 (r283231) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:26:52 2015 (r283232) @@ -449,6 +449,18 @@ node_expand_defined(struct node *n) return (cumulated_error); } +static bool +node_is_direct_key(const struct node *n) +{ + + if (n-n_parent != NULL n-n_parent-n_parent == NULL + strcmp(n-n_key, /-) == 0) { + return (true); + } + + return (false); +} + bool node_is_direct_map(const struct node *n) { @@ -460,11 +472,7 @@ node_is_direct_map(const struct node *n) n = n-n_parent; } - assert(n-n_key != NULL); - if (strcmp(n-n_key, /-) != 0) - return (false); - - return (true); + return (node_is_direct_key(n)); } bool @@ -538,11 +546,8 @@ node_path_x(const struct node *n, char * * Return /- for direct maps only if we were asked for path * to the /- node itself, not to any of its subnodes. */ - if (n-n_parent-n_parent == NULL - strcmp(n-n_key, /-) == 0 - x[0] != '\0') { + if (node_is_direct_key(n) x[0] != '\0') return (x); - } assert(n-n_key[0] != '\0'); path = concat(n-n_key, '/', x); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283237 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:34:33 2015 New Revision: 283237 URL: https://svnweb.freebsd.org/changeset/base/283237 Log: MFC r279914: Options from auto_master must be appended to options from maps, not prepended. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automountd.c == --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:33:06 2015 (r283236) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:34:33 2015 (r283237) @@ -232,7 +232,11 @@ handle_request(const struct autofs_daemo } options = node_options(node); - options = concat(adr-adr_options, ',', options); + + /* +* Append options from auto_master. +*/ + options = concat(options, ',', adr-adr_options); /* * Prepend options passed via automountd(8) command line. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283238 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:36:00 2015 New Revision: 283238 URL: https://svnweb.freebsd.org/changeset/base/283238 Log: MFC r279915: Make concat() accept NULL arguments. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automount.c == --- stable/10/usr.sbin/autofs/automount.c Thu May 21 13:34:33 2015 (r283237) +++ stable/10/usr.sbin/autofs/automount.c Thu May 21 13:36:00 2015 (r283238) @@ -345,11 +345,7 @@ main_automount(int argc, char **argv) force_unmount = true; break; case 'o': - if (options == NULL) { - options = checked_strdup(optarg); - } else { - options = concat(options, ',', optarg); - } + options = concat(options, ',', optarg); break; case 'u': do_unmount = true; @@ -385,9 +381,7 @@ main_automount(int argc, char **argv) parse_master(root, AUTO_MASTER_PATH); if (show_maps) { - if (options != NULL) { - root-n_options = concat(options, ',', root-n_options); - } + root-n_options = concat(options, ',', root-n_options); if (show_maps 1) { node_expand_indirect_maps(root); node_expand_ampersand(root, NULL); Modified: stable/10/usr.sbin/autofs/automountd.c == --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:34:33 2015 (r283237) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:36:00 2015 (r283238) @@ -241,8 +241,7 @@ handle_request(const struct autofs_daemo /* * Prepend options passed via automountd(8) command line. */ - if (cmdline_options != NULL) - options = concat(cmdline_options, ',', options); + options = concat(cmdline_options, ',', options); if (node-n_location == NULL) { log_debugx(found node defined at %s:%d; not a mountpoint, @@ -455,11 +454,7 @@ main_automountd(int argc, char **argv) maxproc = atoi(optarg); break; case 'o': - if (options == NULL) { - options = checked_strdup(optarg); - } else { - options = concat(options, ',', optarg); - } + options = concat(options, ',', optarg); break; case 'v': debug++; Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:34:33 2015 (r283237) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:36:00 2015 (r283238) @@ -94,8 +94,10 @@ concat(const char *s1, char separator, c char *result; int ret; - assert(s1 != NULL); - assert(s2 != NULL); + if (s1 == NULL) + s1 = ; + if (s2 == NULL) + s2 = ; /* * If s2 starts with separator - skip it; otherwise concatenating ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283240 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:39:38 2015 New Revision: 283240 URL: https://svnweb.freebsd.org/changeset/base/283240 Log: MFC r279953: Rework the concat() algorithm to be correct in all cases. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:37:48 2015 (r283239) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:39:38 2015 (r283240) @@ -92,6 +92,7 @@ char * concat(const char *s1, char separator, const char *s2) { char *result; + char s1last, s2first; int ret; if (s1 == NULL) @@ -99,14 +100,22 @@ concat(const char *s1, char separator, c if (s2 == NULL) s2 = ; - /* -* If s2 starts with separator - skip it; otherwise concatenating -* / and /foo would end up returning //foo. -*/ - if (s2[0] == separator) - s2++; + if (s1[0] == '\0') + s1last = '\0'; + else + s1last = s1[strlen(s1) - 1]; - if (s1[0] == '\0' || s2[0] == '\0' || s1[strlen(s1) - 1] == separator) { + s2first = s2[0]; + + if (s1last == separator s2first == separator) { + /* +* If s1 ends with the separator and s2 begins with +* it - skip the latter; otherwise concatenating / +* and /foo would end up returning //foo. +*/ + ret = asprintf(result, %s%s, s1, s2 + 1); + } else if (s1last == separator || s2first == separator || + s1[0] == '\0' || s2[0] == '\0') { ret = asprintf(result, %s%s, s1, s2); } else { ret = asprintf(result, %s%c%s, s1, separator, s2); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283230 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:23:49 2015 New Revision: 283230 URL: https://svnweb.freebsd.org/changeset/base/283230 Log: MFC r279812: Remove some particularly bad code; no functional changes. MFC r279815: Erm, revert chunk committed by mistake. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:21:03 2015 (r283229) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:23:49 2015 (r283230) @@ -86,46 +86,7 @@ checked_strdup(const char *s) } /* - * Take two pointers to strings, concatenate the contents with / in the - * middle, make the first pointer point to the result, the second pointer - * to NULL, and free the old strings. - * - * Concatenate pathnames, basically. - */ -static void -concat(char **p1, char **p2) -{ - int ret; - char *path; - - assert(p1 != NULL); - assert(p2 != NULL); - - if (*p1 == NULL) - *p1 = checked_strdup(); - - if (*p2 == NULL) - *p2 = checked_strdup(); - - ret = asprintf(path, %s/%s, *p1, *p2); - if (ret 0) - log_err(1, asprintf); - - /* -* XXX -*/ - //free(*p1); - //free(*p2); - - *p1 = path; - *p2 = NULL; -} - -/* * Concatenate two strings, inserting separator between them, unless not needed. - * - * This function is very convenient to use when you do not care about freeing - * memory - which is okay here, because we are a short running process. */ char * separated_concat(const char *s1, const char *s2, char separator) @@ -151,7 +112,7 @@ separated_concat(const char *s1, const c if (ret 0) log_err(1, asprintf); - //log_debugx(separated_concat: got %s and %s, returning %s, s1, s2, result); + //log_debugx(%s: got %s and %s, returning %s, __func__, s1, s2, result); return (result); } @@ -159,7 +120,7 @@ separated_concat(const char *s1, const c void create_directory(const char *path) { - char *component, *copy, *tofree, *partial; + char *component, *copy, *tofree, *partial, *tmp; int error; assert(path[0] == '/'); @@ -169,12 +130,14 @@ create_directory(const char *path) */ copy = tofree = checked_strdup(path + 1); - partial = NULL; + partial = checked_strdup(); for (;;) { component = strsep(copy, /); if (component == NULL) break; - concat(partial, component); + tmp = separated_concat(partial, component, '/'); + free(partial); + partial = tmp; //log_debugx(creating \%s\, partial); error = mkdir(partial, 0755); if (error != 0 errno != EEXIST) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283231 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:25:28 2015 New Revision: 283231 URL: https://svnweb.freebsd.org/changeset/base/283231 Log: MFC r279813: Make things more readable; no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/common.c stable/10/usr.sbin/autofs/common.h stable/10/usr.sbin/autofs/popen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automount.c == --- stable/10/usr.sbin/autofs/automount.c Thu May 21 13:23:49 2015 (r283230) +++ stable/10/usr.sbin/autofs/automount.c Thu May 21 13:25:28 2015 (r283231) @@ -349,8 +349,7 @@ main_automount(int argc, char **argv) if (options == NULL) { options = checked_strdup(optarg); } else { - options = - separated_concat(options, optarg, ','); + options = concat(options, ',', optarg); } break; case 'u': @@ -388,8 +387,7 @@ main_automount(int argc, char **argv) if (show_maps) { if (options != NULL) { - root-n_options = separated_concat(options, - root-n_options, ','); + root-n_options = concat(options, ',', root-n_options); } if (show_maps 1) { node_expand_indirect_maps(root); Modified: stable/10/usr.sbin/autofs/automountd.c == --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:23:49 2015 (r283230) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:25:28 2015 (r283231) @@ -241,8 +241,7 @@ handle_request(const struct autofs_daemo * Prepend options passed via automountd(8) command line. */ if (cmdline_options != NULL) { - options = - separated_concat(cmdline_options, options, ','); + options = concat(cmdline_options, ',', options); } nobrowse = pick_option(nobrowse, options); @@ -268,8 +267,7 @@ handle_request(const struct autofs_daemo * We still need to create the single subdirectory * user is trying to access. */ - tmp = separated_concat(adr-adr_path, - adr-adr_key, '/'); + tmp = concat(adr-adr_path, '/', adr-adr_key); node = node_find(root, tmp); if (node != NULL) create_subtree(node, false); @@ -301,12 +299,12 @@ handle_request(const struct autofs_daemo * Prepend options passed via automountd(8) command line. */ if (cmdline_options != NULL) - options = separated_concat(cmdline_options, options, ','); + options = concat(cmdline_options, ',', options); /* * Append automounted. */ - options = separated_concat(options, automounted, ','); + options = concat(options, ',', automounted); /* * Remove nobrowse, mount(8) doesn't understand it. @@ -334,11 +332,10 @@ handle_request(const struct autofs_daemo if (retrycnt == NULL) { log_debugx(retrycnt not specified in options; defaulting to 1); - options = separated_concat(options, - separated_concat(retrycnt, 1, '='), ','); + options = concat(options, ',', retrycnt=1); } else { - options = separated_concat(options, - separated_concat(retrycnt, retrycnt, '='), ','); + options = concat(options, ',', + concat(retrycnt, '=', retrycnt)); } } @@ -465,8 +462,7 @@ main_automountd(int argc, char **argv) if (options == NULL) { options = checked_strdup(optarg); } else { - options = - separated_concat(options, optarg, ','); + options = concat(options, ',', optarg); } break; case 'v': Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:23:49 2015
svn commit: r283234 - stable/10/usr.bin/ar
Author: emaste Date: Thu May 21 13:30:10 2015 New Revision: 283234 URL: https://svnweb.freebsd.org/changeset/base/283234 Log: MFC r276774: ar: Avoid null pointer deref while reading corrupt archives ELF Tool Chain ticket #467 Reported by: Alexander Cherepanov chere...@mccme.ru Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/ar/read.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ar/read.c == --- stable/10/usr.bin/ar/read.c Thu May 21 13:29:34 2015(r283233) +++ stable/10/usr.bin/ar/read.c Thu May 21 13:30:10 2015(r283234) @@ -102,7 +102,8 @@ read_archive(struct bsdar *bsdar, char m continue; } - name = archive_entry_pathname(entry); + if ((name = archive_entry_pathname(entry)) == NULL) + break; /* Skip pseudo members. */ if (strcmp(name, /) == 0 || strcmp(name, //) == 0) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283235 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:31:44 2015 New Revision: 283235 URL: https://svnweb.freebsd.org/changeset/base/283235 Log: MFC r279846: Properly pass options for direct maps. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/automountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automount.c == --- stable/10/usr.sbin/autofs/automount.c Thu May 21 13:30:10 2015 (r283234) +++ stable/10/usr.sbin/autofs/automount.c Thu May 21 13:31:44 2015 (r283235) @@ -141,8 +141,8 @@ mount_autofs(const char *from, const cha } static void -mount_if_not_already(const struct node *n, const char *map, -const struct statfs *mntbuf, int nitems) +mount_if_not_already(const struct node *n, const char *map, const char *options, +const char *prefix, const struct statfs *mntbuf, int nitems) { const struct statfs *sb; char *mountpoint; @@ -175,7 +175,7 @@ mount_if_not_already(const struct node * mountpoint); } - mount_autofs(from, mountpoint, n-n_options, n-n_key); + mount_autofs(from, mountpoint, options, prefix); free(from); free(mountpoint); } @@ -184,7 +184,7 @@ static void mount_unmount(struct node *root) { struct statfs *mntbuf; - struct node *n, *n2, *n3; + struct node *n, *n2; int i, nitems; nitems = getmntinfo(mntbuf, MNT_WAIT); @@ -216,15 +216,14 @@ mount_unmount(struct node *root) TAILQ_FOREACH(n, root-n_children, n_next) { if (!node_is_direct_map(n)) { - mount_if_not_already(n, n-n_map, mntbuf, nitems); + mount_if_not_already(n, n-n_map, n-n_options, + n-n_key, mntbuf, nitems); continue; } TAILQ_FOREACH(n2, n-n_children, n_next) { - TAILQ_FOREACH(n3, n2-n_children, n_next) { - mount_if_not_already(n3, n-n_map, - mntbuf, nitems); - } + mount_if_not_already(n2, n-n_map, n-n_options, + /, mntbuf, nitems); } } } Modified: stable/10/usr.sbin/autofs/automountd.c == --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:30:10 2015 (r283234) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:31:44 2015 (r283235) @@ -202,7 +202,7 @@ handle_request(const struct autofs_daemo parent = root; } else { parent = node_new_map(root, checked_strdup(adr-adr_prefix), - checked_strdup(adr-adr_options), checked_strdup(map), + NULL, checked_strdup(map), checked_strdup([kernel request]), lineno); } @@ -231,19 +231,19 @@ handle_request(const struct autofs_daemo failing mount, map, adr-adr_path); } + options = node_options(node); + options = concat(adr-adr_options, ',', options); + + /* +* Prepend options passed via automountd(8) command line. +*/ + if (cmdline_options != NULL) + options = concat(cmdline_options, ',', options); + if (node-n_location == NULL) { log_debugx(found node defined at %s:%d; not a mountpoint, node-n_config_file, node-n_config_line); - options = node_options(node); - - /* -* Prepend options passed via automountd(8) command line. -*/ - if (cmdline_options != NULL) { - options = concat(cmdline_options, ',', options); - } - nobrowse = pick_option(nobrowse, options); if (nobrowse != NULL adr-adr_key[0] == '\0') { log_debugx(skipping map %s due to \nobrowse\ @@ -293,14 +293,6 @@ handle_request(const struct autofs_daemo failing mount, adr-adr_path); } - options = node_options(node); - - /* -* Prepend options passed via automountd(8) command line. -*/ - if (cmdline_options != NULL) - options = concat(cmdline_options, ',', options); - /* * Append automounted. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283241 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:41:08 2015 New Revision: 283241 URL: https://svnweb.freebsd.org/changeset/base/283241 Log: MFC r279954: Get executable direct maps to work. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automountd.c == --- stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:39:38 2015 (r283240) +++ stable/10/usr.sbin/autofs/automountd.c Thu May 21 13:41:08 2015 (r283241) @@ -177,7 +177,7 @@ handle_request(const struct autofs_daemo const char *map; struct node *root, *parent, *node; FILE *f; - char *options, *fstype, *nobrowse, *retrycnt, *tmp; + char *key, *options, *fstype, *nobrowse, *retrycnt, *tmp; int error; bool wildcards; @@ -199,11 +199,25 @@ handle_request(const struct autofs_daemo map = adr-adr_from + 4; /* 4 for strlen(map ); */ root = node_new_root(); if (adr-adr_prefix[0] == '\0' || strcmp(adr-adr_prefix, /) == 0) { + /* +* Direct map. autofs(4) doesn't have a way to determine +* correct map key, but since it's a direct map, we can just +* use adr_path instead. +*/ parent = root; + key = checked_strdup(adr-adr_path); } else { + /* +* Indirect map. +*/ parent = node_new_map(root, checked_strdup(adr-adr_prefix), NULL, checked_strdup(map), checked_strdup([kernel request]), lineno); + + if (adr-adr_key[0] == '\0') + key = NULL; + else + key = checked_strdup(adr-adr_key); } /* @@ -213,8 +227,7 @@ handle_request(const struct autofs_daemo * needs to be done for maps with wildcard entries, but also * for special and executable maps. */ - parse_map(parent, map, adr-adr_key[0] != '\0' ? adr-adr_key : NULL, - wildcards); + parse_map(parent, map, key, wildcards); if (!wildcards) wildcards = node_has_wildcards(parent); if (wildcards) @@ -222,8 +235,8 @@ handle_request(const struct autofs_daemo else log_debugx(map does not contain wildcard entries); - if (adr-adr_key[0] != '\0') - node_expand_wildcard(root, adr-adr_key); + if (key != NULL) + node_expand_wildcard(root, key); node = node_find(root, adr-adr_path); if (node == NULL) { @@ -248,7 +261,7 @@ handle_request(const struct autofs_daemo node-n_config_file, node-n_config_line); nobrowse = pick_option(nobrowse, options); - if (nobrowse != NULL adr-adr_key[0] == '\0') { + if (nobrowse != NULL key == NULL) { log_debugx(skipping map %s due to \nobrowse\ option; exiting, map); done(0, true); @@ -265,12 +278,12 @@ handle_request(const struct autofs_daemo */ create_subtree(node, incomplete_hierarchy); - if (incomplete_hierarchy adr-adr_key[0] != '\0') { + if (incomplete_hierarchy key != NULL) { /* * We still need to create the single subdirectory * user is trying to access. */ - tmp = concat(adr-adr_path, '/', adr-adr_key); + tmp = concat(adr-adr_path, '/', key); node = node_find(root, tmp); if (node != NULL) create_subtree(node, false); @@ -288,8 +301,8 @@ handle_request(const struct autofs_daemo log_debugx(found node defined at %s:%d; it is a mountpoint, node-n_config_file, node-n_config_line); - node_expand_ampersand(node, - adr-adr_key[0] != '\0' ? adr-adr_key : NULL); + if (key != NULL) + node_expand_ampersand(node, key); error = node_expand_defined(node); if (error != 0) { log_errx(1, variable expansion failed for %s; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283233 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:29:34 2015 New Revision: 283233 URL: https://svnweb.freebsd.org/changeset/base/283233 Log: MFC r279845: Fix handling of direct maps, broken in r275756. Previously, running automount(8) would unmount direct map trigger nodes every second time. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:26:52 2015 (r283232) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:29:34 2015 (r283233) @@ -661,23 +661,25 @@ node_find_x(struct node *node, const cha char *tmp; size_t tmplen; - //log_debugx(looking up %s in %s, path, node-n_key); + //log_debugx(looking up %s in %s, path, node_path(node)); - tmp = node_path(node); - tmplen = strlen(tmp); - if (strncmp(tmp, path, tmplen) != 0) { - free(tmp); - return (NULL); - } - if (path[tmplen] != '/' path[tmplen] != '\0') { - /* -* If we have two map entries like 'foo' and 'foobar', make -* sure the search for 'foobar' won't match 'foo' instead. -*/ + if (!node_is_direct_key(node)) { + tmp = node_path(node); + tmplen = strlen(tmp); + if (strncmp(tmp, path, tmplen) != 0) { + free(tmp); + return (NULL); + } + if (path[tmplen] != '/' path[tmplen] != '\0') { + /* +* If we have two map entries like 'foo' and 'foobar', make +* sure the search for 'foobar' won't match 'foo' instead. +*/ + free(tmp); + return (NULL); + } free(tmp); - return (NULL); } - free(tmp); TAILQ_FOREACH(child, node-n_children, n_next) { found = node_find_x(child, path); @@ -685,6 +687,9 @@ node_find_x(struct node *node, const cha return (found); } + if (node-n_parent == NULL || node_is_direct_key(node)) + return (NULL); + return (node); } @@ -693,9 +698,12 @@ node_find(struct node *root, const char { struct node *node; + assert(root-n_parent == NULL); + node = node_find_x(root, path); - if (node == root) - return (NULL); + if (node != NULL) + assert(node != root); + return (node); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283242 - in stable/10: etc etc/autofs usr.sbin/autofs
Author: trasz Date: Thu May 21 13:42:37 2015 New Revision: 283242 URL: https://svnweb.freebsd.org/changeset/base/283242 Log: MFC r279955: Add -noauto autofs map, for automatic handling of fstab entries marked noauto. Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/etc/autofs/special_noauto - copied unchanged from r279955, head/etc/autofs/special_noauto Modified: stable/10/etc/auto_master stable/10/etc/autofs/Makefile stable/10/usr.sbin/autofs/auto_master.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master == --- stable/10/etc/auto_master Thu May 21 13:41:08 2015(r283241) +++ stable/10/etc/auto_master Thu May 21 13:42:37 2015(r283242) @@ -6,3 +6,4 @@ # When using the -media special map, make sure to edit devd.conf(5) # to move the call to automount -c out of the comments section. #/media-media -nosuid +#/--noauto Modified: stable/10/etc/autofs/Makefile == --- stable/10/etc/autofs/Makefile Thu May 21 13:41:08 2015 (r283241) +++ stable/10/etc/autofs/Makefile Thu May 21 13:42:37 2015 (r283242) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= include_ldap special_hosts special_media special_null +FILES= include_ldap special_hosts special_media special_noauto special_null NO_OBJ= FILESDIR= /etc/autofs Copied: stable/10/etc/autofs/special_noauto (from r279955, head/etc/autofs/special_noauto) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/autofs/special_noauto Thu May 21 13:42:37 2015 (r283242, copy of r279955, head/etc/autofs/special_noauto) @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +print_available() { + sed 's/#.*//' /etc/fstab | awk '$4 ~ /noauto/ { print $2 }' +} + +print_one() { + local _mntpoint + + _mntpoint=${1%/} + + sed 's/#.*//' /etc/fstab | awk ' + $2 == '${_mntpoint}' $4 ~ /noauto/ { + if ($1 ~ /:/) { dev=$1 } else { dev=:$1 } + print -fstype= $3 , $4, dev + }' +} + +if [ $# -eq 0 ]; then + print_available + exit 0 +fi + +print_one $1 +exit 0 + Modified: stable/10/usr.sbin/autofs/auto_master.5 == --- stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:41:08 2015 (r283241) +++ stable/10/usr.sbin/autofs/auto_master.5 Thu May 21 13:42:37 2015 (r283242) @@ -27,7 +27,7 @@ .\ .\ $FreeBSD$ .\ -.Dd January 9, 2015 +.Dd March 13, 2015 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -260,6 +260,11 @@ when they are automatically created. .It Li -media Query devices that are not yet mounted, but contain valid filesystems. Generally used to access files on removable media. +.It Li -noauto +Mount filesystems configured in +.Xr fstab 5 +as noauto. +This needs to be set up as a direct map. .It Li -null Prevent .Xr automountd 8 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283236 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:33:06 2015 New Revision: 283236 URL: https://svnweb.freebsd.org/changeset/base/283236 Log: MFC r279851: Fix typo. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automountd.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automountd.8 == --- stable/10/usr.sbin/autofs/automountd.8 Thu May 21 13:31:44 2015 (r283235) +++ stable/10/usr.sbin/autofs/automountd.8 Thu May 21 13:33:06 2015 (r283236) @@ -27,7 +27,7 @@ .\ .\ $FreeBSD$ .\ -.Dd April 20, 2014 +.Dd March 10, 2015 .Dt AUTOMOUNTD 8 .Os .Sh NAME @@ -78,7 +78,7 @@ The default is 30. Debug mode: increase verbosity and do not daemonize. .It Fl o Ar options Specify mount options. -Options specified here ill be overridden by options entered in maps or +Options specified here will be overridden by options entered in maps or .Xr auto_master 5 . .It Fl v Increase verbosity. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283239 - stable/10/usr.sbin/autofs
Author: trasz Date: Thu May 21 13:37:48 2015 New Revision: 283239 URL: https://svnweb.freebsd.org/changeset/base/283239 Log: MFC r279916: Make automount -LL -o whatever present options in the same order as used by automountd(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/common.c stable/10/usr.sbin/autofs/common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automount.c == --- stable/10/usr.sbin/autofs/automount.c Thu May 21 13:36:00 2015 (r283238) +++ stable/10/usr.sbin/autofs/automount.c Thu May 21 13:37:48 2015 (r283239) @@ -381,13 +381,12 @@ main_automount(int argc, char **argv) parse_master(root, AUTO_MASTER_PATH); if (show_maps) { - root-n_options = concat(options, ',', root-n_options); if (show_maps 1) { node_expand_indirect_maps(root); node_expand_ampersand(root, NULL); } node_expand_defined(root); - node_print(root); + node_print(root, options); return (0); } Modified: stable/10/usr.sbin/autofs/common.c == --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:36:00 2015 (r283238) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:37:48 2015 (r283239) @@ -607,13 +607,16 @@ node_options(const struct node *n) } static void -node_print_indent(const struct node *n, int indent) +node_print_indent(const struct node *n, const char *cmdline_options, +int indent) { const struct node *child, *first_child; - char *path, *options; + char *path, *options, *tmp; path = node_path(n); - options = node_options(n); + tmp = node_options(n); + options = concat(cmdline_options, ',', tmp); + free(tmp); /* * Do not show both parent and child node if they have the same @@ -644,16 +647,21 @@ node_print_indent(const struct node *n, free(options); TAILQ_FOREACH(child, n-n_children, n_next) - node_print_indent(child, indent + 2); + node_print_indent(child, cmdline_options, indent + 2); } +/* + * Recursively print node with all its children. The cmdline_options + * argument is used for additional options to be prepended to all the + * others - usually those are the options passed by command line. + */ void -node_print(const struct node *n) +node_print(const struct node *n, const char *cmdline_options) { const struct node *child; TAILQ_FOREACH(child, n-n_children, n_next) - node_print_indent(child, 0); + node_print_indent(child, cmdline_options, 0); } static struct node * Modified: stable/10/usr.sbin/autofs/common.h == --- stable/10/usr.sbin/autofs/common.h Thu May 21 13:36:00 2015 (r283238) +++ stable/10/usr.sbin/autofs/common.h Thu May 21 13:37:48 2015 (r283239) @@ -87,7 +87,7 @@ void node_expand_ampersand(struct node * void node_expand_wildcard(struct node *root, const char *key); intnode_expand_defined(struct node *root); void node_expand_indirect_maps(struct node *n); -void node_print(const struct node *n); +void node_print(const struct node *n, const char *cmdline_options); void parse_master(struct node *root, const char *path); void parse_map(struct node *parent, const char *map, const char *args, bool *wildcards); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283273 - head/sys/fs/nfsclient
Author: rmacklem Date: Thu May 21 23:14:18 2015 New Revision: 283273 URL: https://svnweb.freebsd.org/changeset/base/283273 Log: The NFS client wasn't handling getdirentries(2) requests for sizes that are not an exact multiple of DIRBLKSIZ correctly. Fortunately readdir(3) always uses an exact multiple of DIRBLKSIZ, so few applications were affected. This patch fixes this problem by reducing the size of the directory read to an exact multiple of DIRBLKSIZ. Tested by:trasz Reported by: trasz Reviewed by: trasz MFC after:2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c == --- head/sys/fs/nfsclient/nfs_clvnops.c Thu May 21 22:50:39 2015 (r283272) +++ head/sys/fs/nfsclient/nfs_clvnops.c Thu May 21 23:14:18 2015 (r283273) @@ -2210,7 +2210,7 @@ nfs_readdir(struct vop_readdir_args *ap) struct vnode *vp = ap-a_vp; struct nfsnode *np = VTONFS(vp); struct uio *uio = ap-a_uio; - ssize_t tresid; + ssize_t tresid, left; int error = 0; struct vattr vattr; @@ -2239,6 +2239,17 @@ nfs_readdir(struct vop_readdir_args *ap) } /* +* NFS always guarantees that directory entries don't straddle +* DIRBLKSIZ boundaries. As such, we need to limit the size +* to an exact multiple of DIRBLKSIZ, to avoid copying a partial +* directory entry. +*/ + left = uio-uio_resid % DIRBLKSIZ; + if (left == uio-uio_resid) + return (EINVAL); + uio-uio_resid -= left; + + /* * Call ncl_bioread() to do the real work. */ tresid = uio-uio_resid; @@ -2249,6 +2260,9 @@ nfs_readdir(struct vop_readdir_args *ap) if (ap-a_eofflag != NULL) *ap-a_eofflag = 1; } + + /* Add the partial DIRBLKSIZ (left) back in. */ + uio-uio_resid += left; return (error); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283271 - head/release
Author: gjb Date: Thu May 21 22:11:57 2015 New Revision: 283271 URL: https://svnweb.freebsd.org/changeset/base/283271 Log: If TARGET or EMBEDDED_TARGET == arm, set EMBEDDED variable, which helps control some of the arm-specific bits a bit more cleanly (but not really 'clean'). If BOARDNAME is defined (as is in the WANDBOARD configuration RE uses), do some magic to work with the KERNCONF and BOARDNAME to rename the file, making it a bit more intuitive for the consumer to determine which they need. Yes, it is ugly, that is why there is a big warning at the top. It is, however, still much cleaner than the now 474-line shell script, and this Makefile produces the hierarchy needed without much evil. MFC after:1 week X-MFC-Note: needs all previous Makefile.mirror commits Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors == --- head/release/Makefile.mirrors Thu May 21 21:45:37 2015 (r283270) +++ head/release/Makefile.mirrors Thu May 21 22:11:57 2015 (r283271) @@ -18,12 +18,14 @@ RELEASEDIR?=/R FTPDIR?= ${RELEASEDIR}/ftp-stage STAGE_TARGETS?=iso-images-stage +.if ${TARGET} == arm || ${EMBEDDED_TARGET} == arm +EMBEDDED= 1 +.endif + # snapshot .if ${BRANCH} == STABLE || ${BRANCH} == CURRENT SNAPSHOT= 1 TLD?= ${FTPDIR}/snapshots -BUILDDATE!=cd ${.CURDIR} date -j -f '%s' $$(stat -f %c ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d -_SNAP_SUFFIX:= -${BUILDDATE} . for _D in /usr/bin /usr/local/bin . for _S in svnversion svnliteversion . if exists(${_D}/${_S}) @@ -31,9 +33,16 @@ SVNVERSION?= ${_D}/${_S} . endif . endfor . endfor +. if exists(${.CURDIR}/${.OBJDIR}/dist/base/bin/sh) +BUILDDATE!=cd ${.CURDIR} date -j -f '%s' $$(stat -f %c ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d +. else +BUILDDATE!=date +%Y%m%d +. endif . if exists(${SVNVERSION}) !empty(SVNVERSION) SVNREVISION!= ${SVNVERSION} ${WORLDDIR}/Makefile -_SNAP_SUFFIX:= ${_SNAP_SUFFIX}-r${SVNREVISION} +_SNAP_SUFFIX:= -r${SVNREVISION}-${BUILDDATE} +. else +_SNAP_SUFFIX:= -${BUILDDATE} . endif .else # release @@ -41,6 +50,20 @@ SNAPSHOT= TLD?= ${FTPDIR}/releases .endif +.if defined(EMBEDDED) !empty(EMBEDDED) +. if ${TARGET} == arm ${TARGET_ARCH} == armv6 +. if !defined(BOARDNAME) empty(BOARDNAME) +BOARDNAME:=${KERNCONF} +. else +OLDNAME:= ${KERNCONF} +. endif +. if ${BRANCH} == STABLE || ${BRANCH} == CURRENT +SNAPSHOT= 1 +. endif +IMAGES:= ${BOARDNAME}.img +. endif # arm/armv6 +.endif # embedded + .if defined(WITH_VMIMAGES) !empty(WITH_VMIMAGES) STAGE_TARGETS+=vm-images-stage VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} @@ -61,10 +84,19 @@ iso-images-stage: .if exists(${RELEASEDIR}) @# Assume we have images to copy. . for IMAGE in ${IMAGES} + @# arm/armv6 IMX6 - WANDBOARD, for example. +. if defined(OLDNAME) !empty(OLDNAME) + cd ${RELEASEDIR} mv ${OSRELEASE}-${IMAGE:S,${BOARDNAME},${OLDNAME},}.xz \ + ${OSRELEASE}-${IMAGE}.xz +. endif +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}) cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ ${ISO_DIR}/${OSRELEASE}-${IMAGE} +. endif +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz +. endif . if exists(${RELEASEDIR}/CHECKSUM.${CHECKSUM}) cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM} \ ${ISO_DIR}/CHECKSUM.${CHECKSUM} @@ -75,31 +107,40 @@ iso-images-stage: .if defined(SNAPSHOT) !empty(SNAPSHOT) . for IMAGE in ${IMAGES} cd ${ISO_DIR} mv ${OSRELEASE}-${IMAGE} \ - ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} || true cd ${ISO_DIR} mv ${OSRELEASE}-${IMAGE}.xz \ - ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz + ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true cd ${TLD}/ISO-IMAGES/${REVISION} \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} || true cd ${TLD}/ISO-IMAGES/${REVISION} \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true + cd ${TLD} find -L . -type l | xargs rm . endfor . for
svn commit: r283272 - head/release
Author: gjb Date: Thu May 21 22:50:39 2015 New Revision: 283272 URL: https://svnweb.freebsd.org/changeset/base/283272 Log: Fix make(1) syntax error for non-embedded targets. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors == --- head/release/Makefile.mirrors Thu May 21 22:11:57 2015 (r283271) +++ head/release/Makefile.mirrors Thu May 21 22:50:39 2015 (r283272) @@ -18,8 +18,10 @@ RELEASEDIR?= /R FTPDIR?= ${RELEASEDIR}/ftp-stage STAGE_TARGETS?=iso-images-stage -.if ${TARGET} == arm || ${EMBEDDED_TARGET} == arm +.if defined(EMBEDDED_TARGET) !empty(EMBEDDED_TARGET) +. if ${TARGET} == arm || ${EMBEDDED_TARGET} == arm EMBEDDED= 1 +. endif .endif # snapshot ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283274 - head/sys/dev/bxe
Author: davidcs Date: Fri May 22 01:44:07 2015 New Revision: 283274 URL: https://svnweb.freebsd.org/changeset/base/283274 Log: Add stat counters for Jumbo Frames using SGE ring. Also remove the checks for IFCAP_LRO in bxe_alloc_fp_buffers() and bxe_pf_rx_q_prep() since both TPA and Jumbo can use SGE ring. Submitted by:gary.zambr...@qlogic.com Approved by:davi...@freebsd.org MFC after:5 days Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe_stats.c head/sys/dev/bxe/bxe_stats.h Modified: head/sys/dev/bxe/bxe.c == --- head/sys/dev/bxe/bxe.c Thu May 21 23:14:18 2015(r283273) +++ head/sys/dev/bxe/bxe.c Fri May 22 01:44:07 2015(r283274) @@ -27,7 +27,7 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); -#define BXE_DRIVER_VERSION 1.78.78 +#define BXE_DRIVER_VERSION 1.78.79 #include bxe.h #include ecore_sp.h @@ -472,6 +472,8 @@ static const struct { 4, STATS_FLAGS_FUNC, rx_pkts}, { STATS_OFFSET32(rx_tpa_pkts), 4, STATS_FLAGS_FUNC, rx_tpa_pkts}, +{ STATS_OFFSET32(rx_jumbo_sge_pkts), +4, STATS_FLAGS_FUNC, rx_jumbo_sge_pkts}, { STATS_OFFSET32(rx_soft_errors), 4, STATS_FLAGS_FUNC, rx_soft_errors}, { STATS_OFFSET32(rx_hw_csum_errors), @@ -583,6 +585,8 @@ static const struct { 4, rx_pkts}, { Q_STATS_OFFSET32(rx_tpa_pkts), 4, rx_tpa_pkts}, +{ Q_STATS_OFFSET32(rx_jumbo_sge_pkts), +4, rx_jumbo_sge_pkts}, { Q_STATS_OFFSET32(rx_soft_errors), 4, rx_soft_errors}, { Q_STATS_OFFSET32(rx_hw_csum_errors), @@ -3466,6 +3470,7 @@ bxe_rxeof(struct bxe_softc*sc, rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp); if (rc) break; +fp-eth_q_stats.rx_jumbo_sge_pkts++; } /* assign packet to this interface interface */ @@ -6844,42 +6849,40 @@ bxe_alloc_fp_buffers(struct bxe_softc *s fp-rx_cq_prod = cqe_ring_prod; fp-eth_q_stats.rx_calls = fp-eth_q_stats.rx_pkts = 0; -if (if_getcapenable(sc-ifp) IFCAP_LRO) { -max_agg_queues = MAX_AGG_QS(sc); +max_agg_queues = MAX_AGG_QS(sc); -fp-tpa_enable = TRUE; +fp-tpa_enable = TRUE; -/* fill the TPA pool */ -for (j = 0; j max_agg_queues; j++) { -rc = bxe_alloc_rx_tpa_mbuf(fp, j); -if (rc != 0) { -BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n, +/* fill the TPA pool */ +for (j = 0; j max_agg_queues; j++) { +rc = bxe_alloc_rx_tpa_mbuf(fp, j); +if (rc != 0) { +BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n, i, j); -fp-tpa_enable = FALSE; -goto bxe_alloc_fp_buffers_error; -} - -fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP; +fp-tpa_enable = FALSE; +goto bxe_alloc_fp_buffers_error; } -if (fp-tpa_enable) { -/* fill the RX SGE chain */ -ring_prod = 0; -for (j = 0; j RX_SGE_USABLE; j++) { -rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod); -if (rc != 0) { -BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n, - i, ring_prod); -fp-tpa_enable = FALSE; -ring_prod = 0; -goto bxe_alloc_fp_buffers_error; -} +fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP; +} -ring_prod = RX_SGE_NEXT(ring_prod); +if (fp-tpa_enable) { +/* fill the RX SGE chain */ +ring_prod = 0; +for (j = 0; j RX_SGE_USABLE; j++) { +rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod); +if (rc != 0) { +BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n, + i, ring_prod); +fp-tpa_enable = FALSE; +ring_prod = 0; +goto bxe_alloc_fp_buffers_error; } -fp-rx_sge_prod = ring_prod; +ring_prod = RX_SGE_NEXT(ring_prod); } + +fp-rx_sge_prod = ring_prod; } } @@ -11763,28 +11766,26 @@ bxe_pf_rx_q_prep(struct bxe_softc uint16_t sge_sz = 0; uint16_t tpa_agg_size = 0; -if (if_getcapenable(sc-ifp) IFCAP_LRO) { -pause-sge_th_lo = SGE_TH_LO(sc); -pause-sge_th_hi = SGE_TH_HI(sc); +pause-sge_th_lo = SGE_TH_LO(sc); +pause-sge_th_hi = SGE_TH_HI(sc); -/* validate SGE ring has enough to cross high threshold */ -if (sc-dropless_fc +/* validate SGE
svn commit: r283275 - head/sys/dev/fdt
Author: gonzo Date: Fri May 22 02:00:44 2015 New Revision: 283275 URL: https://svnweb.freebsd.org/changeset/base/283275 Log: Add helper method fdt_find_child to make access to child nodes easier. Some FDT nodes have complex properties organized as a child sub-nodes (e.g. timing for LCD panel) we need easy way to obtain handles for these sub-nodes Modified: head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/fdt_common.h Modified: head/sys/dev/fdt/fdt_common.c == --- head/sys/dev/fdt/fdt_common.c Fri May 22 01:44:07 2015 (r283274) +++ head/sys/dev/fdt/fdt_common.c Fri May 22 02:00:44 2015 (r283275) @@ -57,6 +57,7 @@ __FBSDID($FreeBSD$); #define FDT_COMPAT_LEN 255 #define FDT_TYPE_LEN 64 +#define FDT_NAME_LEN 32 #define FDT_REG_CELLS 4 @@ -310,6 +311,22 @@ fdt_find_compatible(phandle_t start, con } phandle_t +fdt_find_child(phandle_t start, const char *child_name) +{ + char name[FDT_NAME_LEN]; + phandle_t child; + + for (child = OF_child(start); child != 0; child = OF_peer(child)) { + if (OF_getprop(child, name, name, sizeof(name)) = 0) + continue; + if (strcmp(name, child_name) == 0) + return (child); + } + + return (0); +} + +phandle_t fdt_depth_search_compatible(phandle_t start, const char *compat, int strict) { phandle_t child, node; Modified: head/sys/dev/fdt/fdt_common.h == --- head/sys/dev/fdt/fdt_common.h Fri May 22 01:44:07 2015 (r283274) +++ head/sys/dev/fdt/fdt_common.h Fri May 22 02:00:44 2015 (r283275) @@ -81,6 +81,7 @@ u_long fdt_data_get(void *, int); int fdt_data_to_res(pcell_t *, int, int, u_long *, u_long *); phandle_t fdt_find_compatible(phandle_t, const char *, int); phandle_t fdt_depth_search_compatible(phandle_t, const char *, int); +phandle_t fdt_find_child(phandle_t, const char *); int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *); int fdt_get_reserved_regions(struct mem_region *, int *); int fdt_get_phyaddr(phandle_t, device_t, int *, void **); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r283276 - in head: . sys/arm/conf sys/arm/ti sys/arm/ti/am335x sys/arm/ti/cpsw sys/arm/ti/omap4 sys/arm/ti/usb sys/boot/fdt/dts/arm sys/dev/uart
Author: gonzo Date: Fri May 22 03:16:18 2015 New Revision: 283276 URL: https://svnweb.freebsd.org/changeset/base/283276 Log: Switch TI platform support code from using FreeBSD's custom-baked DTS files to vendor-provided ones. It should make easier to adopt platform code to new revisions of hardware and to use DTS overlays for various Beaglebone extensions (shields/capes). Original dts filenames were not changed, they're now wrappers over dts files provided by TI. So make sure you update .dtb files on your devices as part of kernel update GPIO addressing was changed: instead of one global /dev/gpioc0 there are per-bank instances of /dev/gpiocX. Each bank has 32 pins so for instance pin 121 on /dev/gpioc0 in old addressing scheme is now pin 25 on /dev/gpioc3 On Pandaboard serial console devices was changed from /dev/ttyu0 to /dev/ttyu2 so you'll have to update /etc/ttys to get login prompt on serial port in multiuser mode. Single user mode serial console should work as-is Differential Revision:https://reviews.freebsd.org/D2146 Reviewed by: rpaulo, ian, Michal Meloun, Svatopluk Kraus Added: head/sys/arm/ti/am335x/am335x_ecap.c (contents, props changed) head/sys/arm/ti/am335x/am335x_ehrpwm.c (contents, props changed) head/sys/arm/ti/am335x/am335x_musb.c (contents, props changed) head/sys/arm/ti/am335x/am335x_pwmss.c (contents, props changed) head/sys/arm/ti/ti_hwmods.c (contents, props changed) head/sys/arm/ti/ti_hwmods.h (contents, props changed) head/sys/arm/ti/ti_pinmux.c (contents, props changed) head/sys/arm/ti/ti_pinmux.h (contents, props changed) head/sys/arm/ti/usb/omap_host.c (contents, props changed) head/sys/arm/ti/usb/omap_tll.c (contents, props changed) head/sys/boot/fdt/dts/arm/beaglebone-common.dtsi (contents, props changed) head/sys/boot/fdt/dts/arm/pandaboard-common.dtsi (contents, props changed) head/sys/boot/fdt/dts/arm/pandaboard-es.dts (contents, props changed) Deleted: head/sys/arm/ti/am335x/am335x_pwm.c head/sys/boot/fdt/dts/arm/am335x.dtsi Modified: head/UPDATING head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/PANDABOARD head/sys/arm/ti/aintc.c head/sys/arm/ti/am335x/am335x_dmtimer.c head/sys/arm/ti/am335x/am335x_gpio.c head/sys/arm/ti/am335x/am335x_lcd.c head/sys/arm/ti/am335x/am335x_lcd.h head/sys/arm/ti/am335x/am335x_pmic.c head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/am335x/am335x_pwm.h head/sys/arm/ti/am335x/am335x_scm_padconf.c head/sys/arm/ti/am335x/am335x_usbss.c head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h head/sys/arm/ti/cpsw/if_cpswvar.h head/sys/arm/ti/files.ti head/sys/arm/ti/omap4/files.omap4 head/sys/arm/ti/omap4/omap4_gpio.c head/sys/arm/ti/omap4/omap4_prcm_clks.c head/sys/arm/ti/omap4/omap4_scm_padconf.c head/sys/arm/ti/ti_adc.c head/sys/arm/ti/ti_common.c head/sys/arm/ti/ti_edma3.c head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_gpio.h head/sys/arm/ti/ti_i2c.c head/sys/arm/ti/ti_mbox.c head/sys/arm/ti/ti_prcm.h head/sys/arm/ti/ti_scm.c head/sys/arm/ti/ti_scm.h head/sys/arm/ti/ti_sdhci.c head/sys/arm/ti/ti_sdma.c head/sys/arm/ti/usb/omap_ehci.c head/sys/arm/ti/usb/omap_usb.h head/sys/boot/fdt/dts/arm/am335x-evm.dts head/sys/boot/fdt/dts/arm/beaglebone-black.dts head/sys/boot/fdt/dts/arm/beaglebone.dts head/sys/boot/fdt/dts/arm/pandaboard.dts head/sys/dev/uart/uart_dev_ti8250.c Modified: head/UPDATING == --- head/UPDATING Fri May 22 02:00:44 2015(r283275) +++ head/UPDATING Fri May 22 03:16:18 2015(r283276) @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run ln -s 'abort:false,junk:false' /etc/malloc.conf.) +20150521: + TI platform code switched to using vendor DTS files and this update + may break existing systems running on Beaglebone, Beaglebone Black, + and Pandaboard: + + - dtb files should be regenerated/reinstalled. Filenames are the + same but content is different now + - GPIO addressing was changed, now each GPIO bank (32 pins per bank) + has its own /dev/gpiocX device, e.g. pin 121 on /dev/gpioc0 in old + addressing scheme is now pin 25 on /dev/gpioc3. + - Pandaboard: /etc/ttys should be updated, serial console device is + now /dev/ttyu2, not /dev/ttyu0 + 20150501: soelim(1) from gnu/usr.bin/groff has been replaced by usr.bin/soelim. If you need the GNU extension from groff soelim(1), install groff Modified: head/sys/arm/conf/BEAGLEBONE == --- head/sys/arm/conf/BEAGLEBONEFri May 22 02:00:44 2015 (r283275) +++ head/sys/arm/conf/BEAGLEBONEFri May