Index: head/share/man/man4/acpi_wmi.4 =================================================================== --- head/share/man/man4/acpi_wmi.4 (revision 360526) +++ head/share/man/man4/acpi_wmi.4 (revision 360527) @@ -1,122 +1,122 @@ .\" Copyright (c) 2009 Michael Gmelin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" -.Dd Sep 5, 2019 +.Dd September 5, 2019 .Dt ACPI_WMI 4 .Os .Sh NAME .Nm acpi_wmi .Nd "ACPI to WMI mapping driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device acpi_wmi" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent acpi_wmi_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides an interface for vendor specific WMI implementations (e.g. HP and Acer laptops). It creates /dev/wmistat%d, which can be read to get information about GUIDs found in the system. .Sh FILES .Bl -tag -width /dev/wmistat%d -compact .It Pa /dev/wmistat%d WMI status device. .El .Sh SYSCTLS The following sysctl node is currently implemented: .Bl -tag .It Va dev.acpi_wmi.%d.bmof Managed Object Format (MOF) blob. You can obtain human readable output by bmf2mof in bmfdec tool. (https://github.com/pali/bmfdec) .El .Sh EXAMPLES .Bd -literal # cat /dev/wmistat0 GUID INST EXPE METH STR EVENT OID {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI # sysctl -b dev.acpi_wmi.0.bmof |bmf2mof [abstract] class Lenovo_BIOSElement { }; [WMI, Dynamic, Provider("WMIProv"), WmiExpense(1), Description("Bios Setting"), GUID("{51F5230E-9677-46cd-A1CF-C0B23EE34DB7}"), Locale("MS\\0x409")] class Lenovo_BiosSetting : Lenovo_BiosElement { [key, read] String InstanceName; [read] Boolean Active; [WmiDataId(1), Description("BIOS setting")] String CurrentSetting; }; ... .Ed .Sh SEE ALSO .Xr acpi 4 .Sh HISTORY The .Nm device driver first appeared in .Fx 8.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Michael Gmelin Aq Mt freebsd@grem.de . .Pp Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho. .Pp See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for the specification of ACPI-WMI. .Pp MOF part has been inspired by the Linux wmi-bmof driver written by Andy Lutomirski. .Pp This manual page was written by .An Michael Gmelin Aq Mt freebsd@grem.de . Index: head/share/man/man4/bhndb.4 =================================================================== --- head/share/man/man4/bhndb.4 (revision 360526) +++ head/share/man/man4/bhndb.4 (revision 360527) @@ -1,80 +1,80 @@ .\" Copyright (c) 2015 Landon Fuller .\" Copyright (c) 2017 The FreeBSD Foundation .\" All rights reserved. .\" .\" Portions of this documentation were written by Landon Fuller .\" under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" -.Dd October 16th, 2017 +.Dd October 16, 2017 .Dt BHNDB 4 .Os .Sh NAME .Nm bhndb .Nd Broadcom Home Networking Division interconnect bridge driver .Sh SYNOPSIS To compile this driver into the kernel, add the following lines to the kernel configuration file: .Bd -ragged -offset indent .Cd "device bhnd" .Cd "device bhndb" .Ed .Pp To load the driver as a module at boot, add this line to .Xr loader.conf 5 : .Bd -literal -offset indent bhndb_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides .Xr bhnd 4 host bridge support for Broadcom Home Networking Division's wireless chipsets and network adapters. .Pp To enable use for PCI/PCIe systems, see the .Xr bhndb_pci 4 driver. .Sh SEE ALSO .Xr bhnd 4 , .Xr bhndb_pci 4 , .Xr bwn 4 , .Xr intro 4 .Sh HISTORY The .Nm device driver first appeared in .Fx 11.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Landon Fuller Aq Mt landonf@FreeBSD.org . .Sh CAVEATS The .Nm driver does not currently support PCMCIA or SDIO devices. Index: head/share/man/man4/bnxt.4 =================================================================== --- head/share/man/man4/bnxt.4 (revision 360526) +++ head/share/man/man4/bnxt.4 (revision 360527) @@ -1,252 +1,254 @@ .\" Copyright (c) 2016 Broadcom, All Rights Reserved. .\" The term Broadcom refers to Broadcom Limited and/or its subsidiaries .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd January 30, 2019 .Dt BNXT 4 .Os .Sh NAME .Nm bnxt .Nd "Broadcom NetXtreme-C/NetXtreme-E Family Ethernet driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iflib" .Cd "device bnxt" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_bnxt_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for various NICs based on the Broadcom BCM57301/2/4, and BCM57402/4/6 Ethernet controller chips. .Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm driver provides support for various NICs based on the Broadcom NetXtreme-C and NetXtreme-E families of Gigabit Ethernet controller chips, including the following: .Pp .Bl -bullet -compact .It Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller .It Broadcom BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller .It Broadcom BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller .It Broadcom BCM57304 NetXtreme-C Ethernet Virtual Function .It Broadcom BCM57314 NetXtreme-C Ethernet Virtual Function .It Broadcom BCM57402 NetXtreme-E 10Gb Ethernet Controller .It Broadcom BCM57402 NetXtreme-E Ethernet Partition .It Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller .It Broadcom BCM57404 NetXtreme-E Ethernet Virtual Function .It Broadcom BCM57404 NetXtreme-E Partition .It Broadcom BCM57406 NetXtreme-E 10GBASE-T Ethernet Controller .It Broadcom BCM57406 NetXtreme-E Partition .It Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller .It Broadcom BCM57407 NetXtreme-E 25Gb Ethernet Controller .It Broadcom BCM57407 NetXtreme-E Partition .It Broadcom BCM57412 NetXtreme-E Partition .It Broadcom BCM57414 NetXtreme-E Ethernet Virtual Function .It Broadcom BCM57414 NetXtreme-E Partition .It Broadcom BCM57416 NetXtreme-E Partition .It Broadcom BCM57417 NetXtreme-E Ethernet Partition .It Broadcom BCM57454 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb Ethernet .El .Sh SYSCTL VARIABLES These variables must be set before loading the driver, either via .Xr loader.conf 5 or through the use of .Xr kenv 1 . These are provided by the .Xr iflib 4 framework, and might be better documented there. .Bl -tag -width indent .It Va dev.bnxt.X.iflib.override_nrxds Override the number of RX descriptors for each queue. The value is a comma separated list of three positive integers: the size of the completion ring, the size of the receive ring, and the size of the aggregation ring respectively. The completion ring should be at least the size of the aggregation ring plus four times the size of the receive ring. These numbers must be powers of two, and zero means to use the default. Defaults to 0,0,0. .It Va dev.bnxt.X.iflib.override_ntxds Override the number of TX descriptors for each queue. The value is a comma separated list of two positive integers: the size of the completion ring, and the size of the transmit ring respectively. The completion ring should be at least twice the size of the transmit ring. These numbers must be powers of two, and zero means to use the default. Defaults to 0,0. .It Va override_qs_enable When set, allows the number of transmit and receive queues to be different. If not set, the lower of the number of TX or RX queues will be used for both. .It Va override_nrxqs Set the number of RX queues. If zero, the number of RX queues is derived from the number of cores on the socket connected to the controller. Defaults to 0. .It Va override_ntxqs Set the number of TX queues. If zero, the number of TX queues is derived from the number of cores on the socket connected to the controller. .El .Pp These .Xr sysctl 8 variables can be changed at any time: .Bl -tag -width indent .It Va dev.bnxt.X.vlan_only Require that incoming frames must have a VLAN tag on them that matches one that is configured for the NIC. Normally, both frames that have a matching VLAN tag and frames that have no VLAN tag are accepted. Defaults to 0. .It Va dev.bnxt.X.vlan_strip When non-zero the NIC strips VLAN tags on receive. Defaults to 0. .It Va dev.bnxt.X.rx_stall Enable buffering rather than dropping frames when there are no available host RX buffers for DMA. Defaults to 0. .It Va dev.bnxt.X.rss_type Comma-separated list of RSS hash types to support. Default is all types. Defaults to ipv4,tcp_ipv4,udp_ipv4,ipv6,tcp_ipv6,udp_ipv6. .It Va dev.bnxt.X.rss_key Current RSS key. Defaults to a randomly generated value which is generated for each device during attach. .It Va dev.bnxt.X.ver.hwrm_min_ver Minimum HWRM (HardWare Resource Manager) firmware API to support. If the firmware implements an older version, a warning will be printed, and the firmware should be upgraded. Defaults to 1.2.2. .El .Pp These .Xr sysctl 8 variables are read-only: .Bl -tag -width indent .It Va dev.bnxt.X.if_name Current interface name of the device. This will normally be .Va bnxtX , but this can be changed using .Cm ifconfig name . This sysctl allows correlating an interface with a child of .Va dev.bnxt . .It Va dev.bnxt.X.nvram.* Information about the NVRAM device which contains the device firmware. .It Va dev.bnxt.X.ver.* Version-related information about the device and firmware: .It Va dev.bnxt.X.ver.hwrm_if Supported HWRM API version of the currently running firmware. .It Va dev.bnxt.X.ver.driver_hwrm_if HWRM API version the driver was built to support. .It Va dev.bnxt.X.hwstats.* Per-queue statistics tracked by the hardware. .It Va dev.bnxt.X.hwstats.port_stats.* Per-port statistics tracked by the hardware. .It Va dev.bnxt.X.hwstats.rxq0.drop_pkts Number of packets dropped by hardware on queue zero. This number might seem high, but the count includes packets dropped due to incorrect destination MAC, unsubscribed multicast address, and other normal reasons to ignore Ethernet frames. .It Va dev.bnxt.X.hwstats.rxq0.tpa_* statistics related to HW LRO. .It Va dev.bnxt.X.hw_lro.* -Enable / Disable HW LRO feature. Defaults to disable. +Enable / Disable HW LRO feature. +Defaults to disable. Enabling HW LRO could cause issues when forwarding is enabled on host. .It Va dev.bnxt.X.fc -Enable / Disable Flow Control feature. Defaults to Enable +Enable / Disable Flow Control feature. +Defaults to Enable .El .Sh DIAGNOSTICS .Bl -diag .It "bnxt%d: %s command returned %s error." Device firmware rejected a command from the driver. There might be a driver/firmware HWRM API mismatch. .It "bnxt%d: Timeout sending %s (timeout: %d) seq %d" Device firmware unresponsive. A PCI device reset is likely needed. .It "bnxt%d: Timeout sending %s (timeout: %d) msg {0x%x 0x%x} len:%d v: %d" Partial firmware response. A PCI device reset is likely needed. .Pp As of this writing, the system must be rebooted to initiate a PCI device reset. .El .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , .Xr iflib 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm device driver first appeared in .Fx 11.1 . .Sh AUTHORS .An -nosplit The .Nm driver was written by -.An Jack Vogel Aq Mt jfvogel@gmail.com -and +.An Jack Vogel Aq Mt jfvogel@gmail.com +and .An Stephen Hurd Aq Mt shurd@freebsd.org , and is currently maintained by .An Broadcom Limited Aq Mt freebsd.pdl@broadcom.com . Index: head/share/man/man4/bridge.4 =================================================================== --- head/share/man/man4/bridge.4 (revision 360526) +++ head/share/man/man4/bridge.4 (revision 360527) @@ -1,514 +1,514 @@ .\" $NetBSD: bridge.4,v 1.5 2004/01/31 20:14:11 jdc Exp $ .\" .\" Copyright 2001 Wasabi Systems, Inc. .\" All rights reserved. .\" .\" Written by Jason R. Thorpe for Wasabi Systems, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed for the NetBSD Project by .\" Wasabi Systems, Inc. .\" 4. The name of Wasabi Systems, Inc. may not be used to endorse .\" or promote products derived from this software without specific prior .\" written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" -.Dd February 01, 2020 +.Dd February 1, 2020 .Dt IF_BRIDGE 4 .Os .Sh NAME .Nm if_bridge .Nd network bridge device .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device if_bridge" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent if_bridge_load="YES" bridgestp_load="YES" .Ed .Sh DESCRIPTION The .Nm driver creates a logical link between two or more IEEE 802 networks that use the same (or .Dq "similar enough" ) framing format. For example, it is possible to bridge Ethernet and 802.11 networks together, but it is not possible to bridge Ethernet and Token Ring together. .Pp Each .Nm interface is created at runtime using interface cloning. This is most easily done with the .Xr ifconfig 8 .Cm create command or using the .Va cloned_interfaces variable in .Xr rc.conf 5 . .Pp The .Nm interface randomly chooses a link (MAC) address in the range reserved for locally administered addresses when it is created. This address is guaranteed to be unique .Em only across all .Nm interfaces on the local machine. Thus you can theoretically have two bridges on different machines with the same link addresses. The address can be changed by assigning the desired link address using .Xr ifconfig 8 . .Pp If .Xr sysctl 8 node .Va net.link.bridge.inherit_mac has non-zero value, a newly created bridge will inherit its MAC address from its first member instead of choosing a random link-level address. This provides a more predictable bridge MAC without any additional configuration, but currently this feature is known to break some L2 protocols, for example PPPoE that is provided by .Xr ng_pppoe 4 and .Xr ppp 8 . Currently this feature is considered experimental and is turned off by default. .Pp A bridge can be used to provide several services, such as a simple 802.11-to-Ethernet bridge for wireless hosts, and traffic isolation. .Pp A bridge works like a switch, forwarding traffic from one interface to another. Multicast and broadcast packets are always forwarded to all interfaces that are part of the bridge. For unicast traffic, the bridge learns which MAC addresses are associated with which interfaces and will forward the traffic selectively. .Pp All the bridged member interfaces need to be up in order to pass network traffic. These can be enabled using .Xr ifconfig 8 or .Va ifconfig_ Ns Ao Ar interface Ac Ns Li ="up" in .Xr rc.conf 5 . .Pp The MTU of the first member interface to be added is used as the bridge MTU. All additional members are required to have exactly the same MTU value. .Pp The TOE, TSO, TXCSUM and TXCSUM6 capabilities on all interfaces added to the bridge are disabled if any of the interfaces doesn't support/enable them. The LRO capability is always disabled. All the capabilities are restored when the interface is removed from the bridge. Changing capabilities at run-time may cause NIC reinit and a link flap. .Pp The bridge supports .Dq monitor mode , where the packets are discarded after .Xr bpf 4 processing, and are not processed or forwarded further. This can be used to multiplex the input of two or more interfaces into a single .Xr bpf 4 stream. This is useful for reconstructing the traffic for network taps that transmit the RX/TX signals out through two separate interfaces. .Sh IPV6 SUPPORT .Nm supports the .Li AF_INET6 address family on bridge interfaces. The following .Xr rc.conf 5 variable configures an IPv6 link-local address on .Li bridge0 interface: .Bd -literal -offset indent ifconfig_bridge0_ipv6="up" .Ed .Pp or in a more explicit manner: .Bd -literal -offset indent ifconfig_bridge0_ipv6="inet6 auto_linklocal" .Ed .Pp However, the .Li AF_INET6 address family has a concept of scope zone. Bridging multiple interfaces changes the zone configuration because multiple links are merged to each other and form a new single link while the member interfaces still work individually. This means each member interface still has a separate link-local scope zone and the .Nm interface has another single, aggregated link-local scope zone at the same time. This situation is clearly against the description .Qq zones of the same scope cannot overlap in Section 5, RFC 4007. Although it works in most cases, it can cause some counterintuitive or undesirable behavior in some edge cases when both, the .Nm interface and one of the member interfaces, have an IPv6 address and applications use both of them. .Pp To prevent this situation, .Nm checks whether a link-local scoped IPv6 address is configured on a member interface to be added and the .Nm interface. When the .Nm interface has IPv6 addresses, IPv6 addresses on the member interface will be automatically removed before the interface is added. .Pp This behavior can be disabled by setting .Xr sysctl 8 variable .Va net.link.bridge.allow_llz_overlap to .Li 1 . .Pp Note that .Li ACCEPT_RTADV and .Li AUTO_LINKLOCAL interface flags are not enabled by default on .Nm interfaces even when .Va net.inet6.ip6.accept_rtadv and/or .Va net.inet6.ip6.auto_linklocal is set to .Li 1 . .Sh SPANNING TREE The .Nm driver implements the Rapid Spanning Tree Protocol (RSTP or 802.1w) with backwards compatibility with the legacy Spanning Tree Protocol (STP). Spanning Tree is used to detect and remove loops in a network topology. .Pp RSTP provides faster spanning tree convergence than legacy STP, the protocol will exchange information with neighbouring switches to quickly transition to forwarding without creating loops. .Pp The code will default to RSTP mode but will downgrade any port connected to a legacy STP network so is fully backward compatible. A bridge can be forced to operate in STP mode without rapid state transitions via the .Va proto command in .Xr ifconfig 8 . .Pp The bridge can log STP port changes to .Xr syslog 3 by setting the .Va net.link.bridge.log_stp node using .Xr sysctl 8 . .Sh PACKET FILTERING Packet filtering can be used with any firewall package that hooks in via the .Xr pfil 9 framework. When filtering is enabled, bridged packets will pass through the filter inbound on the originating interface, on the bridge interface and outbound on the appropriate interfaces. Either stage can be disabled. The filtering behaviour can be controlled using .Xr sysctl 8 : .Bl -tag -width ".Va net.link.bridge.pfil_onlyip" .It Va net.link.bridge.pfil_onlyip Controls the handling of non-IP packets which are not passed to .Xr pfil 9 . Set to .Li 1 to only allow IP packets to pass (subject to firewall rules), set to .Li 0 to unconditionally pass all non-IP Ethernet frames. .It Va net.link.bridge.pfil_member Set to .Li 1 to enable filtering on the incoming and outgoing member interfaces, set to .Li 0 to disable it. .It Va net.link.bridge.pfil_bridge Set to .Li 1 to enable filtering on the bridge interface, set to .Li 0 to disable it. .It Va net.link.bridge.pfil_local_phys Set to .Li 1 to additionally filter on the physical interface for locally destined packets. Set to .Li 0 to disable this feature. .It Va net.link.bridge.ipfw Set to .Li 1 to enable layer2 filtering with .Xr ipfirewall 4 , set to .Li 0 to disable it. This needs to be enabled for .Xr dummynet 4 support. When .Va ipfw is enabled, .Va pfil_bridge and .Va pfil_member will be disabled so that IPFW is not run twice; these can be re-enabled if desired. .It Va net.link.bridge.ipfw_arp Set to .Li 1 to enable layer2 ARP filtering with .Xr ipfirewall 4 , set to .Li 0 to disable it. Requires .Va ipfw to be enabled. .El .Pp ARP and REVARP packets are forwarded without being filtered and others that are not IP nor IPv6 packets are not forwarded when .Va pfil_onlyip is enabled. IPFW can filter Ethernet types using .Cm mac-type so all packets are passed to the filter for processing. .Pp The packets originating from the bridging host will be seen by the filter on the interface that is looked up in the routing table. .Pp The packets destined to the bridging host will be seen by the filter on the interface with the MAC address equal to the packet's destination MAC. There are situations when some of the bridge members are sharing the same MAC address (for example the .Xr vlan 4 interfaces: they are currently sharing the MAC address of the parent physical interface). It is not possible to distinguish between these interfaces using their MAC address, excluding the case when the packet's destination MAC address is equal to the MAC address of the interface on which the packet was entered to the system. In this case the filter will see the incoming packet on this interface. In all other cases the interface seen by the packet filter is chosen from the list of bridge members with the same MAC address and the result strongly depends on the member addition sequence and the actual implementation of .Nm . It is not recommended to rely on the order chosen by the current .Nm implementation since it may change in the future. .Pp The previous paragraph is best illustrated with the following pictures. Let .Bl -bullet .It the MAC address of the incoming packet's destination is .Nm nn:nn:nn:nn:nn:nn , .It the interface on which packet entered the system is .Nm ifX , .It .Nm ifX MAC address is .Nm xx:xx:xx:xx:xx:xx , .It there are possibly other bridge members with the same MAC address .Nm xx:xx:xx:xx:xx:xx , .It the bridge has more than one interface that are sharing the same MAC address .Nm yy:yy:yy:yy:yy:yy ; we will call them .Nm vlanY1 , .Nm vlanY2 , etc. .El .Pp If the MAC address .Nm nn:nn:nn:nn:nn:nn is equal to .Nm xx:xx:xx:xx:xx:xx the filter will see the packet on interface .Nm ifX no matter if there are any other bridge members carrying the same MAC address. But if the MAC address .Nm nn:nn:nn:nn:nn:nn is equal to .Nm yy:yy:yy:yy:yy:yy then the interface that will be seen by the filter is one of the .Nm vlanYn . It is not possible to predict the name of the actual interface without the knowledge of the system state and the .Nm implementation details. .Pp This problem arises for any bridge members that are sharing the same MAC address, not only to the .Xr vlan 4 ones: they were taken just as an example of such a situation. So if one wants to filter the locally destined packets based on their interface name, one should be aware of this implication. The described situation will appear at least on the filtering bridges that are doing IP-forwarding; in some of such cases it is better to assign the IP address only to the .Nm interface and not to the bridge members. Enabling .Va net.link.bridge.pfil_local_phys will let you do the additional filtering on the physical interface. .Sh EXAMPLES The following when placed in the file .Pa /etc/rc.conf will cause a bridge called .Dq Li bridge0 to be created, and will add the interfaces .Dq Li wlan0 and .Dq Li fxp0 to the bridge, and then enable packet forwarding. Such a configuration could be used to implement a simple 802.11-to-Ethernet bridge (assuming the 802.11 interface is in ad-hoc mode). .Bd -literal -offset indent cloned_interfaces="bridge0" ifconfig_bridge0="addm wlan0 addm fxp0 up" .Ed .Pp For the bridge to forward packets, all member interfaces and the bridge need to be up. The above example would also require: .Bd -literal -offset indent create_args_wlan0="wlanmode hostap" ifconfig_wlan0="up ssid my_ap mode 11g" ifconfig_fxp0="up" .Ed .Pp Consider a system with two 4-port Ethernet boards. The following will cause a bridge consisting of all 8 ports with Rapid Spanning Tree enabled to be created: .Bd -literal -offset indent ifconfig bridge0 create ifconfig bridge0 \e addm fxp0 stp fxp0 \e addm fxp1 stp fxp1 \e addm fxp2 stp fxp2 \e addm fxp3 stp fxp3 \e addm fxp4 stp fxp4 \e addm fxp5 stp fxp5 \e addm fxp6 stp fxp6 \e addm fxp7 stp fxp7 \e up .Ed .Pp The bridge can be used as a regular host interface at the same time as bridging between its member ports. In this example, the bridge connects em0 and em1, and will receive its IP address through DHCP: .Bd -literal -offset indent cloned_interfaces="bridge0" ifconfig_bridge0="addm em0 addm em1 DHCP" ifconfig_em0="up" ifconfig_em1="up" .Ed .Pp The bridge can tunnel Ethernet across an IP internet using the EtherIP protocol. This can be combined with .Xr ipsec 4 to provide an encrypted connection. Create a .Xr gif 4 interface and set the local and remote IP addresses for the tunnel, these are reversed on the remote bridge. .Bd -literal -offset indent ifconfig gif0 create ifconfig gif0 tunnel 1.2.3.4 5.6.7.8 up ifconfig bridge0 create ifconfig bridge0 addm fxp0 addm gif0 up .Ed .Sh SEE ALSO .Xr gif 4 , .Xr ipf 4 , .Xr ipfw 4 , .Xr pf 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm driver first appeared in .Fx 6.0 . .Sh AUTHORS .An -nosplit The .Nm bridge driver was originally written by .An Jason L. Wright Aq Mt jason@thought.net as part of an undergraduate independent study at the University of North Carolina at Greensboro. .Pp This version of the .Nm driver has been heavily modified from the original version by .An Jason R. Thorpe Aq Mt thorpej@wasabisystems.com . .Pp Rapid Spanning Tree Protocol (RSTP) support was added by .An Andrew Thompson Aq Mt thompsa@FreeBSD.org . .Sh BUGS The .Nm driver currently supports only Ethernet and Ethernet-like (e.g., 802.11) network devices, with exactly the same interface MTU size as the bridge device. Index: head/share/man/man4/bwi.4 =================================================================== --- head/share/man/man4/bwi.4 (revision 360526) +++ head/share/man/man4/bwi.4 (revision 360527) @@ -1,149 +1,151 @@ .\" Copyright (c) 2009 Christian Brueffer .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd August 7, 2015 .Dt BWI 4 .Os .Sh NAME .Nm bwi .Nd Broadcom BCM43xx IEEE 802.11b/g wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device bwi" .Cd "device wlan" .Cd "device wlan_amrr" .Cd "device firmware" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_bwi_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for Broadcom BCM43xx based PCI/CardBus network adapters. .Pp It supports .Cm station and .Cm monitor mode operation. Only one virtual interface may be configured at any time. For more information on configuring this device, see .Xr ifconfig 8 . .Pp This driver requires firmware to be loaded before it will work. The .Pa ports/net/bwi-firmware-kmod port needs to be installed before .Xr ifconfig 8 will work. .Sh HARDWARE The .Nm driver supports Broadcom BCM43xx based wireless devices, including: .Bl -column "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n .It Em "Card" Ta Em "Chip" Ta Em "Bus" Ta Em "Standard" .It "Apple Airport Extreme BCM4306 PCI b/g" .It "Apple Airport Extreme BCM4318 PCI b/g" .It "ASUS WL-100g BCM4306 CardBus b/g" .It "ASUS WL-138g BCM4318 PCI b/g" .It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g" .It "Buffalo WLI-PCI-G54S BCM4306 PCI b/g" .It "Compaq R4035 onboard BCM4306 PCI b/g" .It "Dell Wireless 1390 BCM4311 Mini PCI b/g" .It "Dell Wireless 1470 BCM4318 Mini PCI b/g" .It "Dell Truemobile 1300 r2 BCM4306 Mini PCI b/g" .It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" .It "HP nx6125 BCM4319 PCI b/g" .It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g" .It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g" .It "TRENDnet TEW-401PCplus BCM4306 CardBus b/g" .It "US Robotics 5411 BCM4318 CardBus b/g" .El .Pp The .Nm driver uses the older v3 version of Broadcom's firmware. While this older firmware does support most BCM43xx parts, the .Xr bwn 4 driver works better for the newer chips it supports. You must use the .Nm driver if you are using older Broadcom chipsets (BCM4301, BCM4303 and BCM4306 rev 2). The v4 version of the firmware that .Xr bwn 4 uses does not support these chips. .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Bd -literal -offset indent ifconfig wlan create wlandev bwi0 inet 192.168.0.20 \e netmask 0xffffff00 .Ed .Pp Join a specific BSS network with network name .Dq Li my_net : .Pp .Dl "ifconfig wlan create wlandev bwi0 ssid my_net up" .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev bwi0 ssid my_net \e wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh SEE ALSO .Xr arp 4 , .Xr cardbus 4 , .Xr intro 4 , .Xr pci 4 , .Xr wlan 4 , .Xr wlan_amrr 4 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY The .Nm driver first appeared in .Fx 8.0 . .Sh AUTHORS .An -nosplit The .Nm -driver was written for DragonFly BSD by +driver was written for +.Dx +by .An Sepherosa Ziehau and subsequently ported to .Fx . .Sh BUGS Some card based on the BCM4306 and BCM4309 chips do not work properly on channel 1, 2 and 3. Index: head/share/man/man4/bxe.4 =================================================================== --- head/share/man/man4/bxe.4 (revision 360526) +++ head/share/man/man4/bxe.4 (revision 360527) @@ -1,344 +1,344 @@ .\" Copyright (c) 2014 Qlogic Corporation. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd April 29, 2012 .Dt BXE 4 .Os .Sh NAME .Nm bxe .Nd QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device bxe" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_bxe_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for PCIe 10Gb Ethernet adapters based on the QLogic NetXtreme II family of 10Gb chips. The driver supports Jumbo Frames, VLAN tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X interrupts, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), and Receive Side Scaling (RSS). .Sh HARDWARE The .Nm driver provides support for various NICs based on the QLogic NetXtreme II family of 10Gb Ethernet controller chips, including the following: .Pp .Bl -bullet -compact .It QLogic NetXtreme II BCM57710 10Gb .It QLogic NetXtreme II BCM57711 10Gb .It QLogic NetXtreme II BCM57711E 10Gb .It QLogic NetXtreme II BCM57712 10Gb .It QLogic NetXtreme II BCM57712-MF 10Gb .It QLogic NetXtreme II BCM57800 10Gb .It QLogic NetXtreme II BCM57800-MF 10Gb .It QLogic NetXtreme II BCM57810 10Gb .It QLogic NetXtreme II BCM57810-MF 10Gb .It QLogic NetXtreme II BCM57840 10Gb / 20Gb .It QLogic NetXtreme II BCM57840-MF 10Gb .El .Sh CONFIGURATION There a number of configuration parameters that can be set to tweak the driver's behavior. These parameters can be set via the .Xr loader.conf 5 file to take affect during the next system boot. The following parameters affect ALL instances of the driver. .Bl -tag -width indent .It Va hw.bxe.debug DEFAULT = 0 .br Sets the default logging level of the driver. See the Diagnostics and Debugging section below for more details. .It Va hw.bxe.interrupt_mode DEFAULT = 2 .br Sets the default interrupt mode: 0=IRQ, 1=MSI, 2=MSIX. If set to MSIX and allocation fails, the driver will roll back and attempt MSI allocation. If MSI allocation fails, the driver will roll back and attempt fixed level IRQ allocation. If IRQ allocation fails, then the driver load fails. With MSI/MSIX, the driver attempts to allocate a vector for each queue in addition to one more for default processing. .It Va hw.bxe.queue_count DEFAULT = 4 .br Sets the default number of fast path packet processing queues. Note that one MSI/MSIX interrupt vector is allocated per-queue. .It Va hw.bxe.max_rx_bufs DEFAULT = 0 .br Sets the maximum number of receive buffers to allocate per-queue. Zero(0) means to allocate a receive buffer for every buffer descriptor. By default this equates to 4080 buffers per-queue which is the maximum value for this config parameter. .It Va hw.bxe.hc_rx_ticks DEFAULT = 25 .br Sets the number of ticks for host interrupt coalescing in the receive path. .It Va hw.bxe.hc_tx_ticks DEFAULT = 50 .br Sets the number of ticks for host interrupt coalescing in the transmit path. .It Va hw.bxe.rx_budget DEFAULT = 0xffffffff .br Sets the maximum number of receive packets to process in an interrupt. If the budget is reached then the remaining/pending packets will be processed in a scheduled taskqueue. .It Va hw.bxe.max_aggregation_size DEFAULT = 32768 .br Sets the maximum LRO aggregration byte size. The higher the value the more packets the hardware will aggregate. Maximum is 65K. .It Va hw.bxe.mrrs DEFAULT = -1 .br Sets the PCI MRRS: -1=Auto, 0=128B, 1=256B, 2=512B, 3=1KB .It Va hw.bxe.autogreeen DEFAULT = 0 .br Set AutoGrEEEN: 0=HW_DEFAULT, 1=FORCE_ON, 2=FORCE_OFF .It Va hw.bxe.udp_rss DEFAULT = 0 .br Enable/Disable 4-tuple RSS for UDP: 0=DISABLED, 1=ENABLED .El .Pp Special care must be taken when modifying the number of queues and receive buffers. -FreeBSD imposes a limit on the maximum number of +.Fx imposes a limit on the maximum number of .Xr mbuf 9 allocations. If buffer allocations fail, the interface initialization will fail and the interface will not be usable. The driver does not make a best effort for buffer allocations. It is an all or nothing effort. .Pp You can tweak the .Xr mbuf 9 allocation limit using .Xr sysctl 8 and view the current usage with .Xr netstat 1 as follows: .Bd -literal -offset indent # netstat -m # sysctl kern.ipc.nmbclusters # sysctl kern.ipc.nmbclusters=<#> .Ed .Pp There are additional configuration parameters that can be set on a per-instance basis to dynamically override the default configuration. The '#' below must be replaced with the driver instance / interface unit number: .Bl -tag -width indent .It Va dev.bxe.#.debug DEFAULT = 0 .br Sets the default logging level of the driver instance. See .Va hw.bxe.debug above and the Diagnostics and Debugging section below for more details. .It Va dev.bxe.#.rx_budget DEFAULT = 0xffffffff .br Sets the maximum number of receive packets to process in an interrupt for the driver instance. See .Va hw.bxe.rx_budget above for more details. .El .Pp Additional items can be configured using .Xr ifconfig 8 : .Bl -tag -width indent .It Va MTU - Maximum Transmission Unit DEFAULT = 1500 .br RANGE = 46-9184 .br # ifconfig bxe# mtu .It Va Promiscuous Mode DEFAULT = OFF .br # ifconfig bxe# [ promisc | -promisc ] .It Va Rx/Tx Checksum Offload DEFAULT = RX/TX CSUM ON .br Note that the Rx and Tx settings are not independent. .br # ifconfig bxe# [ rxcsum | -rxcsum | txcsum | -txcsum ] .It Va TSO - TCP Segmentation Offload DEFAULT = ON .br # ifconfig bxe# [ tso | -tso | tso6 | -tso6 ] .It Va LRO - TCP Large Receive Offload DEFAULT = ON .br # ifconfig bxe# [ lro | -lro ] .El .Sh DIAGNOSTICS AND DEBUGGING There are many statistics exposed by .Nm via .Xr sysctl 8 . .Pp To dump the default driver configuration: .Bd -literal -offset indent # sysctl -a | grep hw.bxe .Ed .Pp To dump every instance's configuration and detailed statistics: .Bd -literal -offset indent # sysctl -a | grep dev.bxe .Ed .Pp To dump information for a single instance (replace the '#' with the driver instance / interface unit number): .Bd -literal -offset indent # sysctl -a | grep dev.bxe.# .Ed .Pp To dump information for all the queues of a single instance: .Bd -literal -offset indent # sysctl -a | grep dev.bxe.#.queue .Ed .Pp To dump information for a single queue of a single instance (replace the additional '#' with the queue number): .Bd -literal -offset indent # sysctl -a | grep dev.bxe.#.queue.# .Ed .Pp The .Nm driver has the ability to dump a ton of debug messages to the system log. The default level of logging can be set with the .Va hw.bxe.debug .Xr sysctl 8 . Take care with this setting as it can result in too many logs being dumped. Since this parameter is the default one, it affects every instance and will dramatically change the timing in the driver. A better alternative to aid in debugging is to dynamically change the debug level of a specific instance with the .Va dev.bxe.#.debug .Xr sysctl 8 . This allows you to turn on/off logging of various debug groups on-the-fly. .Pp The different debug groups that can be toggled are: .Bd -literal -offset indent DBG_LOAD 0x00000001 /* load and unload */ DBG_INTR 0x00000002 /* interrupt handling */ DBG_SP 0x00000004 /* slowpath handling */ DBG_STATS 0x00000008 /* stats updates */ DBG_TX 0x00000010 /* packet transmit */ DBG_RX 0x00000020 /* packet receive */ DBG_PHY 0x00000040 /* phy/link handling */ DBG_IOCTL 0x00000080 /* ioctl handling */ DBG_MBUF 0x00000100 /* dumping mbuf info */ DBG_REGS 0x00000200 /* register access */ DBG_LRO 0x00000400 /* lro processing */ DBG_ASSERT 0x80000000 /* debug assert */ DBG_ALL 0xFFFFFFFF /* flying monkeys */ .Ed .Pp For example, to debug an issue in the receive path on bxe0: .Bd -literal -offset indent # sysctl dev.bxe.0.debug=0x22 .Ed .Pp When finished turn the logging back off: .Bd -literal -offset indent # sysctl dev.bxe.0.debug=0 .Ed .Sh SUPPORT For support questions please contact your QLogic approved reseller or QLogic Technical Support at .Pa http://support.qlogic.com , or by E-mail at .Aq Mt support@qlogic.com . .Sh SEE ALSO .Xr netstat 1 , .Xr altq 4 , .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm device driver first appeared in .Fx 9.0 . .Sh AUTHORS The .Nm driver was written by .An Eric Davis Aq Mt edavis@broadcom.com , .An David Christensen Aq Mt davidch@broadcom.com , and .An Gary Zambrano Aq Mt zambrano@broadcom.com . Index: head/share/man/man4/cyapa.4 =================================================================== --- head/share/man/man4/cyapa.4 (revision 360526) +++ head/share/man/man4/cyapa.4 (revision 360527) @@ -1,228 +1,230 @@ .\" Copyright (c) 2015 Michael Gmelin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd December 18, 2018 .Dt CYAPA 4 .Os .Sh NAME .Nm cyapa .Nd Cypress APA trackpad with I2C interface driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines into the kernel configuration file: .Bd -ragged -offset indent .Cd "device cyapa" .Cd "device ig4" .Cd "device iicbus" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent cyapa_load="YES" ig4_load="YES" .Ed .Pp On many Chromebook models this driver can be automatically configured with the help of the .Xr chromebook_platform 4 driver. Alternatively, the .Nm driver can be manually configured in .Pa /boot/device.hints : .Cd hint.cyapa.0.at="iicbus0" .Cd hint.cyapa.0.addr="0xCE" .Cd hint.cyapa.1.at="iicbus1" .Cd hint.cyapa.1.addr="0xCE" .Sh DESCRIPTION The .Nm driver provides support for the Cypress APA trackpad. It emulates the IntelliMouse PS/2 protocol. It supports basic mouse ioctls, so that .Xr moused 8 is supported properly. .Ss Trackpad layout .Bd -literal 2/3 1/3 +--------------------+------------+ | | Middle | | | Button | | Left | | | Button +------------+ | | Right | | | Button | +--------------------+............| | Thumb/Button Area | 15% +---------------------------------+ .Ed .Ss Trackpad features .Bl -tag -width 8n .It Va Two finger scrolling Use two fingers for Z axis scrolling. .It Va Button down/second finger While one finger clicks and holds down the touchpad, the second finger can be used to move the mouse cursor. This can be useful for drawing or selecting text. .It Va Thumb/Button area The lower 15% of the trackpad will not affect the mouse cursor position. This allows for high precision clicking, by controlling the cursor with the index finger and pushing/holding the pad down with the thumb. .It Va Trackpad button Push physical button. The left two thirds of the pad issues a LEFT button event. The upper right corner issues a MIDDLE button event. The lower right corner issues a RIGHT button. Optionally, tap to click can be enabled (see below). .El .Pp On a system using .Xr device.hints 5 , these values are configurable for .Nm : .Bl -tag -width "hint.cyapa.%d.addr" .It Va hint.cyapa.%d.at target .Xr iicbus 4 . .It Va hint.cyapa.%d.addr .Nm i2c address on the .Xr iicbus 4 . .El .Sh SYSCTL VARIABLES These .Xr sysctl 8 variables are available: .Bl -tag -width 8n .It Va debug.cyapa_idle_freq Scan frequency in idle mode, the default is 1. .It Va debug.cyapa_slow_freq Scan frequency in slow mode, the default is 20. .It Va debug.cyapa_norm_freq Scan frequency in normal mode, the default is 100. .It Va debug.cyapa_minpressure Minimum pressure to detect a finger, the default is 12. .It Va debug.cyapa_enable_tapclick Controls tap to click. Possible values: .Bl -tag -width 8n .It 0 Tap to click is disabled. This is the default value. .It 1 Tap to click always generates a left mouse button event. .It 2 Tap to click generates left mouse button event if the left 2/3rds of the pad are tapped and a right mouse button event otherwise. .It 3 Tap to click generates mouse button events as if the physical button was pressed (see .Sx DESCRIPTION above). .El .It Va debug.cyapa_tapclick_min_ticks Minimum tap duration in ticks to create a click, the default is 1. .It Va debug.cyapa_tapclick_max_ticks Maximum tap duration in ticks to create a click, the default is 8. .It Va debug.cyapa_move_min_ticks Minimum ticks before cursor movement occurs, the default is 4. .It Va debug.cyapa_scroll_wait_ticks Ticks to wait before starting to scroll, the default is 0. .It Va debug.cyapa_scroll_stick_ticks Ticks while preventing cursor movement on single finger after scroll, the default is 15. .It Va debug.cyapa_thumbarea_percent Size of bottom thumb area in percent, the default is 15. .It Va debug.cyapa_debug Setting this to a non-zero value enables debug output to console and syslog, the default is 0. .It Va debug.cyapa_reset Setting this to a non-zero value reinitializes the device. The sysctl resets to zero immediately. .El .Sh FILES .Nm creates .Pa /dev/cyapa0 , which presents the mouse as an .Ar IntelliMouse PS/2 device. It supports .Xr moused 8 levels 0 through 2, level 1 is used by default. .Sh EXAMPLES To use .Nm with .Xr moused 8 , add the following lines to the .Xr rc.conf 5 file: .Pp .Dl moused_enable="YES" .Dl moused_port="/dev/cyapa0" .Pp If vertical scrolling is not desired, add .Pp .Dl moused_flags="-l0" .Pp to .Xr rc.conf 5 . .Pp Enable tap to click for the left and the right mouse button and disable the thumb area by adding these lines to the .Xr sysctl.conf 5 file: .Pp .Dl debug.cyapa_thumbarea_percent=0 .Dl debug.cyapa_enable_tapclick=2 .Sh SEE ALSO .Xr chromebook_platform 4 , .Xr ig4 4 , .Xr iicbus 4 , .Xr sysmouse 4 , .Xr moused 8 .Sh AUTHORS .An -nosplit The original .Nm -driver was written for DragonFly BSD by +driver was written for +.Dx +by .An Matthew Dillon . .Pp It has been ported, modified, and enhanced for .Fx by .An Michael Gmelin Aq Mt freebsd@grem.de . .Pp This manual page was written by .An Michael Gmelin Aq Mt freebsd@grem.de . .Sh BUGS The .Nm driver detects the device from the I2C address. This might have unforeseen consequences if the initialization sequence is sent to an unknown device at that address. Index: head/share/man/man4/hv_vss.4 =================================================================== --- head/share/man/man4/hv_vss.4 (revision 360526) +++ head/share/man/man4/hv_vss.4 (revision 360527) @@ -1,367 +1,375 @@ .\" Copyright (c) 2016 Microsoft Corp. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .Dd October 12, 2016 .Dt HV_VSS 4 .Os .Sh NAME .Nm hv_vss .Nd Hyper-V Volume Shadow Copy Service API .Sh SYNOPSIS .In dev/hyperv/hv_snapshot.h .Bd -literal #define VSS_SUCCESS 0x00000000 #define VSS_FAIL 0x00000001 enum hv_vss_op_t { HV_VSS_NONE = 0, HV_VSS_CHECK, HV_VSS_FREEZE, HV_VSS_THAW, HV_VSS_COUNT }; struct hv_vss_opt_msg { uint32_t opt; /* operation */ uint32_t status; /* 0 for success, 1 for error */ uint64_t msgid; /* an ID used to identify the transaction */ uint8_t reserved[48]; /* reserved values are all zeroes */ }; .Ed .Sh DESCRIPTION The freeze or thaw functionality of application is important to guarantee -the application consistent backup. On windows platform, VSS is defined to do -live backup. But for VM guest running on Hyper-V, the corresponding VSS is -not defined yet. For example, a running database server instance, it knows when the -applications' freeze/thaw should start or finish. But it is not aware of -the freeze/thaw notification from Hyper-V host. The +the application consistent backup. +On windows platform, VSS is defined to do live backup. +But for VM guest running on Hyper-V, the corresponding VSS is +not defined yet. +For example, a running database server instance, it knows when the +applications' freeze/thaw should start or finish. +But it is not aware of the freeze/thaw notification from Hyper-V host. +The .Nm is designed to notify application freeze/thaw request. Thus, it plays a role of broker to forward the freeze/thaw command from Hyper-V host to userland application if it registered VSS service on .Fx VM, and sends the result back to Hyper-V host. .Pp Generally, .Xr hv_vss_daemon 8 takes the responsibility to freeze/thaw UFS file system, -and it is automatically launched after system boots. When Hyper-V host wants to -take a snapshot of the +and it is automatically launched after system boots. +When Hyper-V host wants to take a snapshot of the .Fx VM, it will first send VSS capability check to .Fx -VM. The +VM. +The .Nm received the request and forward the request to userland application if it is -registered. Only after +registered. +Only after .Nm received the VSS_SUCCESS response from application, the .Xr hv_vss_daemon 8 -will be informed to check whether file system freeze/thaw is supported. Any error -occurs during this period, +will be informed to check whether file system freeze/thaw is supported. +Any error occurs during this period, .Nm -will inform Hyper-V host that VSS is not supported. In addition, there is a default -timeout limit before sending response to Hyper-V host. +will inform Hyper-V host that VSS is not supported. +In addition, there is a default timeout limit before sending response to Hyper-V host. If the total response time from application and .Xr hv_vss_daemon 8 exceeds this value, timeout will occurs and VSS unsupported is responsed to Hyper-V host. .Pp After Hyper-V host confirmed the .Fx VM supports VSS, it will send freeze request to VM, and .Nm -will first forward it to application. After application finished freezing, it should -inform +will first forward it to application. +After application finished freezing, it should inform .Nm and file system level freezing will be triggered by -.Xr hv_vss_daemon 8 . After all freezing -on both application and +.Xr hv_vss_daemon 8 . +After all freezing on both application and .Xr hv_vss_daemon 8 were finished, the .Nm -will inform Hyper-V host that freezing is done. Of course, there is a timeout limit as -same as VSS capability is set to make sure freezing on +will inform Hyper-V host that freezing is done. +Of course, there is a timeout limit as same as VSS capability is set to make sure freezing on .Fx -VM is not hang. If there is any error occurs or timeout happened, the freezing is failed -on Hyper-V side. +VM is not hang. +If there is any error occurs or timeout happened, the freezing is failed on Hyper-V side. .Pp Hyper-V host will send thaw request after taking the snapshot, typically, this period is very short in order not to block the running application. .Nm firstly thaw the file system by notifying .Xr hv_vss_daemon 8 , then notifies user registered -application. There is also a timeout check before sending response to Hyper-V host. +application. +There is also a timeout check before sending response to Hyper-V host. .Pp All the default timeout limit used in VSS capability check, freeze or thaw is the same. It is 15 seconds currently. .Sh NOTES .Nm -only support UFS currently. If any of file system partition is non UFS, the VSS capability -check will fail. If application does not register VSS, +only support UFS currently. +If any of file system partition is non UFS, the VSS capability check will fail. +If application does not register VSS, .Nm -only support backup for file system level consistent. The device should be closed before it -was opened again. If you want to simultaneously open "/dev/hv_appvss_dev" two or more times, +only support backup for file system level consistent. +The device should be closed before it was opened again. +If you want to simultaneously open "/dev/hv_appvss_dev" two or more times, an error (-1) will be returned, and errno was set. .Pp If .Xr hv_vss_daemon 8 was killed after system boots, the VSS functionality will not work. .Sh EXAMPLES The following is a complete example which does nothing except for waiting 2 seconds when receiving those notifications from .Nm .Bd -literal #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define UNDEF_FREEZE_THAW (0) #define FREEZE (1) #define THAW (2) #define CHECK (3) #define VSS_LOG(priority, format, args...) do { \\ if (is_debugging == 1) { \\ if (is_daemon == 1) \\ syslog(priority, format, ## args); \\ else \\ printf(format, ## args); \\ } else { \\ if (priority < LOG_DEBUG) { \\ if (is_daemon == 1) \\ syslog(priority, format, ## args); \\ else \\ printf(format, ## args); \\ } \\ } \\ } while(0) #define CHECK_TIMEOUT 1 #define CHECK_FAIL 2 #define FREEZE_TIMEOUT 1 #define FREEZE_FAIL 2 #define THAW_TIMEOUT 1 #define THAW_FAIL 2 static int is_daemon = 1; static int is_debugging = 0; static int simu_opt_waiting = 2; // seconds #define GENERIC_OPT(TIMEOUT, FAIL) \\ do { \\ sleep(simu_opt_waiting); \\ if (opt == CHECK_TIMEOUT) { \\ sleep(simu_opt_waiting * 10); \\ VSS_LOG(LOG_INFO, "%s timeout simulation\\n", \\ __func__); \\ return (0); \\ } else if (opt == CHECK_FAIL) { \\ VSS_LOG(LOG_INFO, "%s failure simulation\\n", \\ __func__); \\ return (CHECK_FAIL); \\ } else { \\ VSS_LOG(LOG_INFO, "%s success simulation\\n", \\ __func__); \\ return (0); \\ } \\ } while (0) static int check(int opt) { GENERIC_OPT(CHECK_TIMEOUT, CHECK_FAIL); } static int freeze(int opt) { GENERIC_OPT(FREEZE_TIMEOUT, FREEZE_FAIL); } static int thaw(int opt) { GENERIC_OPT(THAW_TIMEOUT, THAW_FAIL); } static void usage(const char* cmd) { fprintf(stderr, "%s -f <0|1|2>: simulate app freeze." " 0: successful, 1: freeze timeout, 2: freeze failed\\n" " -c <0|1|2>: simulate vss feature check" " -t <0|1|2>: simulate app thaw." " 0: successful, 1: freeze timeout, 2: freeze failed\\n" " -d : enable debug mode\\n" " -n : run this tool under non-daemon mode\\n", cmd); } int main(int argc, char* argv[]) { int ch, freezesimuop = 0, thawsimuop = 0, checksimuop = 0, fd, r, error; uint32_t op; struct pollfd app_vss_fd[1]; struct hv_vss_opt_msg userdata; while ((ch = getopt(argc, argv, "f:c:t:dnh")) != -1) { switch (ch) { case 'f': /* Run as regular process for debugging purpose. */ freezesimuop = (int)strtol(optarg, NULL, 10); break; case 't': thawsimuop = (int)strtol(optarg, NULL, 10); break; case 'c': checksimuop = (int)strtol(optarg, NULL, 10); break; case 'd': is_debugging = 1; break; case 'n': is_daemon = 0; break; case 'h': default: usage(argv[0]); exit(0); } } openlog("APPVSS", 0, LOG_USER); /* Become daemon first. */ if (is_daemon == 1) daemon(1, 0); else VSS_LOG(LOG_DEBUG, "Run as regular process.\\n"); VSS_LOG(LOG_INFO, "HV_VSS starting; pid is: %d\\n", getpid()); fd = open(VSS_DEV(APP_VSS_DEV_NAME), O_RDWR); if (fd < 0) { VSS_LOG(LOG_ERR, "Fail to open %s, error: %d %s\\n", VSS_DEV(APP_VSS_DEV_NAME), errno, strerror(errno)); exit(EXIT_FAILURE); } app_vss_fd[0].fd = fd; app_vss_fd[0].events = POLLIN | POLLRDNORM; while (1) { r = poll(app_vss_fd, 1, INFTIM); VSS_LOG(LOG_DEBUG, "poll returned r = %d, revent = 0x%x\\n", r, app_vss_fd[0].revents); if (r == 0 || (r < 0 && errno == EAGAIN) || (r < 0 && errno == EINTR)) { /* Nothing to read */ continue; } if (r < 0) { /* * For poll return failure other than EAGAIN, * we want to exit. */ VSS_LOG(LOG_ERR, "Poll failed.\\n"); perror("poll"); exit(EIO); } /* Read from character device */ error = ioctl(fd, IOCHVVSSREAD, &userdata); if (error < 0) { VSS_LOG(LOG_ERR, "Read failed.\\n"); perror("pread"); exit(EIO); } if (userdata.status != 0) { VSS_LOG(LOG_ERR, "data read error\\n"); continue; } op = userdata.opt; switch (op) { case HV_VSS_CHECK: error = check(checksimuop); break; case HV_VSS_FREEZE: error = freeze(freezesimuop); break; case HV_VSS_THAW: error = thaw(thawsimuop); break; default: VSS_LOG(LOG_ERR, "Illegal operation: %d\\n", op); error = VSS_FAIL; } if (error) userdata.status = VSS_FAIL; else userdata.status = VSS_SUCCESS; error = ioctl(fd, IOCHVVSSWRITE, &userdata); if (error != 0) { VSS_LOG(LOG_ERR, "Fail to write to device\\n"); exit(EXIT_FAILURE); } else { VSS_LOG(LOG_INFO, "Send response %d for %s to kernel\\n", userdata.status, op == HV_VSS_FREEZE ? "Freeze" : (op == HV_VSS_THAW ? "Thaw" : "Check")); } } return 0; } .Ed .Sh SEE ALSO .Xr hv_utils 4 , .Xr hv_vss_daemon 8 .Sh HISTORY The daemon was introduced in October 2016 and developed by Microsoft Corp. .Sh AUTHORS .An -nosplit .Fx support for .Nm was first added by .An Microsoft BSD Integration Services Team Aq Mt bsdic@microsoft.com . Index: head/share/man/man4/ig4.4 =================================================================== --- head/share/man/man4/ig4.4 (revision 360526) +++ head/share/man/man4/ig4.4 (revision 360527) @@ -1,82 +1,84 @@ .\" Copyright (c) 2015 Michael Gmelin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd September 13, 2018 .Dt IG4 4 .Os .Sh NAME .Nm ig4 .Nd Synopsys DesignWare I2C Controller .Sh SYNOPSIS To compile this driver into the kernel, place the following lines into the kernel configuration file: .Bd -ragged -offset indent .Cd "device ig4" .Cd "device iicbus" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent ig4_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides access to peripherals attached to an I2C controller. .Sh HARDWARE .Nm supports the I2C controllers based on Synopsys DesignWare IP that can be found in Intel(R) Core(TM) processors starting from the fourth generation, Intel(R) Bay Trail, Apollo Lake SoC families, and some AMD systems. .Sh SYSCTL VARIABLES These .Xr sysctl 8 variables are available: .Bl -tag -width "debug.ig4_dump" .It Va debug.ig4_dump This sysctl is a zero-based bit mask. When any of the bits are set, a register dump is printed for every I2C transfer on an .Nm device with the same unit number. .El .Sh SEE ALSO .Xr iic 4 , .Xr iicbus 4 .Sh AUTHORS .An -nosplit The .Nm -driver was written for DragonFly BSD by +driver was written for +.Dx +by .An Matthew Dillon and subsequently ported to .Fx by .An Michael Gmelin Aq Mt freebsd@grem.de . .Pp This manual page was written by .An Michael Gmelin Aq Mt freebsd@grem.de . Index: head/share/man/man4/pchtherm.4 =================================================================== --- head/share/man/man4/pchtherm.4 (revision 360526) +++ head/share/man/man4/pchtherm.4 (revision 360527) @@ -1,117 +1,117 @@ .\" .\" Copyright (c) 2020 Takanori Watanabe .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd March 15, 2020 .Dt pchtherm 4 .Os .Sh NAME .Nm pchtherm .Nd Intel PCH thermal subsystem .Sh SYNOPSIS .Cd "device pci" .Cd "device pchtherm" .Sh DESCRIPTION The .Nm -driver provides access to sensor data and configuration +driver provides access to sensor data and configuration installed in Intel PCH chipset. .Nm configuration register. .Pp The access to .Nm data is made via the .Xr sysctl 8 interface: .Bd -literal dev.pchtherm.0.ctt: 115.0C dev.pchtherm.0.temperature: 28.5C dev.pchtherm.0.t2temp: 91.0C dev.pchtherm.0.t1temp: 86.0C dev.pchtherm.0.t0temp: 81.0C dev.pchtherm.0.tahv: 83.0C dev.pchtherm.0.talv: 30.0C dev.pchtherm.0.pmtime: 32 dev.pchtherm.0.pmtemp: 50.0C dev.pchtherm.0.%parent: pci0 dev.pchtherm.0.%pnpinfo: vendor=0x8086 device=0x9d31 subvendor=0x17aa subdevice=0x2256 class=0x118000 dev.pchtherm.0.%location: slot=20 function=2 dbsf=pci0:0:20:2 dev.pchtherm.0.%driver: pchtherm dev.pchtherm.0.%desc: Skylake PCH Thermal Subsystem -dev.pchtherm.%parent: +dev.pchtherm.%parent: .Ed .Bl -tag -width ".Va dev.pchtherm.%d.pch_hot_level" .It Va dev.pchtherm.%d.temperature Is the read-only value of the current temperature read by the sensor. .It Va dev.pchtherm.%d.ctt When the system reaches this temperature, it will shut down. This will not appear when this feature is disabled and locked down. .It Va dev.pchtherm.%d.t0temp When temperature is under this value, system will be in T0 state. .It Va dev.pchtherm.%d.t1temp When temperature is over .Va t0temp and under this value, system will be in T1 state. .It Va dev.pchtherm.%d.t2temp When temperature is over .Va t1temp and under this value, system will be in T2 state. Over this value, system will be in T3 state. .It Va dev.pchtherm.%d.talv Lower alart value. This will not appear when sensor enable bit is locked down and the value is zero(which will show -50.0C). .It Va dev.pchtherm.%d.tahv High alart value. This will not appear when sensor enable bit is locked down and the value is zero(which will show -50.0C). .It Va dev.pchtherm.%d.pmtemp Sensor Power management temperature. Under this temperature, sensor will idle during .Va pmtime second. .It Va dev.pchtherm.%d.pmtime Sensor idle duration when low temperature. .It Va dev.pchtherm.%d.pch_hot_level When temperature is higher than this value, PCHHOT# pin will assert. This value is not appear when this feature is disabled and locked down. .El .Pp Please check the PCH datasheets for more details. .Pp -.Sh CAVEAT +.Sh CAVEATS All values are read-only. And it do not support event interrupt for now. .Sh SEE ALSO .Xr sysctl 8 .Sh HISTORY The .Nm driver first appeared in .Fx 13.0 . .Sh AUTHORS .An -nosplit The .Nm driver and this manual page were written by .An Takanori Watanabe Aq Mt takawata@FreeBSD.org . Index: head/share/man/man4/ppbus.4 =================================================================== --- head/share/man/man4/ppbus.4 (revision 360526) +++ head/share/man/man4/ppbus.4 (revision 360527) @@ -1,348 +1,348 @@ .\" Copyright (c) 1998, 1999 Nicolas Souchu .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd March 1, 1998 .Dt PPBUS 4 .Os .Sh NAME .Nm ppbus .Nd Parallel Port Bus system .Sh SYNOPSIS .Cd "device ppbus" .Pp .Cd "device lpt" .Cd "device plip" .Cd "device ppi" .Cd "device pps" .Cd "device lpbb" .Sh DESCRIPTION The .Em ppbus system provides a uniform, modular and architecture-independent system for the implementation of drivers to control various parallel devices, and to utilize different parallel port chipsets. .Sh DEVICE DRIVERS In order to write new drivers or port existing drivers, the ppbus system provides the following facilities: .Bl -bullet -offset indent .It architecture-independent macros or functions to access parallel ports .It mechanism to allow various devices to share the same parallel port .It a user interface named .Xr ppi 4 that allows parallel port access from outside the kernel without conflicting with kernel-in drivers. .El .Ss Developing new drivers The ppbus system has been designed to support the development of standard and non-standard software: .Pp .Bl -column "Driver" -compact .It Em Driver Ta Em Description .It Sy ppi Ta "Parallel port interface for general I/O" .It Sy pps Ta "Pulse per second Timing Interface" .It Sy lpbb Ta "Philips official parallel port I2C bit-banging interface" .El .Ss Porting existing drivers Another approach to the ppbus system is to port existing drivers. Various drivers have already been ported: .Pp .Bl -column "Driver" -compact .It Em Driver Ta Em Description .It Sy lpt Ta "lpt printer driver" .It Sy plip Ta "lp parallel network interface driver" .El .Pp ppbus should let you port any other software even from other operating systems that provide similar services. .Sh PARALLEL PORT CHIPSETS Parallel port chipset support is provided by .Xr ppc 4 . .Pp The ppbus system provides functions and macros to allocate a new parallel port bus, then initialize it and upper peripheral device drivers. .Pp ppc makes chipset detection and initialization and then calls ppbus attach functions to initialize the ppbus system. .Sh PARALLEL PORT MODEL The logical parallel port model chosen for the ppbus system is the PC's parallel port model. Consequently, for the i386 implementation of ppbus, most of the services provided by ppc are macros for inb() and outb() calls. -But, for an other architecture, accesses to one of our logical +But, for another architecture, accesses to one of our logical registers (data, status, control...) may require more than one I/O access. .Ss Description The parallel port may operate in the following modes: .Bl -bullet -offset indent .It compatible mode, also called Centronics mode .It bidirectional 8/4-bits mode, also called NIBBLE mode .It byte mode, also called PS/2 mode .It Extended Capability Port mode, ECP .It Enhanced Parallel Port mode, EPP .It mixed ECP+EPP or ECP+PS/2 modes .El .Ss Compatible mode This mode defines the protocol used by most PCs to transfer data to a printer. In this mode, data is placed on the port's data lines, the printer status is checked for no errors and that it is not busy, and then a data Strobe is generated by the software to clock the data to the printer. .Pp Many I/O controllers have implemented a mode that uses a FIFO buffer to transfer data with the Compatibility mode protocol. This mode is referred to as "Fast Centronics" or "Parallel Port FIFO mode". .Ss Bidirectional mode The NIBBLE mode is the most common way to get reverse channel data from a printer or peripheral. Combined with the standard host to printer mode, it provides a complete bidirectional channel. .Pp In this mode, outputs are 8-bits long. Inputs are accomplished by reading 4 of the 8 bits of the status register. .Ss Byte mode In this mode, the data register is used either for outputs and inputs. Then, any transfer is 8-bits long. .Ss Extended Capability Port mode The ECP protocol was proposed as an advanced mode for communication with printer and scanner type peripherals. Like the EPP protocol, ECP mode provides for a high performance bidirectional communication path between the host adapter and the peripheral. .Pp ECP protocol features include: .Bl -item -offset indent .It Run_Length_Encoding (RLE) data compression for host adapters .It FIFOs for both the forward and reverse channels .It DMA as well as programmed I/O for the host register interface. .El .Ss Enhanced Parallel Port mode The EPP protocol was originally developed as a means to provide a high performance parallel port link that would still be compatible with the standard parallel port. .Pp The EPP mode has two types of cycle: address and data. What makes the difference at hardware level is the strobe of the byte placed on the data lines. Data are strobed with nAutofeed, addresses are strobed with nSelectin signals. .Pp A particularity of the ISA implementation of the EPP protocol is that an EPP cycle fits in an ISA cycle. In this fashion, parallel port peripherals can operate at close to the same performance levels as an equivalent ISA plug-in card. .Pp At software level, you may implement the protocol you wish, using data and address cycles as you want. This is for the IEEE1284 compatible part. Then, peripheral vendors may implement protocol handshake with the following status lines: PError, nFault and Select. Try to know how these lines toggle with your peripheral, allowing the peripheral to request more data, stop the transfer and so on. .Pp At any time, the peripheral may interrupt the host with the nAck signal without disturbing the current transfer. .Ss Mixed modes Some manufacturers, like SMC, have implemented chipsets that support mixed modes. With such chipsets, mode switching is available at any time by accessing the extended control register. .Sh IEEE1284-1994 Standard .Ss Background This standard is also named "IEEE Standard Signaling Method for a Bidirectional Parallel Peripheral Interface for Personal Computers". It defines a signaling method for asynchronous, fully interlocked, bidirectional parallel communications between hosts and printers or other peripherals. It also specifies a format for a peripheral identification string and a method of returning this string to the host outside of the bidirectional data stream. .Pp This standard is architecture independent and only specifies dialog handshake at signal level. One should refer to architecture specific documentation in order to manipulate machine dependent registers, mapped memory or other methods to control these signals. .Pp The IEEE1284 protocol is fully oriented with all supported parallel port modes. The computer acts as master and the peripheral as slave. .Pp Any transfer is defined as a finite state automaton. It allows software to properly manage the fully interlocked scheme of the signaling method. The compatible mode is supported "as is" without any negotiation because it is compatible. Any other mode must be firstly negotiated by the host to check it is supported by the peripheral, then to enter one of the forward idle states. .Pp At any time, the slave may want to send data to the host. This is only possible from forward idle states (nibble, byte, ecp...). So, the host must have previously negotiated to permit the peripheral to request transfer. Interrupt lines may be dedicated to the requesting signals to prevent time consuming polling methods. .Pp But peripheral requests are only a hint to the master host. If the host accepts the transfer, it must firstly negotiate the reverse mode and then starts the transfer. At any time during reverse transfer, the host may terminate the transfer or the slave may drive wires to signal that no more data is available. .Ss Implementation IEEE1284 Standard support has been implemented at the top of the ppbus system as a set of procedures that perform high level functions like negotiation, termination, transfer in any mode without bothering you with low level characteristics of the standard. .Pp IEEE1284 interacts with the ppbus system as little as possible. That means you still have to request the ppbus when you want to access it, the negotiate function does not do it for you. And of course, release it later. .Sh ARCHITECTURE .Ss adapter, ppbus and device layers First, there is the .Em adapter layer, the lowest of the ppbus system. It provides chipset abstraction throw a set of low level functions that maps the logical model to the underlying hardware. .Pp Secondly, there is the .Em ppbus layer that provides functions to: .Bl -enum -offset indent .It share the parallel port bus among the daisy-chain like connected devices .It manage devices linked to ppbus .It propose an arch-independent interface to access the hardware layer. .El .Pp Finally, the .Em device layer gathers the parallel peripheral device drivers. .Ss Parallel modes management We have to differentiate operating modes at various ppbus system layers. Actually, ppbus and adapter operating modes on one hands and for each one, current and available modes are separated. .Pp With this level of abstraction a particular chipset may commute from any native mode to any other mode emulated with extended modes without disturbing upper layers. For example, most chipsets support NIBBLE mode as native and emulated with ECP and/or EPP. .Pp This architecture should support IEEE1284-1994 modes. .Sh FEATURES .Ss The boot process The boot process starts with the probe stage of the .Xr ppc 4 driver during ISA bus (PC architecture) initialization. During attachment of the ppc driver, a new ppbus structure is allocated, then probe and attachment for this new bus node are called. .Pp ppbus attachment tries to detect any PnP parallel peripheral (according to .%T "Plug and Play Parallel Port Devices" draft from (c)1993-4 Microsoft Corporation) then probes and attaches known device drivers. .Pp During probe, device drivers are supposed to request the ppbus and try to set their operating mode. This mode will be saved in the context structure and returned each time the driver requests the ppbus. .Ss Bus allocation and interrupts ppbus allocation is mandatory not to corrupt I/O of other devices. Another usage of ppbus allocation is to reserve the port and receive incoming interrupts. .Pp High level interrupt handlers are connected to the ppbus system thanks to the newbus .Fn BUS_SETUP_INTR and .Fn BUS_TEARDOWN_INTR functions. But, in order to attach a handler, drivers must own the bus. Consequently, a ppbus request is mandatory in order to call the above functions (see existing drivers for more info). Note that the interrupt handler is automatically released when the ppbus is released. .Ss Microsequences .Em Microsequences is a general purpose mechanism to allow fast low-level manipulation of the parallel port. Microsequences may be used to do either standard (in IEEE1284 modes) or non-standard transfers. The philosophy of microsequences is to avoid the overhead of the ppbus layer and do most of the job at adapter level. .Pp A microsequence is an array of opcodes and parameters. Each opcode codes an operation (opcodes are described in .Xr microseq 9 ) . Standard I/O operations are implemented at ppbus level whereas basic I/O operations and microseq language are coded at adapter level for efficiency. .Sh SEE ALSO .Xr lpt 4 , .Xr plip 4 , .Xr ppc 4 , .Xr ppi 4 , .Sh HISTORY The .Nm manual page first appeared in .Fx 3.0 . .Sh AUTHORS This manual page was written by .An Nicolas Souchu .