Commit graph

40465 commits

Author SHA1 Message Date
John Baldwin
75095cd38f mlx5: fs_tcp is only used for INET or INET6. 2022-04-13 16:08:21 -07:00
John Baldwin
127b40e7dc vtnet: offset is only used for INET or INET6. 2022-04-13 16:08:21 -07:00
John Baldwin
ffd8101e93 usb: Add a __usbdebug_used for variables only used under #ifdef USB_DEBUG.
Use it for various variables only used in DPRINTF debug traces
conditional on USB_DEBUG.
2022-04-13 16:08:20 -07:00
John Baldwin
1c5f188212 usb: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:20 -07:00
John Baldwin
e565fa55e6 sfxge: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:20 -07:00
John Baldwin
03d49ffc78 sdhci_card_task: d is only used in the non-MMCCAM case. 2022-04-13 16:08:20 -07:00
John Baldwin
bf264886cd nvdimm: Inline value of variable used once in an assertion. 2022-04-13 16:08:20 -07:00
John Baldwin
8fcf690b83 lpt: Mark ppbus in lptout unused.
It is used both in an assertion under INVARIANTS as well as in a
custom debug trace.
2022-04-13 16:08:20 -07:00
John Baldwin
039880009a hyperv: Use __diagused for a variable only used in KASSERT(). 2022-04-13 16:08:20 -07:00
John Baldwin
acb7423df7 bhnd: Use __diagused for a variable only used in a KASSERT(). 2022-04-13 16:08:20 -07:00
John Baldwin
b25ddb782f virtio: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:19 -07:00
J.R. Oldroyd
9ab4dfce8f e1000: Try auto-negotiation for fixed 100 or 10 configuration
Currently if an e1000 interface is set to a fixed media configuration,
for gigabit, it will participate in auto-negotiation as required by
IEEE 802.3-2018 Clause 37. However, if set to fixed media configuration
for 100 or 10, it does NOT participate in auto-negotiation.

By my reading of Clauses 28 and 37, while auto-negotiation is optional
for 100 and 10, it is not prohibited and is, in fact, "highly
recommended".

This patch enables auto-negotiation for fixed 100 and 10 media
configuration, in a similar manner to that already performed for 1000.
I.e., the patch enables advertising of just the manually configured
settings with the goal of allowing the remote end to match the manually
configured settings if it has them available.

To be clear, this patch does NOT allow an em(4) interface that has been
manually configured with specific media settings to respond to
auto-negotiation by then configuring different parameters to those that
were manually configured. The intent of this patch is to fully comply
with the requirements of Clause 37, but for 100 and 10.

The need for this has arisen on an em(4) link where the other end is
under a different administrative control and is set to full
auto-negotiation. Due to the cable length GigE is not working well. It
is desired to set the em(4) end to "media 100baseTX mediatype
full-duplex" which does work when both ends are configured that way.
Currently, because em(4) does not participate in autoneg for this
setting, the remote defaults to half-duplex - i.e., there's a duplex
mismatch and things don't work. With this patch, em(4) would inform the
remote that it has only 100baseTX full, the remote would match that and
it will work.

Approved by:	erj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34449
2022-04-13 09:17:32 -07:00
Kevin Bowling
07ede75161 e1000: Update mc filter before RCTL flags
Update mc filter array before changing RCTL flags as in 5a3eb6207a

Approved by:	grehan
MFC after:	2 weeks
2022-04-13 09:01:19 -07:00
Kevin Bowling
395cc55d89 ixgbe: Update mc filter before FCTRL flags
Update mc filter array before changing FCTRL flags, similar to 5a3eb6207a

Approved by:	grehan
MFC after:	2 weeks
2022-04-13 08:59:21 -07:00
Dmitry Chagin
ae18d76d61 sc: Move prev_ysize under #ifndef SC_NO_HISTORY
Finish fdf288f39.
2022-04-13 12:35:55 +03:00
Navdeep Parhar
f8058d3333 cxgbe/cxgbei: Allow max PDU payload lengths to be changed with a sysctl.
New connections will use the new values.  Existing connections are not
affected.

Obtained from:	jhb@
MFC after:	3 weeks
Sponsored by:	Chelsio Communications
2022-04-12 21:35:29 -07:00
John Baldwin
613e07c07f smc: Rename constants for control register from CTR* to CTRL*.
This avoids a conflict with the recently-added CTR macro in
<sys/ktr.h>.
2022-04-12 17:11:28 -07:00
John Baldwin
c0a42a0451 ix: Remove cpu_id and related code from ixgbe_if_msix_intr_assign.
Reviewed by:	erj
Differential Revision:	https://reviews.freebsd.org/D34828
2022-04-12 17:01:46 -07:00
Milan Obuch
34f4c17a2b 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
2022-04-12 19:51:17 -03:00
Milan Obuch
66cc0c61b0 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
2022-04-12 19:51:17 -03:00
John Baldwin
113925b0b3 syscons VGA draw_txtcharcursor: Move sc under #ifndef SC_NO_FONT_LOADING. 2022-04-12 14:59:00 -07:00
John Baldwin
c3b1cbc9e6 mlx5 RATELIMIT: Remove an unused variable. 2022-04-12 14:59:00 -07:00
John Baldwin
fdf288f39d sc: Move prev_ysize under #ifndef SC_NO_HISTORY. 2022-04-12 14:58:59 -07:00
John Baldwin
e4d4beba43 isp: Remove unused variable. 2022-04-12 14:58:59 -07:00
John Baldwin
3ef2d49e7d arswitch: Remove unused variable. 2022-04-12 14:58:59 -07:00
John Baldwin
16471f4716 ppc hwpmc: Remove unused variables. 2022-04-12 14:58:58 -07:00
John Baldwin
b8ef5a7ea0 sound aoa: Mark variable only used in debug trace as unused. 2022-04-12 14:58:58 -07:00
John Baldwin
124b6786e4 powermac_nvram: Actually return EBUSY on error from open. 2022-04-12 14:58:58 -07:00
John Baldwin
773cfd2bf8 adt746x: Remove unused variables. 2022-04-12 14:58:58 -07:00
John Baldwin
8209266cab if_xae: Remove unused variables. 2022-04-12 14:58:57 -07:00
John Baldwin
0146e4ce2f axidma: Remove unused variables. 2022-04-12 14:58:57 -07:00
John Baldwin
9e420b3742 uart_dev_lowrisc: Remove unused variables in stub functions. 2022-04-12 14:58:57 -07:00
John Baldwin
d8e7d35acf iicoc: Remove unused variable. 2022-04-12 14:58:57 -07:00
John Baldwin
c434b26cf3 i40e_validate_filter_settings: Remove unused variables.
Reviewed by:	erj
Differential Revision:	https://reviews.freebsd.org/D34829
2022-04-12 14:51:44 -07:00
John Baldwin
f08613087a Remove checks for __CC_SUPPORTS__INLINE assuming it is always true.
All supported compilers (modern versions of GCC and clang) support
this.

PR:		263102 (exp-run)
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D34802
2022-04-12 10:06:09 -07:00
John Baldwin
87445068f9 Remove check for __CC_SUPPORTS___FUNC__.
__func__ is part of C99.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34801
2022-04-12 10:06:04 -07:00
John Baldwin
56f5947a71 Remove checks for __GNUCLIKE_ASM assuming it is always true.
All supported compilers (modern versions of GCC and clang) support
this.

Many places didn't have an #else so would just silently do the wrong
thing.  Ancient versions of icc (the original motivation for this) are
no longer a compiler FreeBSD supports.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp
Differential Revision:	https://reviews.freebsd.org/D34797
2022-04-12 10:05:45 -07:00
John Baldwin
17554af4e8 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
2022-04-12 10:05:34 -07:00
Roger Pau Monné
b93f47eaee xen/acpi: upload Cx and Px data to Xen
When FreeBSD is running as dom0 (initial domain) on a Xen system it
has access to the native ACPI tables and is the OSPM. However the
hypervisor is the entity in charge of the CPU idle and frequency
states, and in order to perform this duty it requires information
found the ACPI dynamic tables that can only be parsed by the OSPM.

Introduce a new Xen specific ACPI driver to fetch the Processor
related information and upload it to Xen. Note that this driver needs
to take precedence over the generic ACPI CPU driver when running as
dom0, so downgrade the probe score of the native driver to
BUS_PROBE_DEFAULT in order for the Xen specific driver to use
BUS_PROBE_SPECIFIC.

Tested on an Intel NUC to successfully parse and upload both the Cx and
Px states to Xen.

Sponsored by: Citrix Systems R&D
Reviewed by: jhb kib
Differential revision: https://reviews.freebsd.org/D34841
2022-04-12 10:03:26 +02:00
Tong Zhang
57f7a82fbb if_axgbe: properly release resource in error case
PR:		262899
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34628
2022-04-11 09:52:32 -04:00
Gordon Bergling
75e1650d7f bhnd(4): Remove a double word in a source code comment
- s/an an/an/

MFC after:	3 days
2022-04-09 14:31:19 +02:00
Gordon Bergling
a37c6fcc46 mpt(4): Fix a typo in a source code comment
- s/proccessor/processor/

MFC after:	3 days
2022-04-09 14:10:05 +02:00
Gordon Bergling
6a734168cb al_eth: Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:06:18 +02:00
Gordon Bergling
5f93395f2f ce(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:05:38 +02:00
Gordon Bergling
586023f10d iwm(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:04:23 +02:00
Gordon Bergling
2e09a4ac3b usb(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:02:23 +02:00
Gordon Bergling
10df4dc724 iscsi(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:01:43 +02:00
Gordon Bergling
db739f1c19 sfxge(4): Remove a double word in a few source code comments
- s/for for/for/

MFC after:	3 days
2022-04-09 10:57:31 +02:00
Gordon Bergling
6cff32b3c4 ath(4): Remove a double word in a few source code comments
- s/for for/for/

MFC after:	3 days
2022-04-09 10:55:00 +02:00
Gordon Bergling
bafe4cee3d ips(4): Remove a double word in a few source code comments
- s/for for/for/

MFC after:	3 days
2022-04-09 10:53:50 +02:00