svn commit: r365403 - head/share/man/man4
Author: lwhsu Date: Mon Sep 7 07:44:14 2020 New Revision: 365403 URL: https://svnweb.freebsd.org/changeset/base/365403 Log: Slightly improve usb(4) - Mention USB 3.0 - Update links - Fix `mandoc -T lint` warnings Reviewed by: bcr, hselasky MFC after:3 days Differential Revision:https://reviews.freebsd.org/D26349 Modified: head/share/man/man4/usb.4 Modified: head/share/man/man4/usb.4 == --- head/share/man/man4/usb.4 Mon Sep 7 06:53:29 2020(r365402) +++ head/share/man/man4/usb.4 Mon Sep 7 07:44:14 2020(r365403) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2018 +.Dd September 7, 2020 .Dt USB 4 .Os .Sh NAME @@ -52,8 +52,7 @@ for more information. .Sh DESCRIPTION .Fx provides machine-independent bus support and drivers for -.Tn USB -devices in host and device side mode. +USB devices in host and device side mode. .Pp The .Nm @@ -67,32 +66,25 @@ driver has three layers: The controller attaches to a physical bus like .Xr pci 4 . -The -.Tn USB -bus attaches to the controller, and the root hub attaches +The USB bus attaches to the controller, and the root hub attaches to the controller. Any devices attached to the bus will attach to the root hub -or another hub attached to the -.Tn USB -bus. +or another hub attached to the USB bus. .Pp The .Nm uhub device will always be present as it is needed for the root hub. .Sh INTRODUCTION TO USB -The -.Tn USB -is a system where external devices can be connected to a PC. +The USB is a system where external devices can be connected to a PC. The most common USB speeds are: .Bl -tag -width 6n -offset indent -.It Low Speed (1.5MBit/sec) -.It Full Speed (12MBit/sec) -.It High Speed (480MBit/sec) +.It Low Speed (1.5 MBit/sec) +.It Full Speed (12 MBit/sec) +.It High Speed (480 MBit/sec) +.It SuperSpeed (5 GBit/sec) .El .Pp -Each -.Tn USB -has a USB controller that is the master of the bus. +Each USB has a USB controller that is the master of the bus. The physical communication is simplex which means the host controller only communicates with one USB device at a time. .Pp @@ -122,9 +114,7 @@ A device may operate in different configurations. Depending on the configuration, the device may present different sets of endpoints and interfaces. .Pp -The bus enumeration of the -.Tn USB -bus proceeds in several steps: +The bus enumeration of the USB bus proceeds in several steps: .Bl -enum .It Any interface specific driver can attach to the device. @@ -144,11 +134,9 @@ debug message verbosity. Default is 0. .El .Sh SEE ALSO -The -.Tn USB -specifications can be found at: +The USB specifications can be found at: .Pp -.D1 Pa http://www.usb.org/developers/docs/ +.D1 Pa https://www.usb.org/documents .Pp .Xr libusb 3 , .Xr aue 4 , @@ -178,7 +166,7 @@ specifications can be found at: .Sh STANDARDS The .Nm -module complies with the USB 2.0 standard. +module complies with the USB 3.0 standard. .Sh HISTORY The .Nm ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365404 - head/sys/net
Author: melifaro Date: Mon Sep 7 10:13:54 2020 New Revision: 365404 URL: https://svnweb.freebsd.org/changeset/base/365404 Log: Consistently use the same gateway when adding/deleting interface routes. Use the same link-level gateway when adding or deleting interface routes. This helps nexthop checking in the upcoming multipath changes. Differential Revision:https://reviews.freebsd.org/D26317 Modified: head/sys/net/route.c Modified: head/sys/net/route.c == --- head/sys/net/route.cMon Sep 7 07:44:14 2020(r365403) +++ head/sys/net/route.cMon Sep 7 10:13:54 2020(r365404) @@ -883,7 +883,6 @@ rt_maskedcopy(struct sockaddr *src, struct sockaddr *d * Set up a routing table entry, normally * for an interface. */ -#define _SOCKADDR_TMPSIZE 128 /* Not too big.. kernel stack size is limited */ static inline int rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum) { @@ -895,10 +894,10 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi struct rt_addrinfo info; int error = 0; int startfib, endfib; - char tempbuf[_SOCKADDR_TMPSIZE]; + struct sockaddr_storage ss; int didwork = 0; int a_failure = 0; - struct sockaddr_dl_short *sdl = NULL; + struct sockaddr_dl_short sdl; struct rib_head *rnh; if (flags & RTF_HOST) { @@ -946,17 +945,15 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi * XXX this is kinda inet specific.. */ if (netmask != NULL) { - rt_maskedcopy(dst, (struct sockaddr *)tempbuf, netmask); - dst = (struct sockaddr *)tempbuf; + rt_maskedcopy(dst, (struct sockaddr *)&ss, netmask); + dst = (struct sockaddr *)&ss; } - } else if (cmd == RTM_ADD) { - sdl = (struct sockaddr_dl_short *)tempbuf; - bzero(sdl, sizeof(struct sockaddr_dl_short)); - sdl->sdl_family = AF_LINK; - sdl->sdl_len = sizeof(struct sockaddr_dl_short); - sdl->sdl_type = ifa->ifa_ifp->if_type; - sdl->sdl_index = ifa->ifa_ifp->if_index; -} + } + bzero(&sdl, sizeof(struct sockaddr_dl_short)); + sdl.sdl_family = AF_LINK; + sdl.sdl_len = sizeof(struct sockaddr_dl_short); + sdl.sdl_type = ifa->ifa_ifp->if_type; + sdl.sdl_index = ifa->ifa_ifp->if_index; /* * Now go through all the requested tables (fibs) and do the * requested action. Realistically, this will either be fib 0 @@ -1012,13 +1009,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi info.rti_flags = flags | (ifa->ifa_flags & ~IFA_RTSELF) | RTF_PINNED; info.rti_info[RTAX_DST] = dst; - /* -* doing this for compatibility reasons -*/ - if (cmd == RTM_ADD) - info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)sdl; - else - info.rti_info[RTAX_GATEWAY] = ifa->ifa_addr; + info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&sdl; info.rti_info[RTAX_NETMASK] = netmask; NET_EPOCH_ENTER(et); error = rib_action(fibnum, cmd, &info, &rc); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365415 - head/share/man/man5
Author: asomers Date: Mon Sep 7 13:44:54 2020 New Revision: 365415 URL: https://svnweb.freebsd.org/changeset/base/365415 Log: nsswitch.conf.5: style fixes Fix some whitespace, and remove the .Tn macro Reported by: mandoc, igor Reviewed by: bcr (manpages) MFC after:1 week Differential Revision:https://reviews.freebsd.org/D26345 Modified: head/share/man/man5/nsswitch.conf.5 Modified: head/share/man/man5/nsswitch.conf.5 == --- head/share/man/man5/nsswitch.conf.5 Mon Sep 7 10:51:48 2020 (r365414) +++ head/share/man/man5/nsswitch.conf.5 Mon Sep 7 13:44:54 2020 (r365415) @@ -1,4 +1,4 @@ -.\"$NetBSD: nsswitch.conf.5,v 1.14 1999/03/17 20:19:47 garbled Exp $ +.\" $NetBSD: nsswitch.conf.5,v 1.14 1999/03/17 20:19:47 garbled Exp $ .\" .\" Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -16,7 +16,7 @@ .\"documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\"must display the following acknowledgement: -.\"This product includes software developed by Luke Mewburn. +.\"This product includes software developed by Luke Mewburn. .\" 4. The name of the author may not be used to endorse or promote products .\"derived from this software without specific prior written permission. .\" @@ -48,8 +48,7 @@ file specifies how the .Pp The configuration file controls how a process looks up various databases containing information regarding hosts, users (passwords), groups, etc. -Each database comes from a source (such as local files, DNS, -.Tn NIS , +Each database comes from a source (such as local files, DNS, NIS , and cache), and the order to look up the sources is specified in .Nm . .Pp @@ -182,9 +181,7 @@ Try the next source Return with the current result .El .Ss Format of file -A -.Tn BNF -description of the syntax of +A BNF description of the syntax of .Nm is: .Pp @@ -250,12 +247,10 @@ In historical multi-source implementations, the and .Sq - characters are used to specify the importing of user password and -group information from -.Tn NIS . +group information from NIS . Although .Nm -provides alternative methods of accessing distributed sources such as -.Tn NIS , +provides alternative methods of accessing distributed sources such as NIS , specifying a sole source of .Dq compat will provide the historical behaviour. @@ -328,9 +323,7 @@ resides in To lookup hosts in .Pa /etc/hosts , then in cache, -and then from the DNS, and lookup user information from -.Tn NIS -then files, use: +and then from the DNS, and lookup user information from NIS then files, use: .Pp .Bl -tag -width passwd: -compact .It hosts: @@ -362,9 +355,7 @@ entries. .Fx Ns 's .Lb libc provides stubs for compatibility with NSS modules -written for the -.Tn GNU -C Library +written for the GNU C Library .Nm nsswitch interface. However, these stubs only support the use of the @@ -390,10 +381,8 @@ Project, where it appeared first in .Sh AUTHORS .An Luke Mewburn Aq Mt lu...@netbsd.org wrote this freely distributable name-service switch implementation, -using ideas from the -.Tn ULTRIX +using ideas from the ULTRIX .Xr svc.conf 5 -and -.Tn Solaris +and Solaris .Xr nsswitch.conf 4 manual pages. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Receipt 7535754
Hello Dear client, Remuneration invoicing #255646 Click here for download Document Best Regards ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap
Author: bz Date: Mon Sep 7 15:35:40 2020 New Revision: 365419 URL: https://svnweb.freebsd.org/changeset/base/365419 Log: WiFi: fix ieee80211_media_change() callers In r178354 with the introduction of multi-bss ("vap") support factoring out started and with r193340 ieee80211_media_change() no longer returned ENETRESET but only 0 or error. As ieee80211(9) tells the ieee80211_media_change() function should not be called directly but is registered with ieee80211_vap_attach() instead. Some drivers have not been fully converted. After fixing the return checking some of these functions were simply wrappers between ieee80211_vap_attach() and ieee80211_media_change(), so remove the extra function, where possible as well. PR: 248955 Submitted by: Tong Zhang (ztong0001 gmail.com) (original) MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/ath/if_ath.c head/sys/dev/bwi/if_bwi.c head/sys/dev/iwm/if_iwm.c head/sys/dev/iwn/if_iwn.c head/sys/dev/mwl/if_mwl.c head/sys/dev/otus/if_otus.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/ath/if_ath.c Mon Sep 7 15:35:40 2020(r365419) @@ -160,7 +160,6 @@ static int ath_init(struct ath_softc *); static voidath_stop(struct ath_softc *); static int ath_reset_vap(struct ieee80211vap *, u_long); static int ath_transmit(struct ieee80211com *, struct mbuf *); -static int ath_media_change(struct ifnet *); static voidath_watchdog(void *); static voidath_parent(struct ieee80211com *); static voidath_fatal_proc(void *, int); @@ -1766,8 +1765,8 @@ ath_vap_create(struct ieee80211com *ic, const char nam ATH_UNLOCK(sc); /* complete setup */ - ieee80211_vap_attach(vap, ath_media_change, ieee80211_media_status, - mac); + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status, mac); return vap; bad2: reclaim_address(sc, mac); @@ -3541,14 +3540,6 @@ finish: ATH_KTR(sc, ATH_KTR_TX, 0, "ath_transmit: finished"); return (retval); -} - -static int -ath_media_change(struct ifnet *ifp) -{ - int error = ieee80211_media_change(ifp); - /* NB: only the fixed rate can change and that doesn't need a reset */ - return (error == ENETRESET ? 0 : error); } /* Modified: head/sys/dev/bwi/if_bwi.c == --- head/sys/dev/bwi/if_bwi.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/bwi/if_bwi.c Mon Sep 7 15:35:40 2020(r365419) @@ -118,7 +118,6 @@ static void bwi_set_channel(struct ieee80211com *); static voidbwi_scan_end(struct ieee80211com *); static int bwi_newstate(struct ieee80211vap *, enum ieee80211_state, int); static voidbwi_updateslot(struct ieee80211com *); -static int bwi_media_change(struct ifnet *); static voidbwi_calibrate(void *); @@ -607,8 +606,8 @@ bwi_vap_create(struct ieee80211com *ic, const char nam ieee80211_ratectl_init(vap); /* complete setup */ - ieee80211_vap_attach(vap, bwi_media_change, ieee80211_media_status, - mac); + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status, mac); ic->ic_opmode = opmode; return vap; } @@ -1807,14 +1806,6 @@ back: BWI_UNLOCK(sc); return error; -} - -static int -bwi_media_change(struct ifnet *ifp) -{ - int error = ieee80211_media_change(ifp); - /* NB: only the fixed rate can change and that doesn't need a reset */ - return (error == ENETRESET ? 0 : error); } static int Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 7 15:35:40 2020(r365419) @@ -4426,8 +4426,8 @@ iwm_media_change(struct ifnet *ifp) int error; error = ieee80211_media_change(ifp); - if (error != ENETRESET) - return error; + if (error != 0) + return (error); IWM_LOCK(sc); if (ic->ic_nrunning > 0) { @@ -4435,7 +4435,7 @@ iwm_media_change(struct ifnet *ifp) iwm_init(sc); } IWM_UNLOCK(sc); - return error; + return (0); } static void Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Mon Sep 7 14:40:33 2020(r365418) +++ head/sys/dev/iwn/if_iwn.c Mon Sep 7 15:35:40 2020(r365419) @@ -194,7 +194,6 @@ static void iwn_read_eeprom_enhinfo(struct iwn_softc
svn commit: r365422 - head/usr.sbin/ntp/ntpd
Author: emaste Date: Mon Sep 7 17:19:31 2020 New Revision: 365422 URL: https://svnweb.freebsd.org/changeset/base/365422 Log: ntp: whitespace and typo fix in conf file PR: 248942 Submitted by: Jose Luis Duran (whitespace), igor (typo) MFC after:1 week Modified: head/usr.sbin/ntp/ntpd/ntp.conf Modified: head/usr.sbin/ntp/ntpd/ntp.conf == --- head/usr.sbin/ntp/ntpd/ntp.conf Mon Sep 7 16:11:49 2020 (r365421) +++ head/usr.sbin/ntp/ntpd/ntp.conf Mon Sep 7 17:19:31 2020 (r365422) @@ -14,8 +14,8 @@ # Set the target and limit for adding servers configured via pool statements # or discovered dynamically via mechanisms such as broadcast and manycast. # Ntpd automatically adds maxclock-1 servers from configured pools, and may -# add as many as maxclock*2 if necessary to ensure that at least minclock -# servers are providing good consistant time. +# add as many as maxclock*2 if necessary to ensure that at least minclock +# servers are providing good consistent time. # tos minclock 3 maxclock 6 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365424 - head/sbin/bectl/tests
Author: lwhsu Date: Mon Sep 7 18:15:58 2020 New Revision: 365424 URL: https://svnweb.freebsd.org/changeset/base/365424 Log: Call atf_skip function in cleanup procedure as it also triggers zfs.ko loading PR: 249055 Sponsored by: The FreeBSD Foundation Modified: head/sbin/bectl/tests/bectl_test.sh Modified: head/sbin/bectl/tests/bectl_test.sh == --- head/sbin/bectl/tests/bectl_test.sh Mon Sep 7 17:31:58 2020 (r365423) +++ head/sbin/bectl/tests/bectl_test.sh Mon Sep 7 18:15:58 2020 (r365424) @@ -452,6 +452,11 @@ bectl_jail_body() # attempts to destroy the zpool. bectl_jail_cleanup() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/249055"; + fi + zpool=$(get_zpool_name) for bootenv in "default" "target" "1234"; do # mountpoint of the boot environment ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365428 - head/sys/sys
Author: bdragon Date: Mon Sep 7 20:05:18 2020 New Revision: 365428 URL: https://svnweb.freebsd.org/changeset/base/365428 Log: Fix vdso compat32 timekeeping on !=x86. Since x86 is the only 32-bit arch that has a 32-bit time_t, adjust the private bintime32 struct in vdso to only use a 32 bit sec on amd64. This matches the existing behavior in the compat code. Noticed while implementing vdso timekeeping on powerpc. This should also theoretically fix vdso timekeeping for arm binaries on aarch64. See tools attached to https://reviews.freebsd.org/D26347 for testing. Reviewed by: kib (in irc) Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/sys/vdso.h Modified: head/sys/sys/vdso.h == --- head/sys/sys/vdso.h Mon Sep 7 19:35:30 2020(r365427) +++ head/sys/sys/vdso.h Mon Sep 7 20:05:18 2020(r365428) @@ -102,8 +102,16 @@ struct vdso_sv_tk *alloc_sv_tk(void); #defineVDSO_TH_NUM 4 #ifdef COMPAT_FREEBSD32 + +/* + * i386 is the only arch with a 32 bit time_t. + */ struct bintime32 { +#if defined(__amd64__) uint32_tsec; +#else + uint64_tsec; +#endif uint32_tfrac[2]; }; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365429 - head/contrib/llvm-project/openmp/runtime/src
Author: dim Date: Mon Sep 7 20:10:03 2020 New Revision: 365429 URL: https://svnweb.freebsd.org/changeset/base/365429 Log: Merge commit 47b0262d3 from llvm git (by me): Add include to kmp_os.h, to get the va_list type, required after cde8f4c164a2. Sort system includes, while here. The original merged commit works fine by itself on head, but fails to compile on stable branches because stdarg.h is not implicitly pulled in. MFC after:immediately, to fix failing builds on stable/{11,12} Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_os.h Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_os.h == --- head/contrib/llvm-project/openmp/runtime/src/kmp_os.h Mon Sep 7 20:05:18 2020(r365428) +++ head/contrib/llvm-project/openmp/runtime/src/kmp_os.h Mon Sep 7 20:10:03 2020(r365429) @@ -14,8 +14,9 @@ #define KMP_OS_H #include "kmp_config.h" -#include #include +#include +#include #define KMP_FTN_PLAIN 1 #define KMP_FTN_APPEND 2 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365431 - head/sys/powerpc/powerpc
Author: bdragon Date: Mon Sep 7 20:25:54 2020 New Revision: 365431 URL: https://svnweb.freebsd.org/changeset/base/365431 Log: [PowerPC] Initialize ELFv1 as a secondary sysvec to ELFv2. In order to enable VDSO timekeeping, it is necessary that there be exactly one primary FreeBSD sysvec for each of the host and (optionally) compat32. So, switch ELFv1 to being a secondary sysvec of ELFv2, so it does not get double-allocated in the shared page. Since secondary sysvecs use the same sigcode allocation as the primary, define both to use the main sigcode64, and adjust the sv_sigcode_base on ELFv2 after initialization to point to the correct offset. This has the desirable side effect of avoiding having a separate copy of the signal trampoline in the shared page. Our sigcode64 was already written to take advantage of trampoline sharing, it was just not being allocated that way until now. Submitted by: jhibbits Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/powerpc/elf64_machdep.c Modified: head/sys/powerpc/powerpc/elf64_machdep.c == --- head/sys/powerpc/powerpc/elf64_machdep.cMon Sep 7 20:17:13 2020 (r365430) +++ head/sys/powerpc/powerpc/elf64_machdep.cMon Sep 7 20:25:54 2020 (r365431) @@ -95,7 +95,6 @@ struct sysentvec elf64_freebsd_sysvec_v1 = { .sv_hwcap = &cpu_features, .sv_hwcap2 = &cpu_features2, }; -INIT_SYSENTVEC(elf64_sysvec_v1, &elf64_freebsd_sysvec_v1); struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_size= SYS_MAXSYSCALL, @@ -105,8 +104,8 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_transtrap = NULL, .sv_fixup = __elfN(freebsd_fixup), .sv_sendsig = sendsig, - .sv_sigcode = sigcode64_elfv2, - .sv_szsigcode = &szsigcode64_elfv2, + .sv_sigcode = sigcode64, /* Fixed up in ppc64_init_sysvecs(). */ + .sv_szsigcode = &szsigcode64, .sv_name= "FreeBSD ELF64 V2", .sv_coredump= __elfN(coredump), .sv_imgact_try = NULL, @@ -133,7 +132,6 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_hwcap = &cpu_features, .sv_hwcap2 = &cpu_features2, }; -INIT_SYSENTVEC(elf64_sysvec_v2, &elf64_freebsd_sysvec_v2); static boolean_t ppc64_elfv1_header_match(struct image_params *params, int32_t *, uint32_t *); @@ -192,6 +190,26 @@ SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, &freebsd_brand_oinfo); void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase); + +static void +ppc64_init_sysvecs(void *arg) +{ + exec_sysvec_init(&elf64_freebsd_sysvec_v2); + exec_sysvec_init_secondary(&elf64_freebsd_sysvec_v2, + &elf64_freebsd_sysvec_v1); + /* +* Adjust elfv2 sigcode after elfv1 sysvec is initialized. +* exec_sysvec_init_secondary() assumes secondary sysvecs use +* identical signal code, and skips allocating a second copy. +* Since the ELFv2 trampoline is a strict subset of the ELFv1 code, +* we can work around this by adjusting the base address. This also +* avoids two copies of the trampoline code being allocated! +*/ + elf64_freebsd_sysvec_v2.sv_sigcode_base += + (uintptr_t)sigcode64_elfv2 - (uintptr_t)&sigcode64; + elf64_freebsd_sysvec_v2.sv_szsigcode = &szsigcode64_elfv2; +} +SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL); static boolean_t ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365432 - head/libexec/rtld-elf
Author: kib Date: Mon Sep 7 21:32:27 2020 New Revision: 365432 URL: https://svnweb.freebsd.org/changeset/base/365432 Log: rtld: pass argc/argv/env to dso inits. This is consistent with how array inits are called, and also makes us more compatible with glibc environment. Requested by: Alex S PR: 249162 Reviewed by: dim, emaste Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D26351 Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cMon Sep 7 20:25:54 2020 (r365431) +++ head/libexec/rtld-elf/rtld.cMon Sep 7 21:32:27 2020 (r365432) @@ -2844,7 +2844,7 @@ objlist_call_init(Objlist *list, RtldLockState *lockst (void *)elm->obj->init); LD_UTRACE(UTRACE_INIT_CALL, elm->obj, (void *)elm->obj->init, 0, 0, elm->obj->path); - call_initfini_pointer(elm->obj, elm->obj->init); + call_init_pointer(elm->obj, elm->obj->init); } init_addr = (Elf_Addr *)elm->obj->init_array; if (init_addr != NULL) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365433 - head/sys/kern
Author: kib Date: Mon Sep 7 21:37:16 2020 New Revision: 365433 URL: https://svnweb.freebsd.org/changeset/base/365433 Log: imgact_elf.c: unify check for phdr fitting into the first page. Similar to the userspace rtld check. Reviewed by: dim, emaste (previous versions) Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D26339 Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c == --- head/sys/kern/imgact_elf.c Mon Sep 7 21:32:27 2020(r365432) +++ head/sys/kern/imgact_elf.c Mon Sep 7 21:37:16 2020(r365433) @@ -448,6 +448,13 @@ __elfN(get_brandinfo)(struct image_params *imgp, const return (NULL); } +static bool +__elfN(phdr_in_zero_page)(const Elf_Ehdr *hdr) +{ + return (hdr->e_phoff <= PAGE_SIZE && + (u_int)hdr->e_phentsize * hdr->e_phnum <= PAGE_SIZE - hdr->e_phoff); +} + static int __elfN(check_header)(const Elf_Ehdr *hdr) { @@ -811,8 +818,7 @@ __elfN(load_file)(struct proc *p, const char *file, u_ } /* Only support headers that fit within first page for now */ - if ((hdr->e_phoff > PAGE_SIZE) || - (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { + if (!__elfN(phdr_in_zero_page)(hdr)) { error = ENOEXEC; goto fail; } @@ -1088,9 +1094,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i * detected an ELF file. */ - if ((hdr->e_phoff > PAGE_SIZE) || - (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { - /* Only support headers in first page for now */ + if (!__elfN(phdr_in_zero_page)(hdr)) { uprintf("Program headers not in the first page\n"); return (ENOEXEC); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365437 - head/sys/vm
Author: markj Date: Mon Sep 7 23:28:33 2020 New Revision: 365437 URL: https://svnweb.freebsd.org/changeset/base/365437 Log: vm_object_split(): Handle orig_object type changes. orig_object->type can change from OBJT_DEFAULT to OBJT_SWAP while vm_object_split() is sleeping. In this case some pages in new_object may be left unbusied, but vm_object_split() attempts to unbusy all of them. Track the beginning of the busied range. Add an assertion to verify that pages are not re-added to the source object while sleeping. Reported by: Olympios Petrakis Reviewed by: alc, kib Tested by:pho MFC after:1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26223 Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c == --- head/sys/vm/vm_object.c Mon Sep 7 23:22:16 2020(r365436) +++ head/sys/vm/vm_object.c Mon Sep 7 23:28:33 2020(r365437) @@ -1496,7 +1496,7 @@ vm_object_shadow(vm_object_t *object, vm_ooffset_t *of void vm_object_split(vm_map_entry_t entry) { - vm_page_t m, m_next; + vm_page_t m, m_busy, m_next; vm_object_t orig_object, new_object, backing_object; vm_pindex_t idx, offidxstart; vm_size_t size; @@ -1553,8 +1553,14 @@ vm_object_split(vm_map_entry_t entry) * that the object is in transition. */ vm_object_set_flag(orig_object, OBJ_SPLIT); + m_busy = NULL; +#ifdef INVARIANTS + idx = 0; +#endif retry: m = vm_page_find_least(orig_object, offidxstart); + KASSERT(m == NULL || idx <= m->pindex - offidxstart, + ("%s: object %p was repopulated", __func__, orig_object)); for (; m != NULL && (idx = m->pindex - offidxstart) < size; m = m_next) { m_next = TAILQ_NEXT(m, listq); @@ -1609,8 +1615,15 @@ retry: */ vm_reserv_rename(m, new_object, orig_object, offidxstart); #endif + + /* +* orig_object's type may change while sleeping, so keep track +* of the beginning of the busied range. +*/ if (orig_object->type != OBJT_SWAP) vm_page_xunbusy(m); + else if (m_busy == NULL) + m_busy = m; } if (orig_object->type == OBJT_SWAP) { /* @@ -1618,8 +1631,9 @@ retry: * and new_object's locks are released and reacquired. */ swap_pager_copy(orig_object, new_object, offidxstart, 0); - TAILQ_FOREACH(m, &new_object->memq, listq) - vm_page_xunbusy(m); + if (m_busy != NULL) + TAILQ_FOREACH_FROM(m_busy, &new_object->memq, listq) + vm_page_xunbusy(m_busy); } vm_object_clear_flag(orig_object, OBJ_SPLIT); VM_OBJECT_WUNLOCK(orig_object); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365438 - head/tools/build
Author: emaste Date: Tue Sep 8 00:15:18 2020 New Revision: 365438 URL: https://svnweb.freebsd.org/changeset/base/365438 Log: retire an old NO_CLEAN dependency cleanup hack We have some hacks to remove stale dependency files for NO_CLEAN builds that are missed by make's dependency handling. These are intended to upport ongoing NO_CLEAN builds, and are no longer needed after a sufficient amount of time elapses. Modified: head/tools/build/depend-cleanup.sh Modified: head/tools/build/depend-cleanup.sh == --- head/tools/build/depend-cleanup.sh Mon Sep 7 23:28:33 2020 (r365437) +++ head/tools/build/depend-cleanup.sh Tue Sep 8 00:15:18 2020 (r365438) @@ -37,8 +37,6 @@ clean_dep() } # Date Rev Description -# 20190916 r352703 shm_open syscall reimplemented in C -clean_dep lib/libc shm_open S # 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp clean_dep lib/libomp ittnotify_static c # 20200414 r359930 closefrom ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365439 - in head: . share/mk tools/build/options
Author: emaste Date: Tue Sep 8 00:44:35 2020 New Revision: 365439 URL: https://svnweb.freebsd.org/changeset/base/365439 Log: Add WITH_/WITHOUT_CLEAN option to replace NO_CLEAN This allows use of the standard src.conf configuration for controlling whether the tree is cleaned before build or not. The default is still to clean. Setting either NOCLEAN or NO_CLEAN will mention the new src.conf option. NOCLEAN remains a .warning, while for now NO_CLEAN is .info. Reviewed by: bdrewery (earlier version) MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D22762 Added: head/tools/build/options/WITHOUT_CLEAN (contents, props changed) Modified: head/Makefile.inc1 head/Makefile.libcompat head/share/mk/src.opts.mk Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Sep 8 00:15:18 2020(r365438) +++ head/Makefile.inc1 Tue Sep 8 00:44:35 2020(r365439) @@ -441,9 +441,13 @@ SUBDIR+=etc .endif # !empty(SUBDIR_OVERRIDE) .if defined(NOCLEAN) -.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. -NO_CLEAN= ${NOCLEAN} +.warning The src.conf WITHOUT_CLEAN option can now be used instead of NOCLEAN. +MK_CLEAN:= no .endif +.if defined(NO_CLEAN) +.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN. +MK_CLEAN:= no +.endif .if defined(NO_CLEANDIR) CLEANDIR= clean cleandepend .else @@ -451,7 +455,7 @@ CLEANDIR= cleandir .endif .if defined(WORLDFAST) -NO_CLEAN= t +MK_CLEAN:= no NO_OBJWALK=t .endif @@ -460,7 +464,7 @@ NO_OBJWALK= t # The .meta files will also track the build command and rebuild should # it change. .if empty(.MAKE.MODE:Mnofilemon) -NO_CLEAN= t +MK_CLEAN:= no .endif .endif .if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes" @@ -837,7 +841,7 @@ _LIBCOMPAT= SOFT # timestamps (see NO_META_IGNORE_HOST in sys.mk). There are known times # when the ABI breaks though that we want to force rebuilding WORLDTMP # to get updated host tools. -.if ${MK_META_MODE} == "yes" && defined(NO_CLEAN) && \ +.if ${MK_META_MODE} == "yes" && ${MK_CLEAN} == "no" && \ !defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) && \ !defined(_MKSHOWCONFIG) # r318736 - ino64 major ABI breakage @@ -869,7 +873,7 @@ NO_META_IGNORE_HOST_HEADERS=1 .export NO_META_IGNORE_HOST_HEADERS .endif # defined(_meta_mode_need_rebuild) .endif # defined(OBJDIR_HOST_OSRELDATE) -.endif # ${MK_META_MODE} == "yes" && defined(NO_CLEAN) ... +.endif # ${MK_META_MODE} == "yes" && ${MK_CLEAN} == "no" ... # This is only used for META_MODE+filemon to track what the oldest # __FreeBSD_version is in WORLDTMP. This purposely does NOT have # a make dependency on /usr/include/osreldate.h as the file should @@ -1013,7 +1017,7 @@ _worldtmp: .PHONY @echo "--" @echo ">>> Rebuilding the temporary build tree" @echo "--" -.if !defined(NO_CLEAN) +.if ${MK_CLEAN} == "yes" rm -rf ${WORLDTMP} .else # Note: for delete-old we need to set $PATH to also include the host $PATH @@ -1038,7 +1042,7 @@ _worldtmp: .PHONY .if ${USING_SYSTEM_LINKER} == "yes" @rm -f ${WORLDTMP}/usr/bin/ld ${WORLDTMP}/usr/bin/ld.lld .endif # ${USING_SYSTEM_LINKER} == "yes" -.endif # !defined(NO_CLEAN) +.endif # ${MK_CLEAN} == "yes" @mkdir -p ${WORLDTMP} @touch ${WORLDTMP}/${.TARGET} # We can't use mtree to create the worldtmp directories since it may not be @@ -1077,7 +1081,7 @@ _bootstrap-tools: ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null .endfor _cleanobj: -.if !defined(NO_CLEAN) +.if ${MK_CLEAN} == "yes" @echo @echo "--" @echo ">>> stage 2.1: cleaning up the object tree" @@ -1090,7 +1094,7 @@ _cleanobj: .endif .else ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack -.endif # !defined(NO_CLEAN) +.endif # ${MK_CLEAN} == "yes" _obj: @echo @echo "--" @@ -1672,7 +1676,7 @@ buildkernel: .MAKE .PHONY -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \ '${KERNCONFDIR}/${_kernel}' .endif -.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) +.if ${MK_CLEAN} == "yes" && !defined(NO_KERNELCLEAN) @echo @echo "--" @echo ">>> stage 2.1: cleaning up the object tree" @@ -2478,7 +2482,7 @@ _jevents=lib/libpmc/pmu-events # kernel-toolchain skips _cleanobj, so handle cleaning up previous # build-tools directories if needed. -.if !defined(NO_CLEAN) && make(kernel-tool
svn commit: r365440 - head/share/man/man5
Author: emaste Date: Tue Sep 8 00:48:18 2020 New Revision: 365440 URL: https://svnweb.freebsd.org/changeset/base/365440 Log: src.conf.5: regen after r365439, WITH_/WITHOUT_CLEAN option Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Tue Sep 8 00:44:35 2020 (r365439) +++ head/share/man/man5/src.conf.5 Tue Sep 8 00:48:18 2020 (r365440) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd September 5, 2020 +.Dd September 7, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -346,6 +346,8 @@ Do not install links to the Clang C/C++ compiler as .Pa /usr/bin/c++ and .Pa /usr/bin/cpp . +.It Va WITHOUT_CLEAN +Do not clean before building world and/or kernel. .It Va WITHOUT_CPP Set to not build .Xr cpp 1 . @@ -1108,7 +1110,6 @@ for more details. Set to disable assertions and statistics gathering in .Xr malloc 3 . It also defaults the A and J runtime options to off. -Disabled by default on -CURRENT. .It Va WITHOUT_MAN Set to not build manual pages. When set, these options are also in effect: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365441 - head/sys/conf
Author: bdragon Date: Tue Sep 8 01:27:03 2020 New Revision: 365441 URL: https://svnweb.freebsd.org/changeset/base/365441 Log: [PowerPC] Work around -O miscompile on powerpc 32 bit. Work around llvm 11 miscompile in 32 bit powerpc that appears to cause ifuncs to branch to the wrong address by forcing -O2. This worked in previous versions because -O was mapped to -O2 previously (but is now -O1.) While here, remove the old temporary workaround from r224882 that does the opposite thing for powerpc non-DEBUG kernels, bringing it in line with other platforms that compile at -O2. This fixes kernel boot on powerpc and powerpcspe after the llvm11 transition. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk == --- head/sys/conf/kern.pre.mk Tue Sep 8 00:48:18 2020(r365440) +++ head/sys/conf/kern.pre.mk Tue Sep 8 01:27:03 2020(r365441) @@ -51,14 +51,15 @@ OBJCOPY?= objcopy SIZE?= size .if defined(DEBUG) +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" +# Work around clang 11 miscompile on 32 bit powerpc. +_MINUS_O= -O2 +.else _MINUS_O= -O +.endif CTFFLAGS+= -g .else -.if ${MACHINE_CPUARCH} == "powerpc" -_MINUS_O= -O # gcc miscompiles some code at -O2 -.else _MINUS_O= -O2 -.endif .endif .if ${MACHINE_CPUARCH} == "amd64" .if ${COMPILER_TYPE} == "clang" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365442 - in head: lib/libc/powerpc lib/libc/powerpc/sys lib/libc/powerpc64 lib/libc/powerpc64/sys lib/libc/powerpcspe sys/powerpc/include sys/powerpc/powerpc
Author: bdragon Date: Tue Sep 8 03:00:31 2020 New Revision: 365442 URL: https://svnweb.freebsd.org/changeset/base/365442 Log: [PowerPC] Implement VDSO timebase access on powerpc* Implement the remaining pieces needed to allow userland timestamp reading. Rewritten based on an intial essay into the problem by Justin Hibbits. (Copyright changed to my own on his request.) Tested on ppc64 (POWER9 Talos II), powerpcspe (e500v2 RB800), and powerpc (g4 PowerBook). Reviewed by: jhibbits (in irc) Sponsored by: Tag1 Consulting, Inc. Differential Revision:https://reviews.freebsd.org/D26347 Added: head/lib/libc/powerpc/sys/__vdso_gettc.c (contents, props changed) head/lib/libc/powerpc64/sys/__vdso_gettc.c (contents, props changed) Modified: head/lib/libc/powerpc/Makefile.inc head/lib/libc/powerpc/sys/Makefile.inc head/lib/libc/powerpc64/Makefile.inc head/lib/libc/powerpc64/sys/Makefile.inc head/lib/libc/powerpcspe/Makefile.inc head/sys/powerpc/include/vdso.h head/sys/powerpc/powerpc/clock.c head/sys/powerpc/powerpc/elf32_machdep.c head/sys/powerpc/powerpc/elf64_machdep.c Modified: head/lib/libc/powerpc/Makefile.inc == --- head/lib/libc/powerpc/Makefile.inc Tue Sep 8 01:27:03 2020 (r365441) +++ head/lib/libc/powerpc/Makefile.inc Tue Sep 8 03:00:31 2020 (r365442) @@ -1,7 +1,5 @@ # $FreeBSD$ -SRCS+= trivial-vdso_tc.c - # Long double is 64-bits SRCS+=machdep_ldisd.c SYM_MAPS+=${LIBC_SRCTOP}/powerpc/Symbol.map Modified: head/lib/libc/powerpc/sys/Makefile.inc == --- head/lib/libc/powerpc/sys/Makefile.inc Tue Sep 8 01:27:03 2020 (r365441) +++ head/lib/libc/powerpc/sys/Makefile.inc Tue Sep 8 03:00:31 2020 (r365442) @@ -1,3 +1,4 @@ # $FreeBSD$ +SRCS+= __vdso_gettc.c MDASM+=cerror.S Added: head/lib/libc/powerpc/sys/__vdso_gettc.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/powerpc/sys/__vdso_gettc.cTue Sep 8 03:00:31 2020 (r365442) @@ -0,0 +1,68 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Brandon Bergren + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include + +#include "libc_private.h" + +#pragma weak __vdso_gettc +int +__vdso_gettc(const struct vdso_timehands *th, u_int *tc) +{ + + if (__predict_false(th->th_algo != VDSO_TH_ALGO_PPC_TB)) + return (ENOSYS); + /* +* While the timebase is a 64 bit quantity, we are only interested +* in the lower 32 bits of it. +*/ + *tc = mfspr(TBR_TBL); + + return (0); +} + +#pragma weak __vdso_gettimekeep +int +__vdso_gettimekeep(struct vdso_timekeep **tk) +{ + + return (_elf_aux_info(AT_TIMEKEEP, tk, sizeof(*tk))); +} Modified: head/lib/libc/powerpc64/Makefile.inc == --- head/lib/libc/powerpc64/Makefile.incTue Sep 8 01:27:03 2020 (r365441) +++ head/lib/libc/powerpc64/Makefile.incTue Sep 8 03:00:31 2020 (r365442) @@ -1,7 +1,5 @@ # $FreeBSD$ -SRCS+= trivial-vdso_tc.c - # Long double is 64-bits SRCS+=machdep_ldisd.c SYM_MAPS+=${LIBC_SRCTOP}/powerpc64/Symbol.map Modified: head/lib/libc/powerpc64/sys/Mak
svn commit: r365444 - in head/sys/dev/usb: . net
Author: lwhsu Date: Tue Sep 8 04:44:37 2020 New Revision: 365444 URL: https://svnweb.freebsd.org/changeset/base/365444 Log: Add support to BELKIN B2B128 USB3 Ethernet Adapter to axge(4) Github PR:https://github.com/freebsd/freebsd/pull/439 Submitted by: https://github.com/jdpc86 MFC after:2 weeks Modified: head/sys/dev/usb/net/if_axge.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/net/if_axge.c == --- head/sys/dev/usb/net/if_axge.c Tue Sep 8 03:55:49 2020 (r365443) +++ head/sys/dev/usb/net/if_axge.c Tue Sep 8 04:44:37 2020 (r365444) @@ -75,6 +75,7 @@ static const STRUCT_USB_HOST_ID axge_devs[] = { #defineAXGE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } AXGE_DEV(ASIX, AX88178A), AXGE_DEV(ASIX, AX88179), + AXGE_DEV(BELKIN, B2B128), AXGE_DEV(DLINK, DUB1312), AXGE_DEV(LENOVO, GIGALAN), AXGE_DEV(SITECOMEU, LN032), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Sep 8 03:55:49 2020(r365443) +++ head/sys/dev/usb/usbdevsTue Sep 8 04:44:37 2020(r365444) @@ -1366,6 +1366,7 @@ product BELKIN F5U109 0x0109 F5U109 Serial product BELKIN USB2SCSI0x0115 USB to SCSI product BELKIN F8T012 0x0121 F8T012xx1 Bluetooth USB Adapter product BELKIN USB2LAN 0x0121 USB to LAN +product BELKIN B2B128 0x0128 USB3 to LAN product BELKIN F5U208 0x0208 F5U208 VideoBus II product BELKIN F5U237 0x0237 F5U237 USB 2.0 7-Port Hub product BELKIN F5U257 0x0257 F5U257 Serial ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365445 - head/sys/cam/mmc
Author: avg Date: Tue Sep 8 05:46:10 2020 New Revision: 365445 URL: https://svnweb.freebsd.org/changeset/base/365445 Log: mmc_da: make sure that part_index is not used uninitialized in sddastart This is a fix to r334065. Without this change I once got stuck I/O with endless partition switching: (sdda0:aw_mmc_sim2:0:0:0): sddastart (sdda0:aw_mmc_sim2:0:0:0): Partition 0 -> -525703168 (sdda0:aw_mmc_sim2:0:0:0): xpt_action: func 0x91d XPT_MMC_IO (sdda0:aw_mmc_sim2:0:0:0): xpt_done: func= 0x91d XPT_MMC_IO status 0x1 (sdda0:aw_mmc_sim2:0:0:0): sddadone (sdda0:aw_mmc_sim2:0:0:0): Card status: (sdda0:aw_mmc_sim2:0:0:0): Current state: 4 (sdda0:aw_mmc_sim2:0:0:0): Compteting partition switch to 0 Note that -525703168 (an int) is 0xe0aa6800 in binary representation. The partition indexes are actually stored as uint8_t, so that value was converted / truncated to zero. MFC after:1 week Modified: head/sys/cam/mmc/mmc_da.c Modified: head/sys/cam/mmc/mmc_da.c == --- head/sys/cam/mmc/mmc_da.c Tue Sep 8 04:44:37 2020(r365444) +++ head/sys/cam/mmc/mmc_da.c Tue Sep 8 05:46:10 2020(r365445) @@ -1808,6 +1808,7 @@ sddastart(struct cam_periph *periph, union ccb *start_ } /* Find partition that has outstanding commands. Prefer current partition. */ + part_index = softc->part_curr; part = softc->part[softc->part_curr]; bp = bioq_first(&part->bio_queue); if (bp == NULL) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365446 - head/sys/cam/mmc
Author: avg Date: Tue Sep 8 06:18:34 2020 New Revision: 365446 URL: https://svnweb.freebsd.org/changeset/base/365446 Log: mmc_da: fix a typo and a too long line MFC after:1 week Modified: head/sys/cam/mmc/mmc_da.c Modified: head/sys/cam/mmc/mmc_da.c == --- head/sys/cam/mmc/mmc_da.c Tue Sep 8 05:46:10 2020(r365445) +++ head/sys/cam/mmc/mmc_da.c Tue Sep 8 06:18:34 2020(r365446) @@ -1965,7 +1965,8 @@ sddadone(struct cam_periph *periph, union ccb *done_cc /* Process result of switching MMC partitions */ if (softc->state == SDDA_STATE_PART_SWITCH) { CAM_DEBUG(path, CAM_DEBUG_TRACE, - ("Compteting partition switch to %d\n", softc->part_requested)); + ("Completing partition switch to %d\n", + softc->part_requested)); softc->outstanding_cmds--; /* Complete partition switch */ softc->state = SDDA_STATE_NORMAL; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365447 - head/sys/cam/mmc
Author: avg Date: Tue Sep 8 06:19:23 2020 New Revision: 365447 URL: https://svnweb.freebsd.org/changeset/base/365447 Log: mmc_da: universally use uint8_t for the partition index Also, assert in sdda_init_switch_part() that the index is within the defined range. MFC after:1 week Modified: head/sys/cam/mmc/mmc_da.c Modified: head/sys/cam/mmc/mmc_da.c == --- head/sys/cam/mmc/mmc_da.c Tue Sep 8 06:18:34 2020(r365446) +++ head/sys/cam/mmc/mmc_da.c Tue Sep 8 06:19:23 2020(r365447) @@ -182,7 +182,6 @@ static void sdda_start_init(void *context, union ccb * static void sdda_start_init_task(void *context, int pending); static void sdda_process_mmc_partitions(struct cam_periph *periph, union ccb *start_ccb); static uint32_t sdda_get_host_caps(struct cam_periph *periph, union ccb *ccb); -static void sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, u_int part); static int mmc_select_card(struct cam_periph *periph, union ccb *ccb, uint32_t rca); static inline uint32_t mmc_get_sector_size(struct cam_periph *periph) {return MMC_SECTOR_SIZE;} @@ -1770,10 +1769,13 @@ sdda_process_mmc_partitions(struct cam_periph *periph, * This function cannot fail, instead check switch errors in sddadone(). */ static void -sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, u_int part) { +sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, +uint8_t part) +{ struct sdda_softc *sc = (struct sdda_softc *)periph->softc; uint8_t value; + KASSERT(part < MMC_PART_MAX, ("%s: invalid partition index", __func__)); sc->part_requested = part; value = (sc->raw_ext_csd[EXT_CSD_PART_CONFIG] & @@ -1797,7 +1799,7 @@ sddastart(struct cam_periph *periph, union ccb *start_ struct sdda_softc *softc = (struct sdda_softc *)periph->softc; struct sdda_part *part; struct mmc_params *mmcp = &periph->path->device->mmc_ident_data; - int part_index; + uint8_t part_index; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddastart\n")); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"