]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoMFC r354247, r355349: lualoader try_include improvement
Kyle Evans [Thu, 12 Dec 2019 18:51:32 +0000 (18:51 +0000)]
MFC r354247, r355349: lualoader try_include improvement

r354247: lualoader: rewrite try_include using lfs + dofile

Actual modules get require()'d in, rather than try_include(). All instances
of try_include should be provided with proper hooks/API in the rest of
loader to do the work they need to do, since we can't rely on them to exist.
Convert this now to lfs + dofile since we won't really be treating them as
modules.

lfs is required because dofile will properly throw an error if the file
doesn't exist, which is not in the spirit of 'optionally included'.

Getting out of the pcall game allows us to provide a loader.exit() style
call that backs out to the common bits of loader (autoboot sequence unless
disabled with a loader.setenv("autoboot_delay", "NO")). The most ideal way
identified so far to implement loader.exit() is to throw a special
abort-style error that indicates to the caller in interp_lua that we've not
actually errored out, just continue execution. Otherwise, we have to hack in
logic to bubble up and return from loader.lua without continuing further,
which gets kind of ugly depending on the context in which we're aborting.

A compat shim is provided temporarily in case the executing loader doesn't
yet have loader.lua_path, which was just added in r354246.

r355349: lualoader: correct a typo from r354247

r354247 converted try_include to lfs + dofile with the loader.lua_path added
just before. Fortunately, there was a hardcoded /boot/lua fallback in case
loader.lua_path wasn't being set yet- I typo'd it as loader.lua_paths.

Fix the typo.

4 years agoMFC r355568:
Dimitry Andric [Thu, 12 Dec 2019 18:16:32 +0000 (18:16 +0000)]
MFC r355568:

Correctly check for C++17 and higher when declaring timespec_get()

Summary:
In rS338751, the check to declare `timespec_get()` for C++17 and higher
was incorrectly done against a `cplusplus` define, while it should have
been `__cplusplus`.

Fix this by using `__cplusplus`, and also bump `__FreeBSD_version` so it
becomes possible to correctly check for `timespec_get()` in upstream
libc++ headers.

Reviewed by: brooks, emaste
Differential Revision: https://reviews.freebsd.org/D22735

4 years agoMFC r355422:
Konstantin Belousov [Thu, 12 Dec 2019 13:47:02 +0000 (13:47 +0000)]
MFC r355422:
mlx5: Do not poke hardware for statistic after teardown is started.

4 years agoMFC r355407:
Konstantin Belousov [Thu, 12 Dec 2019 13:46:02 +0000 (13:46 +0000)]
MFC r355407:
Stop using per-mount tmpfs zones.

4 years agoMFC r355182: Fix use-after-free in case of L2ARC prefetch failure.
Alexander Motin [Thu, 12 Dec 2019 00:29:48 +0000 (00:29 +0000)]
MFC r355182: Fix use-after-free in case of L2ARC prefetch failure.

In case L2ARC read failed, l2arc_read_done() creates _different_ ZIO
to read data from the original storage device.  Unfortunately pointer
to the failed ZIO remains in hdr->b_l1hdr.b_acb->acb_zio_head, and if
some other read try to bump the ZIO priority, it will crash.

The problem is reproducible by corrupting L2ARC content and reading
some data with prefetch if l2arc_noprefetch tunable is changed to 0.
With the default setting the issue is probably not reproducible now.

4 years agoMFC r355404: Mark some more hot global variables with __read_mostly.
Alexander Motin [Wed, 11 Dec 2019 15:15:21 +0000 (15:15 +0000)]
MFC r355404: Mark some more hot global variables with __read_mostly.

4 years agoMFC r355144:
Mark Johnston [Wed, 11 Dec 2019 14:28:13 +0000 (14:28 +0000)]
MFC r355144:
iwm(4): Remove _mvm from the namespace.

4 years agoMFC r355143:
Mark Johnston [Wed, 11 Dec 2019 14:27:33 +0000 (14:27 +0000)]
MFC r355143:
iwm(4): Fix version string formatting.

4 years agoMFC r355399:
Mark Johnston [Wed, 11 Dec 2019 14:27:00 +0000 (14:27 +0000)]
MFC r355399:
Fix an off-by-one error in vm_map_pmap_enter().

4 years agoMFC r340127,340133,355085: libbsdxml (expat) 2.2.9.
Xin LI [Wed, 11 Dec 2019 06:30:26 +0000 (06:30 +0000)]
MFC r340127,340133,355085: libbsdxml (expat) 2.2.9.

4 years agoMFC r354969:
Hans Petter Selasky [Tue, 10 Dec 2019 07:06:32 +0000 (07:06 +0000)]
MFC r354969:
Add USB ID for Diamond Multimedia BVU195 Display Link device.

Submitted by: darius@dons.net.au
PR: 242128
Sponsored by: Mellanox Technologies

4 years agoMFC r355322:
Hans Petter Selasky [Tue, 10 Dec 2019 07:04:20 +0000 (07:04 +0000)]
MFC r355322:
Use refcount from "in_joingroup_locked()" when joining multicast
groups. Do not acquire additional references. This makes the IPv4 IGMP
code in line with the IPv6 MLD code.

Background:
The IPv4 multicast code puts an extra reference on the in_multi struct
when joining groups.  This becomes visible when using daemons like
igmpproxy from ports, that multicast entries do not disappear from the
output of ifmcstat(8) when multicast streams are disconnected.

This fixes a regression issue after r349762.

While at it factor the ip_mfilter_insert() and ip6_mfilter_insert() calls
to avoid repeated "is_new" check.

Differential Revision: https://reviews.freebsd.org/D22595
Tested by: Guido van Rooij <guido@gvr.org>
Reviewed by: rgrimes (network)
Sponsored by: Mellanox Technologies

4 years agoMFC r355347:
Toomas Soome [Mon, 9 Dec 2019 21:10:18 +0000 (21:10 +0000)]
MFC r355347:
loader: ReadKeyStrokeEx may return partial keystrokes

In some systems we can receive no scancode nor unicodechar values.

PR: 240760
Reported by: Ariel Millennium Thornton

4 years agoMFC r350624 (by cem):
Alexander Motin [Mon, 9 Dec 2019 17:13:17 +0000 (17:13 +0000)]
MFC r350624 (by cem):
amdtemp(4), amdsmn(4): Attach to Ryzen 3 (Zen 2) hostbridges

PR: 239607

4 years agoMFC r355224, r355308, r355392:
Toomas Soome [Mon, 9 Dec 2019 16:21:26 +0000 (16:21 +0000)]
MFC r355224, r355308, r355392:
loader.efi: efipart needs better support detecting nested partitions

Just as disks can have nested partitions, the same happens with cd devices,
so we need to detect device paths and make sure we will not mix the handles.

To address this:

we fetch handle array and create linked list of block devices.
we walk the list and detect parent devices and set children pd_parent.
for {fd, cd, hd}, we walk device list and pick up our devices and store to
corresponding list. We make sure we store parent device first.

For sorting we use 3 steps: We check for floppy, we check for cd and then
everything else must be hd.

In general, it seems the floppy devices have no parent.
CD can have both parents and children (multiple boot entries, partitions
from the hybrid disk image).

Tested by: cross+freebsd@distal.com on Cisco UCS systems, C200 series (C220M5, C240M4, C220M3).
Also on MBP with UEFI 1.10

4 years agoMFC r355424: release: chase ports r519089 (rpi-firmware update)
Kyle Evans [Mon, 9 Dec 2019 15:30:12 +0000 (15:30 +0000)]
MFC r355424: release: chase ports r519089 (rpi-firmware update)

4 years agoMFC r355288:
Konstantin Belousov [Mon, 9 Dec 2019 00:43:11 +0000 (00:43 +0000)]
MFC r355288:
mlx5: Do not try to enable fwdumps if scan space did not responded.

4 years agoMFC r355287:
Konstantin Belousov [Mon, 9 Dec 2019 00:42:12 +0000 (00:42 +0000)]
MFC r355287:
mlx5: Downgrade assert about misbehaving hardware to error message.

4 years agoMFC r355469:
Mark Johnston [Mon, 9 Dec 2019 00:34:34 +0000 (00:34 +0000)]
MFC r355469:
Fix fault_type handling in vm_map_lookup().

4 years agoMFC r355129:
Andrey V. Elsukov [Sun, 8 Dec 2019 15:22:20 +0000 (15:22 +0000)]
MFC r355129:
  Add support for dummy ESP packets with next header field equal to
  IPPROTO_NONE.

  According to RFC4303 2.6 they should be silently dropped.

  Submitted by: aurelien.cazuc.external_stormshield.eu
  Sponsored by: Stormshield
  Differential Revision: https://reviews.freebsd.org/D22557

4 years agoMFC r351770,r352920-r352923
Matt Macy [Sun, 8 Dec 2019 04:19:05 +0000 (04:19 +0000)]
MFC r351770,r352920-r352923

MFCs to dd appear to have been haphazard so selectively
MFCing individually didn't work easily.

Add conv=fsync flag to dd

The fsync flag performs an fsync(2) on the output file before closing it.
This will be useful for the ZFS test suite.

Add conv=fdatasync flag to dd

The fdatasync flag performs an fdatasync(2) on the output file before closing it.
This will be useful for the ZFS test suite.

dd: Check result of close(2) for errors

close(2) can return errors from previous operations which should not be ignored.

Add oflag=fsync and oflag=sync capability to dd

Sets the O_FSYNC flag on the output file. oflag=fsync and oflag=sync are
synonyms just as O_FSYNC and O_SYNC are synonyms. This functionality is
intended to improve portability of dd commands in the ZFS test suite.

Add iflag=fullblock to dd

Normally, count=n means read(2) will be called n times on the input to dd. If
the read() returns short, as may happen when reading from a pipe, fewer bytes
will be copied from the input. With conv=sync the buffer is padded with zeros
to fill the rest of the block.

iflag=fullblock causes dd to continue reading until the block is full, so that
count=n means n full blocks are copied. This flag is compatible with illumos
and GNU dd and is used in the ZFS test suite.

Submitted by: Ryan Moeller, Thomas Hurst
Reviewed by: manpages, mmacy@
Sponsored by: iXsystems, Inc.

4 years agoMFC r349549: MFV r349535: less v551.
Xin LI [Sat, 7 Dec 2019 19:02:09 +0000 (19:02 +0000)]
MFC r349549: MFV r349535: less v551.

Relnotes: yes

4 years agoMFC r355193:
Ian Lepore [Sat, 7 Dec 2019 17:46:32 +0000 (17:46 +0000)]
MFC r355193:

Implement the ofw_bus_get_node method in the imx_gpio driver so that
ofw_gpiobus can find its fdt metadata and instantiate child devices.

4 years agoMFC r354973:
Ian Lepore [Sat, 7 Dec 2019 17:44:21 +0000 (17:44 +0000)]
MFC r354973:

Rewrite iicdev_writeto() to use a single buffer and a single iic_msg, rather
than effectively doing scatter/gather IO with a pair of iic_msgs that direct
the controller to do a single transfer with no bus STOP/START between the
two buffers.  It turns out we have multiple i2c hardware drivers that don't
honor the NOSTOP and NOSTART flags; sometimes they just try to do the
transfers anyway, creating confusing failures or leading to corrupted data.

4 years agoMFC r352938:
Ian Lepore [Sat, 7 Dec 2019 17:34:04 +0000 (17:34 +0000)]
MFC r352938:

Add 8 and 16 bit versions of atomic_cmpset and atomic_fcmpset for arm.

This adds 8 and 16 bit versions of the cmpset and fcmpset functions. Macros
are used to generate all the flavors from the same set of instructions; the
macro expansion handles the couple minor differences between each size
variation (generating ldrexb/ldrexh/ldrex for 8/16/32, etc).

In addition to handling new sizes, the instruction sequences used for cmpset
and fcmpset are rewritten to be a bit shorter/faster, and the new sequence
will not return false when *dst==*old but the store-exclusive fails because
of concurrent writers. Instead, it just loops like ldrex/strex sequences
normally do until it gets a non-conflicted store. The manpage allows LL/SC
architectures to bogusly return false, but there's no reason to actually do
so, at least on arm.

Reviewed by: cognet

4 years agoMFC r352338:
Ian Lepore [Sat, 7 Dec 2019 17:24:07 +0000 (17:24 +0000)]
MFC r352338:

Create a mechanism for encoding a system errno into the IIC_Exxxxx space.

Errors are communicated between the i2c controller layer and upper layers
(iicbus and slave device drivers) using a set of IIC_Exxxxxx constants which
effectively define a private number space separate from (and having values
that conflict with) the system errno number space. Sometimes it is necessary
to report a plain old system error (especially EINTR) from the controller or
bus layer and have that value make it back across the syscall interface
intact.

I initially considered replicating a few "crucial" errno values with similar
names and new numbers, e.g., IIC_EINTR, IIC_ERESTART, etc. It seemed like
that had the potential to grow over time until many of the errno names were
duplicated into the IIC_Exxxxx space.

So instead, this defines a mechanism to "encode" an errno into the IIC_Exxxx
space by setting the high bit and putting the errno into the lower-order
bits; a new errno2iic() function does this. The existing iic2errno()
recognizes the encoded values and extracts the original errno out of the
encoded value. An interesting wrinkle occurs with the pseudo-error values
such as ERESTART -- they aleady have the high bit set, and turning it off
would be the wrong thing to do. Instead, iic2errno() recognizes that lots of
high bits are on (i.e., it's a negative number near to zero) and just
returns that value as-is.

Thus, existing drivers continue to work without needing any changes, and
there is now a way to return errno values from the lower layers. The first
use of that is in iicbus_poll() which does mtx_sleep() with the PCATCH flag,
and needs to return the errno from that up the call chain.

Differential Revision: https://reviews.freebsd.org/D20975

4 years agoMFC r353024-r353025
Ian Lepore [Sat, 7 Dec 2019 17:19:36 +0000 (17:19 +0000)]
MFC r353024-r353025

r353024:
Clarify how the -f option for daemon(8) interacts with other options
related to redirecting stdout and stderr.

r353025:
Bump .Dd for earlier update (should have been part of r353024).

4 years agoMFC r352196, r352333, r352342, r353653
Ian Lepore [Sat, 7 Dec 2019 17:17:34 +0000 (17:17 +0000)]
MFC r352196, r352333, r352342, r353653

r352196:
In am335x_dmtpps, use a spin mutex to interlock between PPS capture and PPS
ioctl(2) handling.  This allows doing the pps_event() work in the polling
routine, instead of using a taskqueue task to do that work.

Also, add PNPINFO, and switch to using make_dev_s() to create the cdev.

Using a spin mutex and calling pps_event() from the polling function works
around the situation which requires more than 2 sets of timecounter
timehands in a single-core system to get reliable PPS capture.  That problem
would happen when a single-core system is idle in cpu_idle() then gets woken
up with an event timer event which was scheduled to handle a hardclock tick.
That processing path would end up calling tc_windup 3 or 4 times between
when the tc polling function was called and when the taskqueue task would
eventually run, and with only two sets of timehands, the th_generation count
would always be too old to allow the captured PPS data to be used.

r352333:
Include <lock.h>, required to use spinlocks in this code.

r352342:
Make the ti_sysc device quiet.  It's an internal utility pseudo-device
that makes the upstream FDT data work right, so we don't need to see a
couple dozen instances of it spam the dmesg at boot time unless it's a
verbose boot.

r353653:
Update some comments; no functional changes.  Some historical old comments
in this driver indicate that the SD_CAPA register is write-once and after
being set one time the values in it cannot be changed.  That turns out not
to be the case -- the values written to it survive a reset, but they can
be rewritten/changed at any time.

4 years agoMFC r355214, r355239, r355274, r355276-r355277, r355295, r355298
Ian Lepore [Sat, 7 Dec 2019 17:10:03 +0000 (17:10 +0000)]
MFC r355214, r355239, r355274, r355276-r355277, r355295, r355298

r355214:
Ignore "gpio-hog" nodes when instantiating ofw_gpiobus children.  Also,
in ofw_gpiobus_probe() return BUS_PROBE_DEFAULT rather than 0; we are not
the only possible driver to handle this device, we're just slightly better
than the base gpiobus (which probes at BUS_PROBE_GENERIC).

In the time since this code was first written, the gpio controller bindings
aquired the concept of a "hog" node which could be used to preset one or
more gpio pins as input or output at a specified level.  This change doesn't
fully implement the hogging concept, it just filters out hog nodes when
instantiating child devices by scanning for child nodes in the fdt data.

The whole concept of having child nodes under the controller node is not
supported by the standard bindings, and appears to be a freebsd extension,
probably left over from the days when we had no support for cross-tree
phandle references in the fdt data.

r355239:
Add an OFWBUS_PNP_INFO() macro for devices that hang directly off the root
ofwbus.  Also, apply some style(9) whitespace fixing to the
SIMPLEBUS_PNP_INFO() macro (no functional change).

r355274:
Move most of the gpio_pin_* functions from ofw_gpiobus.c to gpiobus.c so
that they can be used by drivers on non-FDT-configured systems.  Only the
functions related to acquiring pins by parsing FDT data remain in
ofw_gpiobus.  Also, add two new functions for acquiring gpio pins based on
child device_t and index, or on the bus device_t and pin number.  And
finally, defer reserving pins for gpiobus children until they acquire the
pin, rather than reserving them as soon as the child is added (before it's
even known whether the child will attach).

This will allow drivers configured with hints (or any other mechanism) to
use the same code as drivers configured via FDT data.  Until now, a hinted
driver and an FDT driver had to be two completely different sets of code,
because hinted drivers could only use gpiobus calls to manipulate pins,
while fdt-configured drivers could not use that API (due to not always being
children of the bus that owns the pins) and had to use the newer
gpio_pin_xxxx() functions.  Now drivers can be written in the more
traditional form, where most of the code is shared and only the resource
acquisition code at attachment time changes.

r355276:
Rewrite gpioiic(4) to use the gpio_pin_* API, and to conform to the modern
FDT bindings document for gpio-i2c devices.

Using the gpio_pin_* functions to acquire/release/manipulate gpio pins
removes the constraint that both gpio pins must belong to the same gpio
controller/bank, and that the gpioiic instance must be a child of gpiobus.
Removing those constraints allows the driver to be fully compatible with
the modern dts bindings for a gpio bitbanged i2c bus.

For hinted attachment, the two gpio pins still must be on the same gpiobus,
and the device instance must be a child of that bus.  This preserves
compatibility for existing installations that have use gpioiic(4) with hints.

r355277:
Fix leading whitespace (spaces->tabs) in comments; no functional change.

r355295:
Remove "all rights reserved" from copyright after getting a response from
Luiz that he also was not intentionally asserting that right, it was already
there when he added his name.

r355298:
Do not initialize the flags field in struct gpiobus_pin from the flags in
struct gpio_pin.  It turns out these two sets of flags are completely
unrelated to each other.

Also, update the comment for GPIO_ACTIVE_LOW to reflect the fact that it
does get set, somewhat unobviously, by code that parses FDT data.  The bits
from the FDT cell containing flags are just copied to gpiobus_pin.flags, so
there's never any obvious reference to the symbol GPIO_ACTIVE_LOW being
stored into the flags field.

4 years agoMFC r355225:
Benedict Reuschling [Sat, 7 Dec 2019 14:17:56 +0000 (14:17 +0000)]
MFC r355225:
Capitalize some user-visible output messages in
the bectl utility.

No functional changes.

Approved by: imp@
Differential Revision: https://reviews.freebsd.org/D22330

4 years agoMFC r238022 (cem): dhclient: fix braino in previous bugfix r300174
Ed Maste [Sat, 7 Dec 2019 03:56:36 +0000 (03:56 +0000)]
MFC r238022 (cem): dhclient: fix braino in previous bugfix r300174

The previous revision missed the exact same error in a copy paste block
of the same code in another function.  Fix the identical case, too.

A DHCP client identifier is simply the hardware type (one byte)
concatenated with the hardware address (some variable number of bytes,
but at most 16).  Limit the size of the temporary buffer to match and
the rest of the calculations shake out correctly.

PR: 238022
Reported by: Young <yangx92 AT hotmail.com>
Submitted by: Young <yangx92 AT hotmail.com>

4 years agoMFC r354446: rc.shutdown: print a newline before watchdog timeout message
Ed Maste [Sat, 7 Dec 2019 03:29:58 +0000 (03:29 +0000)]
MFC r354446: rc.shutdown: print a newline before watchdog timeout message

Previously the watchdog timeout message was appended to the last entry
in the "Waiting for PIDS" list, resulting in a message like

    Waiting for PIDS: 31299 31296 90201 9020090 second watchdog timeout
    expired. Shutdown terminated.

Print a newline to separate the watchdog timeout message.

Also MFC 355476: rc.shutdown: kill shutdown process after logging message

Move the kill -KILL $$ back to the pre-r354446 location at the end of
the shutdown timeout handler.

PR: 241072
Sponsored by: The FreeBSD Foundation

4 years agoMFC r355388:
Cy Schubert [Sat, 7 Dec 2019 00:53:22 +0000 (00:53 +0000)]
MFC r355388:

Chase r352304. The default rlimit memlock is no memory locking.

Reported by: egypcio@

4 years agoMFC r355300:
Cy Schubert [Sat, 7 Dec 2019 00:51:37 +0000 (00:51 +0000)]
MFC r355300:

Fix a typo (upto --> up to) and reword to improve word flow.

4 years agoMFC r355003:
Mark Johnston [Fri, 6 Dec 2019 18:51:16 +0000 (18:51 +0000)]
MFC r355003:
Update the checks in vm_page_zone_import().

4 years agoMFC r344551:
Mark Johnston [Fri, 6 Dec 2019 18:27:50 +0000 (18:27 +0000)]
MFC r344551:
Fix handling of rights on stdio streams, take two.

PR: 234885

4 years agoMFC r340138 (by oshogbo):
Mark Johnston [Fri, 6 Dec 2019 18:26:34 +0000 (18:26 +0000)]
MFC r340138 (by oshogbo):
capsicum: use a new capsicum helpers in tools

4 years agoMFC r355139:
Brooks Davis [Fri, 6 Dec 2019 17:58:27 +0000 (17:58 +0000)]
MFC r355139:

Fix a logic bug when "mask" contains a ?: operator.

Newer versions of clang warn that '&' evaluates before '?:'.

Reviewed by: markj
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D22573

4 years agoMFC r355001:
Mark Johnston [Fri, 6 Dec 2019 15:01:36 +0000 (15:01 +0000)]
MFC r355001:
Fix locking in vm_reserv_reclaim_contig().

4 years agoMFC r355211:
Konstantin Belousov [Fri, 6 Dec 2019 11:46:15 +0000 (11:46 +0000)]
MFC r355211:
Add a VN_OPEN_INVFS flag.

4 years agoMFC r349184. This fixing PCI passthrough via VT-d on modern chipsets with
Scott Long [Fri, 6 Dec 2019 09:50:01 +0000 (09:50 +0000)]
MFC r349184.  This fixing PCI passthrough via VT-d on modern chipsets with
multiple translation units.

PR: 229852
Submitted by: callum@mitchison.org

4 years agoMFC r354779:
Alan Somers [Fri, 6 Dec 2019 00:29:16 +0000 (00:29 +0000)]
MFC r354779:

Actually hook CAM_IO_STATS up to the build

It's still disabled by default, but now it can be enabled with config(5) and
it will be build in LINT.

Reviewed by: imp
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D22383

4 years agoMFC r354812:
Alan Somers [Fri, 6 Dec 2019 00:27:16 +0000 (00:27 +0000)]
MFC r354812:

Update the ses(4) man page

This driver was largely rewritten in 2015 (svn r235911) but the man page was
never updated to match.

Reviewed by: trasz
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D22339

4 years agoMFC r354664-r354666
Alan Somers [Fri, 6 Dec 2019 00:24:31 +0000 (00:24 +0000)]
MFC r354664-r354666

r354664:
sesutil: fix an out-of-bounds array access

sesutil would allow the user to toggle an LED that was one past the maximum
element.  If he tried, ENCIOC_GETELMSTAT would return EINVAL.

Reported by: Coverity
Coverity CID: 1398940
Sponsored by: Axcient

r354665:
sesutil: fix some memory leaks

Reported by: Coverity
Coverity CID: 1331665
Sponsored by: Axcient

r354666:
sesutil: fix another memory leak

Instead of calloc()ing (and forgetting to free) in a tight loop, just put
this small array on the stack.

Reported by: Coverity
Coverity CID: 1331665
Sponsored by: Axcient

4 years agoMFC r355108 and r355170:
Hans Petter Selasky [Thu, 5 Dec 2019 14:50:46 +0000 (14:50 +0000)]
MFC r355108 and r355170:
Fix panic when loading kernel modules before root file system is mounted.
Make sure the rootvnode is always NULL checked.

Differential Revision: https://reviews.freebsd.org/D22545
PR: 241639
Sponsored by: Mellanox Technologies

4 years agor355120 | dim | 2019-11-26 23:01:09 +0100 (Tue, 26 Nov 2019) | 32 lines
Dimitry Andric [Wed, 4 Dec 2019 17:45:34 +0000 (17:45 +0000)]
r355120 | dim | 2019-11-26 23:01:09 +0100 (Tue, 26 Nov 2019) | 32 lines

The fdlibm hypot() implementations shouldn't potentially left-shift
negative numbers (invoking undefined behavior)

Summary:
Various paths through hypot(x, y) will multiply x and y by a power of
two, perform the calculation in a range where IEEE-754 provides greater
precision, then undo the multiplication to determine the true result.
Undoing that multiplication is implemented as t1*w, where t1=2**k.

2**k is often computed by taking the high word of 1.0, then adding k<<20
(for doubles or long doubles) or k<<23 (for floats) to it, then
overwriting that high word. But when k is negative this left-shifts a
negative value -- and that's undefined behavior in many editions of C
and C++.

This patch should fix all hypot implementations to compute 2**k without
triggering this particular bit of undefined behavior.

Test Plan: I've only very lightly tested out the hypot(double, double)
change, in SpiderMonkey's JavaScript engine, for consistency with prior
behavior.  The other functions' changes have more or less only been
eyeballed.  Careful examination appreciated!  Do note, however, that an
error in any of these changes would most likely produce a value that is
incorrect by a factor of two, so any mistake would most likely be
glaring if invoked.

Submitted by: Jeff Walden <jwalden@mit.edu>
Obtained from: https://github.com/freebsd/freebsd/pull/414
Reviewed by: dim, lwhsu
Differential Revision: https://reviews.freebsd.org/D22354

4 years agoMFC r355165: Make DMAR allow Intel NTB device to access its own BAR0.
Alexander Motin [Wed, 4 Dec 2019 15:14:14 +0000 (15:14 +0000)]
MFC r355165: Make DMAR allow Intel NTB device to access its own BAR0.

I have no good explanation why it happens, but I found that in B2B mode
at least Xeon v4 NTB leaks accesses to its configuration memory at BAR0
originated from the link side to its host side.  DMAR predictably blocks
those, making access to remote scratchpad registers in B2B mode impossible.

This change creates identity mapping in DMAR covering the BAR0 addresses,
making the NTB work fine with DMAR enabled.  It seems like allowing single
4KB range at 32KB offset may be enough, but I don't see a reason to be so
specific.

4 years agoMFC r355163: Make the code slightly more compact.
Alexander Motin [Wed, 4 Dec 2019 15:12:09 +0000 (15:12 +0000)]
MFC r355163: Make the code slightly more compact.

There should be no functional change.

4 years agoMFC r355074: Report XLAT0 register for completeness.
Alexander Motin [Wed, 4 Dec 2019 15:11:42 +0000 (15:11 +0000)]
MFC r355074: Report XLAT0 register for completeness.

4 years agoMFC r355146:
Konstantin Belousov [Wed, 4 Dec 2019 09:21:00 +0000 (09:21 +0000)]
MFC r355146:
Ease the life of PT_TO_SCE/PT_TO_SCX users when debuggee sleeps in
sigsuspend(2)/sig{timed,}wait(2).

4 years agoMFC r355138:
Konstantin Belousov [Wed, 4 Dec 2019 09:18:32 +0000 (09:18 +0000)]
MFC r355138:
bus_dma_dmar_load_ident(9): load identity mapping into the map.

4 years agoMFC r355065 - r355068: Linux epoll improvements.
Vladimir Kondratyev [Tue, 3 Dec 2019 23:11:40 +0000 (23:11 +0000)]
MFC r355065 - r355068: Linux epoll improvements.

r355065:
Linux epoll: Don't deregister file descriptor after EPOLLONESHOT is fired

Linux epoll does not remove descriptor after one-shot event has been triggered.
Set EV_DISPATCH kqueue flag rather then EV_ONESHOT to get the same behavior.

Required by Linux Steam client.

PR: 240590
Reported by: Alex S <iwtcex@gmail.com>
Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D22513

r355066:
Linux epoll: Check both read and write kqueue events existence in EPOLL_CTL_ADD

Linux epoll EPOLL_CTL_ADD op handler should always check registration
of both EVFILT_READ and EVFILT_WRITE kevents to deceide if supplied
file descriptor fd is already registered with epoll instance.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D22515

r355067:
Linux epoll: Register events with zero event mask

Such an events are legal and should be interpreted as EPOLLERR | EPOLLHUP.
Register a disabled kqueue event in that case as we do not support EPOLLHUP yet.

Required by Linux Steam client.

PR: 240590
Reported by: Alex S <iwtcex@gmail.com>
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D22516

r355068:
Linux epoll: Allow passing of any negative timeout value to epoll_wait

Linux epoll allow passing of any negative timeout value to epoll_wait()
to cause unbound blocking

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D22517

4 years agoMFC r354624
Eric van Gyzen [Tue, 3 Dec 2019 22:57:10 +0000 (22:57 +0000)]
MFC r354624

tip/cu: check for EOF on input on the local side

If cu reads an EOF on the input side, it goes into a tight loop
sending a garbage byte to the remote.  With this change, it exits
gracefully, along with its child.

Sponsored by: Dell EMC Isilon

4 years agoMFC r355006:
Ravi Pokala [Tue, 3 Dec 2019 22:53:22 +0000 (22:53 +0000)]
MFC r355006:

Add and document options to allow rpc.lockd and rpc.statd to run in the
foreground.

This allows a separate process to monitor when and how those programs exit.
That process can then restart them if needed.

4 years agoMFC r354673:
Ravi Pokala [Tue, 3 Dec 2019 22:53:07 +0000 (22:53 +0000)]
MFC r354673:

Logging improvements to loader::nfs

Include the server IP address when logging nfs_open(), add a few missing
"\n"s, and correct a typo.

4 years agoMFC r354102:
Ravi Pokala [Tue, 3 Dec 2019 22:51:25 +0000 (22:51 +0000)]
MFC r354102:

Args for buf_track() might be unused

If neither FULL_BUF_TRACKING nor BUF_TRACKING are defined, then the body of
buf_track() becomes empty. Mark the arguments with "__unused" so the
compiler doesn't complain about unused arguments in that case.

4 years agoMFC r343583:
Ravi Pokala [Tue, 3 Dec 2019 22:49:24 +0000 (22:49 +0000)]
MFC r343583:

Remove unecessary "All rights reserved" from files under my or Panasas's
copyright.

When all member nations of the Buenos Aires Convention adopted the Berne
Convention, the phrase "All rights reserved" became unnecessary to assert
copyright. Remove it from files under my or Panasas's copyright. The files
related to jedec_dimm(4) also bear avg@'s copyright; he has approved this
change.

4 years agoMFC 342160: Work around BIOS quirks on HPE Proliant MicroServer Gen10
John Baldwin [Tue, 3 Dec 2019 22:01:45 +0000 (22:01 +0000)]
MFC 342160: Work around BIOS quirks on HPE Proliant MicroServer Gen10

PR: 221350

4 years agoMFC r355205: snp: don't reference tp->t_mtx directly
Kyle Evans [Tue, 3 Dec 2019 19:14:02 +0000 (19:14 +0000)]
MFC r355205: snp: don't reference tp->t_mtx directly

This is the only part of snp(4) that pokes around in struct tty directly;
replace it with the tty_getlock accessor to avoid struct tty internals.

4 years agoMFC r354712: arm64: fix BUS_DMA_ALLOCNOW for non-paged aligned sizes
Kyle Evans [Tue, 3 Dec 2019 19:00:12 +0000 (19:00 +0000)]
MFC r354712: arm64: fix BUS_DMA_ALLOCNOW for non-paged aligned sizes

For any size that isn't page-aligned, we end up not pre-allocating enough
for a single mapping because we truncate the size instead of rounding up to
make sure the last bit is accounted for, leaving us one page shy of what we
need to fulfill a request.

4 years agoMFC r354541: csu: Fix dynamiclib/init_test:jcr_test on !HAVE_CTORS archs
Kyle Evans [Tue, 3 Dec 2019 18:58:45 +0000 (18:58 +0000)]
MFC r354541: csu: Fix dynamiclib/init_test:jcr_test on !HAVE_CTORS archs

.jcr still needs a 0-entry added in crtend, even on !HAVE_CTORS archs, as
we're still getting .jcr sections added -- presumably due to the reference
in crtbegin. Without this terminal, the .jcr section (without data) overlaps
with the next section and register_classes in crtbegin will be examining the
wrong item.

PR: 241439

4 years agoMFC r354464: sys/conf/files.arm64: remove unnecessary soc_* dependencies
Kyle Evans [Tue, 3 Dec 2019 18:57:32 +0000 (18:57 +0000)]
MFC r354464: sys/conf/files.arm64: remove unnecessary soc_* dependencies

These files already have 'device' lines that they require; adding a
dependency on SOC_* options is an extra restriction that adds extra
verbosity when future supported Broadcom-based SOC will also feature the
same compatible device.

Users wishing to not compile these devices in should remove the 'device'
lines from their config.

4 years agoMFC r351836, r351866, r354328: patch(1) /dev/null testing+improvement
Kyle Evans [Tue, 3 Dec 2019 18:55:09 +0000 (18:55 +0000)]
MFC r351836, r351866, r354328: patch(1) /dev/null testing+improvement

r351836: patch(1): add some basic tests

Summary:
- basic: test application of patches created by diff -u at the
  beginning/middle/end of file, which have differing amounts of context
  before and after chunks being added
- limited_ctx: stems from PR 74127 in which a rogue line was getting added
  when the patch should have been rejected. Similar behavior was
  reproducible with larger contexts near the beginning/end of a file. See
  r326084 for details
- file_creation: patch sourced from /dev/null should create the file
- file_nodupe: said patch sourced from /dev/null shouldn't dupe the contents
  when re-applied (personal vendetta, WIP, see comment)
- file_removal: this follows from nodupe; the reverse of a patch sourced
  from /dev/null is most naturally deleting the file, as is expected based
  on GNU patch behavior (WIP)

r351866: patch(1): fix the file removal test, strengthen it a bit

To remain compatible with GNU patch, we should ensure that once we're
removing empty files after a reversed /dev/null patch we don't remove files
that have been modified. GNU patch leaves these intact and just reverses the
hunk that created the file, effectively implying --remove-empty-files for
reversed /dev/null patches.

r354328: patch(1): give /dev/null patches special treatment

We have a bad habit of duplicating contents of files that are sourced from
/dev/null and applied more than once... take the more sane (in most ways)
GNU route and complain if the file exists and offer reversal options.

This still falls short a little bit as selecting "don't reverse, apply
anyway" will still give you duplicated file contents. There's probably other
issues as well, but awareness is the first step to happiness.

4 years agoMFC r354246: liblua: add loader.lua_path
Kyle Evans [Tue, 3 Dec 2019 18:50:18 +0000 (18:50 +0000)]
MFC r354246: liblua: add loader.lua_path

As described previously, loader.lua_path is absolute path where scripts are
installed. A future commit will use this to build paths for dofile in
try_include, rather than the current pcall/require setup that makes it more
difficult to coordinate loader aborts from local.lua -- we do not need the
flexibility of require(), and local.lua is in-fact not a 'module-like' file
as we will not be referencing anything from it.

4 years agoMFC r354236: mdmfs(8): add -k skel option to populate fs from a skeleton
Kyle Evans [Tue, 3 Dec 2019 18:38:51 +0000 (18:38 +0000)]
MFC r354236: mdmfs(8): add -k skel option to populate fs from a skeleton

mdmfs(8) lacks the ability to populate throwaway memory filesystems from an
existing directory.

This features permits an interesting setup where /var for instance lives on
a device where wear-leveling is something you want to avoid as much as
possible and nonetheless you don't want to lose your logs, ports metadata,
etc. Here are the steps:

1. Copy /var to /var.bak;
2. Mount an mfs into /var using -k /var.bak at startup;
3. Synchronize /var to /var.bak weekly and on shutdown.

Note that this more or less mimics OpenBSD's mount_mfs(8) -P flag.

PR: 146254

4 years agoMFC rarm: correct kernelstack allocation size
Kyle Evans [Tue, 3 Dec 2019 18:28:39 +0000 (18:28 +0000)]
MFC rarm: correct kernelstack allocation size

This appears to be a copy-pasto from previous lines that propagated to v6
over the years. Indeed, nothing references kernelstack beyond
USPACE_SVC_STACK_TOP and it would be odd if anything did.

4 years agoMFC r354245, r354833, r354837: add flua to the base system
Kyle Evans [Tue, 3 Dec 2019 18:25:16 +0000 (18:25 +0000)]
MFC r354245, r354833, r354837: add flua to the base system

r354245: stand: consolidate knowledge of lua path

Multiple places coordinate to 'know' where lua scripts are installed. Knock
this down to being formally defined (and overridable) in exactly one spot,
defs.mk, and spread the knowledge to loaders and liblua alike. A future
commit will expose this to lua as loader.lua_path, so it can build absolute
paths to lua scripts as needed.

r354833: Add flua to the base system, install to /usr/libexec

FreeBSDlua ("flua") is a FreeBSD-private lua, flavored with whatever
extensions we need for base system operations. We currently support a subset
of lfs and lposix that are used in the rewrite of makesyscall.sh into lua,
added in r354786.

flua is intentionally written such that one can install standard lua and
some set of lua modules from ports and achieve the same effect.

linit_flua is a copy of linit.c from contrib/lua with lfs and lposix added
in. This is similar to what we do in stand/. linit.c has been renamed to
make it clear that this has flua-specific bits.

luaconf has been slightly obfuscated to make extensions more difficult. Part
of the problem is that flua is already hard enough to use as a bootstrap
tool because it's not in PATH- attempting to do extension loading would
require a special bootstrap version of flua with paths changed to protect
the innocent.

src.lua.mk has been added to make it easy for in-tree stuff to find flua,
whether it's bootstrap-flua or relying on PATH frobbing by Makefile.inc1.

r354837: flua: newer GCC complains about format-nonliteral at WARNS=2

Disable that one, too.

4 years agoMFC r354986: Add variant of root_mount_hold() without allocation.
Alexander Motin [Tue, 3 Dec 2019 17:06:48 +0000 (17:06 +0000)]
MFC r354986: Add variant of root_mount_hold() without allocation.

It allows to use this KPI in non-sleepable contexts.

4 years agoMFC r355023: Do not retry long ready waits if previous gave nothing.
Alexander Motin [Tue, 3 Dec 2019 16:51:26 +0000 (16:51 +0000)]
MFC r355023: Do not retry long ready waits if previous gave nothing.

I have some disks reporting "Logical unit is in process of becoming ready"
for about half an hour before finally reporting failure.  During that time
CAM waits for the readiness during ~2 minutes for each request, that makes
system boot take very long time.

This change reduces wait times for the following requests to ~1 second if
previously long wait for that device has timed out.

4 years agoMFC r355013: Remove xpt_lock mutex.
Alexander Motin [Tue, 3 Dec 2019 16:50:06 +0000 (16:50 +0000)]
MFC r355013: Remove xpt_lock mutex.

CAM does not require SIM locks for years, and obviously does not require
it for completely virtual XPT SIM.

4 years agoMFC r355010: Make CAM use root_mount_hold_token() to delay boot.
Alexander Motin [Tue, 3 Dec 2019 16:48:21 +0000 (16:48 +0000)]
MFC r355010: Make CAM use root_mount_hold_token() to delay boot.

Before this change CAM used config_intrhook_establish() for this purpose,
but that approach does not allow to delay it again after releasing once.

USB stack uses root_mount_hold() to delay boot until bus scan is complete.
But once it is, CAM had no time to scan SCSI bus, registered by umass(4),
if it already done other scans and called config_intrhook_disestablish().
The new approach makes it work smooth, assuming the USB device is found
during the initial bus scan.  Devices appearing on USB bus later may still
require setting kern.cam.boot_delay, but hopefully those are minority.

4 years agoMFC r354914: Set handling for some "Logical unit not ready" errors.
Alexander Motin [Tue, 3 Dec 2019 16:46:44 +0000 (16:46 +0000)]
MFC r354914: Set handling for some "Logical unit not ready" errors.

4 years agoMFC r341756 (by scottl):
Alexander Motin [Tue, 3 Dec 2019 16:42:32 +0000 (16:42 +0000)]
MFC r341756 (by scottl):
Don't allocate the config_intrhook separately from the softc, it's small
enough that it costs more code to handle the malloc/free than it saves.

4 years agoMFC r354602
Olivier Houchard [Tue, 3 Dec 2019 16:32:30 +0000 (16:32 +0000)]
MFC r354602

  linprocfs: Make sure to report -1 as tty when we have no controlling tty.

  When reporting a process' stats, we can't just provide the tty as an
  unsigned long, as if we have no controlling tty, the tty would be NODEV, or
  -1. Instaed, just special-case NODEV.

4 years agoMFC r355113: Add some IDs of Intel Wildcat Point-LP.
Alexander Motin [Tue, 3 Dec 2019 14:47:50 +0000 (14:47 +0000)]
MFC r355113: Add some IDs of Intel Wildcat Point-LP.

4 years agoMFC r354269:
Cy Schubert [Tue, 3 Dec 2019 13:47:46 +0000 (13:47 +0000)]
MFC r354269:

MFV r354257:

Update sqlite3-3.29.0 (3290000) --> sqlite3-3.30.1 (3300100)

4 years agoMFC r354349: if_ixv: disable RSS configuration on 82599 and X540 VFs
Andriy Gapon [Tue, 3 Dec 2019 07:22:16 +0000 (07:22 +0000)]
MFC r354349: if_ixv: disable RSS configuration on 82599 and X540 VFs

It is reported that those VFs share their RSS configuration with PF and,
thus, they cannot be configured independently.

Also:
- add missing opt_rss.h to if_ixv.c, otherwise RSS kernel option could
  not be seen
- do not enable IXGBE_FEATURE_RSS on the older VFs
- set flowid / hash type to M_HASHTYPE_NONE or M_HASHTYPE_OPAQUE_HASH
  (based on what the hardware reports) if IXGBE_FEATURE_RSS is not set

4 years agoMFC r354849: hyperv/storvsc: stash a pointer to hv_storvsc_request in ccb
Andriy Gapon [Tue, 3 Dec 2019 07:20:47 +0000 (07:20 +0000)]
MFC r354849: hyperv/storvsc: stash a pointer to hv_storvsc_request in ccb

4 years agoMFC r354638: teach db_nextframe/x86 about [X]xen_intr_upcall interrupt handler
Andriy Gapon [Tue, 3 Dec 2019 07:19:28 +0000 (07:19 +0000)]
MFC r354638: teach db_nextframe/x86 about [X]xen_intr_upcall interrupt handler

4 years agoMFC r355156:
Cy Schubert [Mon, 2 Dec 2019 21:00:29 +0000 (21:00 +0000)]
MFC r355156:

Include fin, the packet information structure (fr_info_t), in the
l4sums DTrace probe, making more information available for the diagnosis
of IPv6 checksum errors.

4 years agoMFC r355142:
Cy Schubert [Mon, 2 Dec 2019 20:58:55 +0000 (20:58 +0000)]
MFC r355142:

Move ipf_pcksum6() to its rightful place, in ip_fil_freebsd.c. This
FreeBSD-only function should live in the O/S specific source file.

This essentially reverts r349929 Now that ipftest and ipfreplay are
disabled in FreeBSD 11-stable.

4 years agoMFC r355141:
Cy Schubert [Mon, 2 Dec 2019 20:57:13 +0000 (20:57 +0000)]
MFC r355141:

Save a little stack by removing a used once intermediate variable.

4 years agoMFC r355140:
Cy Schubert [Mon, 2 Dec 2019 20:55:08 +0000 (20:55 +0000)]
MFC r355140:

Remove redundant #ifdef'd function definitions.

4 years agoMFC r354821:
Mark Johnston [Mon, 2 Dec 2019 17:53:32 +0000 (17:53 +0000)]
MFC r354821:
Group per-domain reservation data in the same structure.

4 years agoMFC r348749 - Speed-up vm_reserv_reclaim_config.
Doug Moore [Mon, 2 Dec 2019 17:28:20 +0000 (17:28 +0000)]
MFC r348749 - Speed-up vm_reserv_reclaim_config.

Requested by: markj

4 years agoMFC r354815:
Mark Johnston [Mon, 2 Dec 2019 15:57:25 +0000 (15:57 +0000)]
MFC r354815:
Let arm64 pmap_qenter() and pmap_kenter() unconditionally set NX.

4 years agoMFC r354816:
Mark Johnston [Mon, 2 Dec 2019 15:56:01 +0000 (15:56 +0000)]
MFC r354816:
Implement vm.pmap.kernel_maps for arm64.

4 years agolibzpool: lz4.c build needs CFLAGS.lz4.c
Toomas Soome [Mon, 2 Dec 2019 15:28:06 +0000 (15:28 +0000)]
libzpool: lz4.c build needs CFLAGS.lz4.c

For some reason the setup from CURRENT did not work, probably I did mix
something up.

4 years agoMFC r354267:
Toomas Soome [Mon, 2 Dec 2019 12:26:47 +0000 (12:26 +0000)]
MFC r354267:
r354264 did mix up the directory path

The correct path is sys/cddl/contrib/opensolaris/common/lz4, not
sys/cddl/contrib/opensolaris/lz4

Reported by: Michael Butler

4 years agoMFC r354253, r354254, r354264, r354265
Toomas Soome [Mon, 2 Dec 2019 11:44:39 +0000 (11:44 +0000)]
MFC r354253, r354254, r354264, r354265
Remove duplicate lz4 implementations

Port illumos change: https://www.illumos.org/issues/11667

Move lz4.c out of zfs tree to opensolaris/common/lz4, adjust it to be
usable from kernel/stand/userland builds, so we can use just one single
source. Add lz4.h to declare lz4_compress() and lz4_decompress().

Differential Revision: https://reviews.freebsd.org/D22037

4 years agor353501 did mimerge r350654 boot1 and gptboot were left out
Toomas Soome [Mon, 2 Dec 2019 09:57:07 +0000 (09:57 +0000)]
r353501 did mimerge r350654 boot1 and gptboot were left out

Replace left over BS->HandleProtocol by OpenProtocolByHandle.

Reported by: Harry Schmalzbauer

4 years agoMFC r354436: MFV r354377: 10554 Implemented zpool sync command
Andriy Gapon [Mon, 2 Dec 2019 07:39:55 +0000 (07:39 +0000)]
MFC r354436: MFV r354377: 10554 Implemented zpool sync command

This addition will enable us to sync an open TXG to the main pool on
demand.  The functionality is similar to sync(2) but 'zpool sync' will
return when data has hit the main storage instead of potentially just
the ZIL as is the case with the sync(2) cmd.

4 years agoMFC r354627: db_nextframe/i386: reduce the number of special frame types
Andriy Gapon [Mon, 2 Dec 2019 07:22:01 +0000 (07:22 +0000)]
MFC r354627: db_nextframe/i386: reduce the number of special frame types

4 years agoMFC r354886: zpool.8: remove a paragraph about quorum disks
Andriy Gapon [Mon, 2 Dec 2019 07:20:32 +0000 (07:20 +0000)]
MFC r354886: zpool.8: remove a paragraph about quorum disks

4 years agoMFC r355210:
Konstantin Belousov [Mon, 2 Dec 2019 00:39:58 +0000 (00:39 +0000)]
MFC r355210:
In nfs_lock(), recheck vp->v_data after lock before accessing it.

PR: 242184

4 years agoMFC r355060:
Konstantin Belousov [Sun, 1 Dec 2019 16:02:15 +0000 (16:02 +0000)]
MFC r355060:
amd64: assert that EARLY_COUNTER does not corrupt memory.

4 years agoMFC r355061:
Konstantin Belousov [Sun, 1 Dec 2019 15:29:48 +0000 (15:29 +0000)]
MFC r355061:
tmpfs: resolve deadlock between rename and unmount.

4 years agoMFC r354742:
Navdeep Parhar [Sat, 30 Nov 2019 18:05:38 +0000 (18:05 +0000)]
MFC r354742:

cxgbev(4): Catch up with the pciids in the PF driver.

Sponsored by: Chelsio Communications

4 years agoMFC r354522:
Navdeep Parhar [Sat, 30 Nov 2019 18:03:53 +0000 (18:03 +0000)]
MFC r354522:

cxgbe(4): Query Vdd from the firmware if its last known value is 0.

TVSENSE may not be ready by the time t4_fw_initialize returns and the
firmware returns 0 if the driver asks for the Vdd before the sensor is
ready.

Sponsored by: Chelsio Communications

4 years agoMFC r354110:
Navdeep Parhar [Sat, 30 Nov 2019 17:57:37 +0000 (17:57 +0000)]
MFC r354110:

Fix typo in cxgbe.4.