1. 04 Jul, 2022 16 commits
    • Gleb Smirnoff's avatar
      sockets: use positive flag for file descriptor socket reference · bc760564
      Gleb Smirnoff authored
      Rename SS_NOFDREF to SS_FDREF and flip all bitwise operations.
      Mark sockets created by socreate() with SS_FDREF.
      This change is mostly illustrative. With it we see that SS_FDREF
      is a debugging flag, since:
      * socreate() takes a reference with soref().
      * on accept path solisten_dequeue() takes a reference
        with soref() and then soaccept() sets SS_FDREF.
      * soclose() checks SS_FDREF, removes it and does sorele().
      Reviewed by:		tuexen
      Differential revision:	https://reviews.freebsd.org/D35678
    • Gleb Smirnoff's avatar
      tcp: use a TCP flag to check if connection has been close(2)d · 74703901
      Gleb Smirnoff authored
      The flag SS_NOFDREF is a private flag of the socket layer.  It also
      is supposed to be read with SOCK_LOCK(), which we don't own here.
      Reviewed by:		rrs, tuexen
      Differential revision:	https://reviews.freebsd.org/D35663
    • Bjoern A. Zeeb's avatar
      pca954x: harmonize pca9547 and pca954x and add pca9540 support · 97dbd377
      Bjoern A. Zeeb authored
      The two implementations for the pca9548 switch and the pca9547 mux
      seemed close enough so we can put them together and with a bit more
      abstraction add pca9540 support.
      While here apply a bit of consistency in variable and driver naming and
      use device_has_property instead of the FDT-only OF_ variant.
      This disconnects pca9547 from the build but does not yet delete it.
      MFC after:	2 weeks
      Reviewed by:	mmel (earlier version), avg
      Differential Revision: https://reviews.freebsd.org/D35701
    • Doug Moore's avatar
      rb_tree: fine-tune rebalancing code · 2120d7f5
      Doug Moore authored
      Change parts of RB_INSERT_COLOR and RB_REMOVE_COLOR to reduce the
      number of operations, by, in some cases, flipping two color bits at a
      time instead of flipping each individually, in separate operations,
      and by using a switch statement to replace a sequence of if-elses.
      Rewrite RB_SET_PARENT to generate fewer instructions.  These changes
      reduce the code size by over 100 bytes on some architectures.
      Also, allow RB users to define a preprocessor symbol to generate
      RB_REMOVE_COLOR code that matches the implementation described in the
      original weak-AVL paper in one particular case, instead of the still
      correct, but slightly more efficient implementation of that case
      currently implemented.
      Reviewed by:	alc
      MFC after:	3 weeks
      Differential Revision:	https://reviews.freebsd.org/D35524
    • Andrew Gallatin's avatar
      pmcstat: fix log analysis · 0aa15077
      Andrew Gallatin authored
      pmcstat has been broken for analyzing logs since D35342 / b6e28991.
      This is because the pmc for the first CPU is not added when reading logs
      because unlike its clones, its event id is not invalid. That causes us
      to fail the assertion at lib/libpmcstat/libpmcstat_logging.c:293
      when encountering samples from cpu0.
      Fix this by removing the check that the PMC is invalid
      Reviewed by: tsoome
      Sponsored by: Netflix
      Differential Revision: https://reviews.freebsd.org/D35709
    • Andrew Turner's avatar
      Add Rockchip PCIe cleanup on attach faulure · ee2324aa
      Andrew Turner authored
      We should clean up on failure as it may panic the kernel later, e.g.
      if we crate the rman, but fail to destroy it on attach faulure.
      Reviewed by:	imp
      Sponsored by:	The FreeBSD Foundation
      Differential Revision: https://reviews.freebsd.org/D35682
    • Andrew Turner's avatar
      Fix ofw pcib when it rman_init fails · b1e93132
      Andrew Turner authored
      rman_fini assumes rman_init has been called successfully. Clean up
      init faulure by only calling rman_fini when rman_init has succeeded.
      While here add ofw_pcib_fini that can be used by a sub-class to clean
      Reviewed by:	bz, imp
      Sponsored by:	The FreeBSD Foundation
      Differential Revision: https://reviews.freebsd.org/D35681
    • Andrew Turner's avatar
      Support decoding mem32 memory in the rk pcie driver · 1c799a6f
      Andrew Turner authored
      This is needed with some dtb files.
      While here use a switch statement as the two options are mutually
      exclusive in any iteration of the loop.
      Reviewed by:	imp
      Sponsored by:	The FreeBSD Foundation
      Differential Revision: https://reviews.freebsd.org/D35680
    • Kornel Dulęba's avatar
      e6000sw: Fix direct register write logic · 66548259
      Kornel Dulęba authored
      When accessing a register directly from etherswitchcfg one must specify
      a register group(e.g. registers of portN) and the register offset within
      the group. The latter is passed as the 5 least significant bits.
      Extract the former by dividing the register address by 32, not by 5.
      Approved by:	mw(mentor)
      Obtained from:	Semihalf
      Sponsored by:	Stormshield
      MFC after:	2 weeks
      Differential Revision:	https://reviews.freebsd.org/D35672
    • Kornel Dulęba's avatar
      lockstat: Fix construction of comparision predicates · 9dbacce2
      Kornel Dulęba authored
      Passing "0x%p" to sprintf results in double "0x" being printed.
      This causes a dtrace script compilation failure when "-d" flag
      is specified.
      Fix that by removing the extraneous "0x".
      Reviewed by:	markj
      Approved by:	mw(mentor)
      Obtained from:	Semihalf
      Sponsored by:	Alstom
      MFC after:	2 weeks
      Differential Revision:	https://reviews.freebsd.org/D35690
    • Mike Karels's avatar
      mountd startup: enable NFSv4 if needed on restart · 1cf8e633
      Mike Karels authored
      The mountd script in rc.d sets vfs.nfsd.server_max_nfsvers correctly
      when it is run at system startup, relying on the kernel default.
      However, if NFSv4 was enabled in /etc/rc.conf later, and the script
      was re-run to restart mountd, the sysctl was still set to 3.
      Set the sysctl to the right value in all cases.
      Reviewed by:	rmacklem
      MFC after:	1 week
    • Mateusz Guzik's avatar
      routing: hide notify_add and notify_del behind ROUTE_MPATH · db4b4021
      Mateusz Guzik authored
      Fixes a warn about unused routines without the option.
      Sponsored by:	Rubicon Communications, LLC ("Netgate")
    • Yuri's avatar
      ipmi: do not omit lun in BMC addresses · 177f8b32
      Yuri authored
      Some systems put sensors on non-0 lun, so we should not omit it.  This
      was the only difference with the Linux driver, where DIMM sensors could
      be queried, but not on FreeBSD.
      See this report[1] on the FreeBSD forums:
      Reviewed by:	philip
      Tested by:	Andrey Lanin[1]
      MFC after:	1 week
      Differential Revision: https://reviews.freebsd.org/D35612
    • Yuri's avatar
      ipmi: correctly handle ipmb requests · 18db96db
      Yuri authored
      Handle IPMB requests using SEND_MSG (sent as driver request as we do not
      need to return anything back to userland for this) and GET_MSG (sent as
      usual request so we can return the data for RECEIVE_MSG ioctl) pair.
      This fixes fetching complete sensor data from boards (e.g. HP ProLiant
      DL380 Gen10).
      Reviewed by:	philip
      MFC after:	1 week
      Differential Revision: https://reviews.freebsd.org/D35605
    • Xin LI's avatar
      file: upgrade to 5.42. · a4d6d3b8
      Xin LI authored
      MFC after:	2 weeks
    • Xin LI's avatar
      Vendor import of file 5.42. · ba49e637
      Xin LI authored
  2. 03 Jul, 2022 19 commits
  3. 02 Jul, 2022 5 commits