Commit graph

39815 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
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
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
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
8d672e8449 ofw_cpu: Make ext_resources non-optional for arm* and riscv
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.
For RISC-V it was always enabled.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D33835

(cherry picked from commit 02398e581d)
2022-05-16 13:45:38 +02:00
Emmanuel Vadot
c9fab04640 uart_dev_snps: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33828

(cherry picked from commit 5c00765bf2)
2022-05-16 13:45:37 +02:00
Emmanuel Vadot
0c7209c263 usb: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33827

(cherry picked from commit fb6cebd8bd)
2022-05-16 13:45:36 +02:00
Emmanuel Vadot
5e1a684c4c uart_dev_imx: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33826

(cherry picked from commit 4f64df4e32)
2022-05-16 13:45:36 +02:00
Emmanuel Vadot
65ae10de64 if_cgem: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33825

(cherry picked from commit d46fd9e855)
2022-05-16 13:45:36 +02:00
Emmanuel Vadot
69b0498ff8 sdhci: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33824

(cherry picked from commit a813b0965d)
2022-05-16 13:45:35 +02:00
Emmanuel Vadot
354beb15b7 twsi: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33823

(cherry picked from commit 36498b1408)
2022-05-16 13:45:35 +02:00
Emmanuel Vadot
be92a2d12c dwmmc: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33822

(cherry picked from commit b4cc0f7d28)
2022-05-16 13:45:35 +02:00
Emmanuel Vadot
3766f99c48 mmc: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33821

(cherry picked from commit 78f8b4aafa)
2022-05-16 13:45:35 +02:00
Emmanuel Vadot
57766bd637 dwc: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D33820

(cherry picked from commit a5339ba3ff)
2022-05-16 13:45:34 +02:00
Emmanuel Vadot
40d62bb4f9 dwmmc: Properly implement power_off/power_up
Write to the PWREN register should be done in update_ios based
on the power_mode value in the ios struct.
Also none of the manual (RockChip and Altera) and Linux talks about
the needed for an inverted PWREN value so just remove this.
This fixes eMMC (and possibly SD) when u-boot didn't setup the controller.

Reported by:	avg
Tested-on:	Rock64, RockPro64

(cherry picked from commit af32e2cc32)
2022-05-16 11:33:42 +02:00
Emmanuel Vadot
1be298a0bf dwmmc: Remove dwmmc_setup_bus call from start_cmd
There is no need to re-setup the bus before each commands.
Tested-on:  Rock64, RockPro64
Reported by:	    avg

(cherry picked from commit 559f60214b)
2022-05-16 11:33:41 +02:00
Emmanuel Vadot
c8dbee973e dwmmc: Fix MMCCAM block size support
When using SDIO the block size if per function and most of the time
not equal to MMC_SECTOR_SIZE, fix sdio on dwmmc by setting the correct
block size in the mmc registers.

MFC after:    1 month
Sponsored by:	Diablotin Systems

(cherry picked from commit 990a1dbf6f)
2022-05-16 11:33:41 +02:00
Kevin Bowling
3f8306cf8e e1000: Increase rx_buffer_size to 32b
Extend the size of the local rx_buffer_size variable to account for
larger buffer sizes possible on 82580, i350 chips.

From i350 datasheet, 6.2.10 Initialization Control 4 (LAN Base Address
+ Offset 0x13):
When 4 ports are enabled maximum buffer size is 36 KB. When 2 ports are
enabled maximum buffer size is 72 KB. When only a single port is
enabled maximum buffer size is 144 KB.

and 8.3:
The overall available internal buffer size in the I350 for all ports is
144 KB for receive buffers and 80 KB for transmit Buffers. Disabled
ports memory can be shared between active ports and sharing can be
asymmetric. The default buffer size for each port is loaded from the
EEPROM on initialization.

From the reporter:
But for I350 when only 2 ports are used PBA size can be set as 72KB
(see datasheet RXPbsize or e1000_rxpbs_adjust_82580 function in
e1000_82575.c). In this case calculating the rx_buffer_size overflows
as 0x0048 << 10 = 73728 or 0x12000 pushed into u16. It is then set as
0x2000 or 8192.

PR:		263896
Reported by:	hannula@gmail.com
Tested by:	hannula@gmail.com
Approved by:	markj
Differential Revision:	https://reviews.freebsd.org/D35167

(cherry picked from commit 6987c47569)
2022-05-15 10:04:00 -07:00
Scott Long
c16cbd2e91 Default to always accepting the PHY that's present. Linux did
something similar a while back, and there are devices in the wild
that otherwise won't attach.  This patch is temporary until the
PHY code is further cleared up.

Obtained from: grehan

(cherry picked from commit 6f3c0d2764)
2022-05-15 12:29:57 -04:00
John Baldwin
d32888f4fe ix: Remove cpu_id and related code from ixgbe_if_msix_intr_assign.
Reviewed by:	erj
Differential Revision:	https://reviews.freebsd.org/D34828

(cherry picked from commit c0a42a0451)
2022-05-13 13:14:07 -07:00
John Baldwin
eb9716f41b powermac_nvram: Actually return EBUSY on error from open.
(cherry picked from commit 124b6786e4)
2022-05-13 13:13:33 -07:00
John Baldwin
2cb2e6691f ce,cp: Remove pointless checks for <sys/cdefs.h>
Both of these headers check for _SYS_CDEFS_H_ after including
<sys/param.h> which itself includes <sys/cdefs.h>.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34795

(cherry picked from commit 17554af4e8)
2022-05-13 13:11:30 -07:00
John Baldwin
d7cd104458 sbni: Use memset to clear flags structure in attach.
NFC, just less nausea-inducing.

(cherry picked from commit 9c11e6af89)
2022-05-13 10:44:36 -07:00
John Baldwin
6aca4e6127 rtwn: Restore RF_ENV control type after initializing RF.
Both rwlwifi in Linux and rtwn in OpenBSD restore this register,
and the existing code was saving the value and not using it.

Reported by:	-Wunused-but-set-variable
Reviewed by:	imp
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D34838

(cherry picked from commit 50e3b6aa48)
2022-05-13 10:44:10 -07:00
John Baldwin
872428acea qlnx: Return error from qlnxr_mod_load if it fails.
Fix qlnx_rdma_register_if return ENXIO rather than -1 on error and
propagate that error to the caller in qlnxr_mod_load.

(cherry picked from commit ee07d71213)
2022-05-13 10:43:38 -07:00
John Baldwin
3fc514f4a7 otus: Return computed error value instead of ENXIO from otus_raw_xmit.
(cherry picked from commit c0ca75b0db)
2022-05-13 10:43:31 -07:00
John Baldwin
e994b6f6d3 mlx5: Pass the correct data pointer to the add_dst_cb instead of NULL.
Reported by:	-Wunused-but-set-variable
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D34812

(cherry picked from commit ebb16d5e93)
2022-05-13 10:43:25 -07:00
John Baldwin
6dcb516ba6 bnhd: Write out updated resource dependencies from the table.
The driver parsed the table to update the relevant resource map
registers, but failed to write the new register value after computing
it.

Reported by:	-Wunused-but-set-variable
Reviewed by:	landonf, imp
Differential Revision:	https://reviews.freebsd.org/D34814

(cherry picked from commit 3cebca152b)
2022-05-13 10:43:14 -07:00
John Baldwin
ad17102e4e isci: Propagate error from bus_dma_tag_create.
Return error from isci_controller_allocate_memory if bus_dma_tag_create
fails instead of ignoring the error.

(cherry picked from commit bbfec32d15)
2022-05-13 10:43:02 -07:00
John Baldwin
1db9d7b775 cxgbei: Support unmapped I/O requests.
- Add icl_pdu_append_bio and icl_pdu_get_bio methods.

- Add new page pod routines for allocating and writing page pods for
  unmapped bio requests.  Use these new routines for setting up DDP
  for iSCSI tasks with a SCSI I/O CCB which uses CAM_DATA_BIO.

- When ICL_NOCOPY is used to append data from an unmapped I/O request
  to a PDU, construct unmapped mbufs from the relevant pages backing
  the struct bio.  This also requires changes in the t4_push_pdus path
  to support unmapped mbufs.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34383

(cherry picked from commit 2beaefe884)
2022-05-11 13:52:48 -07:00
John Baldwin
34185c0a1a icl_soft: Use PHYS_TO_DMAP instead of pmap_map_io_transient.
The latter API is not actually MI but is only supported on amd64,
arm64, and RISC-V.

Sponsored by:	Chelsio Communications

(cherry picked from commit 832acea92f)
2022-05-11 13:52:41 -07:00
John Baldwin
5ee84b311e iscsi: Support unmapped I/O requests in the default initiator.
- Add icl_pdu_append_bio and icl_pdu_get_bio methods.

- When ICL_NOCOPY is used to append data from an unmapped I/O request
  to a PDU, construct unmapped mbufs from the relevant pages backing
  the struct bio.

- Use m_apply with a helper to compute crc32 digests on mbuf chains
  to handle unmapped mbufs.  Since m_apply requires PMAP_HAS_DMAP
  for unmapped mbufs, only support unmapped requests when PMAP_HAS_DMAP
  is true.

Reviewed by:	mav
Differential Revision:	https://reviews.freebsd.org/D34406

(cherry picked from commit 530e725d8e)
2022-05-11 13:52:33 -07:00
John Baldwin
156e41c4b7 iscsi: Handle unmapped I/O requests.
Don't assume that csio->data_ptr is pointer to a data buffer that can
be passed to icl_get_pdu_data and icl_append_data.  For unmapped I/O
requests, csio->data_ptr is instead a pointer to a struct bio as
indicated by CAM_DATA_BIO.  To support these requests, add
icl_pdu_append_bio and icl_pdu_get_bio methods which pass a pointer to
the bio and an offset and length relative to the bio's buffer.

Note that only backends supporting unmapped requests need to implement
these hooks.

Implement simple no-op hooks for the iser backend.

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

(cherry picked from commit 7aab9c14a4)
2022-05-11 13:52:17 -07:00
John Baldwin
08b090d767 iser: Fix check for opcodes in iser_conn_pdu_append_data.
Reviewed by:	mav
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34487

(cherry picked from commit c6a43f7f10)
2022-05-11 13:50:40 -07:00
John Baldwin
94b27fc812 iscsi: Use ICL_NOCOPY for SCSI command immediate data and R2T.
The associated csio ccb will not be completed via xpt_done() until
after the associated PDUs are transmitted to the other side and either
the original PDU is acked with a SCSI response, or a response is
received for a subsequent abort CCB (which means the earlier PDU has
also been sent since it would have been sent before the abort PDU).

This does assume that once an I/O request has been aborted, no further
PDUs with data payload are queued for that I/O request.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34405

(cherry picked from commit 9c7a4875bc)
2022-05-11 13:50:26 -07:00
Henri Hennebert
d6a32773ea rtsx: Number of tweaks for RTS5260.
MFC after:	2 weeks

(cherry picked from commit 8290c14420)
2022-05-10 20:56:53 -04:00
John Baldwin
95303c0646 hyperv storvsc: Don't abuse struct sglist to hold virtual addresses.
struct sglist is intended for holding S/G lists of physical address
ranges, not virtual address ranges.  GCC 9.x issues several warnings
due to casts between pointers and integers of different sizes as a
result (vm_paddr_t is 64-bits on i386).  Instead, add a local 'struct
hv_sglist' which uses an array of 'struct iovec' to hold the S/G list
of virtual address ranges.

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

(cherry picked from commit 53e938e408)
2022-05-10 17:03:58 -07:00
Hans Petter Selasky
75a5bdd453 xhci(4): Tweak USB port speed checks to allow newer super speed generations.
This allows setting the U1 and U2 port timeout values.

Sponsored by:	NVIDIA Networking

(cherry picked from commit a1c0442b41)
2022-05-10 10:05:32 +02:00
Hans Petter Selasky
a11ac66f1c xhci(4): Properly define all basic USB port speeds.
Sponsored by:	NVIDIA Networking

(cherry picked from commit d730333c80)
2022-05-10 10:05:29 +02:00
Hans Petter Selasky
51a9a42f0c mlx5en(4): Use hard-coded 4K page size for RQ/SQ/CQ.
The page size specified for RQ, SQ and CQ is always in units of 4KBytes.
Make sure we subtract MLX5_ADAPTER_PAGE_SHIFT, 12, instead of PAGE_SHIFT
which may vary. This fixes support for using the mlx5en driver on systems
having non-4K page size.

Linux commit:
68cdf5d6e91068c98d6091b193dc7a5ab7dcf5eb

Sponsored by:	NVIDIA Networking

(cherry picked from commit d735d604f0)
2022-05-10 10:02:28 +02:00
Alex Richardson
299d5e2b64 Add missing const after 6c4f95161d
I accidentally didn't include hunk in the committed patch.

Fixes:		6c4f95161d ("virtio: make the write_config buffer argument const")
(cherry picked from commit 9017870541)
2022-05-07 13:09:43 +01:00
Alex Richardson
b7a47939e2 virtio: make the write_config buffer argument const
No functional change intended, but noticed that we could add const here
while adding linuxkpi support for virtio.

Reviewed By:	bryanv, imp
Differential Revision: https://reviews.freebsd.org/D32370

(cherry picked from commit 6c4f95161d)
2022-05-07 13:09:09 +01:00