svn commit: r333098 - head/sbin/fsck_msdosfs
Author: delphij Date: Mon Apr 30 05:57:55 2018 New Revision: 333098 URL: https://svnweb.freebsd.org/changeset/base/333098 Log: Don't bail out from the check if readboot() returns !FSFATAL. This can happen when the fsinfo signature is invalid, and the user have choose to fix it, in which case the code would return FSBOOTMOD (not FSOK but not FSFATAL either). All other (fatal) cases would return FSFATAL. Obtained from:Android Open Source Project Obtained from: https://android.googlesource.com/platform/external/fsck_msdos/+/d8775a29ea7eac2e5f1504dd21da3725b93b3036 MFC after:2 weeks Modified: head/sbin/fsck_msdosfs/check.c Modified: head/sbin/fsck_msdosfs/check.c == --- head/sbin/fsck_msdosfs/check.c Mon Apr 30 04:02:48 2018 (r333097) +++ head/sbin/fsck_msdosfs/check.c Mon Apr 30 05:57:55 2018 (r333098) @@ -74,7 +74,7 @@ checkfilesys(const char *fname) return 8; } - if (readboot(dosfs, ) != FSOK) { + if (readboot(dosfs, ) == FSFATAL) { close(dosfs); printf("\n"); return 8; ___ 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: r333097 - head/share/misc
Author: bcran Date: Mon Apr 30 04:02:48 2018 New Revision: 333097 URL: https://svnweb.freebsd.org/changeset/base/333097 Log: Add back the historical information about being mentored by rrs Reviewed by: imp, eadler Differential Revision:https://reviews.freebsd.org/D15230 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Mon Apr 30 02:18:19 2018 (r333096) +++ head/share/misc/committers-src.dot Mon Apr 30 04:02:48 2018 (r333097) @@ -753,6 +753,7 @@ rpaulo -> jmmv rpaulo -> lidl rpaulo -> ngie +rrs -> bcran rrs -> jchandra rrs -> tuexen ___ 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: r333096 - head/sys/dev/usb/net
Author: emaste Date: Mon Apr 30 02:18:19 2018 New Revision: 333096 URL: https://svnweb.freebsd.org/changeset/base/333096 Log: if_smsc: set MII BUSY bit to read/write PHY regs Per the datasheet, the BUSY bit must be set when reading or writing PHY registers. From Linux commit 80928805babf. Submitted by: Arshan Khanifar MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D15217 Modified: head/sys/dev/usb/net/if_smsc.c Modified: head/sys/dev/usb/net/if_smsc.c == --- head/sys/dev/usb/net/if_smsc.c Mon Apr 30 01:58:24 2018 (r333095) +++ head/sys/dev/usb/net/if_smsc.c Mon Apr 30 02:18:19 2018 (r333096) @@ -452,7 +452,7 @@ smsc_miibus_readreg(device_t dev, int phy, int reg) goto done; } - addr = (phy << 11) | (reg << 6) | SMSC_MII_READ; + addr = (phy << 11) | (reg << 6) | SMSC_MII_READ | SMSC_MII_BUSY; smsc_write_reg(sc, SMSC_MII_ADDR, addr); if (smsc_wait_for_bits(sc, SMSC_MII_ADDR, SMSC_MII_BUSY) != 0) @@ -505,7 +505,7 @@ smsc_miibus_writereg(device_t dev, int phy, int reg, i val = htole32(val); smsc_write_reg(sc, SMSC_MII_DATA, val); - addr = (phy << 11) | (reg << 6) | SMSC_MII_WRITE; + addr = (phy << 11) | (reg << 6) | SMSC_MII_WRITE | SMSC_MII_BUSY; smsc_write_reg(sc, SMSC_MII_ADDR, addr); if (smsc_wait_for_bits(sc, SMSC_MII_ADDR, SMSC_MII_BUSY) != 0) ___ 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: r333095 - head/sys/dev/usb/net
Author: emaste Date: Mon Apr 30 01:58:24 2018 New Revision: 333095 URL: https://svnweb.freebsd.org/changeset/base/333095 Log: if_smsc: fix reset check In smsc_phy_init function, when the driver was trying to reset PHY, it didn't poll for the correct bit (BMCR_RESET) to be cleared. Instead, it anded it with MII_BMCR (which is 0), so it just exited the loop. This issue was fixed in Linux in commit d94609200069. Submitted by: Arshan Khanifar MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/net/if_smsc.c Modified: head/sys/dev/usb/net/if_smsc.c == --- head/sys/dev/usb/net/if_smsc.c Mon Apr 30 00:07:41 2018 (r333094) +++ head/sys/dev/usb/net/if_smsc.c Mon Apr 30 01:58:24 2018 (r333095) @@ -1306,7 +1306,7 @@ smsc_phy_init(struct smsc_softc *sc) do { uether_pause(>sc_ue, hz / 100); bmcr = smsc_miibus_readreg(sc->sc_ue.ue_dev, sc->sc_phyno, MII_BMCR); - } while ((bmcr & MII_BMCR) && ((ticks - start_ticks) < max_ticks)); + } while ((bmcr & BMCR_RESET) && ((ticks - start_ticks) < max_ticks)); if (((usb_ticks_t)(ticks - start_ticks)) >= max_ticks) { smsc_err_printf(sc, "PHY reset timed-out"); ___ 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: r333092 - in head/bin/sh: . tests/builtins
Author: jilles Date: Sun Apr 29 17:46:08 2018 New Revision: 333092 URL: https://svnweb.freebsd.org/changeset/base/333092 Log: sh: Don't have [ match any [[:class:]] Submitted by: Robert Elz MFC after:3 days Added: head/bin/sh/tests/builtins/case23.0 (contents, props changed) Modified: head/bin/sh/expand.c head/bin/sh/tests/builtins/Makefile Modified: head/bin/sh/expand.c == --- head/bin/sh/expand.cSun Apr 29 12:43:08 2018(r333091) +++ head/bin/sh/expand.cSun Apr 29 17:46:08 2018(r333092) @@ -1342,8 +1342,10 @@ patmatch(const char *pattern, const char *string) } if (c == '[' && *p == ':') { found |= match_charclass(p, chr, ); - if (end != NULL) + if (end != NULL) { p = end; + continue; + } } if (c == CTLESC) c = *p++; Modified: head/bin/sh/tests/builtins/Makefile == --- head/bin/sh/tests/builtins/Makefile Sun Apr 29 12:43:08 2018 (r333091) +++ head/bin/sh/tests/builtins/Makefile Sun Apr 29 17:46:08 2018 (r333092) @@ -42,6 +42,7 @@ ${PACKAGE}FILES+= case19.0 ${PACKAGE}FILES+= case20.0 ${PACKAGE}FILES+= case21.0 ${PACKAGE}FILES+= case22.0 +${PACKAGE}FILES+= case23.0 ${PACKAGE}FILES+= cd1.0 ${PACKAGE}FILES+= cd2.0 ${PACKAGE}FILES+= cd3.0 Added: head/bin/sh/tests/builtins/case23.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/case23.0 Sun Apr 29 17:46:08 2018 (r333092) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +case [ in +[[:alpha:]]) echo bad +esac ___ 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: r333091 - head/sys/vm
Author: kib Date: Sun Apr 29 12:43:08 2018 New Revision: 333091 URL: https://svnweb.freebsd.org/changeset/base/333091 Log: Eliminate some vm object relocks in vm fault. For the vm_fault_prefault() call from vm_fault_soft_fast(), extend the scope of the object rlock to avoid re-taking it inside vm_fault_prefault(). It causes pmap_enter_quick() sometimes called with shadow object lock as well as the page lock, but this looks innocent. Noted and measured by:mjg Reviewed by: alc, markj (as part of the larger patch) Tested by:pho (as part of the larger patch) Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D15122 Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c == --- head/sys/vm/vm_fault.c Sun Apr 29 11:46:20 2018(r333090) +++ head/sys/vm/vm_fault.c Sun Apr 29 12:43:08 2018(r333091) @@ -132,7 +132,7 @@ struct faultstate { static void vm_fault_dontneed(const struct faultstate *fs, vm_offset_t vaddr, int ahead); static void vm_fault_prefault(const struct faultstate *fs, vm_offset_t addra, - int backward, int forward); + int backward, int forward, bool obj_locked); static inline void release_page(struct faultstate *fs) @@ -320,9 +320,9 @@ vm_fault_soft_fast(struct faultstate *fs, vm_offset_t return (rv); vm_fault_fill_hold(m_hold, m); vm_fault_dirty(fs->entry, m, prot, fault_type, fault_flags, false); - VM_OBJECT_RUNLOCK(fs->first_object); if (psind == 0 && !wired) - vm_fault_prefault(fs, vaddr, PFBAK, PFFOR); + vm_fault_prefault(fs, vaddr, PFBAK, PFFOR, true); + VM_OBJECT_RUNLOCK(fs->first_object); vm_map_lookup_done(fs->map, fs->entry); curthread->td_ru.ru_minflt++; return (KERN_SUCCESS); @@ -1262,7 +1262,7 @@ readrest: wired == 0) vm_fault_prefault(, vaddr, faultcount > 0 ? behind : PFBAK, - faultcount > 0 ? ahead : PFFOR); + faultcount > 0 ? ahead : PFFOR, false); VM_OBJECT_WLOCK(fs.object); vm_page_lock(fs.m); @@ -1395,7 +1395,7 @@ vm_fault_dontneed(const struct faultstate *fs, vm_offs */ static void vm_fault_prefault(const struct faultstate *fs, vm_offset_t addra, -int backward, int forward) +int backward, int forward, bool obj_locked) { pmap_t pmap; vm_map_entry_t entry; @@ -1441,7 +1441,8 @@ vm_fault_prefault(const struct faultstate *fs, vm_offs pindex = ((addr - entry->start) + entry->offset) >> PAGE_SHIFT; lobject = entry->object.vm_object; - VM_OBJECT_RLOCK(lobject); + if (!obj_locked) + VM_OBJECT_RLOCK(lobject); while ((m = vm_page_lookup(lobject, pindex)) == NULL && lobject->type == OBJT_DEFAULT && (backing_object = lobject->backing_object) != NULL) { @@ -1449,17 +1450,20 @@ vm_fault_prefault(const struct faultstate *fs, vm_offs 0, ("vm_fault_prefault: unaligned object offset")); pindex += lobject->backing_object_offset >> PAGE_SHIFT; VM_OBJECT_RLOCK(backing_object); - VM_OBJECT_RUNLOCK(lobject); + if (!obj_locked || lobject != entry->object.vm_object) + VM_OBJECT_RUNLOCK(lobject); lobject = backing_object; } if (m == NULL) { - VM_OBJECT_RUNLOCK(lobject); + if (!obj_locked || lobject != entry->object.vm_object) + VM_OBJECT_RUNLOCK(lobject); break; } if (m->valid == VM_PAGE_BITS_ALL && (m->flags & PG_FICTITIOUS) == 0) pmap_enter_quick(pmap, addr, m, entry->protection); - VM_OBJECT_RUNLOCK(lobject); + if (!obj_locked || lobject != entry->object.vm_object) + VM_OBJECT_RUNLOCK(lobject); } } ___ 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: r333089 - head/usr.sbin/usbconfig
Author: trasz Date: Sun Apr 29 10:45:09 2018 New Revision: 333089 URL: https://svnweb.freebsd.org/changeset/base/333089 Log: Clean up the EXAMPLES section of usbconfig(8). This removes parts that become redundant after documenting all the subcommands, and switches to the new syntax, without the '-d'. Reviewed by: hselasky@ MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/usbconfig/usbconfig.8 Modified: head/usr.sbin/usbconfig/usbconfig.8 == --- head/usr.sbin/usbconfig/usbconfig.8 Sun Apr 29 05:37:46 2018 (r333088) +++ head/usr.sbin/usbconfig/usbconfig.8 Sun Apr 29 10:45:09 2018 (r333089) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 17, 2018 +.Dd April 29, 2018 .Dt USBCONFIG 8 .Os .Sh NAME @@ -146,33 +146,21 @@ See for more information. .El .Sh EXAMPLES -Show information about the device on USB bus 1 at address 2: +List all connected USB devices and their attached interface drivers: .Pp -.Dl usbconfig -d ugen1.2 dump_info +.Dl usbconfig show_ifdrv .Pp -Dump HID descriptor for device on USB bus 1 at address 2: +Dump device and configuration descriptors for device on USB bus 1 at address 2: .Pp -.Dl usbconfig -d ugen1.2 do_request 0x81 0x06 0x2200 0 0x100 +.Dl usbconfig ugen1.2 dump_all_desc .Pp -Dump string descriptor at index Z for device on USB bus 1 at address 2: +Dump HID descriptor for device on USB bus 1 at address 2: .Pp -.Dl usbconfig -d ugen1.2 dump_string Z +.Dl usbconfig ugen1.2 do_request 0x81 0x06 0x2200 0 0x100 .Pp -Dump current configuration descriptor for device on USB bus 1 at address 2: +Power off the device on USB bus 1 at address 2: .Pp -.Dl usbconfig -d ugen1.2 dump_curr_config_desc -.Pp -Dump device descriptor for device on USB bus 1 at address 2: -.Pp -.Dl usbconfig -d ugen1.2 dump_device_desc -.Pp -Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on: -.Pp -.Dl usbconfig -d ugen1.2 suspend -.Dl usbconfig -d ugen1.2 resume -.Dl usbconfig -d ugen1.2 power_off -.Dl usbconfig -d ugen1.2 power_save -.Dl usbconfig -d ugen1.2 power_on +.Dl usbconfig ugen1.2 power_off .Sh SEE ALSO .Xr usb 4 , .Xr usb_quirk 4 , ___ 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"