Commit graph

269924 commits

Author SHA1 Message Date
Daniel W. Delâtre
4bb64770b3 asmc: Add support for MacBook Pro 9,1 (mid 2012)
PR:		261981

(cherry picked from commit 79291c9baf)
2022-05-18 17:15:53 -04:00
Mark Johnston
cd613d7cd9 asmc: Make the model table const and local to asmc.c
No functional change intended.

(cherry picked from commit 27d4c6f86e)
2022-05-18 17:15:51 -04:00
Adam S
1610a56a56 asmc: Add support for MacPro 6,1 (2013)
PR:		260781

(cherry picked from commit 7d5fef1837)
2022-05-18 17:15:47 -04:00
Mark Johnston
85f0cdff6f asmc: Add support for MacBook Air 4,1 and 4,2 (2011)
PR:		218574
Submitted by:	NapoleonWils0n <t43InvisibleMan@gmail.com>
Submitted by:	John Hay <john@sanren.ac.za>

(cherry picked from commit 308340cce2)
2022-05-18 17:15:43 -04:00
Kevin Bowling
49d682cb1a igc: Update PCI IDs
bf0aa72f:
igc: Update PCI IDs
I226-K PCI ID got clarified by intel. Add a new I226 ID while here.

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D35218

48a1a6be:
igc: Fix typo in PCI ID define usage

Reported by:	jenkins
Fixes:	bf0aa72f1f igc: Update PCI IDs

(cherry picked from commit bf0aa72f1f)
(cherry picked from commit 48a1a6be19)
2022-05-17 17:30:36 -07:00
John Baldwin
5f684c7cb8 Deprecate the 'devclass' argument from *DRIVER_MODULE() macros.
This argument is useless for the vast majority of drivers.  For now,
use __VA_ARGS__ wrapper macros so that that the *DRIVER_MODULE()
macros accept both the old version (with a devclass) and the new
version (which omits the argument and stores NULL in the
driver_module_data structure).  This provides an API compatiblity
shim that can be merged to older stable branches.

Once all drivers relevant to 14.0 (both in and out of tree) have been
updated, the API compat shims can be dropped.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34963

(cherry picked from commit 2a99dd30df)
(cherry picked from commit 0fdf5bc531)
(cherry picked from commit b7d4192598)
2022-05-17 14:17:18 -07:00
John Baldwin
eae3c14a28 devclass_add_driver: Permit NULL to be passed in dcp.
This permits a driver module structure that doesn't want to store a
pointer to the new driver's devclass.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34962

(cherry picked from commit 5bdea8826b)
2022-05-17 14:16:13 -07:00
John Baldwin
8403beb349 mips: Remove EXT_RESOURCES from kernel configs.
This is a direct commit to stable/13 as these kernel configs are not
present in main.
2022-05-17 14:15:45 -07:00
John Baldwin
08a9d7ffe8 Add the extres pseudo devices to some kernels.
This is a direct commit to stable/13 as these kernel configs are not
present in main.
2022-05-17 14:15:44 -07:00
John Baldwin
263efa6c4a iscsid: Push #ifdef ICL_KERNEL_PROXY into cap_ioctl_limits list.
This reduces duplication in the two lists and makes it clearer which
ioctls are needed in the ICL_KERNEL_PROXY case.

Reviewed by:	mav
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34927

(cherry picked from commit f0df722733)
2022-05-17 14:15:13 -07:00
Rick Macklem
3c6bc3e966 nfscl: Acquire a refcount on "cred" for mirrored pNFS RPCs
When the NFSv4.1/4.2 client is doing a pnfs mount to
mirrored DS(s), asynchronous threads are used to do the
RPCs against the DS(s) concurrently.  If a DS is slow
to reply, it is possible for the "cred" to be free'd
before the asynchronous thread is done with it, causing
a panic/crash.

This patch fixes the problem by acquiring a refcount on
the "cred" while it is being used by the asynchronous thread
for a DS RPC.  This bug was found during a recent IETF
NFSv4 testing event.

This bug only affects "pnfs" mounts to mirrored pNFS
servers.

(cherry picked from commit 70910e4b55)
2022-05-17 13:39:49 -07:00
Konstantin Belousov
2430388070 UFS: clear fs_fmod once more, in the buffer data copy.
PR:	263765

(cherry picked from commit ca7c2d2eed)
2022-05-17 01:32:55 +03:00
Konstantin Belousov
bc6860ca7c ffs_use_bwrite: make the superblock snapshot more consistent
PR:	263765

(cherry picked from commit 4ac2df8f4c)
2022-05-17 01:32:55 +03:00
Rick Macklem
a3821a906e nfsd: Fix session slot freeing for NFSv4.1/4.2
Without this patch the NFSv4.1/4.2 server erroneously
always frees session slot zero for callbacks.  This only
affects 4.1/4.2 mounts if the server has delegations
enabled or is a pNFS configuration.  Even for those
cases, the effect is mainly to only use slot 0 for
callbacks, serializing all of them.  There is a slight
chance that callbacks will fail if the client performs
them in a different order than received on the TCP
connection.

If this bug affects your server, you will see console
messages like:
  newnfs_request: Bad session slot

This patch fixes the problem.  Found during a recent
IETF NFSv4 testing event.

PR:	263728

(cherry picked from commit 271f6d52a6)
2022-05-16 12:21:06 -07:00
Emmanuel Vadot
9818559bb6 arm: rockchip: rk3288: Use the macros that already exists in rk_cru.h
(cherry picked from commit 78bf40e10c)
2022-05-16 17:27:24 +02:00
Emmanuel Vadot
687d5fb11f arm64: rockchip: rk3328: Add watchdog clock
The watchdog clock is controlled by the secure world but we need a clock
to sastify the driver so add a fixed clock for it.

Reported by:   avg

(cherry picked from commit 548a706608)
2022-05-16 17:27:24 +02:00
Emmanuel Vadot
cb5d34e595 arm64: rockchip: rk3328: Finish implementing clocks
This finish (almost) the clocks implementations for the RK3328 SoC.
The clocks are now correctly implemented respecting the clock hiearchy.
The missing clocks are mostly the DDR clocks, implementing those is only
useful for debugging as we will never set them in the kernel.
The ARMCLK still needs to be rewritten so it looks closer to how the
hardware is done.

Tested-on: Rock64
(cherry picked from commit cc2f9bbbad)
2022-05-16 17:27:23 +02:00
Emmanuel Vadot
77fbd51e83 arm64: rockchip: clk: Add MUXRAW macros
Some clocks in the RK3328 SoC (and possibly others) have registers not in
the CLKSEL_CON range. Add a macros for muxes which lives not in the range
of CLKSEL_CON which just takes a raw offset.

(cherry picked from commit deff1fb3dc)
2022-05-16 17:27:23 +02:00
Emmanuel Vadot
1547924e53 arm64: rockchip: clk_mux: Add support for mux in GRF type clock
Some clocks have their mux register in the GRF and not in the CRU.
Add support for that in the rk_clk_mux clock type.

(cherry picked from commit 731e418bd7)
2022-05-16 17:27:23 +02:00
Mina Galić
c3c44de5f0 pkgbase: move devd's hyperv.conf to hyperv-tools package
This devd config file is useless without hyperv-tools, so we're moving
it into the hyperv-tools package. pr#263691

PR:		263691
MFC after:	3 days

(cherry picked from commit 7ac164dc8e)
2022-05-16 17:25:23 +02:00
Corvin Köhne
95c6bc5a03 bsdinstall/script: umount before zpool export
When running zpool export first, boot/efi and dev is still mounted so
zpool export fails. By running bsdinstall umount first the pool can be
cleanly exported.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35114
Sponsored by:		Beckhoff Automation GmbH & Co. KG
MFC After:		3 days

(cherry picked from commit 450b4ac23c)
2022-05-16 17:24:56 +02:00
Corvin Köhne
45eb93a964 bsdinstall: stop messing with file descriptors
Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). By closing file descriptor 3 here, the
final f_dprintf "Installation Completed ... does not work anymore.

By putting the code into a subshell, file descriptors can be edited
without interference with the calling script.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35113
Sponsored by:		Beckhoff Automation GmbH & Co. KG
MFC after:		3 days

(cherry picked from commit 1f7746d81f)
2022-05-16 17:24:56 +02:00
Corvin Köhne
8c119b3b71 bhyve: avoid uninitialized variable
Reviewed by:	markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
Differential Revision:	https://reviews.freebsd.org/D34688
(cherry picked from commit 8ac8adda8d)
2022-05-16 17:24:33 +02:00
Corvin Köhne
1b3141c630 bhyve: avoid overflow of BAR index
At the moment, writes to BAR registers that aren't 4 byte aligned are
ignored. So, there's no overflow yet. Nevertheless, if this behaviour
changes in the future, it could unintentionally, introduce a buffer
overflow. Additionally, some compiler or tools will detect this
potential overflow and complain about it.

Reviewed by:	markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
Differential Revision:	https://reviews.freebsd.org/D34689
(cherry picked from commit 45ddbf2112)
2022-05-16 17:24:33 +02:00
Corvin Köhne
469a4e669d bhyve: avoid an empty passthru config value
pci_parse_legacy_config splits the options string by comma characters.
strchr returns a pointer to the first occurence of a character. In that
case, it's a comma. So, pci_parse_legacy_config will stop at the first
character and creates a new config node with a name of NULL.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34600

(cherry picked from commit 3256b7ca36)
2022-05-16 17:24:33 +02:00
Alexander Motin
718cb64a1f mpsutil: Fix device speed reporting.
Report controller SAS phy speed only for directly attached devices.
For others try to read and report parent expander phy speed.

MFC after:	1 week

(cherry picked from commit bce02a0ea4)
2022-05-16 09:53:02 -04:00
Alexander Motin
9d06207226 mpsutil: fix set but not used warning
MFC after:	1 week

(cherry picked from commit 53c184cf06)
2022-05-16 09:53:02 -04:00
Scott Long
ef303790ef Fix formatting of the usage() output
(cherry picked from commit 638e2a132e)
2022-05-16 09:53:01 -04:00
Ed Maste
d7620b6ec9 Add deprecation notices to ISA sound cards
ISA sound cards (and ISA itself) are long obsolete.  NYCBUG dmesgd has
no entries for any of these devices after 2005.

Mail to -current and -stable revealed some nostalgic interest, but
no offers to test or requests to pospone the deprecation.

Add deprecation notices to device attach routines and man pages for:

snd_ad1816  Analog Devices AD1816 SoundPort
snd_ess     Ensoniq ESS
snd_gusc    Gravis UltraSound (MAX and newer AFAIK)
snd_mss     Microsoft Sound System
snd_sbc     Creative Sound Blaster

Reviewed by:	cy, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34604

(cherry picked from commit e39ec8933b)
2022-05-16 09:51:23 -04:00
Mitchell Horne
65c10f12df vt: use TERMINAL_DECLARE_EARLY() macro
It simplifies the declaration of the driver structures a little. There
are no current consumers of this macro, in fact it looks like it was
added for exactly this purpose.

This decreases the scope of some variables, so rework the initialization
in vt_init_logos() such that it doesn't require them.

No functional change intended.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34820

(cherry picked from commit ff1c8af8c3)
2022-05-16 10:34:04 -03:00
Julien Cassette
e221118930 aw_wdog: support Allwinner D1 watchdog
This device is present on the Allwinner D1-based SoCs. Without this
driver, the watchdog timeout will trigger a reset a few seconds after
control is given to the kernel.

Reviewed By:	manu, mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34749

(cherry picked from commit 3a6f0bb25f)
2022-05-16 10:34:04 -03:00
Philip Paeps
13033a1549 riscv: add iicbus and iicoc to GENERIC
The iicoc driver supports the OpenCores I2C IP.  This is included in at
least the SiFive "Unleashed" and "Unmatched" cores and probably others.

Suggested by:	jrtc27

(cherry picked from commit 91feb4f420)
2022-05-16 10:34:04 -03:00
Milan Obuch
fe1c0e6d2a cgem: support SGMII PHY connection mode
As the PolarFire SoC needs SGMII to connect the PHY, check the
'phy-mode' property of device tree node for ethernet and act on it
appropriately.

Add the compatible strings for the PolarFire SoC device tree.
'microchip,mpfs-mss-gem" is not officially documented but has been
observed in the available firmware for this platform, so it is included
for now.

Also, fix a typo in if_cgem_hw.h.

Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	Conclusive Engineering
Differential Revision: https://reviews.freebsd.org/D34764

(cherry picked from commit 34f4c17a2b)
2022-05-16 10:34:04 -03:00
Milan Obuch
a1785a3009 cgem: rework hardware quirk detection
Rather than doing these checks based on the detected hardware variant, allow
quirks to be specified as a set of flags for each compatible string.
This simplifies adding support for new compatible hardware.

Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	Conclusive Engineering
Differential Revision:	https://reviews.freebsd.org/D34764

(cherry picked from commit 66cc0c61b0)
2022-05-16 10:34:04 -03:00
Mitchell Horne
0decce4326 savecore: factor out info file handling
Move it to a separate function, allowing its reuse.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34822

(cherry picked from commit cf02cf8dbf)
2022-05-16 10:34:03 -03:00
Mitchell Horne
274e8fff31 savecore: decrease filename buffer sizes
All files are now created relative to savedirfd, e.g. with openat(2).
Therefore, we do not need character buffers to be PATH_MAX bytes long,
just long enough to hold the complete filename. 32 bytes is long enough
in all cases. These can be allocated on the stack.

While here, fix an error message that attempts to use an uninitialized
infoname.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34821

(cherry picked from commit fafeb5342b)
2022-05-16 10:34:03 -03:00
Mitchell Horne
1961b46059 savecore: fold maxdumps check into getbounds()
So that new callers of getbounds() don't need to duplicate it.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34783

(cherry picked from commit 4243d307d3)
2022-05-16 10:34:03 -03:00
Emmanuel Vadot
1ba03dcaad files: Make mmc_fdt_helper and sdhci depends on clk and regulator
Those two frameworks are needed.

(cherry picked from commit b7bfded146)
2022-05-16 15:21:38 +02:00
Emmanuel Vadot
2cbf98b74b files: Make mmc_pwrseq depends on regulator and clk
It uses those two frameworks too.

(cherry picked from commit adbb32d3e6)
2022-05-16 15:21:38 +02:00
Emmanuel Vadot
8a08d2dbe5 files: Make mmc_helpers depends on regulator and clk
It also needs those two framework.

(cherry picked from commit 832adbd4c4)
2022-05-16 15:21:38 +02:00
Emmanuel Vadot
a62c4665be files: Make mmc_helper depend on gpio
mmc_helper have an hard dependency on gpio_if.h
gpio(4) isn't in the default x86 kernel and none of the x86
sd/mmc drivers uses mmc_helper so just add a dependency on gpio.

Fixes: 85b3794cee ("files: Make ext_resources non-optional")
(cherry picked from commit f898e41925)
2022-05-16 15:21:37 +02:00
Emmanuel Vadot
1fa3912aa2 cpufreq: dt: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit eb80ba8d54)
2022-05-16 15:15:45 +02:00
Emmanuel Vadot
f379ab270c twsi: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 4f118605ad)
2022-05-16 15:15:44 +02:00
Emmanuel Vadot
3485ff9587 if_dwc: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 79778f8692)
2022-05-16 15:15:44 +02:00
Emmanuel Vadot
94429bcfc5 arm: allwinner: a10_timer: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 8604ba7423)
2022-05-16 15:15:44 +02:00
Emmanuel Vadot
808ec6897f arm: allwinner: clk: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 4c5b550e63)
2022-05-16 15:15:44 +02:00
Emmanuel Vadot
0e617da802 arm64: allwinner: aw_usb3phy: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit cfd8b9545e)
2022-05-16 15:15:43 +02:00
Emmanuel Vadot
cb26df12c1 arm: allwinner: aw_gpio: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 3dc60bab27)
2022-05-16 15:15:43 +02:00
Emmanuel Vadot
ef5ae4e8f8 arm64: allwinner: axp81x: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit aeb70a6707)
2022-05-16 15:15:43 +02:00
Emmanuel Vadot
b65d223e11 arm64: allwinner: aw_sid: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 34abc89413)
2022-05-16 15:15:42 +02:00