mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
Networking changes for 6.16.
Core ---- - Implement the Device Memory TCP transmit path, allowing zero-copy data transmission on top of TCP from e.g. GPU memory to the wire. - Move all the IPv6 routing tables management outside the RTNL scope, under its own lock and RCU. The route control path is now 3x times faster. - Convert queue related netlink ops to instance lock, reducing again the scope of the RTNL lock. This improves the control plane scalability. - Refactor the software crc32c implementation, removing unneeded abstraction layers and improving significantly the related micro-benchmarks. - Optimize the GRO engine for UDP-tunneled traffic, for a 10% performance improvement in related stream tests. - Cover more per-CPU storage with local nested BH locking; this is a prep work to remove the current per-CPU lock in local_bh_disable() on PREMPT_RT. - Introduce and use nlmsg_payload helper, combining buffer bounds verification with accessing payload carried by netlink messages. Netfilter --------- - Rewrite the procfs conntrack table implementation, improving considerably the dump performance. A lot of user-space tools still use this interface. - Implement support for wildcard netdevice in netdev basechain and flowtables. - Integrate conntrack information into nft trace infrastructure. - Export set count and backend name to userspace, for better introspection. BPF --- - BPF qdisc support: BPF-qdisc can be implemented with BPF struct_ops programs and can be controlled in similar way to traditional qdiscs using the "tc qdisc" command. - Refactor the UDP socket iterator, addressing long standing issues WRT duplicate hits or missed sockets. Protocols --------- - Improve TCP receive buffer auto-tuning and increase the default upper bound for the receive buffer; overall this improves the single flow maximum thoughput on 200Gbs link by over 60%. - Add AFS GSSAPI security class to AF_RXRPC; it provides transport security for connections to the AFS fileserver and VL server. - Improve TCP multipath routing, so that the sources address always matches the nexthop device. - Introduce SO_PASSRIGHTS for AF_UNIX, to allow disabling SCM_RIGHTS, and thus preventing DoS caused by passing around problematic FDs. - Retire DCCP socket. DCCP only receives updates for bugs, and major distros disable it by default. Its removal allows for better organisation of TCP fields to reduce the number of cache lines hit in the fast path. - Extend TCP drop-reason support to cover PAWS checks. Driver API ---------- - Reorganize PTP ioctl flag support to require an explicit opt-in for the drivers, avoiding the problem of drivers not rejecting new unsupported flags. - Converted several device drivers to timestamping APIs. - Introduce per-PHY ethtool dump helpers, improving the support for dump operations targeting PHYs. Tests and tooling ----------------- - Add support for classic netlink in user space C codegen, so that ynl-c can now read, create and modify links, routes addresses and qdisc layer configuration. - Add ynl sub-types for binary attributes, allowing ynl-c to output known struct instead of raw binary data, clarifying the classic netlink output. - Extend MPTCP selftests to improve the code-coverage. - Add tests for XDP tail adjustment in AF_XDP. New hardware / drivers ---------------------- - OpenVPN virtual driver: offload OpenVPN data channels processing to the kernel-space, increasing the data transfer throughput WRT the user-space implementation. - Renesas glue driver for the gigabit ethernet RZ/V2H(P) SoC. - Broadcom asp-v3.0 ethernet driver. - AMD Renoir ethernet device. - ReakTek MT9888 2.5G ethernet PHY driver. - Aeonsemi 10G C45 PHYs driver. Drivers ------- - Ethernet high-speed NICs: - nVidia/Mellanox (mlx5): - refactor the stearing table handling to reduce significantly the amount of memory used - add support for complex matches in H/W flow steering - improve flow streeing error handling - convert to netdev instance locking - Intel (100G, ice, igb, ixgbe, idpf): - ice: add switchdev support for LLDP traffic over VF - ixgbe: add firmware manipulation and regions devlink support - igb: introduce support for frame transmission premption - igb: adds persistent NAPI configuration - idpf: introduce RDMA support - idpf: add initial PTP support - Meta (fbnic): - extend hardware stats coverage - add devlink dev flash support - Broadcom (bnxt): - add support for RX-side device memory TCP - Wangxun (txgbe): - implement support for udp tunnel offload - complete PTP and SRIOV support for AML 25G/10G devices - Ethernet NICs embedded and virtual: - Google (gve): - add device memory TCP TX support - Amazon (ena): - support persistent per-NAPI config - Airoha: - add H/W support for L2 traffic offload - add per flow stats for flow offloading - RealTek (rtl8211): add support for WoL magic packet - Synopsys (stmmac): - dwmac-socfpga 1000BaseX support - add Loongson-2K3000 support - introduce support for hardware-accelerated VLAN stripping - Broadcom (bcmgenet): - expose more H/W stats - Freescale (enetc, dpaa2-eth): - enetc: add MAC filter, VLAN filter RSS and loopback support - dpaa2-eth: convert to H/W timestamping APIs - vxlan: convert FDB table to rhashtable, for better scalabilty - veth: apply qdisc backpressure on full ring to reduce TX drops - Ethernet switches: - Microchip (kzZ88x3): add ETS scheduler support - Ethernet PHYs: - RealTek (rtl8211): - add support for WoL magic packet - add support for PHY LEDs - CAN: - Adds RZ/G3E CANFD support to the rcar_canfd driver. - Preparatory work for CAN-XL support. - Add self-tests framework with support for CAN physical interfaces. - WiFi: - mac80211: - scan improvements with multi-link operation (MLO) - Qualcomm (ath12k): - enable AHB support for IPQ5332 - add monitor interface support to QCN9274 - add multi-link operation support to WCN7850 - add 802.11d scan offload support to WCN7850 - monitor mode for WCN7850, better 6 GHz regulatory - Qualcomm (ath11k): - restore hibernation support - MediaTek (mt76): - WiFi-7 improvements - implement support for mt7990 - Intel (iwlwifi): - enhanced multi-link single-radio (EMLSR) support on 5 GHz links - rework device configuration - RealTek (rtw88): - improve throughput for RTL8814AU - RealTek (rtw89): - add multi-link operation support - STA/P2P concurrency improvements - support different SAR configs by antenna - Bluetooth: - introduce HCI Driver protocol - btintel_pcie: do not generate coredump for diagnostic events - btusb: add HCI Drv commands for configuring altsetting - btusb: add RTL8851BE device 0x0bda:0xb850 - btusb: add new VID/PID 13d3/3584 for MT7922 - btusb: add new VID/PID 13d3/3630 and 13d3/3613 for MT7925 - btnxpuart: implement host-wakeup feature Signed-off-by: Paolo Abeni <pabeni@redhat.com> -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEg1AjqC77wbdLX2LbKSR5jcyPE6QFAmg3D64SHHBhYmVuaUBy ZWRoYXQuY29tAAoJECkkeY3MjxOkcIsQAK2eEc+BxQer975wzvtMg6gF9eoex4a+ rZ7jxfDzDtNvTauoQsrpehDZp0FnySaVGCU36lHGB2OvDnhCpPc5hXzKDWQpOuqQ SHrGG3/6FTbdTG/HfHUcbNyrUzIf53SADSObiQ3qg4gyEQ3sCpcOKtVtMcU8rvsY /HqMnsJWFaROUMjMtCcnUSgjmeY9kBvha3sTXUqgeRugEOCvZD7z4rpqFIcQqHw7 e2Fi8dwIXEYNxqPp6MRq2qdyUTewCRruE8ZIMAFuhtfYeMElUZMPlqlMENX3AzTQ cr0EgwcFOUxRA7oZRxhoBNBsVXavtSpQr4ZDoWplxP4aQ37n5tc1E9Q72axpB/Og FbJRl6GvWYnCd8071BczgmfHlKaTAigPvt2Z4r6JjM5I/Bij/IZ3k+On1OTuOAj/ EqfFkdZ0a5cfKrwUMP+oSGtSAywkMVUtnIKJlZeRbjSj2432sCfe2jVAlS8ELM43 3LUgXYrAKtA87g171LlsRu5EEpI5QmqPb+i5LpPlEXe2TJEgPisyfecJ3NafF/2+ j575lm+TFNm9NTNhGGjDPEvw0djI5wSGGMe9J4gC74eWi6s5t6C4cuUf84TKWdwR x+9H0IB7rfFncAwXHJuUUtzd+fPHaYzs5dDGbSgMQOXr1cr1wlubCK8mQ1r/Wt/a 3GjFIOQKW2Q5 =t/Tz -----END PGP SIGNATURE----- Merge tag 'net-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "Core: - Implement the Device Memory TCP transmit path, allowing zero-copy data transmission on top of TCP from e.g. GPU memory to the wire. - Move all the IPv6 routing tables management outside the RTNL scope, under its own lock and RCU. The route control path is now 3x times faster. - Convert queue related netlink ops to instance lock, reducing again the scope of the RTNL lock. This improves the control plane scalability. - Refactor the software crc32c implementation, removing unneeded abstraction layers and improving significantly the related micro-benchmarks. - Optimize the GRO engine for UDP-tunneled traffic, for a 10% performance improvement in related stream tests. - Cover more per-CPU storage with local nested BH locking; this is a prep work to remove the current per-CPU lock in local_bh_disable() on PREMPT_RT. - Introduce and use nlmsg_payload helper, combining buffer bounds verification with accessing payload carried by netlink messages. Netfilter: - Rewrite the procfs conntrack table implementation, improving considerably the dump performance. A lot of user-space tools still use this interface. - Implement support for wildcard netdevice in netdev basechain and flowtables. - Integrate conntrack information into nft trace infrastructure. - Export set count and backend name to userspace, for better introspection. BPF: - BPF qdisc support: BPF-qdisc can be implemented with BPF struct_ops programs and can be controlled in similar way to traditional qdiscs using the "tc qdisc" command. - Refactor the UDP socket iterator, addressing long standing issues WRT duplicate hits or missed sockets. Protocols: - Improve TCP receive buffer auto-tuning and increase the default upper bound for the receive buffer; overall this improves the single flow maximum thoughput on 200Gbs link by over 60%. - Add AFS GSSAPI security class to AF_RXRPC; it provides transport security for connections to the AFS fileserver and VL server. - Improve TCP multipath routing, so that the sources address always matches the nexthop device. - Introduce SO_PASSRIGHTS for AF_UNIX, to allow disabling SCM_RIGHTS, and thus preventing DoS caused by passing around problematic FDs. - Retire DCCP socket. DCCP only receives updates for bugs, and major distros disable it by default. Its removal allows for better organisation of TCP fields to reduce the number of cache lines hit in the fast path. - Extend TCP drop-reason support to cover PAWS checks. Driver API: - Reorganize PTP ioctl flag support to require an explicit opt-in for the drivers, avoiding the problem of drivers not rejecting new unsupported flags. - Converted several device drivers to timestamping APIs. - Introduce per-PHY ethtool dump helpers, improving the support for dump operations targeting PHYs. Tests and tooling: - Add support for classic netlink in user space C codegen, so that ynl-c can now read, create and modify links, routes addresses and qdisc layer configuration. - Add ynl sub-types for binary attributes, allowing ynl-c to output known struct instead of raw binary data, clarifying the classic netlink output. - Extend MPTCP selftests to improve the code-coverage. - Add tests for XDP tail adjustment in AF_XDP. New hardware / drivers: - OpenVPN virtual driver: offload OpenVPN data channels processing to the kernel-space, increasing the data transfer throughput WRT the user-space implementation. - Renesas glue driver for the gigabit ethernet RZ/V2H(P) SoC. - Broadcom asp-v3.0 ethernet driver. - AMD Renoir ethernet device. - ReakTek MT9888 2.5G ethernet PHY driver. - Aeonsemi 10G C45 PHYs driver. Drivers: - Ethernet high-speed NICs: - nVidia/Mellanox (mlx5): - refactor the steering table handling to significantly reduce the amount of memory used - add support for complex matches in H/W flow steering - improve flow streeing error handling - convert to netdev instance locking - Intel (100G, ice, igb, ixgbe, idpf): - ice: add switchdev support for LLDP traffic over VF - ixgbe: add firmware manipulation and regions devlink support - igb: introduce support for frame transmission premption - igb: adds persistent NAPI configuration - idpf: introduce RDMA support - idpf: add initial PTP support - Meta (fbnic): - extend hardware stats coverage - add devlink dev flash support - Broadcom (bnxt): - add support for RX-side device memory TCP - Wangxun (txgbe): - implement support for udp tunnel offload - complete PTP and SRIOV support for AML 25G/10G devices - Ethernet NICs embedded and virtual: - Google (gve): - add device memory TCP TX support - Amazon (ena): - support persistent per-NAPI config - Airoha: - add H/W support for L2 traffic offload - add per flow stats for flow offloading - RealTek (rtl8211): add support for WoL magic packet - Synopsys (stmmac): - dwmac-socfpga 1000BaseX support - add Loongson-2K3000 support - introduce support for hardware-accelerated VLAN stripping - Broadcom (bcmgenet): - expose more H/W stats - Freescale (enetc, dpaa2-eth): - enetc: add MAC filter, VLAN filter RSS and loopback support - dpaa2-eth: convert to H/W timestamping APIs - vxlan: convert FDB table to rhashtable, for better scalabilty - veth: apply qdisc backpressure on full ring to reduce TX drops - Ethernet switches: - Microchip (kzZ88x3): add ETS scheduler support - Ethernet PHYs: - RealTek (rtl8211): - add support for WoL magic packet - add support for PHY LEDs - CAN: - Adds RZ/G3E CANFD support to the rcar_canfd driver. - Preparatory work for CAN-XL support. - Add self-tests framework with support for CAN physical interfaces. - WiFi: - mac80211: - scan improvements with multi-link operation (MLO) - Qualcomm (ath12k): - enable AHB support for IPQ5332 - add monitor interface support to QCN9274 - add multi-link operation support to WCN7850 - add 802.11d scan offload support to WCN7850 - monitor mode for WCN7850, better 6 GHz regulatory - Qualcomm (ath11k): - restore hibernation support - MediaTek (mt76): - WiFi-7 improvements - implement support for mt7990 - Intel (iwlwifi): - enhanced multi-link single-radio (EMLSR) support on 5 GHz links - rework device configuration - RealTek (rtw88): - improve throughput for RTL8814AU - RealTek (rtw89): - add multi-link operation support - STA/P2P concurrency improvements - support different SAR configs by antenna - Bluetooth: - introduce HCI Driver protocol - btintel_pcie: do not generate coredump for diagnostic events - btusb: add HCI Drv commands for configuring altsetting - btusb: add RTL8851BE device 0x0bda:0xb850 - btusb: add new VID/PID 13d3/3584 for MT7922 - btusb: add new VID/PID 13d3/3630 and 13d3/3613 for MT7925 - btnxpuart: implement host-wakeup feature" * tag 'net-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1611 commits) selftests/bpf: Fix bpf selftest build warning selftests: netfilter: Fix skip of wildcard interface test net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames net: openvswitch: Fix the dead loop of MPLS parse calipso: Don't call calipso functions for AF_INET sk. selftests/tc-testing: Add a test for HFSC eltree double add with reentrant enqueue behaviour on netem net_sched: hfsc: Address reentrant enqueue adding class to eltree twice octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback octeontx2-pf: QOS: Perform cache sync on send queue teardown net: mana: Add support for Multi Vports on Bare metal net: devmem: ncdevmem: remove unused variable net: devmem: ksft: upgrade rx test to send 1K data net: devmem: ksft: add 5 tuple FS support net: devmem: ksft: add exit_wait to make rx test pass net: devmem: ksft: add ipv4 support net: devmem: preserve sockc_err page_pool: fix ugly page_pool formatting net: devmem: move list_add to net_devmem_bind_dmabuf. selftests: netfilter: nft_queue.sh: include file transfer duration in log message net: phy: mscc: Fix memory leak when using one step timestamping ...
This commit is contained in:
commit
1b98f357da
@ -196,7 +196,7 @@ will see the assembler code for the routine shown, but if your kernel has
|
||||
debug symbols the C code will also be available. (Debug symbols can be enabled
|
||||
in the kernel hacking menu of the menu configuration.) For example::
|
||||
|
||||
$ objdump -r -S -l --disassemble net/dccp/ipv4.o
|
||||
$ objdump -r -S -l --disassemble net/ipv4/tcp.o
|
||||
|
||||
.. note::
|
||||
|
||||
|
122
Documentation/devicetree/bindings/net/aeonsemi,as21xxx.yaml
Normal file
122
Documentation/devicetree/bindings/net/aeonsemi,as21xxx.yaml
Normal file
@ -0,0 +1,122 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/aeonsemi,as21xxx.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Aeonsemi AS21XXX Ethernet PHY
|
||||
|
||||
maintainers:
|
||||
- Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
description: |
|
||||
Aeonsemi AS21xxx Ethernet PHYs requires a firmware to be loaded to actually
|
||||
work. The same firmware is compatible with various PHYs of the same family.
|
||||
|
||||
A PHY with not firmware loaded will be exposed on the MDIO bus with ID
|
||||
0x7500 0x7500 or 0x7500 0x9410 on C45 registers.
|
||||
|
||||
This can be done and is implemented by OEM in 2 different way:
|
||||
- Attached SPI flash directly to the PHY with the firmware. The PHY
|
||||
will self load the firmware in the presence of this configuration.
|
||||
- Manually provided firmware loaded from a file in the filesystem.
|
||||
|
||||
Each PHY can support up to 5 LEDs.
|
||||
|
||||
AS2xxx PHY Name logic:
|
||||
|
||||
AS21x1xxB1
|
||||
^ ^^
|
||||
| |J: Supports SyncE/PTP
|
||||
| |P: No SyncE/PTP support
|
||||
| 1: Supports 2nd Serdes
|
||||
| 2: Not 2nd Serdes support
|
||||
0: 10G, 5G, 2.5G
|
||||
5: 5G, 2.5G
|
||||
2: 2.5G
|
||||
|
||||
allOf:
|
||||
- $ref: ethernet-phy.yaml#
|
||||
|
||||
select:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- ethernet-phy-id7500.9410
|
||||
- ethernet-phy-id7500.9402
|
||||
- ethernet-phy-id7500.9412
|
||||
- ethernet-phy-id7500.9422
|
||||
- ethernet-phy-id7500.9432
|
||||
- ethernet-phy-id7500.9442
|
||||
- ethernet-phy-id7500.9452
|
||||
- ethernet-phy-id7500.9462
|
||||
- ethernet-phy-id7500.9472
|
||||
- ethernet-phy-id7500.9482
|
||||
- ethernet-phy-id7500.9492
|
||||
required:
|
||||
- compatible
|
||||
|
||||
properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
firmware-name:
|
||||
description: specify the name of PHY firmware to load
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: ethernet-phy-id7500.9410
|
||||
then:
|
||||
required:
|
||||
- firmware-name
|
||||
else:
|
||||
properties:
|
||||
firmware-name: false
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethernet-phy@1f {
|
||||
compatible = "ethernet-phy-id7500.9410",
|
||||
"ethernet-phy-ieee802.3-c45";
|
||||
|
||||
reg = <31>;
|
||||
firmware-name = "as21x1x_fw.bin";
|
||||
|
||||
leds {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led@0 {
|
||||
reg = <0>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
function-enumerator = <0>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
function-enumerator = <1>;
|
||||
default-state = "keep";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -57,6 +57,16 @@ properties:
|
||||
- const: hsi-mac
|
||||
- const: xfp-mac
|
||||
|
||||
memory-region:
|
||||
items:
|
||||
- description: QDMA0 buffer memory
|
||||
- description: QDMA1 buffer memory
|
||||
|
||||
memory-region-names:
|
||||
items:
|
||||
- const: qdma0-buf
|
||||
- const: qdma1-buf
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
@ -140,6 +150,9 @@ examples:
|
||||
<GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
memory-region = <&qdma0_buf>, <&qdma1_buf>;
|
||||
memory-region-names = "qdma0-buf", "qdma1-buf";
|
||||
|
||||
airoha,npu = <&npu>;
|
||||
|
||||
#address-cells = <1>;
|
||||
|
@ -23,6 +23,7 @@ properties:
|
||||
- allwinner,sun20i-d1-emac
|
||||
- allwinner,sun50i-h6-emac
|
||||
- allwinner,sun50i-h616-emac0
|
||||
- allwinner,sun55i-a523-emac0
|
||||
- const: allwinner,sun50i-a64-emac
|
||||
|
||||
reg:
|
||||
|
@ -48,6 +48,18 @@ properties:
|
||||
description:
|
||||
The GPIO number of the NXP chipset used for BT_WAKE_IN.
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
description:
|
||||
Host wakeup by falling edge interrupt on this pin which is
|
||||
connected to BT_WAKE_OUT pin of the NXP chipset.
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: wakeup
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
nxp,wakeout-pin:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8
|
||||
description:
|
||||
@ -61,6 +73,7 @@ unevaluatedProperties: false
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
serial {
|
||||
bluetooth {
|
||||
compatible = "nxp,88w8987-bt";
|
||||
@ -70,5 +83,9 @@ examples:
|
||||
nxp,wakein-pin = /bits/ 8 <18>;
|
||||
nxp,wakeout-pin = /bits/ 8 <19>;
|
||||
local-bd-address = [66 55 44 33 22 11];
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-names = "wakeup";
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
$id: http://devicetree.org/schemas/net/brcm,asp-v2.0.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Broadcom ASP 2.0 Ethernet controller
|
||||
title: Broadcom ASP Ethernet controller
|
||||
|
||||
maintainers:
|
||||
- Justin Chen <justin.chen@broadcom.com>
|
||||
@ -15,6 +15,10 @@ description: Broadcom Ethernet controller first introduced with 72165
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- brcm,bcm74110-asp
|
||||
- const: brcm,asp-v3.0
|
||||
- items:
|
||||
- enum:
|
||||
- brcm,bcm74165b0-asp
|
||||
@ -23,10 +27,6 @@ properties:
|
||||
- enum:
|
||||
- brcm,bcm74165-asp
|
||||
- const: brcm,asp-v2.1
|
||||
- items:
|
||||
- enum:
|
||||
- brcm,bcm72165-asp
|
||||
- const: brcm,asp-v2.0
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
@ -39,11 +39,9 @@ properties:
|
||||
ranges: true
|
||||
|
||||
interrupts:
|
||||
minItems: 1
|
||||
items:
|
||||
- description: RX/TX interrupt
|
||||
- description: Port 0 Wake-on-LAN
|
||||
- description: Port 1 Wake-on-LAN
|
||||
- description: Wake-on-LAN interrupt
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
@ -106,16 +104,17 @@ examples:
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
ethernet@9c00000 {
|
||||
compatible = "brcm,bcm72165-asp", "brcm,asp-v2.0";
|
||||
compatible = "brcm,bcm74165-asp", "brcm,asp-v2.1";
|
||||
reg = <0x9c00000 0x1fff14>;
|
||||
interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts-extended = <&intc GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&aon_pm_l2_intc 14>;
|
||||
ranges = <0x0 0x9c00000 0x1fff14>;
|
||||
clocks = <&scmi 14>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
mdio@c614 {
|
||||
compatible = "brcm,asp-v2.0-mdio";
|
||||
compatible = "brcm,asp-v2.1-mdio";
|
||||
reg = <0xc614 0x8>;
|
||||
reg-names = "mdio";
|
||||
#address-cells = <1>;
|
||||
@ -127,7 +126,7 @@ examples:
|
||||
};
|
||||
|
||||
mdio@ce14 {
|
||||
compatible = "brcm,asp-v2.0-mdio";
|
||||
compatible = "brcm,asp-v2.1-mdio";
|
||||
reg = <0xce14 0x8>;
|
||||
reg-names = "mdio";
|
||||
#address-cells = <1>;
|
||||
|
@ -22,9 +22,9 @@ properties:
|
||||
- brcm,genet-mdio-v3
|
||||
- brcm,genet-mdio-v4
|
||||
- brcm,genet-mdio-v5
|
||||
- brcm,asp-v2.0-mdio
|
||||
- brcm,asp-v2.1-mdio
|
||||
- brcm,asp-v2.2-mdio
|
||||
- brcm,asp-v3.0-mdio
|
||||
- brcm,unimac-mdio
|
||||
- brcm,bcm6846-mdio
|
||||
|
||||
|
@ -42,19 +42,80 @@ properties:
|
||||
- renesas,r9a07g054-canfd # RZ/V2L
|
||||
- const: renesas,rzg2l-canfd # RZ/G2L family
|
||||
|
||||
- const: renesas,r9a09g047-canfd # RZ/G3E
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts: true
|
||||
interrupts:
|
||||
oneOf:
|
||||
- items:
|
||||
- description: Channel interrupt
|
||||
- description: Global interrupt
|
||||
- items:
|
||||
- description: CAN global error interrupt
|
||||
- description: CAN receive FIFO interrupt
|
||||
- description: CAN0 error interrupt
|
||||
- description: CAN0 transmit interrupt
|
||||
- description: CAN0 transmit/receive FIFO receive completion interrupt
|
||||
- description: CAN1 error interrupt
|
||||
- description: CAN1 transmit interrupt
|
||||
- description: CAN1 transmit/receive FIFO receive completion interrupt
|
||||
- description: CAN2 error interrupt
|
||||
- description: CAN2 transmit interrupt
|
||||
- description: CAN2 transmit/receive FIFO receive completion interrupt
|
||||
- description: CAN3 error interrupt
|
||||
- description: CAN3 transmit interrupt
|
||||
- description: CAN3 transmit/receive FIFO receive completion interrupt
|
||||
- description: CAN4 error interrupt
|
||||
- description: CAN4 transmit interrupt
|
||||
- description: CAN4 transmit/receive FIFO receive completion interrupt
|
||||
- description: CAN5 error interrupt
|
||||
- description: CAN5 transmit interrupt
|
||||
- description: CAN5 transmit/receive FIFO receive completion interrupt
|
||||
minItems: 8
|
||||
|
||||
interrupt-names:
|
||||
oneOf:
|
||||
- items:
|
||||
- const: ch_int
|
||||
- const: g_int
|
||||
- items:
|
||||
- const: g_err
|
||||
- const: g_recc
|
||||
- const: ch0_err
|
||||
- const: ch0_rec
|
||||
- const: ch0_trx
|
||||
- const: ch1_err
|
||||
- const: ch1_rec
|
||||
- const: ch1_trx
|
||||
- const: ch2_err
|
||||
- const: ch2_rec
|
||||
- const: ch2_trx
|
||||
- const: ch3_err
|
||||
- const: ch3_rec
|
||||
- const: ch3_trx
|
||||
- const: ch4_err
|
||||
- const: ch4_rec
|
||||
- const: ch4_trx
|
||||
- const: ch5_err
|
||||
- const: ch5_rec
|
||||
- const: ch5_trx
|
||||
minItems: 8
|
||||
|
||||
clocks:
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: fck
|
||||
- const: canfd
|
||||
- const: can_clk
|
||||
oneOf:
|
||||
- items:
|
||||
- const: fck
|
||||
- const: canfd
|
||||
- const: can_clk
|
||||
- items:
|
||||
- const: fck
|
||||
- const: ram_clk
|
||||
- const: can_clk
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
@ -117,52 +178,77 @@ allOf:
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
items:
|
||||
- description: CAN global error interrupt
|
||||
- description: CAN receive FIFO interrupt
|
||||
- description: CAN0 error interrupt
|
||||
- description: CAN0 transmit interrupt
|
||||
- description: CAN0 transmit/receive FIFO receive completion interrupt
|
||||
- description: CAN1 error interrupt
|
||||
- description: CAN1 transmit interrupt
|
||||
- description: CAN1 transmit/receive FIFO receive completion interrupt
|
||||
maxItems: 8
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: g_err
|
||||
- const: g_recc
|
||||
- const: ch0_err
|
||||
- const: ch0_rec
|
||||
- const: ch0_trx
|
||||
- const: ch1_err
|
||||
- const: ch1_rec
|
||||
- const: ch1_trx
|
||||
maxItems: 8
|
||||
|
||||
resets:
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: rstp_n
|
||||
- const: rstc_n
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
required:
|
||||
- reset-names
|
||||
else:
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- renesas,rcar-gen3-canfd
|
||||
- renesas,rcar-gen4-canfd
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
items:
|
||||
- description: Channel interrupt
|
||||
- description: Global interrupt
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: ch_int
|
||||
- const: g_int
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: renesas,r9a09g047-canfd
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
minItems: 20
|
||||
|
||||
interrupt-names:
|
||||
minItems: 20
|
||||
|
||||
resets:
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
reset-names:
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
required:
|
||||
- reset-names
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- renesas,rcar-gen3-canfd
|
||||
- renesas,rzg2l-canfd
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel[2-7]$": false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@ -171,16 +257,15 @@ allOf:
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel[4-7]$": false
|
||||
else:
|
||||
if:
|
||||
not:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: renesas,rcar-gen4-canfd
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel[2-7]$": false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: renesas,r9a09g047-canfd
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel[6-7]$": false
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
|
@ -96,6 +96,10 @@ properties:
|
||||
Built-in switch of the Airoha EN7581 SoC
|
||||
const: airoha,en7581-switch
|
||||
|
||||
- description:
|
||||
Built-in switch of the Airoha AN7583 SoC
|
||||
const: airoha,an7583-switch
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@ -291,6 +295,7 @@ allOf:
|
||||
enum:
|
||||
- mediatek,mt7988-switch
|
||||
- airoha,en7581-switch
|
||||
- airoha,an7583-switch
|
||||
then:
|
||||
$ref: "#/$defs/mt7530-dsa-port"
|
||||
properties:
|
||||
|
@ -16,30 +16,6 @@ properties:
|
||||
label:
|
||||
description: Human readable label on a port of a box.
|
||||
|
||||
local-mac-address:
|
||||
description:
|
||||
Specifies the MAC address that was assigned to the network device.
|
||||
$ref: /schemas/types.yaml#/definitions/uint8-array
|
||||
minItems: 6
|
||||
maxItems: 6
|
||||
|
||||
mac-address:
|
||||
description:
|
||||
Specifies the MAC address that was last used by the boot
|
||||
program; should be used in cases where the MAC address assigned
|
||||
to the device by the boot program is different from the
|
||||
local-mac-address property.
|
||||
$ref: /schemas/types.yaml#/definitions/uint8-array
|
||||
minItems: 6
|
||||
maxItems: 6
|
||||
|
||||
max-frame-size:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Maximum transfer unit (IEEE defined MTU), rather than the
|
||||
maximum frame size (there\'s contradiction in the Devicetree
|
||||
Specification).
|
||||
|
||||
max-speed:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
@ -195,7 +171,7 @@ properties:
|
||||
description:
|
||||
Link speed.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [10, 100, 1000, 2500, 10000]
|
||||
enum: [10, 100, 1000, 2500, 5000, 10000]
|
||||
|
||||
full-duplex:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
@ -260,6 +236,7 @@ dependencies:
|
||||
pcs-handle-names: [pcs-handle]
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/net/network-class.yaml#
|
||||
- if:
|
||||
properties:
|
||||
phy-mode:
|
||||
|
@ -238,6 +238,16 @@ properties:
|
||||
peak-to-peak specified in ANSI X3.263. When omitted, the PHYs default
|
||||
will be left as is.
|
||||
|
||||
mac-termination-ohms:
|
||||
maximum: 200
|
||||
description:
|
||||
The xMII signals need series termination on the driver side to match both
|
||||
the output driver impedance and the line characteristic impedance, to
|
||||
prevent reflections and EMI problems. Select a resistance value which is
|
||||
supported by the builtin resistors of the PHY, otherwise the resistors may
|
||||
have to be placed on board. When omitted, the PHYs default will be left as
|
||||
is.
|
||||
|
||||
leds:
|
||||
type: object
|
||||
|
||||
|
46
Documentation/devicetree/bindings/net/network-class.yaml
Normal file
46
Documentation/devicetree/bindings/net/network-class.yaml
Normal file
@ -0,0 +1,46 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/network-class.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Network Class Common Properties
|
||||
|
||||
maintainers:
|
||||
- Devicetree Specification Mailing List <devicetree-spec@vger.kernel.org>
|
||||
|
||||
properties:
|
||||
address-bits:
|
||||
description:
|
||||
Specifies number of address bits required to address the device
|
||||
described by this node, e.g. size of the MAC address.
|
||||
default: 48
|
||||
const: 48
|
||||
|
||||
local-mac-address:
|
||||
description:
|
||||
Specifies MAC address that was assigned to the network device described by
|
||||
the node containing this property.
|
||||
$ref: /schemas/types.yaml#/definitions/uint8-array
|
||||
minItems: 6
|
||||
maxItems: 6
|
||||
|
||||
mac-address:
|
||||
description:
|
||||
Specifies the MAC address that was last used by the boot program. This
|
||||
property should be used in cases where the MAC address assigned to the
|
||||
device by the boot program is different from the
|
||||
local-mac-address property. This property shall be used only if the value
|
||||
differs from local-mac-address property value.
|
||||
$ref: /schemas/types.yaml#/definitions/uint8-array
|
||||
minItems: 6
|
||||
maxItems: 6
|
||||
|
||||
max-frame-size:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Maximum transfer unit (IEEE defined MTU), rather than the
|
||||
maximum frame size (there\'s contradiction in the Devicetree
|
||||
Specification).
|
||||
|
||||
additionalProperties: true
|
@ -0,0 +1,203 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/renesas,r9a09g057-gbeth.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: GBETH glue layer for Renesas RZ/V2H(P) (and similar SoCs)
|
||||
|
||||
maintainers:
|
||||
- Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
|
||||
|
||||
select:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- renesas,r9a09g056-gbeth
|
||||
- renesas,r9a09g057-gbeth
|
||||
- renesas,rzv2h-gbeth
|
||||
required:
|
||||
- compatible
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- renesas,r9a09g056-gbeth # RZ/V2N
|
||||
- renesas,r9a09g057-gbeth # RZ/V2H(P)
|
||||
- const: renesas,rzv2h-gbeth
|
||||
- const: snps,dwmac-5.20
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: CSR clock
|
||||
- description: AXI system clock
|
||||
- description: PTP clock
|
||||
- description: TX clock
|
||||
- description: RX clock
|
||||
- description: TX clock phase-shifted by 180 degrees
|
||||
- description: RX clock phase-shifted by 180 degrees
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: stmmaceth
|
||||
- const: pclk
|
||||
- const: ptp_ref
|
||||
- const: tx
|
||||
- const: rx
|
||||
- const: tx-180
|
||||
- const: rx-180
|
||||
|
||||
interrupts:
|
||||
minItems: 11
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: macirq
|
||||
- const: eth_wake_irq
|
||||
- const: eth_lpi
|
||||
- const: rx-queue-0
|
||||
- const: rx-queue-1
|
||||
- const: rx-queue-2
|
||||
- const: rx-queue-3
|
||||
- const: tx-queue-0
|
||||
- const: tx-queue-1
|
||||
- const: tx-queue-2
|
||||
- const: tx-queue-3
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: AXI power-on system reset
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- interrupts
|
||||
- interrupt-names
|
||||
- resets
|
||||
|
||||
allOf:
|
||||
- $ref: snps,dwmac.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/renesas-cpg-mssr.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
ethernet@15c30000 {
|
||||
compatible = "renesas,r9a09g057-gbeth", "renesas,rzv2h-gbeth", "snps,dwmac-5.20";
|
||||
reg = <0x15c30000 0x10000>;
|
||||
clocks = <&cpg CPG_MOD 0xbd>, <&cpg CPG_MOD 0xbc>,
|
||||
<&ptp_clock>, <&cpg CPG_MOD 0xb8>,
|
||||
<&cpg CPG_MOD 0xb9>, <&cpg CPG_MOD 0xba>,
|
||||
<&cpg CPG_MOD 0xbb>;
|
||||
clock-names = "stmmaceth", "pclk", "ptp_ref",
|
||||
"tx", "rx", "tx-180", "rx-180";
|
||||
resets = <&cpg 0xb0>;
|
||||
interrupts = <GIC_SPI 765 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 767 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 766 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 772 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 773 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 774 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 745 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 768 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 769 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 770 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 771 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq", "eth_wake_irq", "eth_lpi",
|
||||
"rx-queue-0", "rx-queue-1", "rx-queue-2",
|
||||
"rx-queue-3", "tx-queue-0", "tx-queue-1",
|
||||
"tx-queue-2", "tx-queue-3";
|
||||
phy-mode = "rgmii-id";
|
||||
snps,multicast-filter-bins = <256>;
|
||||
snps,perfect-filter-entries = <128>;
|
||||
rx-fifo-depth = <8192>;
|
||||
tx-fifo-depth = <8192>;
|
||||
snps,fixed-burst;
|
||||
snps,force_thresh_dma_mode;
|
||||
snps,axi-config = <&stmmac_axi_setup>;
|
||||
snps,mtl-rx-config = <&mtl_rx_setup>;
|
||||
snps,mtl-tx-config = <&mtl_tx_setup>;
|
||||
snps,txpbl = <32>;
|
||||
snps,rxpbl = <32>;
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
stmmac_axi_setup: stmmac-axi-config {
|
||||
snps,lpi_en;
|
||||
snps,wr_osr_lmt = <0xf>;
|
||||
snps,rd_osr_lmt = <0xf>;
|
||||
snps,blen = <16 8 4 0 0 0 0>;
|
||||
};
|
||||
|
||||
mtl_rx_setup: rx-queues-config {
|
||||
snps,rx-queues-to-use = <4>;
|
||||
snps,rx-sched-sp;
|
||||
|
||||
queue0 {
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x1>;
|
||||
snps,map-to-dma-channel = <0>;
|
||||
};
|
||||
|
||||
queue1 {
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x2>;
|
||||
snps,map-to-dma-channel = <1>;
|
||||
};
|
||||
|
||||
queue2 {
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x4>;
|
||||
snps,map-to-dma-channel = <2>;
|
||||
};
|
||||
|
||||
queue3 {
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x8>;
|
||||
snps,map-to-dma-channel = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
mtl_tx_setup: tx-queues-config {
|
||||
snps,tx-queues-to-use = <4>;
|
||||
|
||||
queue0 {
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x1>;
|
||||
};
|
||||
|
||||
queue1 {
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x2>;
|
||||
};
|
||||
|
||||
queue2 {
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x4>;
|
||||
};
|
||||
|
||||
queue3 {
|
||||
snps,dcb-algorithm;
|
||||
snps,priority = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "snps,dwmac-mdio";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
@ -75,6 +75,7 @@ properties:
|
||||
- qcom,sm8150-ethqos
|
||||
- renesas,r9a06g032-gmac
|
||||
- renesas,rzn1-gmac
|
||||
- renesas,rzv2h-gbeth
|
||||
- rockchip,px30-gmac
|
||||
- rockchip,rk3128-gmac
|
||||
- rockchip,rk3228-gmac
|
||||
@ -114,19 +115,25 @@ properties:
|
||||
|
||||
interrupts:
|
||||
minItems: 1
|
||||
items:
|
||||
- description: Combined signal for various interrupt events
|
||||
- description: The interrupt to manage the remote wake-up packet detection
|
||||
- description: The interrupt that occurs when Rx exits the LPI state
|
||||
- description: The interrupt that occurs when HW safety error triggered
|
||||
maxItems: 11
|
||||
|
||||
interrupt-names:
|
||||
minItems: 1
|
||||
maxItems: 11
|
||||
items:
|
||||
- const: macirq
|
||||
- enum: [eth_wake_irq, eth_lpi, sfty]
|
||||
- enum: [eth_wake_irq, eth_lpi, sfty]
|
||||
- enum: [eth_wake_irq, eth_lpi, sfty]
|
||||
oneOf:
|
||||
- description: Combined signal for various interrupt events
|
||||
const: macirq
|
||||
- description: The interrupt to manage the remote wake-up packet detection
|
||||
const: eth_wake_irq
|
||||
- description: The interrupt that occurs when Rx exits the LPI state
|
||||
const: eth_lpi
|
||||
- description: The interrupt that occurs when HW safety error triggered
|
||||
const: sfty
|
||||
- description: Per channel receive completion interrupt
|
||||
pattern: '^rx-queue-[0-3]$'
|
||||
- description: Per channel transmit completion interrupt
|
||||
pattern: '^tx-queue-[0-3]$'
|
||||
|
||||
clocks:
|
||||
minItems: 1
|
||||
@ -703,7 +710,7 @@ examples:
|
||||
};
|
||||
};
|
||||
|
||||
mdio0 {
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "snps,dwmac-mdio";
|
||||
|
@ -122,6 +122,9 @@ properties:
|
||||
- free-running
|
||||
- recovered
|
||||
|
||||
mac-termination-ohms:
|
||||
enum: [43, 44, 46, 48, 50, 53, 55, 58, 61, 65, 69, 73, 78, 84, 91, 99]
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
@ -137,6 +140,7 @@ examples:
|
||||
rx-internal-delay-ps = <1>;
|
||||
tx-internal-delay-ps = <1>;
|
||||
ti,gpio2-clk-out = "xi";
|
||||
mac-termination-ohms = <43>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -143,6 +143,8 @@ properties:
|
||||
label:
|
||||
description: label associated with this port
|
||||
|
||||
fixed-link: true
|
||||
|
||||
ti,mac-only:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description:
|
||||
|
@ -63,7 +63,7 @@ examples:
|
||||
compatible = "vertexcom,mse1021";
|
||||
reg = <0>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <23 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
spi-cpha;
|
||||
spi-cpol;
|
||||
spi-max-frequency = <7142857>;
|
||||
|
41
Documentation/devicetree/bindings/net/via,vt8500-rhine.yaml
Normal file
41
Documentation/devicetree/bindings/net/via,vt8500-rhine.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/via,vt8500-rhine.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: VIA Rhine 10/100 Network Controller
|
||||
|
||||
description:
|
||||
VIA's Ethernet controller integrated into VIA VT8500,
|
||||
WonderMedia WM8950 and related SoCs
|
||||
|
||||
maintainers:
|
||||
- Alexey Charkov <alchark@gmail.com>
|
||||
|
||||
allOf:
|
||||
- $ref: ethernet-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: via,vt8500-rhine
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
ethernet@d8004000 {
|
||||
compatible = "via,vt8500-rhine";
|
||||
reg = <0xd8004000 0x100>;
|
||||
interrupts = <10>;
|
||||
};
|
@ -1,17 +0,0 @@
|
||||
* VIA Rhine 10/100 Network Controller
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "via,vt8500-rhine" for integrated
|
||||
Rhine controllers found in VIA VT8500, WonderMedia WM8950
|
||||
and similar. These are listed as 1106:3106 rev. 0x84 on the
|
||||
virtual PCI bus under vendor-provided kernels
|
||||
- reg : Address and length of the io space
|
||||
- interrupts : Should contain the controller interrupt line
|
||||
|
||||
Examples:
|
||||
|
||||
ethernet@d8004000 {
|
||||
compatible = "via,vt8500-rhine";
|
||||
reg = <0xd8004000 0x100>;
|
||||
interrupts = <10>;
|
||||
};
|
@ -16,7 +16,7 @@ description:
|
||||
binding.
|
||||
|
||||
allOf:
|
||||
- $ref: ieee80211.yaml#
|
||||
- $ref: /schemas/net/wireless/wireless-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
@ -21,6 +21,12 @@ properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
firmware-name:
|
||||
maxItems: 1
|
||||
description:
|
||||
If present, a board or platform specific string used to lookup
|
||||
usecase-specific firmware files for the device.
|
||||
|
||||
vddaon-supply:
|
||||
description: VDD_AON supply regulator handle
|
||||
|
||||
|
@ -0,0 +1,315 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
# Copyright (c) 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/wireless/qcom,ipq5332-wifi.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Technologies ath12k wireless devices (AHB)
|
||||
|
||||
maintainers:
|
||||
- Jeff Johnson <jjohnson@kernel.org>
|
||||
|
||||
description:
|
||||
Qualcomm Technologies IEEE 802.11be AHB devices.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq5332-wifi
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: XO clock used for copy engine
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: xo
|
||||
|
||||
interrupts:
|
||||
items:
|
||||
- description: Fatal interrupt
|
||||
- description: Ready interrupt
|
||||
- description: Spawn acknowledge interrupt
|
||||
- description: Stop acknowledge interrupt
|
||||
- description: misc-pulse1 interrupt events
|
||||
- description: misc-latch interrupt events
|
||||
- description: sw exception interrupt events
|
||||
- description: interrupt event for ring CE0
|
||||
- description: interrupt event for ring CE1
|
||||
- description: interrupt event for ring CE2
|
||||
- description: interrupt event for ring CE3
|
||||
- description: interrupt event for ring CE4
|
||||
- description: interrupt event for ring CE5
|
||||
- description: interrupt event for ring CE6
|
||||
- description: interrupt event for ring CE7
|
||||
- description: interrupt event for ring CE8
|
||||
- description: interrupt event for ring CE9
|
||||
- description: interrupt event for ring CE10
|
||||
- description: interrupt event for ring CE11
|
||||
- description: interrupt event for ring host2wbm-desc-feed
|
||||
- description: interrupt event for ring host2reo-re-injection
|
||||
- description: interrupt event for ring host2reo-command
|
||||
- description: interrupt event for ring host2rxdma-monitor-ring1
|
||||
- description: interrupt event for ring reo2ost-exception
|
||||
- description: interrupt event for ring wbm2host-rx-release
|
||||
- description: interrupt event for ring reo2host-status
|
||||
- description: interrupt event for ring reo2host-destination-ring4
|
||||
- description: interrupt event for ring reo2host-destination-ring3
|
||||
- description: interrupt event for ring reo2host-destination-ring2
|
||||
- description: interrupt event for ring reo2host-destination-ring1
|
||||
- description: interrupt event for ring rxdma2host-monitor-destination-mac3
|
||||
- description: interrupt event for ring rxdma2host-monitor-destination-mac2
|
||||
- description: interrupt event for ring rxdma2host-monitor-destination-mac1
|
||||
- description: interrupt event for ring host2rxdma-host-buf-ring-mac3
|
||||
- description: interrupt event for ring host2rxdma-host-buf-ring-mac2
|
||||
- description: interrupt event for ring host2rxdma-host-buf-ring-mac1
|
||||
- description: interrupt event for ring host2tcl-input-ring4
|
||||
- description: interrupt event for ring host2tcl-input-ring3
|
||||
- description: interrupt event for ring host2tcl-input-ring2
|
||||
- description: interrupt event for ring host2tcl-input-ring1
|
||||
- description: interrupt event for ring wbm2host-tx-completions-ring4
|
||||
- description: interrupt event for ring wbm2host-tx-completions-ring3
|
||||
- description: interrupt event for ring wbm2host-tx-completions-ring2
|
||||
- description: interrupt event for ring wbm2host-tx-completions-ring1
|
||||
- description: interrupt event for ring host2tx-monitor-ring1
|
||||
- description: interrupt event for ring txmon2host-monitor-destination-mac3
|
||||
- description: interrupt event for ring txmon2host-monitor-destination-mac2
|
||||
- description: interrupt event for ring txmon2host-monitor-destination-mac1
|
||||
- description: interrupt event for umac-reset
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: fatal
|
||||
- const: ready
|
||||
- const: spawn
|
||||
- const: stop-ack
|
||||
- const: misc-pulse1
|
||||
- const: misc-latch
|
||||
- const: sw-exception
|
||||
- const: ce0
|
||||
- const: ce1
|
||||
- const: ce2
|
||||
- const: ce3
|
||||
- const: ce4
|
||||
- const: ce5
|
||||
- const: ce6
|
||||
- const: ce7
|
||||
- const: ce8
|
||||
- const: ce9
|
||||
- const: ce10
|
||||
- const: ce11
|
||||
- const: host2wbm-desc-feed
|
||||
- const: host2reo-re-injection
|
||||
- const: host2reo-command
|
||||
- const: host2rxdma-monitor-ring1
|
||||
- const: reo2ost-exception
|
||||
- const: wbm2host-rx-release
|
||||
- const: reo2host-status
|
||||
- const: reo2host-destination-ring4
|
||||
- const: reo2host-destination-ring3
|
||||
- const: reo2host-destination-ring2
|
||||
- const: reo2host-destination-ring1
|
||||
- const: rxdma2host-monitor-destination-mac3
|
||||
- const: rxdma2host-monitor-destination-mac2
|
||||
- const: rxdma2host-monitor-destination-mac1
|
||||
- const: host2rxdma-host-buf-ring-mac3
|
||||
- const: host2rxdma-host-buf-ring-mac2
|
||||
- const: host2rxdma-host-buf-ring-mac1
|
||||
- const: host2tcl-input-ring4
|
||||
- const: host2tcl-input-ring3
|
||||
- const: host2tcl-input-ring2
|
||||
- const: host2tcl-input-ring1
|
||||
- const: wbm2host-tx-completions-ring4
|
||||
- const: wbm2host-tx-completions-ring3
|
||||
- const: wbm2host-tx-completions-ring2
|
||||
- const: wbm2host-tx-completions-ring1
|
||||
- const: host2tx-monitor-ring1
|
||||
- const: txmon2host-monitor-destination-mac3
|
||||
- const: txmon2host-monitor-destination-mac2
|
||||
- const: txmon2host-monitor-destination-mac1
|
||||
- const: umac-reset
|
||||
|
||||
memory-region:
|
||||
description:
|
||||
Memory regions used by the ath12k firmware.
|
||||
items:
|
||||
- description: Q6 memory region
|
||||
- description: m3 dump memory region
|
||||
- description: Q6 caldata memory region
|
||||
- description: Multi Link Operation (MLO) Global memory region
|
||||
|
||||
memory-region-names:
|
||||
items:
|
||||
- const: q6-region
|
||||
- const: m3-dump
|
||||
- const: q6-caldb
|
||||
- const: mlo-global-mem
|
||||
|
||||
qcom,calibration-variant:
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
description:
|
||||
String to uniquely identify variant of the calibration data for designs
|
||||
with colliding bus and device ids
|
||||
|
||||
qcom,rproc:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
Phandle to the Qualcomm Hexagon DSP(q6 remote processor), which is utilized
|
||||
for offloading WiFi processing tasks, this q6 remote processor operates in
|
||||
conjunction with WiFi.
|
||||
|
||||
qcom,smem-states:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
description: States used by the AP to signal the remote processor
|
||||
items:
|
||||
- description: Shutdown WCSS pd
|
||||
- description: Stop WCSS pd
|
||||
- description: Spawn WCSS pd
|
||||
|
||||
qcom,smem-state-names:
|
||||
description:
|
||||
Names of the states used by the AP to signal the remote processor
|
||||
items:
|
||||
- const: shutdown
|
||||
- const: stop
|
||||
- const: spawn
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- interrupts
|
||||
- interrupt-names
|
||||
- memory-region
|
||||
- memory-region-names
|
||||
- qcom,rproc
|
||||
- qcom,smem-states
|
||||
- qcom,smem-state-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/clock/qcom,ipq5332-gcc.h>
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
compatible = "qcom,ipq5332-wifi";
|
||||
reg = <0x0c000000 0x1000000>;
|
||||
clocks = <&gcc GCC_XO_CLK>;
|
||||
clock-names = "xo";
|
||||
interrupts-extended = <&wcss_smp2p_in 8 IRQ_TYPE_NONE>,
|
||||
<&wcss_smp2p_in 9 IRQ_TYPE_NONE>,
|
||||
<&wcss_smp2p_in 12 IRQ_TYPE_NONE>,
|
||||
<&wcss_smp2p_in 11 IRQ_TYPE_NONE>,
|
||||
<&intc GIC_SPI 559 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 560 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 561 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 422 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 423 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 424 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 425 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 426 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 427 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 428 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 429 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 430 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 431 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 432 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 433 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 491 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 495 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 493 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 544 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 457 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 466 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 497 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 454 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 453 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 452 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 451 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 488 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 488 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 484 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 554 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 554 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 549 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 507 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 500 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 499 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 498 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 450 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 449 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 448 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 447 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 543 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 486 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 486 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 482 IRQ_TYPE_EDGE_RISING>,
|
||||
<&intc GIC_SPI 419 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "fatal",
|
||||
"ready",
|
||||
"spawn",
|
||||
"stop-ack",
|
||||
"misc-pulse1",
|
||||
"misc-latch",
|
||||
"sw-exception",
|
||||
"ce0",
|
||||
"ce1",
|
||||
"ce2",
|
||||
"ce3",
|
||||
"ce4",
|
||||
"ce5",
|
||||
"ce6",
|
||||
"ce7",
|
||||
"ce8",
|
||||
"ce9",
|
||||
"ce10",
|
||||
"ce11",
|
||||
"host2wbm-desc-feed",
|
||||
"host2reo-re-injection",
|
||||
"host2reo-command",
|
||||
"host2rxdma-monitor-ring1",
|
||||
"reo2ost-exception",
|
||||
"wbm2host-rx-release",
|
||||
"reo2host-status",
|
||||
"reo2host-destination-ring4",
|
||||
"reo2host-destination-ring3",
|
||||
"reo2host-destination-ring2",
|
||||
"reo2host-destination-ring1",
|
||||
"rxdma2host-monitor-destination-mac3",
|
||||
"rxdma2host-monitor-destination-mac2",
|
||||
"rxdma2host-monitor-destination-mac1",
|
||||
"host2rxdma-host-buf-ring-mac3",
|
||||
"host2rxdma-host-buf-ring-mac2",
|
||||
"host2rxdma-host-buf-ring-mac1",
|
||||
"host2tcl-input-ring4",
|
||||
"host2tcl-input-ring3",
|
||||
"host2tcl-input-ring2",
|
||||
"host2tcl-input-ring1",
|
||||
"wbm2host-tx-completions-ring4",
|
||||
"wbm2host-tx-completions-ring3",
|
||||
"wbm2host-tx-completions-ring2",
|
||||
"wbm2host-tx-completions-ring1",
|
||||
"host2tx-monitor-ring1",
|
||||
"txmon2host-monitor-destination-mac3",
|
||||
"txmon2host-monitor-destination-mac2",
|
||||
"txmon2host-monitor-destination-mac1",
|
||||
"umac-reset";
|
||||
|
||||
memory-region = <&q6_region>, <&m3_dump>, <&q6_caldb>, <&mlo_mem>;
|
||||
memory-region-names = "q6-region", "m3-dump", "q6-caldb", "mlo-global-mem";
|
||||
qcom,calibration-variant = "RDP441_1";
|
||||
qcom,rproc = <&q6v5_wcss>;
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
};
|
@ -71,15 +71,12 @@ properties:
|
||||
"Platform Data Set" in Silabs jargon). Default depends of "compatible"
|
||||
string. For "silabs,wf200", the default is 'wf200.pds'.
|
||||
|
||||
local-mac-address: true
|
||||
|
||||
mac-address: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/net/wireless/wireless-controller.yaml#
|
||||
- $ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
@ -0,0 +1,23 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/wireless/wireless-controller.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Wireless Controller Common Properties
|
||||
|
||||
maintainers:
|
||||
- Lorenzo Bianconi <lorenzo@kernel.org>
|
||||
|
||||
properties:
|
||||
$nodename:
|
||||
pattern: "^wifi(@.*)?$"
|
||||
|
||||
allOf:
|
||||
- $ref: ieee80211.yaml#
|
||||
- $ref: /schemas/net/network-class.yaml#
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
...
|
||||
|
@ -54,7 +54,7 @@ properties:
|
||||
- compatible
|
||||
|
||||
wifi:
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
type: object
|
||||
properties:
|
||||
compatible:
|
||||
@ -88,6 +88,9 @@ properties:
|
||||
- qcom,smem-states
|
||||
- qcom,smem-state-names
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/net/wireless/wireless-controller.yaml#
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- qcom,mmio
|
||||
|
@ -148,6 +148,9 @@ properties:
|
||||
attr-max-name:
|
||||
description: The explicit name for last member of attribute enum.
|
||||
type: string
|
||||
header:
|
||||
description: For C-compatible languages, header which already defines this attribute set.
|
||||
type: string
|
||||
# End genetlink-c
|
||||
attributes:
|
||||
description: List of attributes in the space.
|
||||
|
@ -193,6 +193,9 @@ properties:
|
||||
attr-max-name:
|
||||
description: The explicit name for last member of attribute enum.
|
||||
type: string
|
||||
header:
|
||||
description: For C-compatible languages, header which already defines this attribute set.
|
||||
type: string
|
||||
# End genetlink-c
|
||||
attributes:
|
||||
description: List of attributes in the space.
|
||||
|
@ -207,6 +207,9 @@ properties:
|
||||
attr-max-name:
|
||||
description: The explicit name for last member of attribute enum.
|
||||
type: string
|
||||
header:
|
||||
description: For C-compatible languages, header which already defines this attribute set.
|
||||
type: string
|
||||
# End genetlink-c
|
||||
attributes:
|
||||
description: List of attributes in the space.
|
||||
|
@ -202,6 +202,28 @@ definitions:
|
||||
name: exception
|
||||
-
|
||||
name: control
|
||||
-
|
||||
type: enum
|
||||
name: var-attr-type
|
||||
entries:
|
||||
-
|
||||
name: u8
|
||||
value: 1
|
||||
-
|
||||
name: u16
|
||||
-
|
||||
name: u32
|
||||
-
|
||||
name: u64
|
||||
-
|
||||
name: string
|
||||
-
|
||||
name: flag
|
||||
-
|
||||
name: nul_string
|
||||
value: 10
|
||||
-
|
||||
name: binary
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
@ -498,6 +520,7 @@ attribute-sets:
|
||||
-
|
||||
name: param-type
|
||||
type: u8
|
||||
enum: var-attr-type
|
||||
|
||||
# TODO: fill in the attributes in between
|
||||
|
||||
@ -592,6 +615,7 @@ attribute-sets:
|
||||
-
|
||||
name: fmsg-obj-value-type
|
||||
type: u8
|
||||
enum: var-attr-type
|
||||
|
||||
# TODO: fill in the attributes in between
|
||||
|
||||
|
@ -98,6 +98,24 @@ definitions:
|
||||
name: tcp-data-split
|
||||
type: enum
|
||||
entries: [ unknown, disabled, enabled ]
|
||||
-
|
||||
name: hwtstamp-source
|
||||
doc: Source of the hardware timestamp
|
||||
enum-name: hwtstamp-source
|
||||
name-prefix: hwtstamp-source-
|
||||
type: enum
|
||||
entries:
|
||||
-
|
||||
name: netdev
|
||||
doc: |
|
||||
Hardware timestamp comes from a MAC or a device
|
||||
which has MAC and PHY integrated
|
||||
value: 1
|
||||
-
|
||||
name: phylib
|
||||
doc: |
|
||||
Hardware timestamp comes from one PHY device
|
||||
of the network topology
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
@ -896,6 +914,13 @@ attribute-sets:
|
||||
name: hwtstamp-provider
|
||||
type: nest
|
||||
nested-attributes: ts-hwtstamp-provider
|
||||
-
|
||||
name: hwtstamp-source
|
||||
type: u32
|
||||
enum: hwtstamp-source
|
||||
-
|
||||
name: hwtstamp-phyindex
|
||||
type: u32
|
||||
-
|
||||
name: cable-result
|
||||
attr-cnt-name: __ethtool-a-cable-result-cnt
|
||||
@ -1981,6 +2006,8 @@ operations:
|
||||
- phc-index
|
||||
- stats
|
||||
- hwtstamp-provider
|
||||
- hwtstamp-source
|
||||
- hwtstamp-phyindex
|
||||
dump: *tsinfo-get-op
|
||||
-
|
||||
name: cable-test-act
|
||||
|
@ -743,6 +743,18 @@ operations:
|
||||
- defer-hard-irqs
|
||||
- gro-flush-timeout
|
||||
- irq-suspend-timeout
|
||||
-
|
||||
name: bind-tx
|
||||
doc: Bind dmabuf to netdev for TX
|
||||
attribute-set: dmabuf
|
||||
do:
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- fd
|
||||
reply:
|
||||
attributes:
|
||||
- id
|
||||
|
||||
kernel-family:
|
||||
headers: [ "net/netdev_netlink.h"]
|
||||
|
@ -203,71 +203,6 @@ definitions:
|
||||
- scan-random-mac-addr
|
||||
- sched-scan-random-mac-addr
|
||||
- no-random-mac-addr
|
||||
-
|
||||
name: ieee80211-mcs-info
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: rx-mask
|
||||
type: binary
|
||||
len: 10
|
||||
-
|
||||
name: rx-highest
|
||||
type: u16
|
||||
byte-order: little-endian
|
||||
-
|
||||
name: tx-params
|
||||
type: u8
|
||||
-
|
||||
name: reserved
|
||||
type: binary
|
||||
len: 3
|
||||
-
|
||||
name: ieee80211-vht-mcs-info
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: rx-mcs-map
|
||||
type: u16
|
||||
byte-order: little-endian
|
||||
-
|
||||
name: rx-highest
|
||||
type: u16
|
||||
byte-order: little-endian
|
||||
-
|
||||
name: tx-mcs-map
|
||||
type: u16
|
||||
byte-order: little-endian
|
||||
-
|
||||
name: tx-highest
|
||||
type: u16
|
||||
byte-order: little-endian
|
||||
-
|
||||
name: ieee80211-ht-cap
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
name: cap-info
|
||||
type: u16
|
||||
byte-order: little-endian
|
||||
-
|
||||
name: ampdu-params-info
|
||||
type: u8
|
||||
-
|
||||
name: mcs
|
||||
type: binary
|
||||
struct: ieee80211-mcs-info
|
||||
-
|
||||
name: extended-ht-cap-info
|
||||
type: u16
|
||||
byte-order: little-endian
|
||||
-
|
||||
name: tx-bf-cap-info
|
||||
type: u32
|
||||
byte-order: little-endian
|
||||
-
|
||||
name: antenna-selection-info
|
||||
type: u8
|
||||
-
|
||||
name: channel-type
|
||||
type: enum
|
||||
@ -761,7 +696,6 @@ attribute-sets:
|
||||
-
|
||||
name: ht-capability-mask
|
||||
type: binary
|
||||
struct: ieee80211-ht-cap
|
||||
-
|
||||
name: noack-map
|
||||
type: u16
|
||||
@ -1382,7 +1316,6 @@ attribute-sets:
|
||||
-
|
||||
name: ht-mcs-set
|
||||
type: binary
|
||||
struct: ieee80211-mcs-info
|
||||
-
|
||||
name: ht-capa
|
||||
type: u16
|
||||
@ -1395,7 +1328,6 @@ attribute-sets:
|
||||
-
|
||||
name: vht-mcs-set
|
||||
type: binary
|
||||
struct: ieee80211-vht-mcs-info
|
||||
-
|
||||
name: vht-capa
|
||||
type: u32
|
||||
|
367
Documentation/netlink/specs/ovpn.yaml
Normal file
367
Documentation/netlink/specs/ovpn.yaml
Normal file
@ -0,0 +1,367 @@
|
||||
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
||||
#
|
||||
# Author: Antonio Quartulli <antonio@openvpn.net>
|
||||
#
|
||||
# Copyright (c) 2024-2025, OpenVPN Inc.
|
||||
#
|
||||
|
||||
name: ovpn
|
||||
|
||||
protocol: genetlink
|
||||
|
||||
doc: Netlink protocol to control OpenVPN network devices
|
||||
|
||||
definitions:
|
||||
-
|
||||
type: const
|
||||
name: nonce-tail-size
|
||||
value: 8
|
||||
-
|
||||
type: enum
|
||||
name: cipher-alg
|
||||
entries: [ none, aes-gcm, chacha20-poly1305 ]
|
||||
-
|
||||
type: enum
|
||||
name: del-peer-reason
|
||||
entries:
|
||||
- teardown
|
||||
- userspace
|
||||
- expired
|
||||
- transport-error
|
||||
- transport-disconnect
|
||||
-
|
||||
type: enum
|
||||
name: key-slot
|
||||
entries: [ primary, secondary ]
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
name: peer
|
||||
attributes:
|
||||
-
|
||||
name: id
|
||||
type: u32
|
||||
doc: >-
|
||||
The unique ID of the peer in the device context. To be used to identify
|
||||
peers during operations for a specific device
|
||||
checks:
|
||||
max: 0xFFFFFF
|
||||
-
|
||||
name: remote-ipv4
|
||||
type: u32
|
||||
doc: The remote IPv4 address of the peer
|
||||
byte-order: big-endian
|
||||
display-hint: ipv4
|
||||
-
|
||||
name: remote-ipv6
|
||||
type: binary
|
||||
doc: The remote IPv6 address of the peer
|
||||
display-hint: ipv6
|
||||
checks:
|
||||
exact-len: 16
|
||||
-
|
||||
name: remote-ipv6-scope-id
|
||||
type: u32
|
||||
doc: The scope id of the remote IPv6 address of the peer (RFC2553)
|
||||
-
|
||||
name: remote-port
|
||||
type: u16
|
||||
doc: The remote port of the peer
|
||||
byte-order: big-endian
|
||||
checks:
|
||||
min: 1
|
||||
-
|
||||
name: socket
|
||||
type: u32
|
||||
doc: The socket to be used to communicate with the peer
|
||||
-
|
||||
name: socket-netnsid
|
||||
type: s32
|
||||
doc: The ID of the netns the socket assigned to this peer lives in
|
||||
-
|
||||
name: vpn-ipv4
|
||||
type: u32
|
||||
doc: The IPv4 address assigned to the peer by the server
|
||||
byte-order: big-endian
|
||||
display-hint: ipv4
|
||||
-
|
||||
name: vpn-ipv6
|
||||
type: binary
|
||||
doc: The IPv6 address assigned to the peer by the server
|
||||
display-hint: ipv6
|
||||
checks:
|
||||
exact-len: 16
|
||||
-
|
||||
name: local-ipv4
|
||||
type: u32
|
||||
doc: The local IPv4 to be used to send packets to the peer (UDP only)
|
||||
byte-order: big-endian
|
||||
display-hint: ipv4
|
||||
-
|
||||
name: local-ipv6
|
||||
type: binary
|
||||
doc: The local IPv6 to be used to send packets to the peer (UDP only)
|
||||
display-hint: ipv6
|
||||
checks:
|
||||
exact-len: 16
|
||||
-
|
||||
name: local-port
|
||||
type: u16
|
||||
doc: The local port to be used to send packets to the peer (UDP only)
|
||||
byte-order: big-endian
|
||||
checks:
|
||||
min: 1
|
||||
-
|
||||
name: keepalive-interval
|
||||
type: u32
|
||||
doc: >-
|
||||
The number of seconds after which a keep alive message is sent to the
|
||||
peer
|
||||
-
|
||||
name: keepalive-timeout
|
||||
type: u32
|
||||
doc: >-
|
||||
The number of seconds from the last activity after which the peer is
|
||||
assumed dead
|
||||
-
|
||||
name: del-reason
|
||||
type: u32
|
||||
doc: The reason why a peer was deleted
|
||||
enum: del-peer-reason
|
||||
-
|
||||
name: vpn-rx-bytes
|
||||
type: uint
|
||||
doc: Number of bytes received over the tunnel
|
||||
-
|
||||
name: vpn-tx-bytes
|
||||
type: uint
|
||||
doc: Number of bytes transmitted over the tunnel
|
||||
-
|
||||
name: vpn-rx-packets
|
||||
type: uint
|
||||
doc: Number of packets received over the tunnel
|
||||
-
|
||||
name: vpn-tx-packets
|
||||
type: uint
|
||||
doc: Number of packets transmitted over the tunnel
|
||||
-
|
||||
name: link-rx-bytes
|
||||
type: uint
|
||||
doc: Number of bytes received at the transport level
|
||||
-
|
||||
name: link-tx-bytes
|
||||
type: uint
|
||||
doc: Number of bytes transmitted at the transport level
|
||||
-
|
||||
name: link-rx-packets
|
||||
type: uint
|
||||
doc: Number of packets received at the transport level
|
||||
-
|
||||
name: link-tx-packets
|
||||
type: uint
|
||||
doc: Number of packets transmitted at the transport level
|
||||
-
|
||||
name: keyconf
|
||||
attributes:
|
||||
-
|
||||
name: peer-id
|
||||
type: u32
|
||||
doc: >-
|
||||
The unique ID of the peer in the device context. To be used to
|
||||
identify peers during key operations
|
||||
checks:
|
||||
max: 0xFFFFFF
|
||||
-
|
||||
name: slot
|
||||
type: u32
|
||||
doc: The slot where the key should be stored
|
||||
enum: key-slot
|
||||
-
|
||||
name: key-id
|
||||
doc: >-
|
||||
The unique ID of the key in the peer context. Used to fetch the
|
||||
correct key upon decryption
|
||||
type: u32
|
||||
checks:
|
||||
max: 7
|
||||
-
|
||||
name: cipher-alg
|
||||
type: u32
|
||||
doc: The cipher to be used when communicating with the peer
|
||||
enum: cipher-alg
|
||||
-
|
||||
name: encrypt-dir
|
||||
type: nest
|
||||
doc: Key material for encrypt direction
|
||||
nested-attributes: keydir
|
||||
-
|
||||
name: decrypt-dir
|
||||
type: nest
|
||||
doc: Key material for decrypt direction
|
||||
nested-attributes: keydir
|
||||
-
|
||||
name: keydir
|
||||
attributes:
|
||||
-
|
||||
name: cipher-key
|
||||
type: binary
|
||||
doc: The actual key to be used by the cipher
|
||||
checks:
|
||||
max-len: 256
|
||||
-
|
||||
name: nonce-tail
|
||||
type: binary
|
||||
doc: >-
|
||||
Random nonce to be concatenated to the packet ID, in order to
|
||||
obtain the actual cipher IV
|
||||
checks:
|
||||
exact-len: nonce-tail-size
|
||||
-
|
||||
name: ovpn
|
||||
attributes:
|
||||
-
|
||||
name: ifindex
|
||||
type: u32
|
||||
doc: Index of the ovpn interface to operate on
|
||||
-
|
||||
name: peer
|
||||
type: nest
|
||||
doc: >-
|
||||
The peer object containing the attributed of interest for the specific
|
||||
operation
|
||||
nested-attributes: peer
|
||||
-
|
||||
name: keyconf
|
||||
type: nest
|
||||
doc: Peer specific cipher configuration
|
||||
nested-attributes: keyconf
|
||||
|
||||
operations:
|
||||
list:
|
||||
-
|
||||
name: peer-new
|
||||
attribute-set: ovpn
|
||||
flags: [ admin-perm ]
|
||||
doc: Add a remote peer
|
||||
do:
|
||||
pre: ovpn-nl-pre-doit
|
||||
post: ovpn-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- peer
|
||||
-
|
||||
name: peer-set
|
||||
attribute-set: ovpn
|
||||
flags: [ admin-perm ]
|
||||
doc: modify a remote peer
|
||||
do:
|
||||
pre: ovpn-nl-pre-doit
|
||||
post: ovpn-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- peer
|
||||
-
|
||||
name: peer-get
|
||||
attribute-set: ovpn
|
||||
flags: [ admin-perm ]
|
||||
doc: Retrieve data about existing remote peers (or a specific one)
|
||||
do:
|
||||
pre: ovpn-nl-pre-doit
|
||||
post: ovpn-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- peer
|
||||
reply:
|
||||
attributes:
|
||||
- peer
|
||||
dump:
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
reply:
|
||||
attributes:
|
||||
- peer
|
||||
-
|
||||
name: peer-del
|
||||
attribute-set: ovpn
|
||||
flags: [ admin-perm ]
|
||||
doc: Delete existing remote peer
|
||||
do:
|
||||
pre: ovpn-nl-pre-doit
|
||||
post: ovpn-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- peer
|
||||
-
|
||||
name: peer-del-ntf
|
||||
doc: Notification about a peer being deleted
|
||||
notify: peer-get
|
||||
mcgrp: peers
|
||||
|
||||
-
|
||||
name: key-new
|
||||
attribute-set: ovpn
|
||||
flags: [ admin-perm ]
|
||||
doc: Add a cipher key for a specific peer
|
||||
do:
|
||||
pre: ovpn-nl-pre-doit
|
||||
post: ovpn-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- keyconf
|
||||
-
|
||||
name: key-get
|
||||
attribute-set: ovpn
|
||||
flags: [ admin-perm ]
|
||||
doc: Retrieve non-sensitive data about peer key and cipher
|
||||
do:
|
||||
pre: ovpn-nl-pre-doit
|
||||
post: ovpn-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- keyconf
|
||||
reply:
|
||||
attributes:
|
||||
- keyconf
|
||||
-
|
||||
name: key-swap
|
||||
attribute-set: ovpn
|
||||
flags: [ admin-perm ]
|
||||
doc: Swap primary and secondary session keys for a specific peer
|
||||
do:
|
||||
pre: ovpn-nl-pre-doit
|
||||
post: ovpn-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- keyconf
|
||||
-
|
||||
name: key-swap-ntf
|
||||
notify: key-get
|
||||
doc: >-
|
||||
Notification about key having exhausted its IV space and requiring
|
||||
renegotiation
|
||||
mcgrp: peers
|
||||
-
|
||||
name: key-del
|
||||
attribute-set: ovpn
|
||||
flags: [ admin-perm ]
|
||||
doc: Delete cipher key for a specific peer
|
||||
do:
|
||||
pre: ovpn-nl-pre-doit
|
||||
post: ovpn-nl-post-doit
|
||||
request:
|
||||
attributes:
|
||||
- ifindex
|
||||
- keyconf
|
||||
|
||||
mcast-groups:
|
||||
list:
|
||||
-
|
||||
name: peers
|
@ -35,8 +35,7 @@ definitions:
|
||||
name: dispatch-upcall-per-cpu
|
||||
doc: Allow per-cpu dispatch of upcalls
|
||||
-
|
||||
name: datapath-stats
|
||||
enum-name: ovs-dp-stats
|
||||
name: ovs-dp-stats
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
@ -52,8 +51,7 @@ definitions:
|
||||
name: n-flows
|
||||
type: u64
|
||||
-
|
||||
name: megaflow-stats
|
||||
enum-name: ovs-dp-megaflow-stats
|
||||
name: ovs-dp-megaflow-stats
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
@ -88,11 +86,11 @@ attribute-sets:
|
||||
-
|
||||
name: stats
|
||||
type: binary
|
||||
struct: datapath-stats
|
||||
struct: ovs-dp-stats
|
||||
-
|
||||
name: megaflow-stats
|
||||
type: binary
|
||||
struct: megaflow-stats
|
||||
struct: ovs-dp-megaflow-stats
|
||||
-
|
||||
name: user-features
|
||||
type: u32
|
||||
|
@ -23,9 +23,8 @@ definitions:
|
||||
name-prefix: ovs-vport-type-
|
||||
entries: [ unspec, netdev, internal, gre, vxlan, geneve ]
|
||||
-
|
||||
name: vport-stats
|
||||
name: ovs-vport-stats
|
||||
type: struct
|
||||
enum-name: ovs-vport-stats
|
||||
members:
|
||||
-
|
||||
name: rx-packets
|
||||
@ -106,7 +105,7 @@ attribute-sets:
|
||||
-
|
||||
name: stats
|
||||
type: binary
|
||||
struct: vport-stats
|
||||
struct: ovs-vport-stats
|
||||
-
|
||||
name: pad
|
||||
type: unused
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
name: rt-addr
|
||||
protocol: netlink-raw
|
||||
uapi-header: linux/rtnetlink.h
|
||||
protonum: 0
|
||||
|
||||
doc:
|
||||
@ -49,6 +50,8 @@ definitions:
|
||||
-
|
||||
name: ifa-flags
|
||||
type: flags
|
||||
name-prefix: ifa-f-
|
||||
enum-name:
|
||||
entries:
|
||||
-
|
||||
name: secondary
|
||||
@ -124,6 +127,7 @@ attribute-sets:
|
||||
operations:
|
||||
fixed-header: ifaddrmsg
|
||||
enum-model: directional
|
||||
name-prefix: rtm-
|
||||
list:
|
||||
-
|
||||
name: newaddr
|
||||
@ -133,11 +137,6 @@ operations:
|
||||
request:
|
||||
value: 20
|
||||
attributes: &ifaddr-all
|
||||
- ifa-family
|
||||
- ifa-flags
|
||||
- ifa-prefixlen
|
||||
- ifa-scope
|
||||
- ifa-index
|
||||
- address
|
||||
- label
|
||||
- local
|
||||
@ -150,11 +149,6 @@ operations:
|
||||
request:
|
||||
value: 21
|
||||
attributes:
|
||||
- ifa-family
|
||||
- ifa-flags
|
||||
- ifa-prefixlen
|
||||
- ifa-scope
|
||||
- ifa-index
|
||||
- address
|
||||
- local
|
||||
-
|
||||
@ -164,8 +158,7 @@ operations:
|
||||
dump:
|
||||
request:
|
||||
value: 22
|
||||
attributes:
|
||||
- ifa-index
|
||||
attributes: []
|
||||
reply:
|
||||
value: 20
|
||||
attributes: *ifaddr-all
|
||||
@ -177,9 +170,7 @@ operations:
|
||||
do:
|
||||
request:
|
||||
value: 58
|
||||
attributes:
|
||||
- ifa-family
|
||||
- ifa-index
|
||||
attributes: []
|
||||
reply:
|
||||
value: 58
|
||||
attributes: &mcaddr-attrs
|
||||
@ -188,8 +179,7 @@ operations:
|
||||
dump:
|
||||
request:
|
||||
value: 58
|
||||
attributes:
|
||||
- ifa-family
|
||||
attributes: []
|
||||
reply:
|
||||
value: 58
|
||||
attributes: *mcaddr-attrs
|
@ -2,6 +2,7 @@
|
||||
|
||||
name: rt-link
|
||||
protocol: netlink-raw
|
||||
uapi-header: linux/rtnetlink.h
|
||||
protonum: 0
|
||||
|
||||
doc:
|
||||
@ -11,6 +12,9 @@ definitions:
|
||||
-
|
||||
name: ifinfo-flags
|
||||
type: flags
|
||||
header: linux/if.h
|
||||
enum-name: net-device-flags
|
||||
name-prefix: iff-
|
||||
entries:
|
||||
-
|
||||
name: up
|
||||
@ -53,6 +57,7 @@ definitions:
|
||||
-
|
||||
name: vlan-protocols
|
||||
type: enum
|
||||
enum-name:
|
||||
entries:
|
||||
-
|
||||
name: 8021q
|
||||
@ -299,421 +304,297 @@ definitions:
|
||||
type: u8
|
||||
-
|
||||
name: ipv4-devconf
|
||||
type: struct
|
||||
members:
|
||||
enum-name:
|
||||
type: enum
|
||||
entries:
|
||||
-
|
||||
name: forwarding
|
||||
type: u32
|
||||
-
|
||||
name: mc-forwarding
|
||||
type: u32
|
||||
-
|
||||
name: proxy-arp
|
||||
type: u32
|
||||
-
|
||||
name: accept-redirects
|
||||
type: u32
|
||||
-
|
||||
name: secure-redirects
|
||||
type: u32
|
||||
-
|
||||
name: send-redirects
|
||||
type: u32
|
||||
-
|
||||
name: shared-media
|
||||
type: u32
|
||||
-
|
||||
name: rp-filter
|
||||
type: u32
|
||||
-
|
||||
name: accept-source-route
|
||||
type: u32
|
||||
-
|
||||
name: bootp-relay
|
||||
type: u32
|
||||
-
|
||||
name: log-martians
|
||||
type: u32
|
||||
-
|
||||
name: tag
|
||||
type: u32
|
||||
-
|
||||
name: arpfilter
|
||||
type: u32
|
||||
-
|
||||
name: medium-id
|
||||
type: u32
|
||||
-
|
||||
name: noxfrm
|
||||
type: u32
|
||||
-
|
||||
name: nopolicy
|
||||
type: u32
|
||||
-
|
||||
name: force-igmp-version
|
||||
type: u32
|
||||
-
|
||||
name: arp-announce
|
||||
type: u32
|
||||
-
|
||||
name: arp-ignore
|
||||
type: u32
|
||||
-
|
||||
name: promote-secondaries
|
||||
type: u32
|
||||
-
|
||||
name: arp-accept
|
||||
type: u32
|
||||
-
|
||||
name: arp-notify
|
||||
type: u32
|
||||
-
|
||||
name: accept-local
|
||||
type: u32
|
||||
-
|
||||
name: src-vmark
|
||||
type: u32
|
||||
-
|
||||
name: proxy-arp-pvlan
|
||||
type: u32
|
||||
-
|
||||
name: route-localnet
|
||||
type: u32
|
||||
-
|
||||
name: igmpv2-unsolicited-report-interval
|
||||
type: u32
|
||||
-
|
||||
name: igmpv3-unsolicited-report-interval
|
||||
type: u32
|
||||
-
|
||||
name: ignore-routes-with-linkdown
|
||||
type: u32
|
||||
-
|
||||
name: drop-unicast-in-l2-multicast
|
||||
type: u32
|
||||
-
|
||||
name: drop-gratuitous-arp
|
||||
type: u32
|
||||
-
|
||||
name: bc-forwarding
|
||||
type: u32
|
||||
-
|
||||
name: arp-evict-nocarrier
|
||||
type: u32
|
||||
-
|
||||
name: ipv6-devconf
|
||||
type: struct
|
||||
members:
|
||||
enum-name:
|
||||
type: enum
|
||||
entries:
|
||||
-
|
||||
name: forwarding
|
||||
type: u32
|
||||
-
|
||||
name: hoplimit
|
||||
type: u32
|
||||
-
|
||||
name: mtu6
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra
|
||||
type: u32
|
||||
-
|
||||
name: accept-redirects
|
||||
type: u32
|
||||
-
|
||||
name: autoconf
|
||||
type: u32
|
||||
-
|
||||
name: dad-transmits
|
||||
type: u32
|
||||
-
|
||||
name: rtr-solicits
|
||||
type: u32
|
||||
-
|
||||
name: rtr-solicit-interval
|
||||
type: u32
|
||||
-
|
||||
name: rtr-solicit-delay
|
||||
type: u32
|
||||
-
|
||||
name: use-tempaddr
|
||||
type: u32
|
||||
-
|
||||
name: temp-valid-lft
|
||||
type: u32
|
||||
-
|
||||
name: temp-prefered-lft
|
||||
type: u32
|
||||
-
|
||||
name: regen-max-retry
|
||||
type: u32
|
||||
-
|
||||
name: max-desync-factor
|
||||
type: u32
|
||||
-
|
||||
name: max-addresses
|
||||
type: u32
|
||||
-
|
||||
name: force-mld-version
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra-defrtr
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra-pinfo
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra-rtr-pref
|
||||
type: u32
|
||||
-
|
||||
name: rtr-probe-interval
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra-rt-info-max-plen
|
||||
type: u32
|
||||
-
|
||||
name: proxy-ndp
|
||||
type: u32
|
||||
-
|
||||
name: optimistic-dad
|
||||
type: u32
|
||||
-
|
||||
name: accept-source-route
|
||||
type: u32
|
||||
-
|
||||
name: mc-forwarding
|
||||
type: u32
|
||||
-
|
||||
name: disable-ipv6
|
||||
type: u32
|
||||
-
|
||||
name: accept-dad
|
||||
type: u32
|
||||
-
|
||||
name: force-tllao
|
||||
type: u32
|
||||
-
|
||||
name: ndisc-notify
|
||||
type: u32
|
||||
-
|
||||
name: mldv1-unsolicited-report-interval
|
||||
type: u32
|
||||
-
|
||||
name: mldv2-unsolicited-report-interval
|
||||
type: u32
|
||||
-
|
||||
name: suppress-frag-ndisc
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra-from-local
|
||||
type: u32
|
||||
-
|
||||
name: use-optimistic
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra-mtu
|
||||
type: u32
|
||||
-
|
||||
name: stable-secret
|
||||
type: u32
|
||||
-
|
||||
name: use-oif-addrs-only
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra-min-hop-limit
|
||||
type: u32
|
||||
-
|
||||
name: ignore-routes-with-linkdown
|
||||
type: u32
|
||||
-
|
||||
name: drop-unicast-in-l2-multicast
|
||||
type: u32
|
||||
-
|
||||
name: drop-unsolicited-na
|
||||
type: u32
|
||||
-
|
||||
name: keep-addr-on-down
|
||||
type: u32
|
||||
-
|
||||
name: rtr-solicit-max-interval
|
||||
type: u32
|
||||
-
|
||||
name: seg6-enabled
|
||||
type: u32
|
||||
-
|
||||
name: seg6-require-hmac
|
||||
type: u32
|
||||
-
|
||||
name: enhanced-dad
|
||||
type: u32
|
||||
-
|
||||
name: addr-gen-mode
|
||||
type: u8
|
||||
-
|
||||
name: disable-policy
|
||||
type: u32
|
||||
-
|
||||
name: accept-ra-rt-info-min-plen
|
||||
type: u32
|
||||
-
|
||||
name: ndisc-tclass
|
||||
type: u32
|
||||
-
|
||||
name: rpl-seg-enabled
|
||||
type: u32
|
||||
-
|
||||
name: ra-defrtr-metric
|
||||
type: u32
|
||||
-
|
||||
name: ioam6-enabled
|
||||
type: u32
|
||||
-
|
||||
name: ioam6-id
|
||||
type: u32
|
||||
-
|
||||
name: ioam6-id-wide
|
||||
type: u32
|
||||
-
|
||||
name: ndisc-evict-nocarrier
|
||||
type: u32
|
||||
-
|
||||
name: accept-untracked-na
|
||||
type: u32
|
||||
-
|
||||
name: ifla-icmp6-stats
|
||||
type: struct
|
||||
members:
|
||||
enum-name:
|
||||
type: enum
|
||||
entries:
|
||||
-
|
||||
name: num
|
||||
-
|
||||
name: inmsgs
|
||||
type: u64
|
||||
-
|
||||
name: inerrors
|
||||
type: u64
|
||||
-
|
||||
name: outmsgs
|
||||
type: u64
|
||||
-
|
||||
name: outerrors
|
||||
type: u64
|
||||
-
|
||||
name: csumerrors
|
||||
type: u64
|
||||
-
|
||||
name: ratelimithost
|
||||
type: u64
|
||||
-
|
||||
name: ifla-inet6-stats
|
||||
type: struct
|
||||
members:
|
||||
enum-name:
|
||||
type: enum
|
||||
entries:
|
||||
-
|
||||
name: num
|
||||
-
|
||||
name: inpkts
|
||||
type: u64
|
||||
-
|
||||
name: inoctets
|
||||
type: u64
|
||||
-
|
||||
name: indelivers
|
||||
type: u64
|
||||
-
|
||||
name: outforwdatagrams
|
||||
type: u64
|
||||
-
|
||||
name: outpkts
|
||||
type: u64
|
||||
-
|
||||
name: outoctets
|
||||
type: u64
|
||||
-
|
||||
name: inhdrerrors
|
||||
type: u64
|
||||
-
|
||||
name: intoobigerrors
|
||||
type: u64
|
||||
-
|
||||
name: innoroutes
|
||||
type: u64
|
||||
-
|
||||
name: inaddrerrors
|
||||
type: u64
|
||||
-
|
||||
name: inunknownprotos
|
||||
type: u64
|
||||
-
|
||||
name: intruncatedpkts
|
||||
type: u64
|
||||
-
|
||||
name: indiscards
|
||||
type: u64
|
||||
-
|
||||
name: outdiscards
|
||||
type: u64
|
||||
-
|
||||
name: outnoroutes
|
||||
type: u64
|
||||
-
|
||||
name: reasmtimeout
|
||||
type: u64
|
||||
-
|
||||
name: reasmreqds
|
||||
type: u64
|
||||
-
|
||||
name: reasmoks
|
||||
type: u64
|
||||
-
|
||||
name: reasmfails
|
||||
type: u64
|
||||
-
|
||||
name: fragoks
|
||||
type: u64
|
||||
-
|
||||
name: fragfails
|
||||
type: u64
|
||||
-
|
||||
name: fragcreates
|
||||
type: u64
|
||||
-
|
||||
name: inmcastpkts
|
||||
type: u64
|
||||
-
|
||||
name: outmcastpkts
|
||||
type: u64
|
||||
-
|
||||
name: inbcastpkts
|
||||
type: u64
|
||||
-
|
||||
name: outbcastpkts
|
||||
type: u64
|
||||
-
|
||||
name: inmcastoctets
|
||||
type: u64
|
||||
-
|
||||
name: outmcastoctets
|
||||
type: u64
|
||||
-
|
||||
name: inbcastoctets
|
||||
type: u64
|
||||
-
|
||||
name: outbcastoctets
|
||||
type: u64
|
||||
-
|
||||
name: csumerrors
|
||||
type: u64
|
||||
-
|
||||
name: noectpkts
|
||||
type: u64
|
||||
-
|
||||
name: ect1-pkts
|
||||
type: u64
|
||||
-
|
||||
name: ect0-pkts
|
||||
type: u64
|
||||
-
|
||||
name: cepkts
|
||||
type: u64
|
||||
-
|
||||
name: reasm-overlaps
|
||||
type: u64
|
||||
- name: br-boolopt-multi
|
||||
type: struct
|
||||
header: linux/if_bridge.h
|
||||
members:
|
||||
-
|
||||
name: optval
|
||||
@ -754,6 +635,7 @@ definitions:
|
||||
-
|
||||
name: vlan-flags
|
||||
type: flags
|
||||
enum-name:
|
||||
entries:
|
||||
- reorder-hdr
|
||||
- gvrp
|
||||
@ -840,6 +722,7 @@ definitions:
|
||||
-
|
||||
name: ifla-vf-link-state-enum
|
||||
type: enum
|
||||
enum-name:
|
||||
entries:
|
||||
- auto
|
||||
- enable
|
||||
@ -906,6 +789,7 @@ definitions:
|
||||
-
|
||||
name: rtext-filter
|
||||
type: flags
|
||||
enum-name:
|
||||
entries:
|
||||
- vf
|
||||
- brvlan
|
||||
@ -918,6 +802,7 @@ definitions:
|
||||
-
|
||||
name: netkit-policy
|
||||
type: enum
|
||||
enum-name:
|
||||
entries:
|
||||
-
|
||||
name: forward
|
||||
@ -928,6 +813,7 @@ definitions:
|
||||
-
|
||||
name: netkit-mode
|
||||
type: enum
|
||||
enum-name: netkit-mode
|
||||
entries:
|
||||
- name: l2
|
||||
- name: l3
|
||||
@ -935,9 +821,18 @@ definitions:
|
||||
-
|
||||
name: netkit-scrub
|
||||
type: enum
|
||||
enum-name:
|
||||
entries:
|
||||
- name: none
|
||||
- name: default
|
||||
-
|
||||
name: ovpn-mode
|
||||
enum-name: ovpn-mode
|
||||
name-prefix: ovpn-mode
|
||||
type: enum
|
||||
entries:
|
||||
- p2p
|
||||
- mp
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
@ -1171,24 +1066,27 @@ attribute-sets:
|
||||
multi-attr: true
|
||||
-
|
||||
name: af-spec-attrs
|
||||
name-prefix: af-
|
||||
attr-max-name: af-max
|
||||
attributes:
|
||||
-
|
||||
name: "inet"
|
||||
name: inet
|
||||
type: nest
|
||||
value: 2
|
||||
nested-attributes: ifla-attrs
|
||||
-
|
||||
name: "inet6"
|
||||
name: inet6
|
||||
type: nest
|
||||
value: 10
|
||||
nested-attributes: ifla6-attrs
|
||||
-
|
||||
name: "mctp"
|
||||
name: mctp
|
||||
type: nest
|
||||
value: 45
|
||||
nested-attributes: mctp-attrs
|
||||
-
|
||||
name: vfinfo-list-attrs
|
||||
name-prefix: ifla-vf-
|
||||
attributes:
|
||||
-
|
||||
name: info
|
||||
@ -1197,6 +1095,7 @@ attribute-sets:
|
||||
multi-attr: true
|
||||
-
|
||||
name: vfinfo-attrs
|
||||
name-prefix: ifla-vf-
|
||||
attributes:
|
||||
-
|
||||
name: mac
|
||||
@ -1251,6 +1150,7 @@ attribute-sets:
|
||||
type: binary
|
||||
-
|
||||
name: vf-stats-attrs
|
||||
name-prefix: ifla-vf-stats-
|
||||
attributes:
|
||||
-
|
||||
name: rx-packets
|
||||
@ -1282,6 +1182,8 @@ attribute-sets:
|
||||
type: u64
|
||||
-
|
||||
name: vf-vlan-attrs
|
||||
name-prefix: ifla-vf-vlan-
|
||||
attr-max-name: ifla-vf-vlan-info-max
|
||||
attributes:
|
||||
-
|
||||
name: info
|
||||
@ -1290,12 +1192,15 @@ attribute-sets:
|
||||
multi-attr: true
|
||||
-
|
||||
name: vf-ports-attrs
|
||||
name-prefix: ifla-
|
||||
attributes: []
|
||||
-
|
||||
name: port-self-attrs
|
||||
name-prefix: ifla-
|
||||
attributes: []
|
||||
-
|
||||
name: linkinfo-attrs
|
||||
name-prefix: ifla-info-
|
||||
attributes:
|
||||
-
|
||||
name: kind
|
||||
@ -1420,6 +1325,8 @@ attribute-sets:
|
||||
type: indexed-array
|
||||
sub-type: binary
|
||||
display-hint: ipv6
|
||||
checks:
|
||||
exact-len: 16
|
||||
-
|
||||
name: coupled-control
|
||||
type: u8
|
||||
@ -1849,6 +1756,7 @@ attribute-sets:
|
||||
-
|
||||
name: linkinfo-vti-attrs
|
||||
name-prefix: ifla-vti-
|
||||
header: linux/if_tunnel.h
|
||||
attributes:
|
||||
-
|
||||
name: link
|
||||
@ -2101,7 +2009,7 @@ attribute-sets:
|
||||
byte-order: big-endian
|
||||
-
|
||||
name: ifla-vlan-qos
|
||||
name-prefix: ifla-vlan-qos
|
||||
name-prefix: ifla-vlan-qos-
|
||||
attributes:
|
||||
-
|
||||
name: mapping
|
||||
@ -2117,6 +2025,7 @@ attribute-sets:
|
||||
type: u32
|
||||
-
|
||||
name: xdp-attrs
|
||||
name-prefix: ifla-xdp-
|
||||
attributes:
|
||||
-
|
||||
name: fd
|
||||
@ -2144,13 +2053,16 @@ attribute-sets:
|
||||
type: s32
|
||||
-
|
||||
name: ifla-attrs
|
||||
name-prefix: ifla-inet-
|
||||
attributes:
|
||||
-
|
||||
name: conf
|
||||
type: binary
|
||||
struct: ipv4-devconf
|
||||
sub-type: u32
|
||||
doc: u32 indexed by ipv4-devconf - 1 on output, on input it's a nest
|
||||
-
|
||||
name: ifla6-attrs
|
||||
name-prefix: ifla-inet6-
|
||||
attributes:
|
||||
-
|
||||
name: flags
|
||||
@ -2158,11 +2070,12 @@ attribute-sets:
|
||||
-
|
||||
name: conf
|
||||
type: binary
|
||||
struct: ipv6-devconf
|
||||
sub-type: u32
|
||||
doc: u32 indexed by ipv6-devconf - 1 on output, on input it's a nest
|
||||
-
|
||||
name: stats
|
||||
type: binary
|
||||
struct: ifla-inet6-stats
|
||||
sub-type: u64
|
||||
-
|
||||
name: mcast
|
||||
type: binary
|
||||
@ -2173,7 +2086,7 @@ attribute-sets:
|
||||
-
|
||||
name: icmp6stats
|
||||
type: binary
|
||||
struct: ifla-icmp6-stats
|
||||
sub-type: u64
|
||||
-
|
||||
name: token
|
||||
type: binary
|
||||
@ -2216,6 +2129,7 @@ attribute-sets:
|
||||
type: binary
|
||||
-
|
||||
name: link-offload-xstats
|
||||
name-prefix: ifla-offload-xstats-
|
||||
attributes:
|
||||
-
|
||||
name: cpu-hit
|
||||
@ -2230,6 +2144,7 @@ attribute-sets:
|
||||
type: binary
|
||||
-
|
||||
name: hw-s-info-one
|
||||
name-prefix: ifla-offload-xstats-hw-s-info-
|
||||
attributes:
|
||||
-
|
||||
name: request
|
||||
@ -2239,6 +2154,8 @@ attribute-sets:
|
||||
type: u8
|
||||
-
|
||||
name: link-dpll-pin-attrs
|
||||
name-prefix: dpll-a-
|
||||
header: linux/dpll.h
|
||||
attributes:
|
||||
-
|
||||
name: id
|
||||
@ -2279,6 +2196,14 @@ attribute-sets:
|
||||
-
|
||||
name: tailroom
|
||||
type: u16
|
||||
-
|
||||
name: linkinfo-ovpn-attrs
|
||||
name-prefix: ifla-ovpn-
|
||||
attributes:
|
||||
-
|
||||
name: mode
|
||||
type: u8
|
||||
enum: ovpn-mode
|
||||
|
||||
sub-messages:
|
||||
-
|
||||
@ -2329,6 +2254,9 @@ sub-messages:
|
||||
-
|
||||
value: netkit
|
||||
attribute-set: linkinfo-netkit-attrs
|
||||
-
|
||||
value: ovpn
|
||||
attribute-set: linkinfo-ovpn-attrs
|
||||
-
|
||||
name: linkinfo-member-data-msg
|
||||
formats:
|
||||
@ -2341,6 +2269,7 @@ sub-messages:
|
||||
|
||||
operations:
|
||||
enum-model: directional
|
||||
name-prefix: rtm-
|
||||
list:
|
||||
-
|
||||
name: newlink
|
||||
@ -2351,7 +2280,6 @@ operations:
|
||||
request:
|
||||
value: 16
|
||||
attributes: &link-new-attrs
|
||||
- ifi-index
|
||||
- ifname
|
||||
- net-ns-pid
|
||||
- net-ns-fd
|
||||
@ -2367,13 +2295,18 @@ operations:
|
||||
- txqlen
|
||||
- operstate
|
||||
- linkmode
|
||||
- group
|
||||
- gso-max-size
|
||||
- gso-max-segs
|
||||
- gro-max-size
|
||||
- gso-ipv4-max-size
|
||||
- gro-ipv4-max-size
|
||||
- af-spec
|
||||
-
|
||||
name: newlink-ntf
|
||||
doc: Notify that a link has been created
|
||||
value: 16
|
||||
notify: getlink
|
||||
fixed-header: ifinfomsg
|
||||
-
|
||||
name: dellink
|
||||
doc: Delete an existing link.
|
||||
@ -2383,7 +2316,6 @@ operations:
|
||||
request:
|
||||
value: 17
|
||||
attributes:
|
||||
- ifi-index
|
||||
- ifname
|
||||
-
|
||||
name: getlink
|
||||
@ -2394,7 +2326,6 @@ operations:
|
||||
request:
|
||||
value: 18
|
||||
attributes:
|
||||
- ifi-index
|
||||
- ifname
|
||||
- alt-ifname
|
||||
- ext-mask
|
||||
@ -2402,11 +2333,6 @@ operations:
|
||||
reply:
|
||||
value: 16
|
||||
attributes: &link-all-attrs
|
||||
- ifi-family
|
||||
- ifi-type
|
||||
- ifi-index
|
||||
- ifi-flags
|
||||
- ifi-change
|
||||
- address
|
||||
- broadcast
|
||||
- ifname
|
||||
@ -2452,7 +2378,6 @@ operations:
|
||||
- xdp
|
||||
- event
|
||||
- new-netnsid
|
||||
- if-netnsid
|
||||
- target-netnsid
|
||||
- carrier-up-count
|
||||
- carrier-down-count
|
||||
@ -2499,14 +2424,9 @@ operations:
|
||||
do:
|
||||
request:
|
||||
value: 94
|
||||
attributes:
|
||||
- ifindex
|
||||
reply:
|
||||
value: 92
|
||||
attributes: &link-stats-attrs
|
||||
- family
|
||||
- ifindex
|
||||
- filter-mask
|
||||
- link-64
|
||||
- link-xstats
|
||||
- link-xstats-slave
|
@ -2,6 +2,7 @@
|
||||
|
||||
name: rt-neigh
|
||||
protocol: netlink-raw
|
||||
uapi-header: linux/rtnetlink.h
|
||||
protonum: 0
|
||||
|
||||
doc:
|
||||
@ -48,6 +49,7 @@ definitions:
|
||||
-
|
||||
name: nud-state
|
||||
type: flags
|
||||
enum-name:
|
||||
entries:
|
||||
- incomplete
|
||||
- reachable
|
||||
@ -60,6 +62,7 @@ definitions:
|
||||
-
|
||||
name: ntf-flags
|
||||
type: flags
|
||||
enum-name:
|
||||
entries:
|
||||
- use
|
||||
- self
|
||||
@ -72,12 +75,14 @@ definitions:
|
||||
-
|
||||
name: ntf-ext-flags
|
||||
type: flags
|
||||
enum-name:
|
||||
entries:
|
||||
- managed
|
||||
- locked
|
||||
-
|
||||
name: rtm-type
|
||||
type: enum
|
||||
enum-name:
|
||||
entries:
|
||||
- unspec
|
||||
- unicast
|
||||
@ -179,6 +184,7 @@ definitions:
|
||||
attribute-sets:
|
||||
-
|
||||
name: neighbour-attrs
|
||||
name-prefix: nda-
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
@ -241,6 +247,7 @@ attribute-sets:
|
||||
type: u8
|
||||
-
|
||||
name: ndt-attrs
|
||||
name-prefix: ndta-
|
||||
attributes:
|
||||
-
|
||||
name: name
|
||||
@ -274,6 +281,7 @@ attribute-sets:
|
||||
type: pad
|
||||
-
|
||||
name: ndtpa-attrs
|
||||
name-prefix: ndtpa-
|
||||
attributes:
|
||||
-
|
||||
name: ifindex
|
||||
@ -335,6 +343,7 @@ attribute-sets:
|
||||
|
||||
operations:
|
||||
enum-model: directional
|
||||
name-prefix: rtm-
|
||||
list:
|
||||
-
|
||||
name: newneigh
|
||||
@ -372,7 +381,7 @@ operations:
|
||||
name: delneigh-ntf
|
||||
doc: Notify a neighbour deletion
|
||||
value: 29
|
||||
notify: delneigh
|
||||
notify: getneigh
|
||||
fixed-header: ndmsg
|
||||
-
|
||||
name: getneigh
|
||||
@ -393,6 +402,7 @@ operations:
|
||||
- ifindex
|
||||
- master
|
||||
reply:
|
||||
value: 28
|
||||
attributes: *neighbour-all
|
||||
-
|
||||
name: newneigh-ntf
|
@ -2,6 +2,7 @@
|
||||
|
||||
name: rt-route
|
||||
protocol: netlink-raw
|
||||
uapi-header: linux/rtnetlink.h
|
||||
protonum: 0
|
||||
|
||||
doc:
|
||||
@ -11,6 +12,7 @@ definitions:
|
||||
-
|
||||
name: rtm-type
|
||||
name-prefix: rtn-
|
||||
enum-name:
|
||||
type: enum
|
||||
entries:
|
||||
- unspec
|
||||
@ -245,21 +247,19 @@ attribute-sets:
|
||||
|
||||
operations:
|
||||
enum-model: directional
|
||||
fixed-header: rtmsg
|
||||
name-prefix: rtm-
|
||||
list:
|
||||
-
|
||||
name: getroute
|
||||
doc: Dump route information.
|
||||
attribute-set: route-attrs
|
||||
fixed-header: rtmsg
|
||||
do:
|
||||
request:
|
||||
value: 26
|
||||
attributes:
|
||||
- rtm-family
|
||||
- src
|
||||
- rtm-src-len
|
||||
- dst
|
||||
- rtm-dst-len
|
||||
- iif
|
||||
- oif
|
||||
- ip-proto
|
||||
@ -271,15 +271,6 @@ operations:
|
||||
reply:
|
||||
value: 24
|
||||
attributes: &all-route-attrs
|
||||
- rtm-family
|
||||
- rtm-dst-len
|
||||
- rtm-src-len
|
||||
- rtm-tos
|
||||
- rtm-table
|
||||
- rtm-protocol
|
||||
- rtm-scope
|
||||
- rtm-type
|
||||
- rtm-flags
|
||||
- dst
|
||||
- src
|
||||
- iif
|
||||
@ -311,8 +302,7 @@ operations:
|
||||
dump:
|
||||
request:
|
||||
value: 26
|
||||
attributes:
|
||||
- rtm-family
|
||||
attributes: []
|
||||
reply:
|
||||
value: 24
|
||||
attributes: *all-route-attrs
|
||||
@ -320,7 +310,6 @@ operations:
|
||||
name: newroute
|
||||
doc: Create a new route
|
||||
attribute-set: route-attrs
|
||||
fixed-header: rtmsg
|
||||
do:
|
||||
request:
|
||||
value: 24
|
||||
@ -329,7 +318,6 @@ operations:
|
||||
name: delroute
|
||||
doc: Delete an existing route
|
||||
attribute-set: route-attrs
|
||||
fixed-header: rtmsg
|
||||
do:
|
||||
request:
|
||||
value: 25
|
@ -2,6 +2,7 @@
|
||||
|
||||
name: rt-rule
|
||||
protocol: netlink-raw
|
||||
uapi-header: linux/fib_rules.h
|
||||
protonum: 0
|
||||
|
||||
doc:
|
||||
@ -56,6 +57,7 @@ definitions:
|
||||
-
|
||||
name: fr-act
|
||||
type: enum
|
||||
enum-name:
|
||||
entries:
|
||||
- unspec
|
||||
- to-tbl
|
||||
@ -90,6 +92,7 @@ definitions:
|
||||
attribute-sets:
|
||||
-
|
||||
name: fib-rule-attrs
|
||||
name-prefix: fra-
|
||||
attributes:
|
||||
-
|
||||
name: dst
|
||||
@ -198,6 +201,7 @@ attribute-sets:
|
||||
operations:
|
||||
enum-model: directional
|
||||
fixed-header: fib-rule-hdr
|
||||
name-prefix: rtm-
|
||||
list:
|
||||
-
|
||||
name: newrule
|
||||
@ -234,7 +238,7 @@ operations:
|
||||
name: newrule-ntf
|
||||
doc: Notify a rule creation
|
||||
value: 32
|
||||
notify: newrule
|
||||
notify: getrule
|
||||
-
|
||||
name: delrule
|
||||
doc: Remove an existing FIB rule
|
||||
@ -247,7 +251,7 @@ operations:
|
||||
name: delrule-ntf
|
||||
doc: Notify a rule deletion
|
||||
value: 33
|
||||
notify: delrule
|
||||
notify: getrule
|
||||
-
|
||||
name: getrule
|
||||
doc: Dump all FIB rules
|
File diff suppressed because it is too large
Load Diff
@ -1,219 +0,0 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=============
|
||||
DCCP protocol
|
||||
=============
|
||||
|
||||
|
||||
.. Contents
|
||||
- Introduction
|
||||
- Missing features
|
||||
- Socket options
|
||||
- Sysctl variables
|
||||
- IOCTLs
|
||||
- Other tunables
|
||||
- Notes
|
||||
|
||||
|
||||
Introduction
|
||||
============
|
||||
Datagram Congestion Control Protocol (DCCP) is an unreliable, connection
|
||||
oriented protocol designed to solve issues present in UDP and TCP, particularly
|
||||
for real-time and multimedia (streaming) traffic.
|
||||
It divides into a base protocol (RFC 4340) and pluggable congestion control
|
||||
modules called CCIDs. Like pluggable TCP congestion control, at least one CCID
|
||||
needs to be enabled in order for the protocol to function properly. In the Linux
|
||||
implementation, this is the TCP-like CCID2 (RFC 4341). Additional CCIDs, such as
|
||||
the TCP-friendly CCID3 (RFC 4342), are optional.
|
||||
For a brief introduction to CCIDs and suggestions for choosing a CCID to match
|
||||
given applications, see section 10 of RFC 4340.
|
||||
|
||||
It has a base protocol and pluggable congestion control IDs (CCIDs).
|
||||
|
||||
DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol
|
||||
is at http://www.ietf.org/html.charters/dccp-charter.html
|
||||
|
||||
|
||||
Missing features
|
||||
================
|
||||
The Linux DCCP implementation does not currently support all the features that are
|
||||
specified in RFCs 4340...42.
|
||||
|
||||
The known bugs are at:
|
||||
|
||||
http://www.linuxfoundation.org/collaborate/workgroups/networking/todo#DCCP
|
||||
|
||||
For more up-to-date versions of the DCCP implementation, please consider using
|
||||
the experimental DCCP test tree; instructions for checking this out are on:
|
||||
http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp_testing#Experimental_DCCP_source_tree
|
||||
|
||||
|
||||
Socket options
|
||||
==============
|
||||
DCCP_SOCKOPT_QPOLICY_ID sets the dequeuing policy for outgoing packets. It takes
|
||||
a policy ID as argument and can only be set before the connection (i.e. changes
|
||||
during an established connection are not supported). Currently, two policies are
|
||||
defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special,
|
||||
and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an
|
||||
u32 priority value as ancillary data to sendmsg(), where higher numbers indicate
|
||||
a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to
|
||||
be formatted using a cmsg(3) message header filled in as follows::
|
||||
|
||||
cmsg->cmsg_level = SOL_DCCP;
|
||||
cmsg->cmsg_type = DCCP_SCM_PRIORITY;
|
||||
cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */
|
||||
|
||||
DCCP_SOCKOPT_QPOLICY_TXQLEN sets the maximum length of the output queue. A zero
|
||||
value is always interpreted as unbounded queue length. If different from zero,
|
||||
the interpretation of this parameter depends on the current dequeuing policy
|
||||
(see above): the "simple" policy will enforce a fixed queue size by returning
|
||||
EAGAIN, whereas the "prio" policy enforces a fixed queue length by dropping the
|
||||
lowest-priority packet first. The default value for this parameter is
|
||||
initialised from /proc/sys/net/dccp/default/tx_qlen.
|
||||
|
||||
DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of
|
||||
service codes (RFC 4340, sec. 8.1.2); if this socket option is not set,
|
||||
the socket will fall back to 0 (which means that no meaningful service code
|
||||
is present). On active sockets this is set before connect(); specifying more
|
||||
than one code has no effect (all subsequent service codes are ignored). The
|
||||
case is different for passive sockets, where multiple service codes (up to 32)
|
||||
can be set before calling bind().
|
||||
|
||||
DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet
|
||||
size (application payload size) in bytes, see RFC 4340, section 14.
|
||||
|
||||
DCCP_SOCKOPT_AVAILABLE_CCIDS is also read-only and returns the list of CCIDs
|
||||
supported by the endpoint. The option value is an array of type uint8_t whose
|
||||
size is passed as option length. The minimum array size is 4 elements, the
|
||||
value returned in the optlen argument always reflects the true number of
|
||||
built-in CCIDs.
|
||||
|
||||
DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same
|
||||
time, combining the operation of the next two socket options. This option is
|
||||
preferable over the latter two, since often applications will use the same
|
||||
type of CCID for both directions; and mixed use of CCIDs is not currently well
|
||||
understood. This socket option takes as argument at least one uint8_t value, or
|
||||
an array of uint8_t values, which must match available CCIDS (see above). CCIDs
|
||||
must be registered on the socket before calling connect() or listen().
|
||||
|
||||
DCCP_SOCKOPT_TX_CCID is read/write. It returns the current CCID (if set) or sets
|
||||
the preference list for the TX CCID, using the same format as DCCP_SOCKOPT_CCID.
|
||||
Please note that the getsockopt argument type here is ``int``, not uint8_t.
|
||||
|
||||
DCCP_SOCKOPT_RX_CCID is analogous to DCCP_SOCKOPT_TX_CCID, but for the RX CCID.
|
||||
|
||||
DCCP_SOCKOPT_SERVER_TIMEWAIT enables the server (listening socket) to hold
|
||||
timewait state when closing the connection (RFC 4340, 8.3). The usual case is
|
||||
that the closing server sends a CloseReq, whereupon the client holds timewait
|
||||
state. When this boolean socket option is on, the server sends a Close instead
|
||||
and will enter TIMEWAIT. This option must be set after accept() returns.
|
||||
|
||||
DCCP_SOCKOPT_SEND_CSCOV and DCCP_SOCKOPT_RECV_CSCOV are used for setting the
|
||||
partial checksum coverage (RFC 4340, sec. 9.2). The default is that checksums
|
||||
always cover the entire packet and that only fully covered application data is
|
||||
accepted by the receiver. Hence, when using this feature on the sender, it must
|
||||
be enabled at the receiver, too with suitable choice of CsCov.
|
||||
|
||||
DCCP_SOCKOPT_SEND_CSCOV sets the sender checksum coverage. Values in the
|
||||
range 0..15 are acceptable. The default setting is 0 (full coverage),
|
||||
values between 1..15 indicate partial coverage.
|
||||
|
||||
DCCP_SOCKOPT_RECV_CSCOV is for the receiver and has a different meaning: it
|
||||
sets a threshold, where again values 0..15 are acceptable. The default
|
||||
of 0 means that all packets with a partial coverage will be discarded.
|
||||
Values in the range 1..15 indicate that packets with minimally such a
|
||||
coverage value are also acceptable. The higher the number, the more
|
||||
restrictive this setting (see [RFC 4340, sec. 9.2.1]). Partial coverage
|
||||
settings are inherited to the child socket after accept().
|
||||
|
||||
The following two options apply to CCID 3 exclusively and are getsockopt()-only.
|
||||
In either case, a TFRC info struct (defined in <linux/tfrc.h>) is returned.
|
||||
|
||||
DCCP_SOCKOPT_CCID_RX_INFO
|
||||
Returns a ``struct tfrc_rx_info`` in optval; the buffer for optval and
|
||||
optlen must be set to at least sizeof(struct tfrc_rx_info).
|
||||
|
||||
DCCP_SOCKOPT_CCID_TX_INFO
|
||||
Returns a ``struct tfrc_tx_info`` in optval; the buffer for optval and
|
||||
optlen must be set to at least sizeof(struct tfrc_tx_info).
|
||||
|
||||
On unidirectional connections it is useful to close the unused half-connection
|
||||
via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs.
|
||||
|
||||
|
||||
Sysctl variables
|
||||
================
|
||||
Several DCCP default parameters can be managed by the following sysctls
|
||||
(sysctl net.dccp.default or /proc/sys/net/dccp/default):
|
||||
|
||||
request_retries
|
||||
The number of active connection initiation retries (the number of
|
||||
Requests minus one) before timing out. In addition, it also governs
|
||||
the behaviour of the other, passive side: this variable also sets
|
||||
the number of times DCCP repeats sending a Response when the initial
|
||||
handshake does not progress from RESPOND to OPEN (i.e. when no Ack
|
||||
is received after the initial Request). This value should be greater
|
||||
than 0, suggested is less than 10. Analogue of tcp_syn_retries.
|
||||
|
||||
retries1
|
||||
How often a DCCP Response is retransmitted until the listening DCCP
|
||||
side considers its connecting peer dead. Analogue of tcp_retries1.
|
||||
|
||||
retries2
|
||||
The number of times a general DCCP packet is retransmitted. This has
|
||||
importance for retransmitted acknowledgments and feature negotiation,
|
||||
data packets are never retransmitted. Analogue of tcp_retries2.
|
||||
|
||||
tx_ccid = 2
|
||||
Default CCID for the sender-receiver half-connection. Depending on the
|
||||
choice of CCID, the Send Ack Vector feature is enabled automatically.
|
||||
|
||||
rx_ccid = 2
|
||||
Default CCID for the receiver-sender half-connection; see tx_ccid.
|
||||
|
||||
seq_window = 100
|
||||
The initial sequence window (sec. 7.5.2) of the sender. This influences
|
||||
the local ackno validity and the remote seqno validity windows (7.5.1).
|
||||
Values in the range Wmin = 32 (RFC 4340, 7.5.2) up to 2^32-1 can be set.
|
||||
|
||||
tx_qlen = 5
|
||||
The size of the transmit buffer in packets. A value of 0 corresponds
|
||||
to an unbounded transmit buffer.
|
||||
|
||||
sync_ratelimit = 125 ms
|
||||
The timeout between subsequent DCCP-Sync packets sent in response to
|
||||
sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit
|
||||
of this parameter is milliseconds; a value of 0 disables rate-limiting.
|
||||
|
||||
|
||||
IOCTLS
|
||||
======
|
||||
FIONREAD
|
||||
Works as in udp(7): returns in the ``int`` argument pointer the size of
|
||||
the next pending datagram in bytes, or 0 when no datagram is pending.
|
||||
|
||||
SIOCOUTQ
|
||||
Returns the number of unsent data bytes in the socket send queue as ``int``
|
||||
into the buffer specified by the argument pointer.
|
||||
|
||||
Other tunables
|
||||
==============
|
||||
Per-route rto_min support
|
||||
CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value
|
||||
of the RTO timer. This setting can be modified via the 'rto_min' option
|
||||
of iproute2; for example::
|
||||
|
||||
> ip route change 10.0.0.0/24 rto_min 250j dev wlan0
|
||||
> ip route add 10.0.0.254/32 rto_min 800j dev wlan0
|
||||
> ip route show dev wlan0
|
||||
|
||||
CCID-3 also supports the rto_min setting: it is used to define the lower
|
||||
bound for the expiry of the nofeedback timer. This can be useful on LANs
|
||||
with very low RTTs (e.g., loopback, Gbit ethernet).
|
||||
|
||||
|
||||
Notes
|
||||
=====
|
||||
DCCP does not travel through NAT successfully at present on many boxes. This is
|
||||
because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT
|
||||
support for DCCP has been added.
|
@ -0,0 +1,137 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=====================================================================
|
||||
Linux kernel driver for Huawei Ethernet Device Driver (hinic3) family
|
||||
=====================================================================
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
The hinic3 is a network interface card (NIC) for Data Center. It supports
|
||||
a range of link-speed devices (10GE, 25GE, 100GE, etc.). The hinic3
|
||||
devices can have multiple physical forms: LOM (Lan on Motherboard) NIC,
|
||||
PCIe standard NIC, OCP (Open Compute Project) NIC, etc.
|
||||
|
||||
The hinic3 driver supports the following features:
|
||||
- IPv4/IPv6 TCP/UDP checksum offload
|
||||
- TSO (TCP Segmentation Offload), LRO (Large Receive Offload)
|
||||
- RSS (Receive Side Scaling)
|
||||
- MSI-X interrupt aggregation configuration and interrupt adaptation.
|
||||
- SR-IOV (Single Root I/O Virtualization).
|
||||
|
||||
Content
|
||||
=======
|
||||
|
||||
- Supported PCI vendor ID/device IDs
|
||||
- Source Code Structure of Hinic3 Driver
|
||||
- Management Interface
|
||||
|
||||
Supported PCI vendor ID/device IDs
|
||||
==================================
|
||||
|
||||
19e5:0222 - hinic3 PF/PPF
|
||||
19e5:375F - hinic3 VF
|
||||
|
||||
Prime Physical Function (PPF) is responsible for the management of the
|
||||
whole NIC card. For example, clock synchronization between the NIC and
|
||||
the host. Any PF may serve as a PPF. The PPF is selected dynamically.
|
||||
|
||||
Source Code Structure of Hinic3 Driver
|
||||
======================================
|
||||
|
||||
======================== ================================================
|
||||
hinic3_pci_id_tbl.h Supported device IDs
|
||||
hinic3_hw_intf.h Interface between HW and driver
|
||||
hinic3_queue_common.[ch] Common structures and methods for NIC queues
|
||||
hinic3_common.[ch] Encapsulation of memory operations in Linux
|
||||
hinic3_csr.h Register definitions in the BAR
|
||||
hinic3_hwif.[ch] Interface for BAR
|
||||
hinic3_eqs.[ch] Interface for AEQs and CEQs
|
||||
hinic3_mbox.[ch] Interface for mailbox
|
||||
hinic3_mgmt.[ch] Management interface based on mailbox and AEQ
|
||||
hinic3_wq.[ch] Work queue data structures and interface
|
||||
hinic3_cmdq.[ch] Command queue is used to post command to HW
|
||||
hinic3_hwdev.[ch] HW structures and methods abstractions
|
||||
hinic3_lld.[ch] Auxiliary driver adaptation layer
|
||||
hinic3_hw_comm.[ch] Interface for common HW operations
|
||||
hinic3_mgmt_interface.h Interface between firmware and driver
|
||||
hinic3_hw_cfg.[ch] Interface for HW configuration
|
||||
hinic3_irq.c Interrupt request
|
||||
hinic3_netdev_ops.c Operations registered to Linux kernel stack
|
||||
hinic3_nic_dev.h NIC structures and methods abstractions
|
||||
hinic3_main.c Main Linux kernel driver
|
||||
hinic3_nic_cfg.[ch] NIC service configuration
|
||||
hinic3_nic_io.[ch] Management plane interface for TX and RX
|
||||
hinic3_rss.[ch] Interface for Receive Side Scaling (RSS)
|
||||
hinic3_rx.[ch] Interface for transmit
|
||||
hinic3_tx.[ch] Interface for receive
|
||||
hinic3_ethtool.c Interface for ethtool operations (ops)
|
||||
hinic3_filter.c Interface for MAC address
|
||||
======================== ================================================
|
||||
|
||||
Management Interface
|
||||
====================
|
||||
|
||||
Asynchronous Event Queue (AEQ)
|
||||
------------------------------
|
||||
|
||||
AEQ receives high priority events from the HW over a descriptor queue.
|
||||
Every descriptor is a fixed size of 64 bytes. AEQ can receive solicited or
|
||||
unsolicited events. Every device, VF or PF, can have up to 4 AEQs.
|
||||
Every AEQ is associated to a dedicated IRQ. AEQ can receive multiple types
|
||||
of events, but in practice the hinic3 driver ignores all events except for
|
||||
2 mailbox related events.
|
||||
|
||||
Mailbox
|
||||
-------
|
||||
|
||||
Mailbox is a communication mechanism between the hinic3 driver and the HW.
|
||||
Each device has an independent mailbox. Driver can use the mailbox to send
|
||||
requests to management. Driver receives mailbox messages, such as responses
|
||||
to requests, over the AEQ (using event HINIC3_AEQ_FOR_MBOX). Due to the
|
||||
limited size of mailbox data register, mailbox messages are sent
|
||||
segment-by-segment.
|
||||
|
||||
Every device can use its mailbox to post request to firmware. The mailbox
|
||||
can also be used to post requests and responses between the PF and its VFs.
|
||||
|
||||
Completion Event Queue (CEQ)
|
||||
----------------------------
|
||||
|
||||
The implementation of CEQ is the same as AEQ. It receives completion events
|
||||
from HW over a fixed size descriptor of 32 bits. Every device can have up
|
||||
to 32 CEQs. Every CEQ has a dedicated IRQ. CEQ only receives solicited
|
||||
events that are responses to requests from the driver. CEQ can receive
|
||||
multiple types of events, but in practice the hinic3 driver ignores all
|
||||
events except for HINIC3_CMDQ that represents completion of previously
|
||||
posted commands on a cmdq.
|
||||
|
||||
Command Queue (cmdq)
|
||||
--------------------
|
||||
|
||||
Every cmdq has a dedicated work queue on which commands are posted.
|
||||
Commands on the work queue are fixed size descriptor of size 64 bytes.
|
||||
Completion of a command will be indicated using ctrl bits in the
|
||||
descriptor that carried the command. Notification of command completions
|
||||
will also be provided via event on CEQ. Every device has 4 command queues
|
||||
that are initialized as a set (called cmdqs), each with its own type.
|
||||
Hinic3 driver only uses type HINIC3_CMDQ_SYNC.
|
||||
|
||||
Work Queues(WQ)
|
||||
---------------
|
||||
|
||||
Work queues are logical arrays of fixed size WQEs. The array may be spread
|
||||
over multiple non-contiguous pages using indirection table. Work queues are
|
||||
used by I/O queues and command queues.
|
||||
|
||||
Global function ID
|
||||
------------------
|
||||
|
||||
Every function, PF or VF, has a unique ordinal identification within the device.
|
||||
Many management commands (mbox or cmdq) contain this ID so HW can apply the
|
||||
command effect to the right function.
|
||||
|
||||
PF is allowed to post management commands to a subordinate VF by specifying the
|
||||
VFs ID. A VF must provide its own ID. Anti-spoofing in the HW will cause
|
||||
command from a VF to fail if it contains the wrong ID.
|
||||
|
@ -28,6 +28,7 @@ Contents:
|
||||
freescale/gianfar
|
||||
google/gve
|
||||
huawei/hinic
|
||||
huawei/hinic3
|
||||
intel/e100
|
||||
intel/e1000
|
||||
intel/e1000e
|
||||
@ -55,6 +56,7 @@ Contents:
|
||||
ti/cpsw_switchdev
|
||||
ti/am65_nuss_cpsw_switchdev
|
||||
ti/tlan
|
||||
ti/icssg_prueth
|
||||
wangxun/txgbe
|
||||
wangxun/ngbe
|
||||
|
||||
|
@ -28,9 +28,60 @@ devlink dev info provides version information for all three components. In
|
||||
addition to the version the hg commit hash of the build is included as a
|
||||
separate entry.
|
||||
|
||||
Upgrading Firmware
|
||||
------------------
|
||||
|
||||
fbnic supports updating firmware using signed PLDM images with devlink dev
|
||||
flash. PLDM images are written into the flash. Flashing does not interrupt
|
||||
the operation of the device.
|
||||
|
||||
On host boot the latest UEFI driver is always used, no explicit activation
|
||||
is required. Firmware activation is required to run new control firmware. cmrt
|
||||
firmware can only be activated by power cycling the NIC.
|
||||
|
||||
Statistics
|
||||
----------
|
||||
|
||||
TX MAC Interface
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
- ``ptp_illegal_req``: packets sent to the NIC with PTP request bit set but routed to BMC/FW
|
||||
- ``ptp_good_ts``: packets successfully routed to MAC with PTP request bit set
|
||||
- ``ptp_bad_ts``: packets destined for MAC with PTP request bit set but aborted because of some error (e.g., DMA read error)
|
||||
|
||||
TX Extension (TEI) Interface (TTI)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- ``tti_cm_drop``: control messages dropped at the TX Extension (TEI) Interface because of credit starvation
|
||||
- ``tti_frame_drop``: packets dropped at the TX Extension (TEI) Interface because of credit starvation
|
||||
- ``tti_tbi_drop``: packets dropped at the TX BMC Interface (TBI) because of credit starvation
|
||||
|
||||
RXB (RX Buffer) Enqueue
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- ``rxb_integrity_err[i]``: frames enqueued with integrity errors (e.g., multi-bit ECC errors) on RXB input i
|
||||
- ``rxb_mac_err[i]``: frames enqueued with MAC end-of-frame errors (e.g., bad FCS) on RXB input i
|
||||
- ``rxb_parser_err[i]``: frames experienced RPC parser errors
|
||||
- ``rxb_frm_err[i]``: frames experienced signaling errors (e.g., missing end-of-packet/start-of-packet) on RXB input i
|
||||
- ``rxb_drbo[i]_frames``: frames received at RXB input i
|
||||
- ``rxb_drbo[i]_bytes``: bytes received at RXB input i
|
||||
|
||||
RXB (RX Buffer) FIFO
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- ``rxb_fifo[i]_drop``: transitions into the drop state on RXB pool i
|
||||
- ``rxb_fifo[i]_dropped_frames``: frames dropped on RXB pool i
|
||||
- ``rxb_fifo[i]_ecn``: transitions into the ECN mark state on RXB pool i
|
||||
- ``rxb_fifo[i]_level``: current occupancy of RXB pool i
|
||||
|
||||
RXB (RX Buffer) Dequeue
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- ``rxb_intf[i]_frames``: frames sent to the output i
|
||||
- ``rxb_intf[i]_bytes``: bytes sent to the output i
|
||||
- ``rxb_pbuf[i]_frames``: frames sent to output i from the perspective of internal packet buffer
|
||||
- ``rxb_pbuf[i]_bytes``: bytes sent to output i from the perspective of internal packet buffer
|
||||
|
||||
RPC (Rx parser)
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
@ -44,6 +95,15 @@ RPC (Rx parser)
|
||||
- ``rpc_out_of_hdr_err``: frames where header was larger than parsable region
|
||||
- ``ovr_size_err``: oversized frames
|
||||
|
||||
Hardware Queues
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
1. RX DMA Engine:
|
||||
|
||||
- ``rde_[i]_pkt_err``: packets with MAC EOP, RPC parser, RXB truncation, or RDE frame truncation errors. These error are flagged in the packet metadata because of cut-through support but the actual drop happens once PCIE/RDE is reached.
|
||||
- ``rde_[i]_pkt_cq_drop``: packets dropped because RCQ is full
|
||||
- ``rde_[i]_pkt_bdq_drop``: packets dropped because HPQ or PPQ ran out of host buffer
|
||||
|
||||
PCIe
|
||||
~~~~
|
||||
|
||||
|
@ -0,0 +1,56 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
==============================================
|
||||
Texas Instruments ICSSG PRUETH ethernet driver
|
||||
==============================================
|
||||
|
||||
:Version: 1.0
|
||||
|
||||
ICSSG Firmware
|
||||
==============
|
||||
|
||||
Every ICSSG core has two Programmable Real-Time Unit(PRUs), two auxiliary
|
||||
Real-Time Transfer Unit (RTUs), and two Transmit Real-Time Transfer Units
|
||||
(TX_PRUs). Each one of these runs its own firmware. The firmwares combnined are
|
||||
referred as ICSSG Firmware.
|
||||
|
||||
Firmware Statistics
|
||||
===================
|
||||
|
||||
The ICSSG firmware maintains certain statistics which are dumped by the driver
|
||||
via ``ethtool -S <interface>``
|
||||
|
||||
These statistics are as follows,
|
||||
|
||||
- ``FW_RTU_PKT_DROP``: Diagnostic error counter which increments when RTU drops a locally injected packet due to port being disabled or rule violation.
|
||||
- ``FW_Q0_OVERFLOW``: TX overflow counter for queue0
|
||||
- ``FW_Q1_OVERFLOW``: TX overflow counter for queue1
|
||||
- ``FW_Q2_OVERFLOW``: TX overflow counter for queue2
|
||||
- ``FW_Q3_OVERFLOW``: TX overflow counter for queue3
|
||||
- ``FW_Q4_OVERFLOW``: TX overflow counter for queue4
|
||||
- ``FW_Q5_OVERFLOW``: TX overflow counter for queue5
|
||||
- ``FW_Q6_OVERFLOW``: TX overflow counter for queue6
|
||||
- ``FW_Q7_OVERFLOW``: TX overflow counter for queue7
|
||||
- ``FW_DROPPED_PKT``: This counter is incremented when a packet is dropped at PRU because of rule violation.
|
||||
- ``FW_RX_ERROR``: Incremented if there was a CRC error or Min/Max frame error at PRU
|
||||
- ``FW_RX_DS_INVALID``: Incremented when RTU detects Data Status invalid condition
|
||||
- ``FW_TX_DROPPED_PACKET``: Counter for packets dropped via TX Port
|
||||
- ``FW_TX_TS_DROPPED_PACKET``: Counter for packets with TS flag dropped via TX Port
|
||||
- ``FW_INF_PORT_DISABLED``: Incremented when RX frame is dropped due to port being disabled
|
||||
- ``FW_INF_SAV``: Incremented when RX frame is dropped due to Source Address violation
|
||||
- ``FW_INF_SA_DL``: Incremented when RX frame is dropped due to Source Address being in the denylist
|
||||
- ``FW_INF_PORT_BLOCKED``: Incremented when RX frame is dropped due to port being blocked and frame being a special frame
|
||||
- ``FW_INF_DROP_TAGGED`` : Incremented when RX frame is dropped for being tagged
|
||||
- ``FW_INF_DROP_PRIOTAGGED``: Incremented when RX frame is dropped for being priority tagged
|
||||
- ``FW_INF_DROP_NOTAG``: Incremented when RX frame is dropped for being untagged
|
||||
- ``FW_INF_DROP_NOTMEMBER``: Incremented when RX frame is dropped for port not being member of VLAN
|
||||
- ``FW_RX_EOF_SHORT_FRMERR``: Incremented if End Of Frame (EOF) task is scheduled without seeing RX_B1
|
||||
- ``FW_RX_B0_DROP_EARLY_EOF``: Incremented when frame is dropped due to Early EOF
|
||||
- ``FW_TX_JUMBO_FRM_CUTOFF``: Incremented when frame is cut off to prevent packet size > 2000 Bytes
|
||||
- ``FW_RX_EXP_FRAG_Q_DROP``: Incremented when express frame is received in the same queue as the previous fragment
|
||||
- ``FW_RX_FIFO_OVERRUN``: RX fifo overrun counter
|
||||
- ``FW_CUT_THR_PKT``: Incremented when a packet is forwarded using Cut-Through forwarding method
|
||||
- ``FW_HOST_RX_PKT_CNT``: Number of valid packets sent by Rx PRU to Host on PSI
|
||||
- ``FW_HOST_TX_PKT_CNT``: Number of valid packets copied by RTU0 to Tx queues
|
||||
- ``FW_HOST_EGRESS_Q_PRE_OVERFLOW``: Host Egress Q (Pre-emptible) Overflow Counter
|
||||
- ``FW_HOST_EGRESS_Q_EXP_OVERFLOW``: Host Egress Q (Pre-emptible) Overflow Counter
|
@ -86,6 +86,10 @@ In case software/firmware components are loaded from the disk (e.g.
|
||||
``/lib/firmware``) only the running version should be reported via
|
||||
the kernel API.
|
||||
|
||||
Please note that any security versions reported via devlink are purely
|
||||
informational. Devlink does not use a secure channel to communicate with
|
||||
the device.
|
||||
|
||||
Generic Versions
|
||||
================
|
||||
|
||||
|
@ -451,7 +451,7 @@ be added to the following table:
|
||||
* - ``udp_parsing``
|
||||
- ``drop``
|
||||
- Traps packets dropped due to an error in the UDP header parsing.
|
||||
This packet trap could include checksum errorrs, an improper UDP
|
||||
This packet trap could include checksum errors, an improper UDP
|
||||
length detected (smaller than 8 bytes) or detection of header
|
||||
truncation.
|
||||
* - ``tcp_parsing``
|
||||
|
@ -84,6 +84,7 @@ parameters, info versions, and other features it supports.
|
||||
i40e
|
||||
ionic
|
||||
ice
|
||||
ixgbe
|
||||
mlx4
|
||||
mlx5
|
||||
mlxsw
|
||||
|
171
Documentation/networking/devlink/ixgbe.rst
Normal file
171
Documentation/networking/devlink/ixgbe.rst
Normal file
@ -0,0 +1,171 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=====================
|
||||
ixgbe devlink support
|
||||
=====================
|
||||
|
||||
This document describes the devlink features implemented by the ``ixgbe``
|
||||
device driver.
|
||||
|
||||
Info versions
|
||||
=============
|
||||
|
||||
Any of the versions dealing with the security presented by ``devlink-info``
|
||||
is purely informational. Devlink does not use a secure channel to communicate
|
||||
with the device.
|
||||
|
||||
The ``ixgbe`` driver reports the following versions
|
||||
|
||||
.. list-table:: devlink info versions implemented
|
||||
:widths: 5 5 5 90
|
||||
|
||||
* - Name
|
||||
- Type
|
||||
- Example
|
||||
- Description
|
||||
* - ``board.id``
|
||||
- fixed
|
||||
- H49289-000
|
||||
- The Product Board Assembly (PBA) identifier of the board.
|
||||
* - ``fw.undi``
|
||||
- running
|
||||
- 1.1937.0
|
||||
- Version of the Option ROM containing the UEFI driver. The version is
|
||||
reported in ``major.minor.patch`` format. The major version is
|
||||
incremented whenever a major breaking change occurs, or when the
|
||||
minor version would overflow. The minor version is incremented for
|
||||
non-breaking changes and reset to 1 when the major version is
|
||||
incremented. The patch version is normally 0 but is incremented when
|
||||
a fix is delivered as a patch against an older base Option ROM.
|
||||
* - ``fw.undi.srev``
|
||||
- running
|
||||
- 4
|
||||
- Number indicating the security revision of the Option ROM.
|
||||
* - ``fw.bundle_id``
|
||||
- running
|
||||
- 0x80000d0d
|
||||
- Unique identifier of the firmware image file that was loaded onto
|
||||
the device. Also referred to as the EETRACK identifier of the NVM.
|
||||
* - ``fw.mgmt.api``
|
||||
- running
|
||||
- 1.5.1
|
||||
- 3-digit version number (major.minor.patch) of the API exported over
|
||||
the AdminQ by the management firmware. Used by the driver to
|
||||
identify what commands are supported. Historical versions of the
|
||||
kernel only displayed a 2-digit version number (major.minor).
|
||||
* - ``fw.mgmt.build``
|
||||
- running
|
||||
- 0x305d955f
|
||||
- Unique identifier of the source for the management firmware.
|
||||
* - ``fw.mgmt.srev``
|
||||
- running
|
||||
- 3
|
||||
- Number indicating the security revision of the firmware.
|
||||
* - ``fw.psid.api``
|
||||
- running
|
||||
- 0.80
|
||||
- Version defining the format of the flash contents.
|
||||
* - ``fw.netlist``
|
||||
- running
|
||||
- 1.1.2000-6.7.0
|
||||
- The version of the netlist module. This module defines the device's
|
||||
Ethernet capabilities and default settings, and is used by the
|
||||
management firmware as part of managing link and device
|
||||
connectivity.
|
||||
* - ``fw.netlist.build``
|
||||
- running
|
||||
- 0xee16ced7
|
||||
- The first 4 bytes of the hash of the netlist module contents.
|
||||
|
||||
Flash Update
|
||||
============
|
||||
|
||||
The ``ixgbe`` driver implements support for flash update using the
|
||||
``devlink-flash`` interface. It supports updating the device flash using a
|
||||
combined flash image that contains the ``fw.mgmt``, ``fw.undi``, and
|
||||
``fw.netlist`` components.
|
||||
|
||||
.. list-table:: List of supported overwrite modes
|
||||
:widths: 5 95
|
||||
|
||||
* - Bits
|
||||
- Behavior
|
||||
* - ``DEVLINK_FLASH_OVERWRITE_SETTINGS``
|
||||
- Do not preserve settings stored in the flash components being
|
||||
updated. This includes overwriting the port configuration that
|
||||
determines the number of physical functions the device will
|
||||
initialize with.
|
||||
* - ``DEVLINK_FLASH_OVERWRITE_SETTINGS`` and ``DEVLINK_FLASH_OVERWRITE_IDENTIFIERS``
|
||||
- Do not preserve either settings or identifiers. Overwrite everything
|
||||
in the flash with the contents from the provided image, without
|
||||
performing any preservation. This includes overwriting device
|
||||
identifying fields such as the MAC address, Vital product Data (VPD) area,
|
||||
and device serial number. It is expected that this combination be used with an
|
||||
image customized for the specific device.
|
||||
|
||||
Reload
|
||||
======
|
||||
|
||||
The ``ixgbe`` driver supports activating new firmware after a flash update
|
||||
using ``DEVLINK_CMD_RELOAD`` with the ``DEVLINK_RELOAD_ACTION_FW_ACTIVATE``
|
||||
action.
|
||||
|
||||
.. code:: shell
|
||||
|
||||
$ devlink dev reload pci/0000:01:00.0 reload action fw_activate
|
||||
|
||||
The new firmware is activated by issuing a device specific Embedded
|
||||
Management Processor reset which requests the device to reset and reload the
|
||||
EMP firmware image.
|
||||
|
||||
The driver does not currently support reloading the driver via
|
||||
``DEVLINK_RELOAD_ACTION_DRIVER_REINIT``.
|
||||
|
||||
Regions
|
||||
=======
|
||||
|
||||
The ``ixgbe`` driver implements the following regions for accessing internal
|
||||
device data.
|
||||
|
||||
.. list-table:: regions implemented
|
||||
:widths: 15 85
|
||||
|
||||
* - Name
|
||||
- Description
|
||||
* - ``nvm-flash``
|
||||
- The contents of the entire flash chip, sometimes referred to as
|
||||
the device's Non Volatile Memory.
|
||||
* - ``shadow-ram``
|
||||
- The contents of the Shadow RAM, which is loaded from the beginning
|
||||
of the flash. Although the contents are primarily from the flash,
|
||||
this area also contains data generated during device boot which is
|
||||
not stored in flash.
|
||||
* - ``device-caps``
|
||||
- The contents of the device firmware's capabilities buffer. Useful to
|
||||
determine the current state and configuration of the device.
|
||||
|
||||
Both the ``nvm-flash`` and ``shadow-ram`` regions can be accessed without a
|
||||
snapshot. The ``device-caps`` region requires a snapshot as the contents are
|
||||
sent by firmware and can't be split into separate reads.
|
||||
|
||||
Users can request an immediate capture of a snapshot for all three regions
|
||||
via the ``DEVLINK_CMD_REGION_NEW`` command.
|
||||
|
||||
.. code:: shell
|
||||
|
||||
$ devlink region show
|
||||
pci/0000:01:00.0/nvm-flash: size 10485760 snapshot [] max 1
|
||||
pci/0000:01:00.0/device-caps: size 4096 snapshot [] max 10
|
||||
|
||||
$ devlink region new pci/0000:01:00.0/nvm-flash snapshot 1
|
||||
|
||||
$ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
|
||||
0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
|
||||
0000000000000010 0000 0000 ffff ff04 0029 8c00 0028 8cc8
|
||||
0000000000000020 0016 0bb8 0016 1720 0000 0000 c00f 3ffc
|
||||
0000000000000030 bada cce5 bada cce5 bada cce5 bada cce5
|
||||
|
||||
$ devlink region read pci/0000:01:00.0/nvm-flash snapshot 1 address 0 length 16
|
||||
0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
|
||||
|
||||
$ devlink region delete pci/0000:01:00.0/device-caps snapshot 1
|
@ -62,15 +62,15 @@ More Info
|
||||
https://lore.kernel.org/netdev/20240831004313.3713467-1-almasrymina@google.com/
|
||||
|
||||
|
||||
Interface
|
||||
=========
|
||||
RX Interface
|
||||
============
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
tools/testing/selftests/net/ncdevmem.c:do_server shows an example of setting up
|
||||
the RX path of this API.
|
||||
./tools/testing/selftests/drivers/net/hw/ncdevmem:do_server shows an example of
|
||||
setting up the RX path of this API.
|
||||
|
||||
|
||||
NIC Setup
|
||||
@ -235,6 +235,148 @@ can be less than the tokens provided by the user in case of:
|
||||
(a) an internal kernel leak bug.
|
||||
(b) the user passed more than 1024 frags.
|
||||
|
||||
TX Interface
|
||||
============
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
./tools/testing/selftests/drivers/net/hw/ncdevmem:do_client shows an example of
|
||||
setting up the TX path of this API.
|
||||
|
||||
|
||||
NIC Setup
|
||||
---------
|
||||
|
||||
The user must bind a TX dmabuf to a given NIC using the netlink API::
|
||||
|
||||
struct netdev_bind_tx_req *req = NULL;
|
||||
struct netdev_bind_tx_rsp *rsp = NULL;
|
||||
struct ynl_error yerr;
|
||||
|
||||
*ys = ynl_sock_create(&ynl_netdev_family, &yerr);
|
||||
|
||||
req = netdev_bind_tx_req_alloc();
|
||||
netdev_bind_tx_req_set_ifindex(req, ifindex);
|
||||
netdev_bind_tx_req_set_fd(req, dmabuf_fd);
|
||||
|
||||
rsp = netdev_bind_tx(*ys, req);
|
||||
|
||||
tx_dmabuf_id = rsp->id;
|
||||
|
||||
|
||||
The netlink API returns a dmabuf_id: a unique ID that refers to this dmabuf
|
||||
that has been bound.
|
||||
|
||||
The user can unbind the dmabuf from the netdevice by closing the netlink socket
|
||||
that established the binding. We do this so that the binding is automatically
|
||||
unbound even if the userspace process crashes.
|
||||
|
||||
Note that any reasonably well-behaved dmabuf from any exporter should work with
|
||||
devmem TCP, even if the dmabuf is not actually backed by devmem. An example of
|
||||
this is udmabuf, which wraps user memory (non-devmem) in a dmabuf.
|
||||
|
||||
Socket Setup
|
||||
------------
|
||||
|
||||
The user application must use MSG_ZEROCOPY flag when sending devmem TCP. Devmem
|
||||
cannot be copied by the kernel, so the semantics of the devmem TX are similar
|
||||
to the semantics of MSG_ZEROCOPY::
|
||||
|
||||
setsockopt(socket_fd, SOL_SOCKET, SO_ZEROCOPY, &opt, sizeof(opt));
|
||||
|
||||
It is also recommended that the user binds the TX socket to the same interface
|
||||
the dma-buf has been bound to via SO_BINDTODEVICE::
|
||||
|
||||
setsockopt(socket_fd, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname) + 1);
|
||||
|
||||
|
||||
Sending data
|
||||
------------
|
||||
|
||||
Devmem data is sent using the SCM_DEVMEM_DMABUF cmsg.
|
||||
|
||||
The user should create a msghdr where,
|
||||
|
||||
* iov_base is set to the offset into the dmabuf to start sending from
|
||||
* iov_len is set to the number of bytes to be sent from the dmabuf
|
||||
|
||||
The user passes the dma-buf id to send from via the dmabuf_tx_cmsg.dmabuf_id.
|
||||
|
||||
The example below sends 1024 bytes from offset 100 into the dmabuf, and 2048
|
||||
from offset 2000 into the dmabuf. The dmabuf to send from is tx_dmabuf_id::
|
||||
|
||||
char ctrl_data[CMSG_SPACE(sizeof(struct dmabuf_tx_cmsg))];
|
||||
struct dmabuf_tx_cmsg ddmabuf;
|
||||
struct msghdr msg = {};
|
||||
struct cmsghdr *cmsg;
|
||||
struct iovec iov[2];
|
||||
|
||||
iov[0].iov_base = (void*)100;
|
||||
iov[0].iov_len = 1024;
|
||||
iov[1].iov_base = (void*)2000;
|
||||
iov[1].iov_len = 2048;
|
||||
|
||||
msg.msg_iov = iov;
|
||||
msg.msg_iovlen = 2;
|
||||
|
||||
msg.msg_control = ctrl_data;
|
||||
msg.msg_controllen = sizeof(ctrl_data);
|
||||
|
||||
cmsg = CMSG_FIRSTHDR(&msg);
|
||||
cmsg->cmsg_level = SOL_SOCKET;
|
||||
cmsg->cmsg_type = SCM_DEVMEM_DMABUF;
|
||||
cmsg->cmsg_len = CMSG_LEN(sizeof(struct dmabuf_tx_cmsg));
|
||||
|
||||
ddmabuf.dmabuf_id = tx_dmabuf_id;
|
||||
|
||||
*((struct dmabuf_tx_cmsg *)CMSG_DATA(cmsg)) = ddmabuf;
|
||||
|
||||
sendmsg(socket_fd, &msg, MSG_ZEROCOPY);
|
||||
|
||||
|
||||
Reusing TX dmabufs
|
||||
------------------
|
||||
|
||||
Similar to MSG_ZEROCOPY with regular memory, the user should not modify the
|
||||
contents of the dma-buf while a send operation is in progress. This is because
|
||||
the kernel does not keep a copy of the dmabuf contents. Instead, the kernel
|
||||
will pin and send data from the buffer available to the userspace.
|
||||
|
||||
Just as in MSG_ZEROCOPY, the kernel notifies the userspace of send completions
|
||||
using MSG_ERRQUEUE::
|
||||
|
||||
int64_t tstop = gettimeofday_ms() + waittime_ms;
|
||||
char control[CMSG_SPACE(100)] = {};
|
||||
struct sock_extended_err *serr;
|
||||
struct msghdr msg = {};
|
||||
struct cmsghdr *cm;
|
||||
int retries = 10;
|
||||
__u32 hi, lo;
|
||||
|
||||
msg.msg_control = control;
|
||||
msg.msg_controllen = sizeof(control);
|
||||
|
||||
while (gettimeofday_ms() < tstop) {
|
||||
if (!do_poll(fd)) continue;
|
||||
|
||||
ret = recvmsg(fd, &msg, MSG_ERRQUEUE);
|
||||
|
||||
for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm)) {
|
||||
serr = (void *)CMSG_DATA(cm);
|
||||
|
||||
hi = serr->ee_data;
|
||||
lo = serr->ee_info;
|
||||
|
||||
fprintf(stdout, "tx complete [%d,%d]\n", lo, hi);
|
||||
}
|
||||
}
|
||||
|
||||
After the associated sendmsg has been completed, the dmabuf can be reused by
|
||||
the userspace.
|
||||
|
||||
|
||||
Implementation & Caveats
|
||||
========================
|
||||
|
||||
|
@ -48,7 +48,6 @@ Contents:
|
||||
ax25
|
||||
bonding
|
||||
cdc_mbim
|
||||
dccp
|
||||
dctcp
|
||||
devmem
|
||||
dns_resolver
|
||||
|
@ -37,8 +37,8 @@ ip_no_pmtu_disc - INTEGER
|
||||
Mode 3 is a hardened pmtu discover mode. The kernel will only
|
||||
accept fragmentation-needed errors if the underlying protocol
|
||||
can verify them besides a plain socket lookup. Current
|
||||
protocols for which pmtu events will be honored are TCP, SCTP
|
||||
and DCCP as they verify e.g. the sequence number or the
|
||||
protocols for which pmtu events will be honored are TCP and
|
||||
SCTP as they verify e.g. the sequence number or the
|
||||
association. This mode should not be enabled globally but is
|
||||
only intended to secure e.g. name servers in namespaces where
|
||||
TCP path mtu must still work but path MTU information of other
|
||||
@ -735,7 +735,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
|
||||
net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables
|
||||
automatic tuning of that socket's receive buffer size, in which
|
||||
case this value is ignored.
|
||||
Default: between 131072 and 6MB, depending on RAM size.
|
||||
Default: between 131072 and 32MB, depending on RAM size.
|
||||
|
||||
tcp_sack - BOOLEAN
|
||||
Enable select acknowledgments (SACKS).
|
||||
@ -1099,7 +1099,7 @@ tcp_limit_output_bytes - INTEGER
|
||||
limits the number of bytes on qdisc or device to reduce artificial
|
||||
RTT/cwnd and reduce bufferbloat.
|
||||
|
||||
Default: 1048576 (16 * 65536)
|
||||
Default: 4194304 (4 MB)
|
||||
|
||||
tcp_challenge_ack_limit - INTEGER
|
||||
Limits number of Challenge ACK sent per second, as recommended
|
||||
|
@ -10,6 +10,7 @@ Type Name fastpath_tx_acce
|
||||
=================================== =========================== =================== =================== ===================================================================================
|
||||
unsigned_long:32 priv_flags read_mostly __dev_queue_xmit(tx)
|
||||
unsigned_long:1 lltx read_mostly HARD_TX_LOCK,HARD_TX_TRYLOCK,HARD_TX_UNLOCK(tx)
|
||||
unsigned long:1 netmem_tx:1; read_mostly
|
||||
char name[16]
|
||||
struct netdev_name_node* name_node
|
||||
struct dev_ifalias* ifalias
|
||||
@ -131,7 +132,7 @@ struct ref_tracker_dir refcnt_tracker
|
||||
struct list_head link_watch_list
|
||||
enum:8 reg_state
|
||||
bool dismantle
|
||||
enum:16 rtnl_link_state
|
||||
bool rtnl_link_initilizing
|
||||
bool needs_free_netdev
|
||||
void*priv_destructor struct net_device
|
||||
struct netpoll_info* npinfo read_mostly napi_poll/napi_poll_lock
|
||||
|
@ -37,6 +37,8 @@ unsigned_long LINUX_MIB_TIMEWAITKILLED
|
||||
unsigned_long LINUX_MIB_PAWSACTIVEREJECTED
|
||||
unsigned_long LINUX_MIB_PAWSESTABREJECTED
|
||||
unsigned_long LINUX_MIB_TSECR_REJECTED
|
||||
unsigned_long LINUX_MIB_PAWS_OLD_ACK
|
||||
unsigned_long LINUX_MIB_PAWS_TW_REJECTED
|
||||
unsigned_long LINUX_MIB_DELAYEDACKLOST
|
||||
unsigned_long LINUX_MIB_LISTENOVERFLOWS
|
||||
unsigned_long LINUX_MIB_LISTENDROPS
|
||||
|
@ -188,3 +188,8 @@ Redundancy) frames from one port to another in hardware.
|
||||
This should be set for devices which duplicate outgoing HSR (High-availability
|
||||
Seamless Redundancy) or PRP (Parallel Redundancy Protocol) tags automatically
|
||||
frames in hardware.
|
||||
|
||||
* netmem-tx
|
||||
|
||||
This should be set for devices which support netmem TX. See
|
||||
Documentation/networking/netmem.rst
|
||||
|
@ -8,7 +8,7 @@ Network Devices, the Kernel, and You!
|
||||
Introduction
|
||||
============
|
||||
The following is a random collection of documentation regarding
|
||||
network devices.
|
||||
network devices. It is intended for driver developers.
|
||||
|
||||
struct net_device lifetime rules
|
||||
================================
|
||||
@ -314,13 +314,8 @@ napi->poll:
|
||||
softirq
|
||||
will be called with interrupts disabled by netconsole.
|
||||
|
||||
struct netdev_queue_mgmt_ops synchronization rules
|
||||
==================================================
|
||||
|
||||
All queue management ndo callbacks are holding netdev instance lock.
|
||||
|
||||
RTNL and netdev instance lock
|
||||
=============================
|
||||
netdev instance lock
|
||||
====================
|
||||
|
||||
Historically, all networking control operations were protected by a single
|
||||
global lock known as ``rtnl_lock``. There is an ongoing effort to replace this
|
||||
@ -328,10 +323,13 @@ global lock with separate locks for each network namespace. Additionally,
|
||||
properties of individual netdev are increasingly protected by per-netdev locks.
|
||||
|
||||
For device drivers that implement shaping or queue management APIs, all control
|
||||
operations will be performed under the netdev instance lock. Currently, this
|
||||
instance lock is acquired within the context of ``rtnl_lock``. The drivers
|
||||
can also explicitly request instance lock to be acquired via
|
||||
``request_ops_lock``. In the future, there will be an option for individual
|
||||
operations will be performed under the netdev instance lock.
|
||||
Drivers can also explicitly request instance lock to be held during ops
|
||||
by setting ``request_ops_lock`` to true. Code comments and docs refer
|
||||
to drivers which have ops called under the instance lock as "ops locked".
|
||||
See also the documentation of the ``lock`` member of struct net_device.
|
||||
|
||||
In the future, there will be an option for individual
|
||||
drivers to opt out of using ``rtnl_lock`` and instead perform their control
|
||||
operations directly under the netdev instance lock.
|
||||
|
||||
@ -344,18 +342,59 @@ functions handle acquiring the instance lock themselves, while the
|
||||
``netif_xxx`` functions assume that the driver has already acquired
|
||||
the instance lock.
|
||||
|
||||
struct net_device_ops
|
||||
---------------------
|
||||
|
||||
``ndos`` are called without holding the instance lock for most drivers.
|
||||
|
||||
"Ops locked" drivers will have most of the ``ndos`` invoked under
|
||||
the instance lock.
|
||||
|
||||
struct ethtool_ops
|
||||
------------------
|
||||
|
||||
Similarly to ``ndos`` the instance lock is only held for select drivers.
|
||||
For "ops locked" drivers all ethtool ops without exceptions should
|
||||
be called under the instance lock.
|
||||
|
||||
struct netdev_stat_ops
|
||||
----------------------
|
||||
|
||||
"qstat" ops are invoked under the instance lock for "ops locked" drivers,
|
||||
and under rtnl_lock for all other drivers.
|
||||
|
||||
struct net_shaper_ops
|
||||
---------------------
|
||||
|
||||
All net shaper callbacks are invoked while holding the netdev instance
|
||||
lock. ``rtnl_lock`` may or may not be held.
|
||||
|
||||
Note that supporting net shapers automatically enables "ops locking".
|
||||
|
||||
struct netdev_queue_mgmt_ops
|
||||
----------------------------
|
||||
|
||||
All queue management callbacks are invoked while holding the netdev instance
|
||||
lock. ``rtnl_lock`` may or may not be held.
|
||||
|
||||
Note that supporting struct netdev_queue_mgmt_ops automatically enables
|
||||
"ops locking".
|
||||
|
||||
Notifiers and netdev instance lock
|
||||
==================================
|
||||
----------------------------------
|
||||
|
||||
For device drivers that implement shaping or queue management APIs,
|
||||
some of the notifiers (``enum netdev_cmd``) are running under the netdev
|
||||
instance lock.
|
||||
|
||||
The following netdev notifiers are always run under the instance lock:
|
||||
* ``NETDEV_XDP_FEAT_CHANGE``
|
||||
|
||||
For devices with locked ops, currently only the following notifiers are
|
||||
running under the lock:
|
||||
* ``NETDEV_CHANGE``
|
||||
* ``NETDEV_REGISTER``
|
||||
* ``NETDEV_UP``
|
||||
* ``NETDEV_CHANGE``
|
||||
|
||||
The following notifiers are running without the lock:
|
||||
* ``NETDEV_UNREGISTER``
|
||||
|
@ -19,8 +19,8 @@ Benefits of Netmem :
|
||||
* Simplified Development: Drivers interact with a consistent API,
|
||||
regardless of the underlying memory implementation.
|
||||
|
||||
Driver Requirements
|
||||
===================
|
||||
Driver RX Requirements
|
||||
======================
|
||||
|
||||
1. The driver must support page_pool.
|
||||
|
||||
@ -77,3 +77,22 @@ Driver Requirements
|
||||
that purpose, but be mindful that some netmem types might have longer
|
||||
circulation times, such as when userspace holds a reference in zerocopy
|
||||
scenarios.
|
||||
|
||||
Driver TX Requirements
|
||||
======================
|
||||
|
||||
1. The Driver must not pass the netmem dma_addr to any of the dma-mapping APIs
|
||||
directly. This is because netmem dma_addrs may come from a source like
|
||||
dma-buf that is not compatible with the dma-mapping APIs.
|
||||
|
||||
Helpers like netmem_dma_unmap_page_attrs() & netmem_dma_unmap_addr_set()
|
||||
should be used in lieu of dma_unmap_page[_attrs](), dma_unmap_addr_set().
|
||||
The netmem variants will handle netmem dma_addrs correctly regardless of the
|
||||
source, delegating to the dma-mapping APIs when appropriate.
|
||||
|
||||
Not all dma-mapping APIs have netmem equivalents at the moment. If your
|
||||
driver relies on a missing netmem API, feel free to add and propose to
|
||||
netdev@, or reach out to the maintainers and/or almasrymina@google.com for
|
||||
help adding the netmem API.
|
||||
|
||||
2. Driver should declare support by setting `netdev->netmem_tx = true`
|
||||
|
@ -265,7 +265,7 @@ RDS Protocol
|
||||
|
||||
The bitmaps are allocated as connections are brought up. This
|
||||
avoids allocation in the interrupt handling path which queues
|
||||
sages on sockets. The dense bitmaps let transports send the
|
||||
messages on sockets. The dense bitmaps let transports send the
|
||||
entire bitmap on any bitmap change reasonably efficiently. This
|
||||
is much easier to implement than some finer-grained
|
||||
communication of per-port congestion. The sender does a very
|
||||
@ -373,7 +373,7 @@ The recv path
|
||||
- validate header checksum
|
||||
- copy header to rds_ib_incoming struct if start of a new datagram
|
||||
- add to ibinc's fraglist
|
||||
- if competed datagram:
|
||||
- if completed datagram:
|
||||
- update cong map if datagram was cong update
|
||||
- call rds_recv_incoming() otherwise
|
||||
- note if ack is required
|
||||
@ -415,7 +415,7 @@ Multipath RDS (mprds)
|
||||
I/O workqs and reconnect threads are driven from the rds_conn_path.
|
||||
Transports such as TCP that are multipath capable may then set up a
|
||||
TCP socket per rds_conn_path, and this is managed by the transport via
|
||||
the transport privatee cp_transport_data pointer.
|
||||
the transport private cp_transport_data pointer.
|
||||
|
||||
Transports announce themselves as multipath capable by setting the
|
||||
t_mp_capable bit during registration with the rds core module. When the
|
||||
@ -430,7 +430,7 @@ Multipath RDS (mprds)
|
||||
This is done by sending out a control packet exchange before the
|
||||
first data packet. The control packet exchange must have completed
|
||||
prior to outgoing hash completion in rds_sendmsg() when the transport
|
||||
is mutlipath capable.
|
||||
is multipath capable.
|
||||
|
||||
The control packet is an RDS ping packet (i.e., packet to rds dest
|
||||
port 0) with the ping packet having a rds extension header option of
|
||||
|
@ -1062,30 +1062,6 @@ The kernel interface functions are as follows:
|
||||
first function to change. Note that this must be called in TASK_RUNNING
|
||||
state.
|
||||
|
||||
(#) Get remote client epoch::
|
||||
|
||||
u32 rxrpc_kernel_get_epoch(struct socket *sock,
|
||||
struct rxrpc_call *call)
|
||||
|
||||
This allows the epoch that's contained in packets of an incoming client
|
||||
call to be queried. This value is returned. The function always
|
||||
successful if the call is still in progress. It shouldn't be called once
|
||||
the call has expired. Note that calling this on a local client call only
|
||||
returns the local epoch.
|
||||
|
||||
This value can be used to determine if the remote client has been
|
||||
restarted as it shouldn't change otherwise.
|
||||
|
||||
(#) Set the maximum lifespan on a call::
|
||||
|
||||
void rxrpc_kernel_set_max_life(struct socket *sock,
|
||||
struct rxrpc_call *call,
|
||||
unsigned long hard_timeout)
|
||||
|
||||
This sets the maximum lifespan on a call to hard_timeout (which is in
|
||||
jiffies). In the event of the timeout occurring, the call will be
|
||||
aborted and -ETIME or -ETIMEDOUT will be returned.
|
||||
|
||||
(#) Apply the RXRPC_MIN_SECURITY_LEVEL sockopt to a socket from within in the
|
||||
kernel::
|
||||
|
||||
@ -1172,3 +1148,18 @@ adjusted through sysctls in /proc/net/rxrpc/:
|
||||
header plus exactly 1412 bytes of data. The terminal packet must contain
|
||||
a four byte header plus any amount of data. In any event, a jumbo packet
|
||||
may not exceed rxrpc_rx_mtu in size.
|
||||
|
||||
|
||||
API Function Reference
|
||||
======================
|
||||
|
||||
.. kernel-doc:: net/rxrpc/af_rxrpc.c
|
||||
.. kernel-doc:: net/rxrpc/call_object.c
|
||||
.. kernel-doc:: net/rxrpc/key.c
|
||||
.. kernel-doc:: net/rxrpc/oob.c
|
||||
.. kernel-doc:: net/rxrpc/peer_object.c
|
||||
.. kernel-doc:: net/rxrpc/recvmsg.c
|
||||
.. kernel-doc:: net/rxrpc/rxgk.c
|
||||
.. kernel-doc:: net/rxrpc/rxkad.c
|
||||
.. kernel-doc:: net/rxrpc/sendmsg.c
|
||||
.. kernel-doc:: net/rxrpc/server_key.c
|
||||
|
@ -69,9 +69,9 @@ add rules like this to the iptables ruleset above::
|
||||
# iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY \
|
||||
--tproxy-mark 0x1/0x1 --on-port 50080
|
||||
|
||||
Or the following rule to nft:
|
||||
Or the following rule to nft::
|
||||
|
||||
# nft add rule filter divert tcp dport 80 tproxy to :50080 meta mark set 1 accept
|
||||
# nft add rule filter divert tcp dport 80 tproxy to :50080 meta mark set 1 accept
|
||||
|
||||
Note that for this to work you'll have to modify the proxy to enable (SOL_IP,
|
||||
IP_TRANSPARENT) for the listening socket.
|
||||
|
@ -65,9 +65,13 @@ Callbacks to implement
|
||||
/* from include/linux/netdevice.h */
|
||||
struct xfrmdev_ops {
|
||||
/* Crypto and Packet offload callbacks */
|
||||
int (*xdo_dev_state_add) (struct xfrm_state *x, struct netlink_ext_ack *extack);
|
||||
void (*xdo_dev_state_delete) (struct xfrm_state *x);
|
||||
void (*xdo_dev_state_free) (struct xfrm_state *x);
|
||||
int (*xdo_dev_state_add)(struct net_device *dev,
|
||||
struct xfrm_state *x,
|
||||
struct netlink_ext_ack *extack);
|
||||
void (*xdo_dev_state_delete)(struct net_device *dev,
|
||||
struct xfrm_state *x);
|
||||
void (*xdo_dev_state_free)(struct net_device *dev,
|
||||
struct xfrm_state *x);
|
||||
bool (*xdo_dev_offload_ok) (struct sk_buff *skb,
|
||||
struct xfrm_state *x);
|
||||
void (*xdo_dev_state_advance_esn) (struct xfrm_state *x);
|
||||
|
@ -188,7 +188,7 @@ objdump
|
||||
编行。如果没有调试符号,您将看到所示例程的汇编程序代码,但是如果内核有调试
|
||||
符号,C代码也将可见(调试符号可以在内核配置菜单的hacking项中启用)。例如::
|
||||
|
||||
$ objdump -r -S -l --disassemble net/dccp/ipv4.o
|
||||
$ objdump -r -S -l --disassemble net/ipv4/tcp.o
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -191,7 +191,7 @@ objdump
|
||||
編行。如果沒有調試符號,您將看到所示例程的彙編程序代碼,但是如果內核有調試
|
||||
符號,C代碼也將可見(調試符號可以在內核配置菜單的hacking項中啓用)。例如::
|
||||
|
||||
$ objdump -r -S -l --disassemble net/dccp/ipv4.o
|
||||
$ objdump -r -S -l --disassemble net/ipv4/tcp.o
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -62,7 +62,7 @@ Sub-messages
|
||||
------------
|
||||
|
||||
Several raw netlink families such as
|
||||
:doc:`rt_link<../../networking/netlink_spec/rt_link>` and
|
||||
:doc:`rt-link<../../networking/netlink_spec/rt-link>` and
|
||||
:doc:`tc<../../networking/netlink_spec/tc>` use attribute nesting as an
|
||||
abstraction to carry module specific information.
|
||||
|
||||
|
50
MAINTAINERS
50
MAINTAINERS
@ -647,6 +647,13 @@ F: drivers/iio/accel/adxl380.h
|
||||
F: drivers/iio/accel/adxl380_i2c.c
|
||||
F: drivers/iio/accel/adxl380_spi.c
|
||||
|
||||
AEONSEMI PHY DRIVER
|
||||
M: Christian Marangi <ansuelsmth@gmail.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/aeonsemi,as21xxx.yaml
|
||||
F: drivers/net/phy/as21xxx.c
|
||||
|
||||
AF8133J THREE-AXIS MAGNETOMETER DRIVER
|
||||
M: Ondřej Jirman <megi@xff.cz>
|
||||
S: Maintained
|
||||
@ -5317,6 +5324,7 @@ F: include/uapi/linux/can/isotp.h
|
||||
F: include/uapi/linux/can/raw.h
|
||||
F: net/can/
|
||||
F: net/sched/em_canid.c
|
||||
F: tools/testing/selftests/net/can/
|
||||
|
||||
CAN-J1939 NETWORK LAYER
|
||||
M: Robin van der Gracht <robin@protonic.nl>
|
||||
@ -6608,15 +6616,6 @@ S: Maintained
|
||||
F: Documentation/scsi/dc395x.rst
|
||||
F: drivers/scsi/dc395x.*
|
||||
|
||||
DCCP PROTOCOL
|
||||
L: dccp@vger.kernel.org
|
||||
S: Orphan
|
||||
W: http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp
|
||||
F: include/linux/dccp.h
|
||||
F: include/linux/tfrc.h
|
||||
F: include/uapi/linux/dccp.h
|
||||
F: net/dccp/
|
||||
|
||||
DEBUGOBJECTS:
|
||||
M: Thomas Gleixner <tglx@linutronix.de>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
@ -9470,6 +9469,7 @@ F: Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml
|
||||
F: drivers/net/ethernet/freescale/enetc/
|
||||
F: include/linux/fsl/enetc_mdio.h
|
||||
F: include/linux/fsl/netc_global.h
|
||||
F: include/linux/fsl/ntmp.h
|
||||
|
||||
FREESCALE eTSEC ETHERNET DRIVER (GIANFAR)
|
||||
M: Claudiu Manoil <claudiu.manoil@nxp.com>
|
||||
@ -11054,6 +11054,13 @@ S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/huawei/hinic.rst
|
||||
F: drivers/net/ethernet/huawei/hinic/
|
||||
|
||||
HUAWEI 3RD GEN ETHERNET DRIVER
|
||||
M: Fan Gong <gongfan1@huawei.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/huawei/hinic3.rst
|
||||
F: drivers/net/ethernet/huawei/hinic3/
|
||||
|
||||
HUAWEI MATEBOOK E GO EMBEDDED CONTROLLER DRIVER
|
||||
M: Pengyu Luo <mitltlatltl@gmail.com>
|
||||
S: Maintained
|
||||
@ -12008,7 +12015,7 @@ F: Documentation/networking/device_drivers/ethernet/intel/
|
||||
F: drivers/net/ethernet/intel/
|
||||
F: drivers/net/ethernet/intel/*/
|
||||
F: include/linux/avf/virtchnl.h
|
||||
F: include/linux/net/intel/iidc.h
|
||||
F: include/linux/net/intel/*/
|
||||
|
||||
INTEL ETHERNET PROTOCOL DRIVER FOR RDMA
|
||||
M: Mustafa Ismail <mustafa.ismail@intel.com>
|
||||
@ -14773,6 +14780,7 @@ MAXLINEAR ETHERNET PHY DRIVER
|
||||
M: Xu Liang <lxu@maxlinear.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/phy/mxl-86110.c
|
||||
F: drivers/net/phy/mxl-gpy.c
|
||||
|
||||
MCAN MMIO DEVICE DRIVER
|
||||
@ -15154,6 +15162,7 @@ M: Qingfang Deng <dqfext@gmail.com>
|
||||
M: SkyLake Huang <SkyLake.Huang@mediatek.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/phy/mediatek/mtk-2p5ge.c
|
||||
F: drivers/net/phy/mediatek/mtk-ge-soc.c
|
||||
F: drivers/net/phy/mediatek/mtk-phy-lib.c
|
||||
F: drivers/net/phy/mediatek/mtk-ge.c
|
||||
@ -17225,6 +17234,7 @@ X: net/ceph/
|
||||
X: net/mac80211/
|
||||
X: net/rfkill/
|
||||
X: net/wireless/
|
||||
X: tools/testing/selftests/net/can/
|
||||
|
||||
NETWORKING [IPSEC]
|
||||
M: Steffen Klassert <steffen.klassert@secunet.com>
|
||||
@ -18455,6 +18465,18 @@ F: arch/openrisc/
|
||||
F: drivers/irqchip/irq-ompic.c
|
||||
F: drivers/irqchip/irq-or1k-*
|
||||
|
||||
OPENVPN DATA CHANNEL OFFLOAD
|
||||
M: Antonio Quartulli <antonio@openvpn.net>
|
||||
R: Sabrina Dubroca <sd@queasysnail.net>
|
||||
L: openvpn-devel@lists.sourceforge.net (subscribers-only)
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
T: git https://github.com/OpenVPN/ovpn-net-next.git
|
||||
F: Documentation/netlink/specs/ovpn.yaml
|
||||
F: drivers/net/ovpn/
|
||||
F: include/uapi/linux/ovpn.h
|
||||
F: tools/testing/selftests/net/ovpn/
|
||||
|
||||
OPENVSWITCH
|
||||
M: Aaron Conole <aconole@redhat.com>
|
||||
M: Eelco Chaudron <echaudro@redhat.com>
|
||||
@ -20954,6 +20976,14 @@ S: Maintained
|
||||
F: Documentation/devicetree/bindings/usb/renesas,rzn1-usbf.yaml
|
||||
F: drivers/usb/gadget/udc/renesas_usbf.c
|
||||
|
||||
RENESAS RZ/V2H(P) DWMAC GBETH GLUE LAYER DRIVER
|
||||
M: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-renesas-soc@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/renesas,r9a09g057-gbeth.yaml
|
||||
F: drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c
|
||||
|
||||
RENESAS RZ/V2M I2C DRIVER
|
||||
M: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
|
@ -150,6 +150,8 @@
|
||||
|
||||
#define SO_RCVPRIORITY 82
|
||||
|
||||
#define SO_PASSRIGHTS 83
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -119,7 +119,7 @@ static struct fixed_phy_status nettel_fixed_phy_status __initdata = {
|
||||
static int __init init_BSP(void)
|
||||
{
|
||||
m5272_uarts_init();
|
||||
fixed_phy_add(PHY_POLL, 0, &nettel_fixed_phy_status);
|
||||
fixed_phy_add(0, &nettel_fixed_phy_status);
|
||||
clkdev_add_table(m5272_clk_lookup, ARRAY_SIZE(m5272_clk_lookup));
|
||||
return 0;
|
||||
}
|
||||
|
@ -267,8 +267,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -263,8 +263,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -270,8 +270,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -260,8 +260,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -262,8 +262,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -261,8 +261,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -281,8 +281,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -259,8 +259,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -260,8 +260,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -261,8 +261,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -256,8 +256,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -257,8 +257,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
# CONFIG_IP_DCCP_CCID3 is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_RDS=m
|
||||
CONFIG_RDS_TCP=m
|
||||
|
@ -282,7 +282,7 @@ static int __init bcm47xx_register_bus_complete(void)
|
||||
bcm47xx_leds_register();
|
||||
bcm47xx_workarounds();
|
||||
|
||||
fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);
|
||||
fixed_phy_add(0, &bcm47xx_fixed_phy_status);
|
||||
return 0;
|
||||
}
|
||||
device_initcall(bcm47xx_register_bus_complete);
|
||||
|
@ -81,7 +81,6 @@ CONFIG_IP_VS_SH=m
|
||||
CONFIG_IP_VS_SED=m
|
||||
CONFIG_IP_VS_NQ=m
|
||||
CONFIG_IP_VS_FTP=m
|
||||
CONFIG_IP_DCCP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
|
@ -84,7 +84,6 @@ CONFIG_BRIDGE_EBT_MARK_T=m
|
||||
CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
CONFIG_IP_SCTP=m
|
||||
CONFIG_TIPC=m
|
||||
CONFIG_ATM=y
|
||||
|
@ -130,7 +130,6 @@ CONFIG_BRIDGE_EBT_MARK_T=m
|
||||
CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
CONFIG_IP_SCTP=m
|
||||
CONFIG_TIPC=m
|
||||
CONFIG_ATM=y
|
||||
|
@ -161,6 +161,8 @@
|
||||
|
||||
#define SO_RCVPRIORITY 82
|
||||
|
||||
#define SO_PASSRIGHTS 83
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -142,6 +142,8 @@
|
||||
#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
|
||||
#define SO_DEVMEM_DONTNEED 0x4050
|
||||
|
||||
#define SO_PASSRIGHTS 0x4051
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -87,7 +87,6 @@ CONFIG_IP_NF_RAW=m
|
||||
CONFIG_IP_NF_ARPTABLES=m
|
||||
CONFIG_IP_NF_ARPFILTER=m
|
||||
CONFIG_IP_NF_ARP_MANGLE=m
|
||||
CONFIG_IP_DCCP=m
|
||||
CONFIG_BT=m
|
||||
CONFIG_BT_RFCOMM=m
|
||||
CONFIG_BT_RFCOMM_TTY=y
|
||||
|
@ -225,7 +225,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_DCCP=m
|
||||
CONFIG_TIPC=m
|
||||
CONFIG_ATM=m
|
||||
CONFIG_ATM_CLIP=m
|
||||
|
@ -143,6 +143,8 @@
|
||||
|
||||
#define SO_RCVPRIORITY 0x005b
|
||||
|
||||
#define SO_PASSRIGHTS 0x005c
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
|
||||
|
@ -89,6 +89,7 @@ int crypto_shash_update_sg(struct shash_desc *desc, struct scatterlist *sg,
|
||||
|
||||
sg_miter_start(&miter, sg, sg_nents(sg),
|
||||
SG_MITER_FROM_SG | SG_MITER_LOCAL);
|
||||
sg_miter_skip(&miter, offset);
|
||||
for (i = 0; i < len; i += n) {
|
||||
sg_miter_next(&miter);
|
||||
n = min(miter.length, len - i);
|
||||
|
@ -26,12 +26,14 @@ static int bcma_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
|
||||
return !!bcma_chipco_gpio_in(cc, 1 << gpio);
|
||||
}
|
||||
|
||||
static void bcma_gpio_set_value(struct gpio_chip *chip, unsigned gpio,
|
||||
int value)
|
||||
static int bcma_gpio_set_value(struct gpio_chip *chip, unsigned int gpio,
|
||||
int value)
|
||||
{
|
||||
struct bcma_drv_cc *cc = gpiochip_get_data(chip);
|
||||
|
||||
bcma_chipco_gpio_out(cc, 1 << gpio, value ? 1 << gpio : 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bcma_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
|
||||
@ -184,7 +186,7 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
|
||||
chip->request = bcma_gpio_request;
|
||||
chip->free = bcma_gpio_free;
|
||||
chip->get = bcma_gpio_get_value;
|
||||
chip->set = bcma_gpio_set_value;
|
||||
chip->set_rv = bcma_gpio_set_value;
|
||||
chip->direction_input = bcma_gpio_direction_input;
|
||||
chip->direction_output = bcma_gpio_direction_output;
|
||||
chip->parent = bus->dev;
|
||||
|
@ -56,18 +56,6 @@ config BT_HCIBTUSB_POLL_SYNC
|
||||
Say Y here to enable USB poll_sync for Bluetooth USB devices by
|
||||
default.
|
||||
|
||||
config BT_HCIBTUSB_AUTO_ISOC_ALT
|
||||
bool "Automatically adjust alternate setting for Isoc endpoints"
|
||||
depends on BT_HCIBTUSB
|
||||
default y if CHROME_PLATFORMS
|
||||
help
|
||||
Say Y here to automatically adjusting the alternate setting for
|
||||
HCI_USER_CHANNEL whenever a SCO link is established.
|
||||
|
||||
When enabled, btusb intercepts the HCI_EV_SYNC_CONN_COMPLETE packets
|
||||
and configures isoc endpoint alternate setting automatically when
|
||||
HCI_USER_CHANNEL is in use.
|
||||
|
||||
config BT_HCIBTUSB_BCM
|
||||
bool "Broadcom protocol support"
|
||||
depends on BT_HCIBTUSB
|
||||
|
@ -2719,7 +2719,7 @@ static int btintel_uefi_get_dsbr(u32 *dsbr_var)
|
||||
} __packed data;
|
||||
|
||||
efi_status_t status;
|
||||
unsigned long data_size = 0;
|
||||
unsigned long data_size = sizeof(data);
|
||||
efi_guid_t guid = EFI_GUID(0xe65d8884, 0xd4af, 0x4b20, 0x8d, 0x03,
|
||||
0x77, 0x2e, 0xcc, 0x3d, 0xa5, 0x31);
|
||||
|
||||
@ -2729,16 +2729,10 @@ static int btintel_uefi_get_dsbr(u32 *dsbr_var)
|
||||
if (!efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
status = efi.get_variable(BTINTEL_EFI_DSBR, &guid, NULL, &data_size,
|
||||
NULL);
|
||||
|
||||
if (status != EFI_BUFFER_TOO_SMALL || !data_size)
|
||||
return -EIO;
|
||||
|
||||
status = efi.get_variable(BTINTEL_EFI_DSBR, &guid, NULL, &data_size,
|
||||
&data);
|
||||
|
||||
if (status != EFI_SUCCESS)
|
||||
if (status != EFI_SUCCESS || data_size != sizeof(data))
|
||||
return -ENXIO;
|
||||
|
||||
*dsbr_var = data.dsbr;
|
||||
@ -3688,7 +3682,7 @@ int btintel_configure_setup(struct hci_dev *hdev, const char *driver_name)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(btintel_configure_setup);
|
||||
|
||||
int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
static int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
{
|
||||
struct intel_tlv *tlv = (void *)&skb->data[5];
|
||||
|
||||
@ -3716,7 +3710,6 @@ int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
recv_frame:
|
||||
return hci_recv_frame(hdev, skb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(btintel_diagnostics);
|
||||
|
||||
int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
{
|
||||
|
@ -277,7 +277,6 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
|
||||
int btintel_shutdown_combined(struct hci_dev *hdev);
|
||||
void btintel_hw_error(struct hci_dev *hdev, u8 code);
|
||||
void btintel_print_fseq_info(struct hci_dev *hdev);
|
||||
int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb);
|
||||
#else
|
||||
|
||||
static inline int btintel_check_bdaddr(struct hci_dev *hdev)
|
||||
@ -411,9 +410,4 @@ static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
|
||||
static inline void btintel_print_fseq_info(struct hci_dev *hdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
#endif
|
||||
|
@ -208,6 +208,96 @@ static void btintel_pcie_prepare_tx(struct txq *txq, u16 tfd_index,
|
||||
memcpy(buf->data, skb->data, tfd->size);
|
||||
}
|
||||
|
||||
static inline void btintel_pcie_dump_debug_registers(struct hci_dev *hdev)
|
||||
{
|
||||
struct btintel_pcie_data *data = hci_get_drvdata(hdev);
|
||||
u16 cr_hia, cr_tia;
|
||||
u32 reg, mbox_reg;
|
||||
struct sk_buff *skb;
|
||||
u8 buf[80];
|
||||
|
||||
skb = alloc_skb(1024, GFP_ATOMIC);
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", "---- Dump of debug registers ---");
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_BOOT_STAGE_REG);
|
||||
snprintf(buf, sizeof(buf), "boot stage: 0x%8.8x", reg);
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
data->boot_stage_cache = reg;
|
||||
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_IPC_STATUS_REG);
|
||||
snprintf(buf, sizeof(buf), "ipc status: 0x%8.8x", reg);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_IPC_CONTROL_REG);
|
||||
snprintf(buf, sizeof(buf), "ipc control: 0x%8.8x", reg);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_IPC_SLEEP_CTL_REG);
|
||||
snprintf(buf, sizeof(buf), "ipc sleep control: 0x%8.8x", reg);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
|
||||
/*Read the Mail box status and registers*/
|
||||
reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_MBOX_STATUS_REG);
|
||||
snprintf(buf, sizeof(buf), "mbox status: 0x%8.8x", reg);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
if (reg & BTINTEL_PCIE_CSR_MBOX_STATUS_MBOX1) {
|
||||
mbox_reg = btintel_pcie_rd_reg32(data,
|
||||
BTINTEL_PCIE_CSR_MBOX_1_REG);
|
||||
snprintf(buf, sizeof(buf), "mbox_1: 0x%8.8x", mbox_reg);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
}
|
||||
|
||||
if (reg & BTINTEL_PCIE_CSR_MBOX_STATUS_MBOX2) {
|
||||
mbox_reg = btintel_pcie_rd_reg32(data,
|
||||
BTINTEL_PCIE_CSR_MBOX_2_REG);
|
||||
snprintf(buf, sizeof(buf), "mbox_2: 0x%8.8x", mbox_reg);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
}
|
||||
|
||||
if (reg & BTINTEL_PCIE_CSR_MBOX_STATUS_MBOX3) {
|
||||
mbox_reg = btintel_pcie_rd_reg32(data,
|
||||
BTINTEL_PCIE_CSR_MBOX_3_REG);
|
||||
snprintf(buf, sizeof(buf), "mbox_3: 0x%8.8x", mbox_reg);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
}
|
||||
|
||||
if (reg & BTINTEL_PCIE_CSR_MBOX_STATUS_MBOX4) {
|
||||
mbox_reg = btintel_pcie_rd_reg32(data,
|
||||
BTINTEL_PCIE_CSR_MBOX_4_REG);
|
||||
snprintf(buf, sizeof(buf), "mbox_4: 0x%8.8x", mbox_reg);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
}
|
||||
|
||||
cr_hia = data->ia.cr_hia[BTINTEL_PCIE_RXQ_NUM];
|
||||
cr_tia = data->ia.cr_tia[BTINTEL_PCIE_RXQ_NUM];
|
||||
snprintf(buf, sizeof(buf), "rxq: cr_tia: %u cr_hia: %u", cr_tia, cr_hia);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
|
||||
cr_hia = data->ia.cr_hia[BTINTEL_PCIE_TXQ_NUM];
|
||||
cr_tia = data->ia.cr_tia[BTINTEL_PCIE_TXQ_NUM];
|
||||
snprintf(buf, sizeof(buf), "txq: cr_tia: %u cr_hia: %u", cr_tia, cr_hia);
|
||||
skb_put_data(skb, buf, strlen(buf));
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
snprintf(buf, sizeof(buf), "--------------------------------");
|
||||
bt_dev_dbg(hdev, "%s", buf);
|
||||
|
||||
hci_recv_diag(hdev, skb);
|
||||
}
|
||||
|
||||
static int btintel_pcie_send_sync(struct btintel_pcie_data *data,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
@ -237,8 +327,11 @@ static int btintel_pcie_send_sync(struct btintel_pcie_data *data,
|
||||
/* Wait for the complete interrupt - URBD0 */
|
||||
ret = wait_event_timeout(data->tx_wait_q, data->tx_wait_done,
|
||||
msecs_to_jiffies(BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS));
|
||||
if (!ret)
|
||||
if (!ret) {
|
||||
bt_dev_err(data->hdev, "tx completion timeout");
|
||||
btintel_pcie_dump_debug_registers(data->hdev);
|
||||
return -ETIME;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -756,6 +849,26 @@ static int btintel_pcie_read_device_mem(struct btintel_pcie_data *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool btintel_pcie_in_lockdown(struct btintel_pcie_data *data)
|
||||
{
|
||||
return (data->boot_stage_cache &
|
||||
BTINTEL_PCIE_CSR_BOOT_STAGE_ROM_LOCKDOWN) ||
|
||||
(data->boot_stage_cache &
|
||||
BTINTEL_PCIE_CSR_BOOT_STAGE_IML_LOCKDOWN);
|
||||
}
|
||||
|
||||
static inline bool btintel_pcie_in_error(struct btintel_pcie_data *data)
|
||||
{
|
||||
return (data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_ERR) ||
|
||||
(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ABORT_HANDLER);
|
||||
}
|
||||
|
||||
static void btintel_pcie_msix_gp1_handler(struct btintel_pcie_data *data)
|
||||
{
|
||||
bt_dev_err(data->hdev, "Received gp1 mailbox interrupt");
|
||||
btintel_pcie_dump_debug_registers(data->hdev);
|
||||
}
|
||||
|
||||
/* This function handles the MSI-X interrupt for gp0 cause (bit 0 in
|
||||
* BTINTEL_PCIE_CSR_MSIX_HW_INT_CAUSES) which is sent for boot stage and image response.
|
||||
*/
|
||||
@ -779,6 +892,18 @@ static void btintel_pcie_msix_gp0_handler(struct btintel_pcie_data *data)
|
||||
if (reg != data->img_resp_cache)
|
||||
data->img_resp_cache = reg;
|
||||
|
||||
if (btintel_pcie_in_error(data)) {
|
||||
bt_dev_err(data->hdev, "Controller in error state");
|
||||
btintel_pcie_dump_debug_registers(data->hdev);
|
||||
return;
|
||||
}
|
||||
|
||||
if (btintel_pcie_in_lockdown(data)) {
|
||||
bt_dev_err(data->hdev, "Controller in lockdown state");
|
||||
btintel_pcie_dump_debug_registers(data->hdev);
|
||||
return;
|
||||
}
|
||||
|
||||
data->gp0_received = true;
|
||||
|
||||
old_ctxt = data->alive_intr_ctxt;
|
||||
@ -889,7 +1014,6 @@ static void btintel_pcie_msix_tx_handle(struct btintel_pcie_data *data)
|
||||
static int btintel_pcie_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
{
|
||||
struct hci_event_hdr *hdr = (void *)skb->data;
|
||||
const char diagnostics_hdr[] = { 0x87, 0x80, 0x03 };
|
||||
struct btintel_pcie_data *data = hci_get_drvdata(hdev);
|
||||
|
||||
if (skb->len > HCI_EVENT_HDR_SIZE && hdr->evt == 0xff &&
|
||||
@ -945,15 +1069,6 @@ static int btintel_pcie_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle all diagnostics events separately. May still call
|
||||
* hci_recv_frame.
|
||||
*/
|
||||
if (len >= sizeof(diagnostics_hdr) &&
|
||||
memcmp(&skb->data[2], diagnostics_hdr,
|
||||
sizeof(diagnostics_hdr)) == 0) {
|
||||
return btintel_diagnostics(hdev, skb);
|
||||
}
|
||||
|
||||
/* This is a debug event that comes from IML and OP image when it
|
||||
* starts execution. There is no need pass this event to stack.
|
||||
*/
|
||||
@ -1343,6 +1458,9 @@ static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id)
|
||||
if (intr_hw & BTINTEL_PCIE_MSIX_HW_INT_CAUSES_HWEXP)
|
||||
btintel_pcie_msix_hw_exp_handler(data);
|
||||
|
||||
if (intr_hw & BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP1)
|
||||
btintel_pcie_msix_gp1_handler(data);
|
||||
|
||||
/* This interrupt is triggered by the firmware after updating
|
||||
* boot_stage register and image_response register
|
||||
*/
|
||||
@ -2028,6 +2146,7 @@ static int btintel_pcie_setup(struct hci_dev *hdev)
|
||||
while ((err = btintel_pcie_setup_internal(hdev)) && fw_dl_retry++ < 1) {
|
||||
bt_dev_err(hdev, "Firmware download retry count: %d",
|
||||
fw_dl_retry);
|
||||
btintel_pcie_dump_debug_registers(hdev);
|
||||
err = btintel_pcie_reset_bt(data);
|
||||
if (err) {
|
||||
bt_dev_err(hdev, "Failed to do shr reset: %d", err);
|
||||
|
@ -12,10 +12,17 @@
|
||||
#define BTINTEL_PCIE_CSR_HW_REV_REG (BTINTEL_PCIE_CSR_BASE + 0x028)
|
||||
#define BTINTEL_PCIE_CSR_RF_ID_REG (BTINTEL_PCIE_CSR_BASE + 0x09C)
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_REG (BTINTEL_PCIE_CSR_BASE + 0x108)
|
||||
#define BTINTEL_PCIE_CSR_IPC_CONTROL_REG (BTINTEL_PCIE_CSR_BASE + 0x10C)
|
||||
#define BTINTEL_PCIE_CSR_IPC_STATUS_REG (BTINTEL_PCIE_CSR_BASE + 0x110)
|
||||
#define BTINTEL_PCIE_CSR_IPC_SLEEP_CTL_REG (BTINTEL_PCIE_CSR_BASE + 0x114)
|
||||
#define BTINTEL_PCIE_CSR_CI_ADDR_LSB_REG (BTINTEL_PCIE_CSR_BASE + 0x118)
|
||||
#define BTINTEL_PCIE_CSR_CI_ADDR_MSB_REG (BTINTEL_PCIE_CSR_BASE + 0x11C)
|
||||
#define BTINTEL_PCIE_CSR_IMG_RESPONSE_REG (BTINTEL_PCIE_CSR_BASE + 0x12C)
|
||||
#define BTINTEL_PCIE_CSR_MBOX_1_REG (BTINTEL_PCIE_CSR_BASE + 0x170)
|
||||
#define BTINTEL_PCIE_CSR_MBOX_2_REG (BTINTEL_PCIE_CSR_BASE + 0x174)
|
||||
#define BTINTEL_PCIE_CSR_MBOX_3_REG (BTINTEL_PCIE_CSR_BASE + 0x178)
|
||||
#define BTINTEL_PCIE_CSR_MBOX_4_REG (BTINTEL_PCIE_CSR_BASE + 0x17C)
|
||||
#define BTINTEL_PCIE_CSR_MBOX_STATUS_REG (BTINTEL_PCIE_CSR_BASE + 0x180)
|
||||
#define BTINTEL_PCIE_PRPH_DEV_ADDR_REG (BTINTEL_PCIE_CSR_BASE + 0x440)
|
||||
#define BTINTEL_PCIE_PRPH_DEV_RD_REG (BTINTEL_PCIE_CSR_BASE + 0x458)
|
||||
#define BTINTEL_PCIE_CSR_HBUS_TARG_WRPTR (BTINTEL_PCIE_CSR_BASE + 0x460)
|
||||
@ -41,6 +48,9 @@
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW (BIT(2))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_ROM_LOCKDOWN (BIT(10))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_IML_LOCKDOWN (BIT(11))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_ERR (BIT(12))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_ABORT_HANDLER (BIT(13))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_HALTED (BIT(14))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_MAC_ACCESS_ON (BIT(16))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_ALIVE (BIT(23))
|
||||
#define BTINTEL_PCIE_CSR_BOOT_STAGE_D3_STATE_READY (BIT(24))
|
||||
@ -89,6 +99,7 @@ enum msix_fh_int_causes {
|
||||
/* Causes for the HW register interrupts */
|
||||
enum msix_hw_int_causes {
|
||||
BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP0 = BIT(0), /* cause 32 */
|
||||
BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP1 = BIT(1), /* cause 33 */
|
||||
BTINTEL_PCIE_MSIX_HW_INT_CAUSES_HWEXP = BIT(3), /* cause 35 */
|
||||
};
|
||||
|
||||
@ -121,6 +132,14 @@ enum btintel_pcie_tlv_type {
|
||||
BTINTEL_FW_BUILD,
|
||||
};
|
||||
|
||||
/* causes for the MBOX interrupts */
|
||||
enum msix_mbox_int_causes {
|
||||
BTINTEL_PCIE_CSR_MBOX_STATUS_MBOX1 = BIT(0), /* cause MBOX1 */
|
||||
BTINTEL_PCIE_CSR_MBOX_STATUS_MBOX2 = BIT(1), /* cause MBOX2 */
|
||||
BTINTEL_PCIE_CSR_MBOX_STATUS_MBOX3 = BIT(2), /* cause MBOX3 */
|
||||
BTINTEL_PCIE_CSR_MBOX_STATUS_MBOX4 = BIT(3), /* cause MBOX4 */
|
||||
};
|
||||
|
||||
#define BTINTEL_PCIE_MSIX_NON_AUTO_CLEAR_CAUSE BIT(7)
|
||||
|
||||
/* Minimum and Maximum number of MSI-X Vector
|
||||
|
@ -100,7 +100,9 @@ static int btmrvl_sdio_probe_of(struct device *dev,
|
||||
}
|
||||
|
||||
/* Configure wakeup (enabled by default) */
|
||||
device_init_wakeup(dev, true);
|
||||
ret = devm_device_init_wakeup(dev);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to init wakeup\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ static int btmtksdio_probe(struct sdio_func *func,
|
||||
*/
|
||||
pm_runtime_put_noidle(bdev->dev);
|
||||
|
||||
err = device_init_wakeup(bdev->dev, true);
|
||||
err = devm_device_init_wakeup(bdev->dev);
|
||||
if (err)
|
||||
bt_dev_err(hdev, "failed to initialize device wakeup");
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/string_helpers.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/of_irq.h>
|
||||
|
||||
#include <net/bluetooth/bluetooth.h>
|
||||
#include <net/bluetooth/hci_core.h>
|
||||
@ -143,7 +144,9 @@ struct ps_data {
|
||||
bool driver_sent_cmd;
|
||||
u16 h2c_ps_interval;
|
||||
u16 c2h_ps_interval;
|
||||
bool wakeup_source;
|
||||
struct gpio_desc *h2c_ps_gpio;
|
||||
s32 irq_handler;
|
||||
struct hci_dev *hdev;
|
||||
struct work_struct work;
|
||||
struct timer_list ps_timer;
|
||||
@ -476,12 +479,21 @@ static void ps_timeout_func(struct timer_list *t)
|
||||
}
|
||||
}
|
||||
|
||||
static irqreturn_t ps_host_wakeup_irq_handler(int irq, void *priv)
|
||||
{
|
||||
struct btnxpuart_dev *nxpdev = (struct btnxpuart_dev *)priv;
|
||||
|
||||
bt_dev_dbg(nxpdev->hdev, "Host wakeup interrupt");
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
static int ps_setup(struct hci_dev *hdev)
|
||||
{
|
||||
struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
|
||||
struct serdev_device *serdev = nxpdev->serdev;
|
||||
struct ps_data *psdata = &nxpdev->psdata;
|
||||
int ret;
|
||||
|
||||
/* Out-Of-Band Device Wakeup */
|
||||
psdata->h2c_ps_gpio = devm_gpiod_get_optional(&serdev->dev, "device-wakeup",
|
||||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(psdata->h2c_ps_gpio)) {
|
||||
@ -493,11 +505,37 @@ static int ps_setup(struct hci_dev *hdev)
|
||||
if (device_property_read_u8(&serdev->dev, "nxp,wakein-pin", &psdata->h2c_wakeup_gpio)) {
|
||||
psdata->h2c_wakeup_gpio = 0xff; /* 0xff: use default pin/gpio */
|
||||
} else if (!psdata->h2c_ps_gpio) {
|
||||
bt_dev_warn(hdev, "nxp,wakein-pin property without device-wakeup GPIO");
|
||||
bt_dev_warn(hdev, "nxp,wakein-pin property without device-wakeup-gpios");
|
||||
psdata->h2c_wakeup_gpio = 0xff;
|
||||
}
|
||||
|
||||
device_property_read_u8(&serdev->dev, "nxp,wakeout-pin", &psdata->c2h_wakeup_gpio);
|
||||
/* Out-Of-Band Host Wakeup */
|
||||
if (of_property_read_bool(serdev->dev.of_node, "wakeup-source")) {
|
||||
psdata->irq_handler = of_irq_get_byname(serdev->dev.of_node, "wakeup");
|
||||
bt_dev_info(nxpdev->hdev, "irq_handler: %d", psdata->irq_handler);
|
||||
if (psdata->irq_handler > 0)
|
||||
psdata->wakeup_source = true;
|
||||
}
|
||||
|
||||
if (device_property_read_u8(&serdev->dev, "nxp,wakeout-pin", &psdata->c2h_wakeup_gpio)) {
|
||||
psdata->c2h_wakeup_gpio = 0xff;
|
||||
if (psdata->wakeup_source) {
|
||||
bt_dev_warn(hdev, "host wakeup interrupt without nxp,wakeout-pin");
|
||||
psdata->wakeup_source = false;
|
||||
}
|
||||
} else if (!psdata->wakeup_source) {
|
||||
bt_dev_warn(hdev, "nxp,wakeout-pin property without host wakeup interrupt");
|
||||
psdata->c2h_wakeup_gpio = 0xff;
|
||||
}
|
||||
|
||||
if (psdata->wakeup_source) {
|
||||
ret = devm_request_irq(&serdev->dev, psdata->irq_handler,
|
||||
ps_host_wakeup_irq_handler,
|
||||
IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
|
||||
dev_name(&serdev->dev), nxpdev);
|
||||
disable_irq(psdata->irq_handler);
|
||||
device_init_wakeup(&serdev->dev, true);
|
||||
}
|
||||
|
||||
psdata->hdev = hdev;
|
||||
INIT_WORK(&psdata->work, ps_work_func);
|
||||
@ -637,12 +675,10 @@ static void ps_init(struct hci_dev *hdev)
|
||||
|
||||
psdata->ps_state = PS_STATE_AWAKE;
|
||||
|
||||
if (psdata->c2h_wakeup_gpio) {
|
||||
if (psdata->c2h_wakeup_gpio != 0xff)
|
||||
psdata->c2h_wakeupmode = BT_HOST_WAKEUP_METHOD_GPIO;
|
||||
} else {
|
||||
else
|
||||
psdata->c2h_wakeupmode = BT_HOST_WAKEUP_METHOD_NONE;
|
||||
psdata->c2h_wakeup_gpio = 0xff;
|
||||
}
|
||||
|
||||
psdata->cur_h2c_wakeupmode = WAKEUP_METHOD_INVALID;
|
||||
if (psdata->h2c_ps_gpio)
|
||||
@ -1821,6 +1857,11 @@ static int nxp_serdev_suspend(struct device *dev)
|
||||
struct ps_data *psdata = &nxpdev->psdata;
|
||||
|
||||
ps_control(psdata->hdev, PS_STATE_SLEEP);
|
||||
|
||||
if (psdata->wakeup_source) {
|
||||
enable_irq_wake(psdata->irq_handler);
|
||||
enable_irq(psdata->irq_handler);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1829,6 +1870,11 @@ static int nxp_serdev_resume(struct device *dev)
|
||||
struct btnxpuart_dev *nxpdev = dev_get_drvdata(dev);
|
||||
struct ps_data *psdata = &nxpdev->psdata;
|
||||
|
||||
if (psdata->wakeup_source) {
|
||||
disable_irq(psdata->irq_handler);
|
||||
disable_irq_wake(psdata->irq_handler);
|
||||
}
|
||||
|
||||
ps_control(psdata->hdev, PS_STATE_AWAKE);
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <net/bluetooth/bluetooth.h>
|
||||
#include <net/bluetooth/hci_core.h>
|
||||
#include <net/bluetooth/hci_drv.h>
|
||||
|
||||
#include "btintel.h"
|
||||
#include "btbcm.h"
|
||||
@ -34,7 +35,6 @@ static bool force_scofix;
|
||||
static bool enable_autosuspend = IS_ENABLED(CONFIG_BT_HCIBTUSB_AUTOSUSPEND);
|
||||
static bool enable_poll_sync = IS_ENABLED(CONFIG_BT_HCIBTUSB_POLL_SYNC);
|
||||
static bool reset = true;
|
||||
static bool auto_isoc_alt = IS_ENABLED(CONFIG_BT_HCIBTUSB_AUTO_ISOC_ALT);
|
||||
|
||||
static struct usb_driver btusb_driver;
|
||||
|
||||
@ -513,6 +513,7 @@ static const struct usb_device_id quirks_table[] = {
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Realtek 8851BE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0bda, 0xb850), .driver_info = BTUSB_REALTEK },
|
||||
{ USB_DEVICE(0x13d3, 0x3600), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Realtek 8852AE Bluetooth devices */
|
||||
@ -678,6 +679,8 @@ static const struct usb_device_id quirks_table[] = {
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3568), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3584), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3605), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3607), .driver_info = BTUSB_MEDIATEK |
|
||||
@ -716,8 +719,12 @@ static const struct usb_device_id quirks_table[] = {
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3608), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3613), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3628), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3630), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Additional Realtek 8723AE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK },
|
||||
@ -1118,42 +1125,6 @@ static inline void btusb_free_frags(struct btusb_data *data)
|
||||
spin_unlock_irqrestore(&data->rxlock, flags);
|
||||
}
|
||||
|
||||
static void btusb_sco_connected(struct btusb_data *data, struct sk_buff *skb)
|
||||
{
|
||||
struct hci_event_hdr *hdr = (void *) skb->data;
|
||||
struct hci_ev_sync_conn_complete *ev =
|
||||
(void *) skb->data + sizeof(*hdr);
|
||||
struct hci_dev *hdev = data->hdev;
|
||||
unsigned int notify_air_mode;
|
||||
|
||||
if (hci_skb_pkt_type(skb) != HCI_EVENT_PKT)
|
||||
return;
|
||||
|
||||
if (skb->len < sizeof(*hdr) || hdr->evt != HCI_EV_SYNC_CONN_COMPLETE)
|
||||
return;
|
||||
|
||||
if (skb->len != sizeof(*hdr) + sizeof(*ev) || ev->status)
|
||||
return;
|
||||
|
||||
switch (ev->air_mode) {
|
||||
case BT_CODEC_CVSD:
|
||||
notify_air_mode = HCI_NOTIFY_ENABLE_SCO_CVSD;
|
||||
break;
|
||||
|
||||
case BT_CODEC_TRANSPARENT:
|
||||
notify_air_mode = HCI_NOTIFY_ENABLE_SCO_TRANSP;
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
bt_dev_info(hdev, "enabling SCO with air mode %u", ev->air_mode);
|
||||
data->sco_num = 1;
|
||||
data->air_mode = notify_air_mode;
|
||||
schedule_work(&data->work);
|
||||
}
|
||||
|
||||
static int btusb_recv_event(struct btusb_data *data, struct sk_buff *skb)
|
||||
{
|
||||
if (data->intr_interval) {
|
||||
@ -1161,10 +1132,6 @@ static int btusb_recv_event(struct btusb_data *data, struct sk_buff *skb)
|
||||
schedule_delayed_work(&data->rx_work, 0);
|
||||
}
|
||||
|
||||
/* Configure altsetting for HCI_USER_CHANNEL on SCO connected */
|
||||
if (auto_isoc_alt && hci_dev_test_flag(data->hdev, HCI_USER_CHANNEL))
|
||||
btusb_sco_connected(data, skb);
|
||||
|
||||
return data->recv_event(data->hdev, skb);
|
||||
}
|
||||
|
||||
@ -3753,31 +3720,133 @@ static const struct file_operations force_poll_sync_fops = {
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
static ssize_t isoc_alt_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct btusb_data *data = dev_get_drvdata(dev);
|
||||
#define BTUSB_HCI_DRV_OP_SUPPORTED_ALTSETTINGS \
|
||||
hci_opcode_pack(HCI_DRV_OGF_DRIVER_SPECIFIC, 0x0000)
|
||||
#define BTUSB_HCI_DRV_SUPPORTED_ALTSETTINGS_SIZE 0
|
||||
struct btusb_hci_drv_rp_supported_altsettings {
|
||||
__u8 num;
|
||||
__u8 altsettings[];
|
||||
} __packed;
|
||||
|
||||
return sysfs_emit(buf, "%d\n", data->isoc_altsetting);
|
||||
#define BTUSB_HCI_DRV_OP_SWITCH_ALTSETTING \
|
||||
hci_opcode_pack(HCI_DRV_OGF_DRIVER_SPECIFIC, 0x0001)
|
||||
#define BTUSB_HCI_DRV_SWITCH_ALTSETTING_SIZE 1
|
||||
struct btusb_hci_drv_cmd_switch_altsetting {
|
||||
__u8 altsetting;
|
||||
} __packed;
|
||||
|
||||
static const struct {
|
||||
u16 opcode;
|
||||
const char *desc;
|
||||
} btusb_hci_drv_supported_commands[] = {
|
||||
/* Common commands */
|
||||
{ HCI_DRV_OP_READ_INFO, "Read Info" },
|
||||
|
||||
/* Driver specific commands */
|
||||
{ BTUSB_HCI_DRV_OP_SUPPORTED_ALTSETTINGS, "Supported Altsettings" },
|
||||
{ BTUSB_HCI_DRV_OP_SWITCH_ALTSETTING, "Switch Altsetting" },
|
||||
};
|
||||
static int btusb_hci_drv_read_info(struct hci_dev *hdev, void *data,
|
||||
u16 data_len)
|
||||
{
|
||||
struct hci_drv_rp_read_info *rp;
|
||||
size_t rp_size;
|
||||
int err, i;
|
||||
u16 opcode, num_supported_commands =
|
||||
ARRAY_SIZE(btusb_hci_drv_supported_commands);
|
||||
|
||||
rp_size = sizeof(*rp) + num_supported_commands * 2;
|
||||
|
||||
rp = kmalloc(rp_size, GFP_KERNEL);
|
||||
if (!rp)
|
||||
return -ENOMEM;
|
||||
|
||||
strscpy_pad(rp->driver_name, btusb_driver.name);
|
||||
|
||||
rp->num_supported_commands = cpu_to_le16(num_supported_commands);
|
||||
for (i = 0; i < num_supported_commands; i++) {
|
||||
opcode = btusb_hci_drv_supported_commands[i].opcode;
|
||||
bt_dev_info(hdev,
|
||||
"Supported HCI Drv command (0x%02x|0x%04x): %s",
|
||||
hci_opcode_ogf(opcode),
|
||||
hci_opcode_ocf(opcode),
|
||||
btusb_hci_drv_supported_commands[i].desc);
|
||||
rp->supported_commands[i] = cpu_to_le16(opcode);
|
||||
}
|
||||
|
||||
err = hci_drv_cmd_complete(hdev, HCI_DRV_OP_READ_INFO,
|
||||
HCI_DRV_STATUS_SUCCESS, rp, rp_size);
|
||||
|
||||
kfree(rp);
|
||||
return err;
|
||||
}
|
||||
|
||||
static ssize_t isoc_alt_store(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
static int btusb_hci_drv_supported_altsettings(struct hci_dev *hdev, void *data,
|
||||
u16 data_len)
|
||||
{
|
||||
struct btusb_data *data = dev_get_drvdata(dev);
|
||||
int alt;
|
||||
int ret;
|
||||
struct btusb_data *drvdata = hci_get_drvdata(hdev);
|
||||
struct btusb_hci_drv_rp_supported_altsettings *rp;
|
||||
size_t rp_size;
|
||||
int err;
|
||||
u8 i;
|
||||
|
||||
if (kstrtoint(buf, 10, &alt))
|
||||
return -EINVAL;
|
||||
/* There are at most 7 alt (0 - 6) */
|
||||
rp = kmalloc(sizeof(*rp) + 7, GFP_KERNEL);
|
||||
|
||||
ret = btusb_switch_alt_setting(data->hdev, alt);
|
||||
return ret < 0 ? ret : count;
|
||||
rp->num = 0;
|
||||
if (!drvdata->isoc)
|
||||
goto done;
|
||||
|
||||
for (i = 0; i <= 6; i++) {
|
||||
if (btusb_find_altsetting(drvdata, i))
|
||||
rp->altsettings[rp->num++] = i;
|
||||
}
|
||||
|
||||
done:
|
||||
rp_size = sizeof(*rp) + rp->num;
|
||||
|
||||
err = hci_drv_cmd_complete(hdev, BTUSB_HCI_DRV_OP_SUPPORTED_ALTSETTINGS,
|
||||
HCI_DRV_STATUS_SUCCESS, rp, rp_size);
|
||||
kfree(rp);
|
||||
return err;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR_RW(isoc_alt);
|
||||
static int btusb_hci_drv_switch_altsetting(struct hci_dev *hdev, void *data,
|
||||
u16 data_len)
|
||||
{
|
||||
struct btusb_hci_drv_cmd_switch_altsetting *cmd = data;
|
||||
u8 status;
|
||||
|
||||
if (cmd->altsetting > 6) {
|
||||
status = HCI_DRV_STATUS_INVALID_PARAMETERS;
|
||||
} else {
|
||||
if (btusb_switch_alt_setting(hdev, cmd->altsetting))
|
||||
status = HCI_DRV_STATUS_UNSPECIFIED_ERROR;
|
||||
else
|
||||
status = HCI_DRV_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return hci_drv_cmd_status(hdev, BTUSB_HCI_DRV_OP_SWITCH_ALTSETTING,
|
||||
status);
|
||||
}
|
||||
|
||||
static const struct hci_drv_handler btusb_hci_drv_common_handlers[] = {
|
||||
{ btusb_hci_drv_read_info, HCI_DRV_READ_INFO_SIZE },
|
||||
};
|
||||
|
||||
static const struct hci_drv_handler btusb_hci_drv_specific_handlers[] = {
|
||||
{ btusb_hci_drv_supported_altsettings,
|
||||
BTUSB_HCI_DRV_SUPPORTED_ALTSETTINGS_SIZE },
|
||||
{ btusb_hci_drv_switch_altsetting,
|
||||
BTUSB_HCI_DRV_SWITCH_ALTSETTING_SIZE },
|
||||
};
|
||||
|
||||
static struct hci_drv btusb_hci_drv = {
|
||||
.common_handler_count = ARRAY_SIZE(btusb_hci_drv_common_handlers),
|
||||
.common_handlers = btusb_hci_drv_common_handlers,
|
||||
.specific_handler_count = ARRAY_SIZE(btusb_hci_drv_specific_handlers),
|
||||
.specific_handlers = btusb_hci_drv_specific_handlers,
|
||||
};
|
||||
|
||||
static int btusb_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *id)
|
||||
@ -3918,12 +3987,13 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
data->reset_gpio = reset_gpio;
|
||||
}
|
||||
|
||||
hdev->open = btusb_open;
|
||||
hdev->close = btusb_close;
|
||||
hdev->flush = btusb_flush;
|
||||
hdev->send = btusb_send_frame;
|
||||
hdev->notify = btusb_notify;
|
||||
hdev->wakeup = btusb_wakeup;
|
||||
hdev->open = btusb_open;
|
||||
hdev->close = btusb_close;
|
||||
hdev->flush = btusb_flush;
|
||||
hdev->send = btusb_send_frame;
|
||||
hdev->notify = btusb_notify;
|
||||
hdev->wakeup = btusb_wakeup;
|
||||
hdev->hci_drv = &btusb_hci_drv;
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
err = btusb_config_oob_wake(hdev);
|
||||
@ -4142,10 +4212,6 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
data->isoc, data);
|
||||
if (err < 0)
|
||||
goto out_free_dev;
|
||||
|
||||
err = device_create_file(&intf->dev, &dev_attr_isoc_alt);
|
||||
if (err)
|
||||
goto out_free_dev;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_HCIBTUSB_BCM) && data->diag) {
|
||||
@ -4192,10 +4258,8 @@ static void btusb_disconnect(struct usb_interface *intf)
|
||||
hdev = data->hdev;
|
||||
usb_set_intfdata(data->intf, NULL);
|
||||
|
||||
if (data->isoc) {
|
||||
device_remove_file(&intf->dev, &dev_attr_isoc_alt);
|
||||
if (data->isoc)
|
||||
usb_set_intfdata(data->isoc, NULL);
|
||||
}
|
||||
|
||||
if (data->diag)
|
||||
usb_set_intfdata(data->diag, NULL);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user