Core:
- Enable memcg accounting for various networking objects. BPF: - Introduce bpf timers. - Add perf link and opaque bpf_cookie which the program can read out again, to be used in libbpf-based USDT library. - Add bpf_task_pt_regs() helper to access user space pt_regs in kprobes, to help user space stack unwinding. - Add support for UNIX sockets for BPF sockmap. - Extend BPF iterator support for UNIX domain sockets. - Allow BPF TCP congestion control progs and bpf iterators to call bpf_setsockopt(), e.g. to switch to another congestion control algorithm. Protocols: - Support IOAM Pre-allocated Trace with IPv6. - Support Management Component Transport Protocol. - bridge: multicast: add vlan support. - netfilter: add hooks for the SRv6 lightweight tunnel driver. - tcp: - enable mid-stream window clamping (by user space or BPF) - allow data-less, empty-cookie SYN with TFO_SERVER_COOKIE_NOT_REQD - more accurate DSACK processing for RACK-TLP - mptcp: - add full mesh path manager option - add partial support for MP_FAIL - improve use of backup subflows - optimize option processing - af_unix: add OOB notification support. - ipv6: add IFLA_INET6_RA_MTU to expose MTU value advertised by the router. - mac80211: Target Wake Time support in AP mode. - can: j1939: extend UAPI to notify about RX status. Driver APIs: - Add page frag support in page pool API. - Many improvements to the DSA (distributed switch) APIs. - ethtool: extend IRQ coalesce uAPI with timer reset modes. - devlink: control which auxiliary devices are created. - Support CAN PHYs via the generic PHY subsystem. - Proper cross-chip support for tag_8021q. - Allow TX forwarding for the software bridge data path to be offloaded to capable devices. Drivers: - veth: more flexible channels number configuration. - openvswitch: introduce per-cpu upcall dispatch. - Add internet mix (IMIX) mode to pktgen. - Transparently handle XDP operations in the bonding driver. - Add LiteETH network driver. - Renesas (ravb): - support Gigabit Ethernet IP - NXP Ethernet switch (sja1105) - fast aging support - support for "H" switch topologies - traffic termination for ports under VLAN-aware bridge - Intel 1G Ethernet - support getcrosststamp() with PCIe PTM (Precision Time Measurement) for better time sync - support Credit-Based Shaper (CBS) offload, enabling HW traffic prioritization and bandwidth reservation - Broadcom Ethernet (bnxt) - support pulse-per-second output - support larger Rx rings - Mellanox Ethernet (mlx5) - support ethtool RSS contexts and MQPRIO channel mode - support LAG offload with bridging - support devlink rate limit API - support packet sampling on tunnels - Huawei Ethernet (hns3): - basic devlink support - add extended IRQ coalescing support - report extended link state - Netronome Ethernet (nfp): - add conntrack offload support - Broadcom WiFi (brcmfmac): - add WPA3 Personal with FT to supported cipher suites - support 43752 SDIO device - Intel WiFi (iwlwifi): - support scanning hidden 6GHz networks - support for a new hardware family (Bz) - Xen pv driver: - harden netfront against malicious backends - Qualcomm mobile - ipa: refactor power management and enable automatic suspend - mhi: move MBIM to WWAN subsystem interfaces Refactor: - Ambient BPF run context and cgroup storage cleanup. - Compat rework for ndo_ioctl. Old code removal: - prism54 remove the obsoleted driver, deprecated by the p54 driver. - wan: remove sbni/granch driver. Signed-off-by: Jakub Kicinski <kuba@kernel.org> -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE6jPA+I1ugmIBA4hXMUZtbf5SIrsFAmEukBYACgkQMUZtbf5S IrsyHA//TO8dw18NYts4n9LmlJT2naJ7yBUUSSXK/M+DtW0MQ9nnHhqzPm5uJdRl IgQTNJrW3dYzRwgqaWZqEwO1t5/FI+f87ND1Nsekg7x9tF66a6ov5WxU26TwwSba U+si/inQ/4chuQ+LxMQobqCDxaLE46I2dIoRl+YfndJ24DRzYSwAEYIPPbSdfyU+ +/l+3s4GaxO4k/hLciPAiOniyxLoUNiGUTNh+2yqRBXelSRJRKVnl+V22ANFrxRW nTEiplfVKhlPU1e4iLuRtaxDDiePHhw9I3j/lMHhfeFU2P/gKJIvz4QpGV0CAZg2 1VvDU32WEx1GQLXJbKm0KwoNRUq1QSjOyyFti+BO7ugGaYAR4gKhShOqlSYLzUtB tbtzQhSNLWOGqgmSJOztZb5kFDm2EdRSll5/lP2uyFlPkIsIp0QbscJVzNTnS74b Xz15ZOw41Z4TfWPEMWgfrx6Zkm7pPWkly+7WfUkPcHa1gftNz6tzXXxSXcXIBPdi yQ5JCzzxrM5573YHuk5YedwZpn6PiAt4A/muFGk9C6aXP60TQAOS/ppaUzZdnk4D NfOk9mj06WEULjYjPcKEuT3GGWE6kmjb8Pu0QZWKOchv7vr6oZly1EkVZqYlXELP AfhcrFeuufie8mqm0jdb4LnYaAnqyLzlb1J4Zxh9F+/IX7G3yoc= =JDGD -----END PGP SIGNATURE----- Merge tag 'net-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Jakub Kicinski: "Core: - Enable memcg accounting for various networking objects. BPF: - Introduce bpf timers. - Add perf link and opaque bpf_cookie which the program can read out again, to be used in libbpf-based USDT library. - Add bpf_task_pt_regs() helper to access user space pt_regs in kprobes, to help user space stack unwinding. - Add support for UNIX sockets for BPF sockmap. - Extend BPF iterator support for UNIX domain sockets. - Allow BPF TCP congestion control progs and bpf iterators to call bpf_setsockopt(), e.g. to switch to another congestion control algorithm. Protocols: - Support IOAM Pre-allocated Trace with IPv6. - Support Management Component Transport Protocol. - bridge: multicast: add vlan support. - netfilter: add hooks for the SRv6 lightweight tunnel driver. - tcp: - enable mid-stream window clamping (by user space or BPF) - allow data-less, empty-cookie SYN with TFO_SERVER_COOKIE_NOT_REQD - more accurate DSACK processing for RACK-TLP - mptcp: - add full mesh path manager option - add partial support for MP_FAIL - improve use of backup subflows - optimize option processing - af_unix: add OOB notification support. - ipv6: add IFLA_INET6_RA_MTU to expose MTU value advertised by the router. - mac80211: Target Wake Time support in AP mode. - can: j1939: extend UAPI to notify about RX status. Driver APIs: - Add page frag support in page pool API. - Many improvements to the DSA (distributed switch) APIs. - ethtool: extend IRQ coalesce uAPI with timer reset modes. - devlink: control which auxiliary devices are created. - Support CAN PHYs via the generic PHY subsystem. - Proper cross-chip support for tag_8021q. - Allow TX forwarding for the software bridge data path to be offloaded to capable devices. Drivers: - veth: more flexible channels number configuration. - openvswitch: introduce per-cpu upcall dispatch. - Add internet mix (IMIX) mode to pktgen. - Transparently handle XDP operations in the bonding driver. - Add LiteETH network driver. - Renesas (ravb): - support Gigabit Ethernet IP - NXP Ethernet switch (sja1105): - fast aging support - support for "H" switch topologies - traffic termination for ports under VLAN-aware bridge - Intel 1G Ethernet - support getcrosststamp() with PCIe PTM (Precision Time Measurement) for better time sync - support Credit-Based Shaper (CBS) offload, enabling HW traffic prioritization and bandwidth reservation - Broadcom Ethernet (bnxt) - support pulse-per-second output - support larger Rx rings - Mellanox Ethernet (mlx5) - support ethtool RSS contexts and MQPRIO channel mode - support LAG offload with bridging - support devlink rate limit API - support packet sampling on tunnels - Huawei Ethernet (hns3): - basic devlink support - add extended IRQ coalescing support - report extended link state - Netronome Ethernet (nfp): - add conntrack offload support - Broadcom WiFi (brcmfmac): - add WPA3 Personal with FT to supported cipher suites - support 43752 SDIO device - Intel WiFi (iwlwifi): - support scanning hidden 6GHz networks - support for a new hardware family (Bz) - Xen pv driver: - harden netfront against malicious backends - Qualcomm mobile - ipa: refactor power management and enable automatic suspend - mhi: move MBIM to WWAN subsystem interfaces Refactor: - Ambient BPF run context and cgroup storage cleanup. - Compat rework for ndo_ioctl. Old code removal: - prism54 remove the obsoleted driver, deprecated by the p54 driver. - wan: remove sbni/granch driver" * tag 'net-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1715 commits) net: Add depends on OF_NET for LiteX's LiteETH ipv6: seg6: remove duplicated include net: hns3: remove unnecessary spaces net: hns3: add some required spaces net: hns3: clean up a type mismatch warning net: hns3: refine function hns3_set_default_feature() ipv6: remove duplicated 'net/lwtunnel.h' include net: w5100: check return value after calling platform_get_resource() net/mlxbf_gige: Make use of devm_platform_ioremap_resourcexxx() net: mdio: mscc-miim: Make use of the helper function devm_platform_ioremap_resource() net: mdio-ipq4019: Make use of devm_platform_ioremap_resource() fou: remove sparse errors ipv4: fix endianness issue in inet_rtm_getroute_build_skb() octeontx2-af: Set proper errorcode for IPv4 checksum errors octeontx2-af: Fix static code analyzer reported issues octeontx2-af: Fix mailbox errors in nix_rss_flowkey_cfg octeontx2-af: Fix loop in free and unmap counter af_unix: fix potential NULL deref in unix_dgram_connect() dpaa2-eth: Replace strlcpy with strscpy octeontx2-af: Use NDC TX for transmit packet data ...
This commit is contained in:
commit
9e9fb7655e
2
.mailmap
2
.mailmap
@ -229,6 +229,7 @@ Matthew Wilcox <willy@infradead.org> <mawilcox@microsoft.com>
|
||||
Matthew Wilcox <willy@infradead.org> <willy@debian.org>
|
||||
Matthew Wilcox <willy@infradead.org> <willy@linux.intel.com>
|
||||
Matthew Wilcox <willy@infradead.org> <willy@parisc-linux.org>
|
||||
Matthias Fuchs <socketcan@esd.eu> <matthias.fuchs@esd.eu>
|
||||
Matthieu CASTET <castet.matthieu@free.fr>
|
||||
Matt Ranostay <matt.ranostay@konsulko.com> <matt@ranostay.consulting>
|
||||
Matt Ranostay <mranostay@gmail.com> Matthew Ranostay <mranostay@embeddedalley.com>
|
||||
@ -341,6 +342,7 @@ Sumit Semwal <sumit.semwal@ti.com>
|
||||
Takashi YOSHII <takashi.yoshii.zj@renesas.com>
|
||||
Tejun Heo <htejun@gmail.com>
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
Thomas Körper <socketcan@esd.eu> <thomas.koerper@esd.eu>
|
||||
Thomas Pedersen <twp@codeaurora.org>
|
||||
Tiezhu Yang <yangtiezhu@loongson.cn> <kernelpatch@126.com>
|
||||
Todor Tomov <todor.too@gmail.com> <todor.tomov@linaro.org>
|
||||
|
@ -4962,8 +4962,6 @@
|
||||
sa1100ir [NET]
|
||||
See drivers/net/irda/sa1100_ir.c.
|
||||
|
||||
sbni= [NET] Granch SBNI12 leased line adapter
|
||||
|
||||
sched_verbose [KNL] Enables verbose scheduler debug messages.
|
||||
|
||||
schedstats= [KNL,X86] Enable or disable scheduled statistics.
|
||||
|
@ -15,15 +15,7 @@ that goes into great technical depth about the BPF Architecture.
|
||||
libbpf
|
||||
======
|
||||
|
||||
Libbpf is a userspace library for loading and interacting with bpf programs.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
libbpf/libbpf
|
||||
libbpf/libbpf_api
|
||||
libbpf/libbpf_build
|
||||
libbpf/libbpf_naming_convention
|
||||
Documentation/bpf/libbpf/libbpf.rst is a userspace library for loading and interacting with bpf programs.
|
||||
|
||||
BPF Type Format (BTF)
|
||||
=====================
|
||||
|
@ -3,6 +3,14 @@
|
||||
libbpf
|
||||
======
|
||||
|
||||
For API documentation see the `versioned API documentation site <https://libbpf.readthedocs.io/en/latest/api.html>`_.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
libbpf_naming_convention
|
||||
libbpf_build
|
||||
|
||||
This is documentation for libbpf, a userspace library for loading and
|
||||
interacting with bpf programs.
|
||||
|
@ -1,27 +0,0 @@
|
||||
.. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
|
||||
|
||||
API
|
||||
===
|
||||
|
||||
This documentation is autogenerated from header files in libbpf, tools/lib/bpf
|
||||
|
||||
.. kernel-doc:: tools/lib/bpf/libbpf.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: tools/lib/bpf/bpf.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: tools/lib/bpf/btf.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: tools/lib/bpf/xsk.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: tools/lib/bpf/bpf_tracing.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: tools/lib/bpf/bpf_core_read.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: tools/lib/bpf/bpf_endian.h
|
||||
:internal:
|
@ -69,7 +69,7 @@ functions. These can be mixed and matched. Note that these functions
|
||||
are not reentrant for performance reasons.
|
||||
|
||||
ABI
|
||||
==========
|
||||
---
|
||||
|
||||
libbpf can be both linked statically or used as DSO. To avoid possible
|
||||
conflicts with other libraries an application is linked with, all
|
||||
|
@ -1,43 +0,0 @@
|
||||
* Broadcom UniMAC MDIO bus controller
|
||||
|
||||
Required properties:
|
||||
- compatible: should one from "brcm,genet-mdio-v1", "brcm,genet-mdio-v2",
|
||||
"brcm,genet-mdio-v3", "brcm,genet-mdio-v4", "brcm,genet-mdio-v5" or
|
||||
"brcm,unimac-mdio"
|
||||
- reg: address and length of the register set for the device, first one is the
|
||||
base register, and the second one is optional and for indirect accesses to
|
||||
larger than 16-bits MDIO transactions
|
||||
- reg-names: name(s) of the register must be "mdio" and optional "mdio_indir_rw"
|
||||
- #size-cells: must be 1
|
||||
- #address-cells: must be 0
|
||||
|
||||
Optional properties:
|
||||
- interrupts: must be one if the interrupt is shared with the Ethernet MAC or
|
||||
Ethernet switch this MDIO block is integrated from, or must be two, if there
|
||||
are two separate interrupts, first one must be "mdio done" and second must be
|
||||
for "mdio error"
|
||||
- interrupt-names: must be "mdio_done_error" when there is a share interrupt fed
|
||||
to this hardware block, or must be "mdio_done" for the first interrupt and
|
||||
"mdio_error" for the second when there are separate interrupts
|
||||
- clocks: A reference to the clock supplying the MDIO bus controller
|
||||
- clock-frequency: the MDIO bus clock that must be output by the MDIO bus
|
||||
hardware, if absent, the default hardware values are used
|
||||
|
||||
Child nodes of this MDIO bus controller node are standard Ethernet PHY device
|
||||
nodes as described in Documentation/devicetree/bindings/net/phy.txt
|
||||
|
||||
Example:
|
||||
|
||||
mdio@403c0 {
|
||||
compatible = "brcm,unimac-mdio";
|
||||
reg = <0x403c0 0x8 0x40300 0x18>;
|
||||
reg-names = "mdio", "mdio_indir_rw";
|
||||
#size-cells = <1>;
|
||||
#address-cells = <0>;
|
||||
|
||||
...
|
||||
phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
84
Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
Normal file
84
Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
Normal file
@ -0,0 +1,84 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/brcm,unimac-mdio.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Broadcom UniMAC MDIO bus controller
|
||||
|
||||
maintainers:
|
||||
- Rafał Miłecki <rafal@milecki.pl>
|
||||
|
||||
allOf:
|
||||
- $ref: mdio.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- brcm,genet-mdio-v1
|
||||
- brcm,genet-mdio-v2
|
||||
- brcm,genet-mdio-v3
|
||||
- brcm,genet-mdio-v4
|
||||
- brcm,genet-mdio-v5
|
||||
- brcm,unimac-mdio
|
||||
|
||||
reg:
|
||||
minItems: 1
|
||||
items:
|
||||
- description: base register
|
||||
- description: indirect accesses to larger than 16-bits MDIO transactions
|
||||
|
||||
reg-names:
|
||||
minItems: 1
|
||||
items:
|
||||
- const: mdio
|
||||
- const: mdio_indir_rw
|
||||
|
||||
interrupts:
|
||||
oneOf:
|
||||
- description: >
|
||||
Interrupt shared with the Ethernet MAC or Ethernet switch this MDIO
|
||||
block is integrated from
|
||||
- items:
|
||||
- description: |
|
||||
"mdio done" interrupt
|
||||
- description: |
|
||||
"mdio error" interrupt
|
||||
|
||||
interrupt-names:
|
||||
oneOf:
|
||||
- const: mdio_done_error
|
||||
- items:
|
||||
- const: mdio_done
|
||||
- const: mdio_error
|
||||
|
||||
clocks:
|
||||
description: A reference to the clock supplying the MDIO bus controller
|
||||
|
||||
clock-frequency:
|
||||
description: >
|
||||
The MDIO bus clock that must be output by the MDIO bus hardware, if
|
||||
absent, the default hardware values are used
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
required:
|
||||
- reg
|
||||
- reg-names
|
||||
- '#address-cells'
|
||||
- '#size-cells'
|
||||
|
||||
examples:
|
||||
- |
|
||||
mdio@403c0 {
|
||||
compatible = "brcm,unimac-mdio";
|
||||
reg = <0x403c0 0x8>, <0x40300 0x18>;
|
||||
reg-names = "mdio", "mdio_indir_rw";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
119
Documentation/devicetree/bindings/net/can/bosch,c_can.yaml
Normal file
119
Documentation/devicetree/bindings/net/can/bosch,c_can.yaml
Normal file
@ -0,0 +1,119 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/can/bosch,c_can.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Bosch C_CAN/D_CAN controller Device Tree Bindings
|
||||
|
||||
description: Bosch C_CAN/D_CAN controller for CAN bus
|
||||
|
||||
maintainers:
|
||||
- Dario Binacchi <dariobin@libero.it>
|
||||
|
||||
allOf:
|
||||
- $ref: can-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- enum:
|
||||
- bosch,c_can
|
||||
- bosch,d_can
|
||||
- ti,dra7-d_can
|
||||
- ti,am3352-d_can
|
||||
- items:
|
||||
- enum:
|
||||
- ti,am4372-d_can
|
||||
- const: ti,am3352-d_can
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
power-domains:
|
||||
description: |
|
||||
Should contain a phandle to a PM domain provider node and an args
|
||||
specifier containing the DCAN device id value. It's mandatory for
|
||||
Keystone 2 66AK2G SoCs only.
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
description: |
|
||||
CAN functional clock phandle.
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
maxItems: 1
|
||||
|
||||
syscon-raminit:
|
||||
description: |
|
||||
Handle to system control region that contains the RAMINIT register,
|
||||
register offset to the RAMINIT register and the CAN instance number (0
|
||||
offset).
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
items:
|
||||
items:
|
||||
- description: The phandle to the system control region.
|
||||
- description: The register offset.
|
||||
- description: The CAN instance number.
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- bosch,d_can
|
||||
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
minItems: 4
|
||||
maxItems: 4
|
||||
items:
|
||||
- description: Error and status IRQ
|
||||
- description: Message object IRQ
|
||||
- description: RAM ECC correctable error IRQ
|
||||
- description: RAM ECC non-correctable error IRQ
|
||||
|
||||
else:
|
||||
properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
items:
|
||||
- description: Error and status IRQ
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/reset/altr,rst-mgr.h>
|
||||
|
||||
can@ffc00000 {
|
||||
compatible = "bosch,d_can";
|
||||
reg = <0xffc00000 0x1000>;
|
||||
interrupts = <0 131 4>, <0 132 4>, <0 133 4>, <0 134 4>;
|
||||
clocks = <&can0_clk>;
|
||||
resets = <&rst CAN0_RESET>;
|
||||
};
|
||||
- |
|
||||
can@0 {
|
||||
compatible = "ti,am3352-d_can";
|
||||
reg = <0x0 0x2000>;
|
||||
clocks = <&dcan1_fck>;
|
||||
clock-names = "fck";
|
||||
syscon-raminit = <&scm_conf 0x644 1>;
|
||||
interrupts = <55>;
|
||||
};
|
@ -104,9 +104,18 @@ properties:
|
||||
maximum: 32
|
||||
maxItems: 1
|
||||
|
||||
power-domains:
|
||||
description:
|
||||
Power domain provider node and an args specifier containing
|
||||
the can device id value.
|
||||
maxItems: 1
|
||||
|
||||
can-transceiver:
|
||||
$ref: can-transceiver.yaml#
|
||||
|
||||
phys:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
@ -1,65 +0,0 @@
|
||||
Bosch C_CAN/D_CAN controller Device Tree Bindings
|
||||
-------------------------------------------------
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "bosch,c_can" for C_CAN controllers and
|
||||
"bosch,d_can" for D_CAN controllers.
|
||||
Can be "ti,dra7-d_can", "ti,am3352-d_can" or
|
||||
"ti,am4372-d_can".
|
||||
- reg : physical base address and size of the C_CAN/D_CAN
|
||||
registers map
|
||||
- interrupts : property with a value describing the interrupt
|
||||
number
|
||||
|
||||
The following are mandatory properties for DRA7x, AM33xx and AM43xx SoCs only:
|
||||
- ti,hwmods : Must be "d_can<n>" or "c_can<n>", n being the
|
||||
instance number
|
||||
|
||||
The following are mandatory properties for Keystone 2 66AK2G SoCs only:
|
||||
- power-domains : Should contain a phandle to a PM domain provider node
|
||||
and an args specifier containing the DCAN device id
|
||||
value. This property is as per the binding,
|
||||
Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml
|
||||
- clocks : CAN functional clock phandle. This property is as per the
|
||||
binding,
|
||||
Documentation/devicetree/bindings/clock/ti,sci-clk.yaml
|
||||
|
||||
Optional properties:
|
||||
- syscon-raminit : Handle to system control region that contains the
|
||||
RAMINIT register, register offset to the RAMINIT
|
||||
register and the CAN instance number (0 offset).
|
||||
|
||||
Note: "ti,hwmods" field is used to fetch the base address and irq
|
||||
resources from TI, omap hwmod data base during device registration.
|
||||
Future plan is to migrate hwmod data base contents into device tree
|
||||
blob so that, all the required data will be used from device tree dts
|
||||
file.
|
||||
|
||||
Example:
|
||||
|
||||
Step1: SoC common .dtsi file
|
||||
|
||||
dcan1: d_can@481d0000 {
|
||||
compatible = "bosch,d_can";
|
||||
reg = <0x481d0000 0x2000>;
|
||||
interrupts = <55>;
|
||||
interrupt-parent = <&intc>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
(or)
|
||||
|
||||
dcan1: d_can@481d0000 {
|
||||
compatible = "bosch,d_can";
|
||||
ti,hwmods = "d_can1";
|
||||
reg = <0x481d0000 0x2000>;
|
||||
interrupts = <55>;
|
||||
interrupt-parent = <&intc>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
Step 2: board specific .dts file
|
||||
|
||||
&dcan1 {
|
||||
status = "okay";
|
||||
};
|
@ -13,6 +13,15 @@ properties:
|
||||
$nodename:
|
||||
pattern: "^can(@.*)?$"
|
||||
|
||||
termination-gpios:
|
||||
description: GPIO pin to enable CAN bus termination.
|
||||
maxItems: 1
|
||||
|
||||
termination-ohms:
|
||||
description: The resistance value of the CAN bus termination resistor.
|
||||
minimum: 1
|
||||
maximum: 65535
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
...
|
||||
|
@ -119,6 +119,9 @@ properties:
|
||||
minimum: 0
|
||||
maximum: 2
|
||||
|
||||
termination-gpios: true
|
||||
termination-ohms: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
@ -148,3 +151,17 @@ examples:
|
||||
fsl,stop-mode = <&gpr 0x34 28>;
|
||||
fsl,scu-index = /bits/ 8 <1>;
|
||||
};
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
can@2090000 {
|
||||
compatible = "fsl,imx6q-flexcan";
|
||||
reg = <0x02090000 0x4000>;
|
||||
interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks 1>, <&clks 2>;
|
||||
clock-names = "ipg", "per";
|
||||
fsl,stop-mode = <&gpr 0x34 28>;
|
||||
termination-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
|
||||
termination-ohms = <120>;
|
||||
};
|
||||
|
@ -30,13 +30,15 @@ properties:
|
||||
- renesas,r8a77995-canfd # R-Car D3
|
||||
- const: renesas,rcar-gen3-canfd # R-Car Gen3 and RZ/G2
|
||||
|
||||
- items:
|
||||
- enum:
|
||||
- renesas,r9a07g044-canfd # RZ/G2{L,LC}
|
||||
- const: renesas,rzg2l-canfd # RZ/G2L family
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
items:
|
||||
- description: Channel interrupt
|
||||
- description: Global interrupt
|
||||
interrupts: true
|
||||
|
||||
clocks:
|
||||
maxItems: 3
|
||||
@ -50,8 +52,7 @@ properties:
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
resets: true
|
||||
|
||||
renesas,no-can-fd:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
@ -91,6 +92,62 @@ required:
|
||||
- channel0
|
||||
- channel1
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- renesas,rzg2l-canfd
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
resets:
|
||||
maxItems: 2
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: rstp_n
|
||||
- const: rstc_n
|
||||
|
||||
required:
|
||||
- interrupt-names
|
||||
- reset-names
|
||||
else:
|
||||
properties:
|
||||
interrupts:
|
||||
items:
|
||||
- description: Channel interrupt
|
||||
- description: Global interrupt
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: ch_int
|
||||
- const: g_int
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
|
244
Documentation/devicetree/bindings/net/fsl,fec.yaml
Normal file
244
Documentation/devicetree/bindings/net/fsl,fec.yaml
Normal file
@ -0,0 +1,244 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/fsl,fec.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Freescale Fast Ethernet Controller (FEC)
|
||||
|
||||
maintainers:
|
||||
- Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
|
||||
allOf:
|
||||
- $ref: ethernet-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- enum:
|
||||
- fsl,imx25-fec
|
||||
- fsl,imx27-fec
|
||||
- fsl,imx28-fec
|
||||
- fsl,imx6q-fec
|
||||
- fsl,mvf600-fec
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx53-fec
|
||||
- fsl,imx6sl-fec
|
||||
- const: fsl,imx25-fec
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx35-fec
|
||||
- fsl,imx51-fec
|
||||
- const: fsl,imx27-fec
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx6ul-fec
|
||||
- fsl,imx6sx-fec
|
||||
- const: fsl,imx6q-fec
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx7d-fec
|
||||
- const: fsl,imx6sx-fec
|
||||
- items:
|
||||
- const: fsl,imx8mq-fec
|
||||
- const: fsl,imx6sx-fec
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx8mm-fec
|
||||
- fsl,imx8mn-fec
|
||||
- fsl,imx8mp-fec
|
||||
- const: fsl,imx8mq-fec
|
||||
- const: fsl,imx6sx-fec
|
||||
- items:
|
||||
- const: fsl,imx8qm-fec
|
||||
- const: fsl,imx6sx-fec
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx8qxp-fec
|
||||
- const: fsl,imx8qm-fec
|
||||
- const: fsl,imx6sx-fec
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
interrupt-names:
|
||||
oneOf:
|
||||
- items:
|
||||
- const: int0
|
||||
- items:
|
||||
- const: int0
|
||||
- const: pps
|
||||
- items:
|
||||
- const: int0
|
||||
- const: int1
|
||||
- const: int2
|
||||
- items:
|
||||
- const: int0
|
||||
- const: int1
|
||||
- const: int2
|
||||
- const: pps
|
||||
|
||||
clocks:
|
||||
minItems: 2
|
||||
maxItems: 5
|
||||
description:
|
||||
The "ipg", for MAC ipg_clk_s, ipg_clk_mac_s that are for register accessing.
|
||||
The "ahb", for MAC ipg_clk, ipg_clk_mac that are bus clock.
|
||||
The "ptp"(option), for IEEE1588 timer clock that requires the clock.
|
||||
The "enet_clk_ref"(option), for MAC transmit/receiver reference clock like
|
||||
RGMII TXC clock or RMII reference clock. It depends on board design,
|
||||
the clock is required if RGMII TXC and RMII reference clock source from
|
||||
SOC internal PLL.
|
||||
The "enet_out"(option), output clock for external device, like supply clock
|
||||
for PHY. The clock is required if PHY clock source from SOC.
|
||||
The "enet_2x_txclk"(option), for RGMII sampling clock which fixed at 250Mhz.
|
||||
The clock is required if SoC RGMII enable clock delay.
|
||||
|
||||
clock-names:
|
||||
minItems: 2
|
||||
maxItems: 5
|
||||
items:
|
||||
enum:
|
||||
- ipg
|
||||
- ahb
|
||||
- ptp
|
||||
- enet_clk_ref
|
||||
- enet_out
|
||||
- enet_2x_txclk
|
||||
|
||||
phy-mode: true
|
||||
|
||||
phy-handle: true
|
||||
|
||||
fixed-link: true
|
||||
|
||||
local-mac-address: true
|
||||
|
||||
mac-address: true
|
||||
|
||||
tx-internal-delay-ps:
|
||||
enum: [0, 2000]
|
||||
|
||||
rx-internal-delay-ps:
|
||||
enum: [0, 2000]
|
||||
|
||||
phy-supply:
|
||||
description:
|
||||
Regulator that powers the Ethernet PHY.
|
||||
|
||||
fsl,num-tx-queues:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
The property is valid for enet-avb IP, which supports hw multi queues.
|
||||
Should specify the tx queue number, otherwise set tx queue number to 1.
|
||||
enum: [1, 2, 3]
|
||||
|
||||
fsl,num-rx-queues:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
The property is valid for enet-avb IP, which supports hw multi queues.
|
||||
Should specify the rx queue number, otherwise set rx queue number to 1.
|
||||
enum: [1, 2, 3]
|
||||
|
||||
fsl,magic-packet:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description:
|
||||
If present, indicates that the hardware supports waking up via magic packet.
|
||||
|
||||
fsl,err006687-workaround-present:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description:
|
||||
If present indicates that the system has the hardware workaround for
|
||||
ERR006687 applied and does not need a software workaround.
|
||||
|
||||
fsl,stop-mode:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
description:
|
||||
Register bits of stop mode control, the format is <&gpr req_gpr req_bit>.
|
||||
gpr is the phandle to general purpose register node.
|
||||
req_gpr is the gpr register offset for ENET stop request.
|
||||
req_bit is the gpr bit offset for ENET stop request.
|
||||
|
||||
mdio:
|
||||
type: object
|
||||
description:
|
||||
Specifies the mdio bus in the FEC, used as a container for phy nodes.
|
||||
|
||||
# Deprecated optional properties:
|
||||
# To avoid these, create a phy node according to ethernet-phy.yaml in the same
|
||||
# directory, and point the FEC's "phy-handle" property to it. Then use
|
||||
# the phy's reset binding, again described by ethernet-phy.yaml.
|
||||
|
||||
phy-reset-gpios:
|
||||
deprecated: true
|
||||
description:
|
||||
Should specify the gpio for phy reset.
|
||||
|
||||
phy-reset-duration:
|
||||
deprecated: true
|
||||
description:
|
||||
Reset duration in milliseconds. Should present only if property
|
||||
"phy-reset-gpios" is available. Missing the property will have the
|
||||
duration be 1 millisecond. Numbers greater than 1000 are invalid
|
||||
and 1 millisecond will be used instead.
|
||||
|
||||
phy-reset-active-high:
|
||||
deprecated: true
|
||||
description:
|
||||
If present then the reset sequence using the GPIO specified in the
|
||||
"phy-reset-gpios" property is reversed (H=reset state, L=operation state).
|
||||
|
||||
phy-reset-post-delay:
|
||||
deprecated: true
|
||||
description:
|
||||
Post reset delay in milliseconds. If present then a delay of phy-reset-post-delay
|
||||
milliseconds will be observed after the phy-reset-gpios has been toggled.
|
||||
Can be omitted thus no delay is observed. Delay is in range of 1ms to 1000ms.
|
||||
Other delays are invalid.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
# FIXME: We had better set additionalProperties to false to avoid invalid or at
|
||||
# least undocumented properties. However, PHY may have a deprecated option to
|
||||
# place PHY OF properties in the MAC node, such as Micrel PHY, and we can find
|
||||
# these boards which is based on i.MX6QDL.
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
ethernet@83fec000 {
|
||||
compatible = "fsl,imx51-fec", "fsl,imx27-fec";
|
||||
reg = <0x83fec000 0x4000>;
|
||||
interrupts = <87>;
|
||||
phy-mode = "mii";
|
||||
phy-reset-gpios = <&gpio2 14 0>;
|
||||
phy-supply = <®_fec_supply>;
|
||||
};
|
||||
|
||||
ethernet@83fed000 {
|
||||
compatible = "fsl,imx51-fec", "fsl,imx27-fec";
|
||||
reg = <0x83fed000 0x4000>;
|
||||
interrupts = <87>;
|
||||
phy-mode = "mii";
|
||||
phy-reset-gpios = <&gpio2 14 0>;
|
||||
phy-supply = <®_fec_supply>;
|
||||
phy-handle = <ðphy0>;
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethphy0: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
@ -1,95 +0,0 @@
|
||||
* Freescale Fast Ethernet Controller (FEC)
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "fsl,<soc>-fec"
|
||||
- reg : Address and length of the register set for the device
|
||||
- interrupts : Should contain fec interrupt
|
||||
- phy-mode : See ethernet.txt file in the same directory
|
||||
|
||||
Optional properties:
|
||||
- phy-supply : regulator that powers the Ethernet PHY.
|
||||
- phy-handle : phandle to the PHY device connected to this device.
|
||||
- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
|
||||
Use instead of phy-handle.
|
||||
- fsl,num-tx-queues : The property is valid for enet-avb IP, which supports
|
||||
hw multi queues. Should specify the tx queue number, otherwise set tx queue
|
||||
number to 1.
|
||||
- fsl,num-rx-queues : The property is valid for enet-avb IP, which supports
|
||||
hw multi queues. Should specify the rx queue number, otherwise set rx queue
|
||||
number to 1.
|
||||
- fsl,magic-packet : If present, indicates that the hardware supports waking
|
||||
up via magic packet.
|
||||
- fsl,err006687-workaround-present: If present indicates that the system has
|
||||
the hardware workaround for ERR006687 applied and does not need a software
|
||||
workaround.
|
||||
- fsl,stop-mode: register bits of stop mode control, the format is
|
||||
<&gpr req_gpr req_bit>.
|
||||
gpr is the phandle to general purpose register node.
|
||||
req_gpr is the gpr register offset for ENET stop request.
|
||||
req_bit is the gpr bit offset for ENET stop request.
|
||||
-interrupt-names: names of the interrupts listed in interrupts property in
|
||||
the same order. The defaults if not specified are
|
||||
__Number of interrupts__ __Default__
|
||||
1 "int0"
|
||||
2 "int0", "pps"
|
||||
3 "int0", "int1", "int2"
|
||||
4 "int0", "int1", "int2", "pps"
|
||||
The order may be changed as long as they correspond to the interrupts
|
||||
property. Currently, only i.mx7 uses "int1" and "int2". They correspond to
|
||||
tx/rx queues 1 and 2. "int0" will be used for queue 0 and ENET_MII interrupts.
|
||||
For imx6sx, "int0" handles all 3 queues and ENET_MII. "pps" is for the pulse
|
||||
per second interrupt associated with 1588 precision time protocol(PTP).
|
||||
|
||||
Optional subnodes:
|
||||
- mdio : specifies the mdio bus in the FEC, used as a container for phy nodes
|
||||
according to phy.txt in the same directory
|
||||
|
||||
Deprecated optional properties:
|
||||
To avoid these, create a phy node according to phy.txt in the same
|
||||
directory, and point the fec's "phy-handle" property to it. Then use
|
||||
the phy's reset binding, again described by phy.txt.
|
||||
- phy-reset-gpios : Should specify the gpio for phy reset
|
||||
- phy-reset-duration : Reset duration in milliseconds. Should present
|
||||
only if property "phy-reset-gpios" is available. Missing the property
|
||||
will have the duration be 1 millisecond. Numbers greater than 1000 are
|
||||
invalid and 1 millisecond will be used instead.
|
||||
- phy-reset-active-high : If present then the reset sequence using the GPIO
|
||||
specified in the "phy-reset-gpios" property is reversed (H=reset state,
|
||||
L=operation state).
|
||||
- phy-reset-post-delay : Post reset delay in milliseconds. If present then
|
||||
a delay of phy-reset-post-delay milliseconds will be observed after the
|
||||
phy-reset-gpios has been toggled. Can be omitted thus no delay is
|
||||
observed. Delay is in range of 1ms to 1000ms. Other delays are invalid.
|
||||
|
||||
Example:
|
||||
|
||||
ethernet@83fec000 {
|
||||
compatible = "fsl,imx51-fec", "fsl,imx27-fec";
|
||||
reg = <0x83fec000 0x4000>;
|
||||
interrupts = <87>;
|
||||
phy-mode = "mii";
|
||||
phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; /* GPIO2_14 */
|
||||
local-mac-address = [00 04 9F 01 1B B9];
|
||||
phy-supply = <®_fec_supply>;
|
||||
};
|
||||
|
||||
Example with phy specified:
|
||||
|
||||
ethernet@83fec000 {
|
||||
compatible = "fsl,imx51-fec", "fsl,imx27-fec";
|
||||
reg = <0x83fec000 0x4000>;
|
||||
interrupts = <87>;
|
||||
phy-mode = "mii";
|
||||
phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; /* GPIO2_14 */
|
||||
local-mac-address = [00 04 9F 01 1B B9];
|
||||
phy-supply = <®_fec_supply>;
|
||||
phy-handle = <ðphy>;
|
||||
mdio {
|
||||
clock-frequency = <5000000>;
|
||||
ethphy: ethernet-phy@6 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <6>;
|
||||
max-speed = <100>;
|
||||
};
|
||||
};
|
||||
};
|
@ -0,0 +1,54 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
# Copyright 2018 Linaro Ltd.
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/net/intel,ixp46x-ptp-timer.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: Intel IXP46x PTP Timer (TSYNC)
|
||||
|
||||
maintainers:
|
||||
- Linus Walleij <linus.walleij@linaro.org>
|
||||
|
||||
description: |
|
||||
The Intel IXP46x PTP timer is known in the manual as IEEE1588 Hardware
|
||||
Assist and Time Synchronization Hardware Assist TSYNC provides a PTP
|
||||
timer. It exists in the Intel IXP45x and IXP46x XScale SoCs.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: intel,ixp46x-ptp-timer
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
items:
|
||||
- description: Interrupt to trigger master mode snapshot from the
|
||||
PRP timer, usually a GPIO interrupt.
|
||||
- description: Interrupt to trigger slave mode snapshot from the
|
||||
PRP timer, usually a GPIO interrupt.
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: master
|
||||
- const: slave
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- interrupt-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
ptp-timer@c8010000 {
|
||||
compatible = "intel,ixp46x-ptp-timer";
|
||||
reg = <0xc8010000 0x1000>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <8 IRQ_TYPE_EDGE_FALLING>, <7 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-names = "master", "slave";
|
||||
};
|
98
Documentation/devicetree/bindings/net/litex,liteeth.yaml
Normal file
98
Documentation/devicetree/bindings/net/litex,liteeth.yaml
Normal file
@ -0,0 +1,98 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/litex,liteeth.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: LiteX LiteETH ethernet device
|
||||
|
||||
maintainers:
|
||||
- Joel Stanley <joel@jms.id.au>
|
||||
|
||||
description: |
|
||||
LiteETH is a small footprint and configurable Ethernet core for FPGA based
|
||||
system on chips.
|
||||
|
||||
The hardware source is Open Source and can be found on at
|
||||
https://github.com/enjoy-digital/liteeth/.
|
||||
|
||||
allOf:
|
||||
- $ref: ethernet-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: litex,liteeth
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: MAC registers
|
||||
- description: MDIO registers
|
||||
- description: Packet buffer
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: mac
|
||||
- const: mdio
|
||||
- const: buffer
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
litex,rx-slots:
|
||||
description: Number of slots in the receive buffer
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 1
|
||||
default: 2
|
||||
|
||||
litex,tx-slots:
|
||||
description: Number of slots in the transmit buffer
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 1
|
||||
default: 2
|
||||
|
||||
litex,slot-size:
|
||||
description: Size in bytes of a slot in the tx/rx buffer
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 0x800
|
||||
default: 0x800
|
||||
|
||||
mac-address: true
|
||||
local-mac-address: true
|
||||
phy-handle: true
|
||||
|
||||
mdio:
|
||||
$ref: mdio.yaml#
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
mac: ethernet@8020000 {
|
||||
compatible = "litex,liteeth";
|
||||
reg = <0x8021000 0x100>,
|
||||
<0x8020800 0x100>,
|
||||
<0x8030000 0x2000>;
|
||||
reg-names = "mac", "mdio", "buffer";
|
||||
litex,rx-slots = <2>;
|
||||
litex,tx-slots = <2>;
|
||||
litex,slot-size = <0x800>;
|
||||
interrupts = <0x11 0x1>;
|
||||
phy-handle = <ð_phy>;
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
eth_phy: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
||||
|
||||
# vim: set ts=2 sw=2 sts=2 tw=80 et cc=80 ft=yaml :
|
@ -8,6 +8,7 @@ Required properties:
|
||||
Use "cdns,np4-macb" for NP4 SoC devices.
|
||||
Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
|
||||
Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
|
||||
Use "atmel,sama5d29-gem" for GEM XL IP (10/100) available on Atmel sama5d29 SoCs.
|
||||
Use "atmel,sama5d3-macb" for the 10/100Mbit IP available on Atmel sama5d3 SoCs.
|
||||
Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
|
||||
Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
|
||||
|
@ -87,16 +87,24 @@ properties:
|
||||
- const: ipa-setup-ready
|
||||
|
||||
interconnects:
|
||||
items:
|
||||
- description: Interconnect path between IPA and main memory
|
||||
- description: Interconnect path between IPA and internal memory
|
||||
- description: Interconnect path between IPA and the AP subsystem
|
||||
oneOf:
|
||||
- items:
|
||||
- description: Path leading to system memory
|
||||
- description: Path between the AP and IPA config space
|
||||
- items:
|
||||
- description: Path leading to system memory
|
||||
- description: Path leading to internal memory
|
||||
- description: Path between the AP and IPA config space
|
||||
|
||||
interconnect-names:
|
||||
items:
|
||||
- const: memory
|
||||
- const: imem
|
||||
- const: config
|
||||
oneOf:
|
||||
- items:
|
||||
- const: memory
|
||||
- const: config
|
||||
- items:
|
||||
- const: memory
|
||||
- const: imem
|
||||
- const: config
|
||||
|
||||
qcom,smem-states:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
|
@ -14,7 +14,9 @@ allOf:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,ipq4019-mdio
|
||||
enum:
|
||||
- qcom,ipq4019-mdio
|
||||
- qcom,ipq5018-mdio
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
@ -23,7 +25,18 @@ properties:
|
||||
const: 0
|
||||
|
||||
reg:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
description:
|
||||
the first Address and length of the register set for the MDIO controller.
|
||||
the second Address and length of the register for ethernet LDO, this second
|
||||
address range is only required by the platform IPQ50xx.
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
description: |
|
||||
MDIO clock source frequency fixed to 100MHZ, this clock should be specified
|
||||
by the platform IPQ807x, IPQ60xx and IPQ50xx.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
@ -181,7 +181,7 @@ xmit_from_hci():
|
||||
The llc must be registered with nfc before it can be used. Do that by
|
||||
calling::
|
||||
|
||||
nfc_llc_register(const char *name, struct nfc_llc_ops *ops);
|
||||
nfc_llc_register(const char *name, const struct nfc_llc_ops *ops);
|
||||
|
||||
Again, note that the llc does not handle the physical link. It is thus very
|
||||
easy to mix any physical link with any llc for a given chip driver.
|
||||
|
@ -157,7 +157,7 @@ Contact
|
||||
Please send us comments, experiences, questions, anything :)
|
||||
|
||||
IRC:
|
||||
#batman on irc.freenode.org
|
||||
#batadv on ircs://irc.hackint.org/
|
||||
Mailing-list:
|
||||
b.a.t.m.a.n@open-mesh.org (optional subscription at
|
||||
https://lists.open-mesh.org/mailman3/postorius/lists/b.a.t.m.a.n.lists.open-mesh.org/)
|
||||
|
@ -501,6 +501,18 @@ fail_over_mac
|
||||
This option was added in bonding version 3.2.0. The "follow"
|
||||
policy was added in bonding version 3.3.0.
|
||||
|
||||
lacp_active
|
||||
Option specifying whether to send LACPDU frames periodically.
|
||||
|
||||
off or 0
|
||||
LACPDU frames acts as "speak when spoken to".
|
||||
|
||||
on or 1
|
||||
LACPDU frames are sent along the configured links
|
||||
periodically. See lacp_rate for more details.
|
||||
|
||||
The default is on.
|
||||
|
||||
lacp_rate
|
||||
|
||||
Option specifying the rate in which we'll ask our link partner
|
||||
|
@ -9,3 +9,4 @@ DPAA2 Documentation
|
||||
dpio-driver
|
||||
ethernet-driver
|
||||
mac-phy-support
|
||||
switch-driver
|
||||
|
@ -0,0 +1,217 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
.. include:: <isonum.txt>
|
||||
|
||||
===================
|
||||
DPAA2 Switch driver
|
||||
===================
|
||||
|
||||
:Copyright: |copy| 2021 NXP
|
||||
|
||||
The DPAA2 Switch driver probes on the Datapath Switch (DPSW) object which can
|
||||
be instantiated on the following DPAA2 SoCs and their variants: LS2088A and
|
||||
LX2160A.
|
||||
|
||||
The driver uses the switch device driver model and exposes each switch port as
|
||||
a network interface, which can be included in a bridge or used as a standalone
|
||||
interface. Traffic switched between ports is offloaded into the hardware.
|
||||
|
||||
The DPSW can have ports connected to DPNIs or to DPMACs for external access.
|
||||
::
|
||||
|
||||
[ethA] [ethB] [ethC] [ethD] [ethE] [ethF]
|
||||
: : : : : :
|
||||
: : : : : :
|
||||
[dpaa2-eth] [dpaa2-eth] [ dpaa2-switch ]
|
||||
: : : : : : kernel
|
||||
=============================================================================
|
||||
: : : : : : hardware
|
||||
[DPNI] [DPNI] [============= DPSW =================]
|
||||
| | | | | |
|
||||
| ---------- | [DPMAC] [DPMAC]
|
||||
------------------------------- | |
|
||||
| |
|
||||
[PHY] [PHY]
|
||||
|
||||
Creating an Ethernet Switch
|
||||
===========================
|
||||
|
||||
The dpaa2-switch driver probes on DPSW devices found on the fsl-mc bus. These
|
||||
devices can be either created statically through the boot time configuration
|
||||
file - DataPath Layout (DPL) - or at runtime using the DPAA2 object APIs
|
||||
(incorporated already into the restool userspace tool).
|
||||
|
||||
At the moment, the dpaa2-switch driver imposes the following restrictions on
|
||||
the DPSW object that it will probe:
|
||||
|
||||
* The minimum number of FDBs should be at least equal to the number of switch
|
||||
interfaces. This is necessary so that separation of switch ports can be
|
||||
done, ie when not under a bridge, each switch port will have its own FDB.
|
||||
::
|
||||
|
||||
fsl_dpaa2_switch dpsw.0: The number of FDBs is lower than the number of ports, cannot probe
|
||||
|
||||
* Both the broadcast and flooding configuration should be per FDB. This
|
||||
enables the driver to restrict the broadcast and flooding domains of each
|
||||
FDB depending on the switch ports that are sharing it (aka are under the
|
||||
same bridge).
|
||||
::
|
||||
|
||||
fsl_dpaa2_switch dpsw.0: Flooding domain is not per FDB, cannot probe
|
||||
fsl_dpaa2_switch dpsw.0: Broadcast domain is not per FDB, cannot probe
|
||||
|
||||
* The control interface of the switch should not be disabled
|
||||
(DPSW_OPT_CTRL_IF_DIS not passed as a create time option). Without the
|
||||
control interface, the driver is not capable to provide proper Rx/Tx traffic
|
||||
support on the switch port netdevices.
|
||||
::
|
||||
|
||||
fsl_dpaa2_switch dpsw.0: Control Interface is disabled, cannot probe
|
||||
|
||||
Besides the configuration of the actual DPSW object, the dpaa2-switch driver
|
||||
will need the following DPAA2 objects:
|
||||
|
||||
* 1 DPMCP - A Management Command Portal object is needed for any interraction
|
||||
with the MC firmware.
|
||||
|
||||
* 1 DPBP - A Buffer Pool is used for seeding buffers intended for the Rx path
|
||||
on the control interface.
|
||||
|
||||
* Access to at least one DPIO object (Software Portal) is needed for any
|
||||
enqueue/dequeue operation to be performed on the control interface queues.
|
||||
The DPIO object will be shared, no need for a private one.
|
||||
|
||||
Switching features
|
||||
==================
|
||||
|
||||
The driver supports the configuration of L2 forwarding rules in hardware for
|
||||
port bridging as well as standalone usage of the independent switch interfaces.
|
||||
|
||||
The hardware is not configurable with respect to VLAN awareness, thus any DPAA2
|
||||
switch port should be used only in usecases with a VLAN aware bridge::
|
||||
|
||||
$ ip link add dev br0 type bridge vlan_filtering 1
|
||||
|
||||
$ ip link add dev br1 type bridge
|
||||
$ ip link set dev ethX master br1
|
||||
Error: fsl_dpaa2_switch: Cannot join a VLAN-unaware bridge
|
||||
|
||||
Topology and loop detection through STP is supported when ``stp_state 1`` is
|
||||
used at bridge create ::
|
||||
|
||||
$ ip link add dev br0 type bridge vlan_filtering 1 stp_state 1
|
||||
|
||||
L2 FDB manipulation (add/delete/dump) is supported.
|
||||
|
||||
HW FDB learning can be configured on each switch port independently through
|
||||
bridge commands. When the HW learning is disabled, a fast age procedure will be
|
||||
run and any previously learnt addresses will be removed.
|
||||
::
|
||||
|
||||
$ bridge link set dev ethX learning off
|
||||
$ bridge link set dev ethX learning on
|
||||
|
||||
Restricting the unknown unicast and multicast flooding domain is supported, but
|
||||
not independently of each other::
|
||||
|
||||
$ ip link set dev ethX type bridge_slave flood off mcast_flood off
|
||||
$ ip link set dev ethX type bridge_slave flood off mcast_flood on
|
||||
Error: fsl_dpaa2_switch: Cannot configure multicast flooding independently of unicast.
|
||||
|
||||
Broadcast flooding on a switch port can be disabled/enabled through the brport sysfs::
|
||||
|
||||
$ echo 0 > /sys/bus/fsl-mc/devices/dpsw.Y/net/ethX/brport/broadcast_flood
|
||||
|
||||
Offloads
|
||||
========
|
||||
|
||||
Routing actions (redirect, trap, drop)
|
||||
--------------------------------------
|
||||
|
||||
The DPAA2 switch is able to offload flow-based redirection of packets making
|
||||
use of ACL tables. Shared filter blocks are supported by sharing a single ACL
|
||||
table between multiple ports.
|
||||
|
||||
The following flow keys are supported:
|
||||
|
||||
* Ethernet: dst_mac/src_mac
|
||||
* IPv4: dst_ip/src_ip/ip_proto/tos
|
||||
* VLAN: vlan_id/vlan_prio/vlan_tpid/vlan_dei
|
||||
* L4: dst_port/src_port
|
||||
|
||||
Also, the matchall filter can be used to redirect the entire traffic received
|
||||
on a port.
|
||||
|
||||
As per flow actions, the following are supported:
|
||||
|
||||
* drop
|
||||
* mirred egress redirect
|
||||
* trap
|
||||
|
||||
Each ACL entry (filter) can be setup with only one of the listed
|
||||
actions.
|
||||
|
||||
Example 1: send frames received on eth4 with a SA of 00:01:02:03:04:05 to the
|
||||
CPU::
|
||||
|
||||
$ tc qdisc add dev eth4 clsact
|
||||
$ tc filter add dev eth4 ingress flower src_mac 00:01:02:03:04:05 skip_sw action trap
|
||||
|
||||
Example 2: drop frames received on eth4 with VID 100 and PCP of 3::
|
||||
|
||||
$ tc filter add dev eth4 ingress protocol 802.1q flower skip_sw vlan_id 100 vlan_prio 3 action drop
|
||||
|
||||
Example 3: redirect all frames received on eth4 to eth1::
|
||||
|
||||
$ tc filter add dev eth4 ingress matchall action mirred egress redirect dev eth1
|
||||
|
||||
Example 4: Use a single shared filter block on both eth5 and eth6::
|
||||
|
||||
$ tc qdisc add dev eth5 ingress_block 1 clsact
|
||||
$ tc qdisc add dev eth6 ingress_block 1 clsact
|
||||
$ tc filter add block 1 ingress flower dst_mac 00:01:02:03:04:04 skip_sw \
|
||||
action trap
|
||||
$ tc filter add block 1 ingress protocol ipv4 flower src_ip 192.168.1.1 skip_sw \
|
||||
action mirred egress redirect dev eth3
|
||||
|
||||
Mirroring
|
||||
~~~~~~~~~
|
||||
|
||||
The DPAA2 switch supports only per port mirroring and per VLAN mirroring.
|
||||
Adding mirroring filters in shared blocks is also supported.
|
||||
|
||||
When using the tc-flower classifier with the 802.1q protocol, only the
|
||||
''vlan_id'' key will be accepted. Mirroring based on any other fields from the
|
||||
802.1q protocol will be rejected::
|
||||
|
||||
$ tc qdisc add dev eth8 ingress_block 1 clsact
|
||||
$ tc filter add block 1 ingress protocol 802.1q flower skip_sw vlan_prio 3 action mirred egress mirror dev eth6
|
||||
Error: fsl_dpaa2_switch: Only matching on VLAN ID supported.
|
||||
We have an error talking to the kernel
|
||||
|
||||
If a mirroring VLAN filter is requested on a port, the VLAN must to be
|
||||
installed on the switch port in question either using ''bridge'' or by creating
|
||||
a VLAN upper device if the switch port is used as a standalone interface::
|
||||
|
||||
$ tc qdisc add dev eth8 ingress_block 1 clsact
|
||||
$ tc filter add block 1 ingress protocol 802.1q flower skip_sw vlan_id 200 action mirred egress mirror dev eth6
|
||||
Error: VLAN must be installed on the switch port.
|
||||
We have an error talking to the kernel
|
||||
|
||||
$ bridge vlan add vid 200 dev eth8
|
||||
$ tc filter add block 1 ingress protocol 802.1q flower skip_sw vlan_id 200 action mirred egress mirror dev eth6
|
||||
|
||||
$ ip link add link eth8 name eth8.200 type vlan id 200
|
||||
$ tc filter add block 1 ingress protocol 802.1q flower skip_sw vlan_id 200 action mirred egress mirror dev eth6
|
||||
|
||||
Also, it should be noted that the mirrored traffic will be subject to the same
|
||||
egress restrictions as any other traffic. This means that when a mirrored
|
||||
packet will reach the mirror port, if the VLAN found in the packet is not
|
||||
installed on the port it will get dropped.
|
||||
|
||||
The DPAA2 switch supports only a single mirroring destination, thus multiple
|
||||
mirror rules can be installed but their ''to'' port has to be the same::
|
||||
|
||||
$ tc filter add block 1 ingress protocol 802.1q flower skip_sw vlan_id 200 action mirred egress mirror dev eth6
|
||||
$ tc filter add block 1 ingress protocol 802.1q flower skip_sw vlan_id 100 action mirred egress mirror dev eth7
|
||||
Error: fsl_dpaa2_switch: Multiple mirror ports not supported.
|
||||
We have an error talking to the kernel
|
@ -656,3 +656,47 @@ Bridge offloads tracepoints:
|
||||
$ cat /sys/kernel/debug/tracing/trace
|
||||
...
|
||||
ip-5387 [000] ...1 573713: mlx5_esw_bridge_vport_cleanup: vport_num=1
|
||||
|
||||
Eswitch QoS tracepoints:
|
||||
|
||||
- mlx5_esw_vport_qos_create: trace creation of transmit scheduler arbiter for vport::
|
||||
|
||||
$ echo mlx5:mlx5_esw_vport_qos_create >> /sys/kernel/debug/tracing/set_event
|
||||
$ cat /sys/kernel/debug/tracing/trace
|
||||
...
|
||||
<...>-23496 [018] .... 73136.838831: mlx5_esw_vport_qos_create: (0000:82:00.0) vport=2 tsar_ix=4 bw_share=0, max_rate=0 group=000000007b576bb3
|
||||
|
||||
- mlx5_esw_vport_qos_config: trace configuration of transmit scheduler arbiter for vport::
|
||||
|
||||
$ echo mlx5:mlx5_esw_vport_qos_config >> /sys/kernel/debug/tracing/set_event
|
||||
$ cat /sys/kernel/debug/tracing/trace
|
||||
...
|
||||
<...>-26548 [023] .... 75754.223823: mlx5_esw_vport_qos_config: (0000:82:00.0) vport=1 tsar_ix=3 bw_share=34, max_rate=10000 group=000000007b576bb3
|
||||
|
||||
- mlx5_esw_vport_qos_destroy: trace deletion of transmit scheduler arbiter for vport::
|
||||
|
||||
$ echo mlx5:mlx5_esw_vport_qos_destroy >> /sys/kernel/debug/tracing/set_event
|
||||
$ cat /sys/kernel/debug/tracing/trace
|
||||
...
|
||||
<...>-27418 [004] .... 76546.680901: mlx5_esw_vport_qos_destroy: (0000:82:00.0) vport=1 tsar_ix=3
|
||||
|
||||
- mlx5_esw_group_qos_create: trace creation of transmit scheduler arbiter for rate group::
|
||||
|
||||
$ echo mlx5:mlx5_esw_group_qos_create >> /sys/kernel/debug/tracing/set_event
|
||||
$ cat /sys/kernel/debug/tracing/trace
|
||||
...
|
||||
<...>-26578 [008] .... 75776.022112: mlx5_esw_group_qos_create: (0000:82:00.0) group=000000008dac63ea tsar_ix=5
|
||||
|
||||
- mlx5_esw_group_qos_config: trace configuration of transmit scheduler arbiter for rate group::
|
||||
|
||||
$ echo mlx5:mlx5_esw_group_qos_config >> /sys/kernel/debug/tracing/set_event
|
||||
$ cat /sys/kernel/debug/tracing/trace
|
||||
...
|
||||
<...>-27303 [020] .... 76461.455356: mlx5_esw_group_qos_config: (0000:82:00.0) group=000000008dac63ea tsar_ix=5 bw_share=100 max_rate=20000
|
||||
|
||||
- mlx5_esw_group_qos_destroy: trace deletion of transmit scheduler arbiter for group::
|
||||
|
||||
$ echo mlx5:mlx5_esw_group_qos_destroy >> /sys/kernel/debug/tracing/set_event
|
||||
$ cat /sys/kernel/debug/tracing/trace
|
||||
...
|
||||
<...>-27418 [006] .... 76547.187258: mlx5_esw_group_qos_destroy: (0000:82:00.0) group=000000007b576bb3 tsar_ix=1
|
||||
|
@ -97,6 +97,18 @@ own name.
|
||||
* - ``enable_roce``
|
||||
- Boolean
|
||||
- Enable handling of RoCE traffic in the device.
|
||||
* - ``enable_eth``
|
||||
- Boolean
|
||||
- When enabled, the device driver will instantiate Ethernet specific
|
||||
auxiliary device of the devlink device.
|
||||
* - ``enable_rdma``
|
||||
- Boolean
|
||||
- When enabled, the device driver will instantiate RDMA specific
|
||||
auxiliary device of the devlink device.
|
||||
* - ``enable_vnet``
|
||||
- Boolean
|
||||
- When enabled, the device driver will instantiate VDPA networking
|
||||
specific auxiliary device of the devlink device.
|
||||
* - ``internal_err_reset``
|
||||
- Boolean
|
||||
- When enabled, the device driver will reset the device on internal
|
||||
|
25
Documentation/networking/devlink/hns3.rst
Normal file
25
Documentation/networking/devlink/hns3.rst
Normal file
@ -0,0 +1,25 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
====================
|
||||
hns3 devlink support
|
||||
====================
|
||||
|
||||
This document describes the devlink features implemented by the ``hns3``
|
||||
device driver.
|
||||
|
||||
The ``hns3`` driver supports reloading via ``DEVLINK_CMD_RELOAD``.
|
||||
|
||||
Info versions
|
||||
=============
|
||||
|
||||
The ``hns3`` driver reports the following versions
|
||||
|
||||
.. list-table:: devlink info versions implemented
|
||||
:widths: 10 10 80
|
||||
|
||||
* - Name
|
||||
- Type
|
||||
- Description
|
||||
* - ``fw``
|
||||
- running
|
||||
- Used to represent the firmware version.
|
@ -34,6 +34,7 @@ parameters, info versions, and other features it supports.
|
||||
:maxdepth: 1
|
||||
|
||||
bnxt
|
||||
hns3
|
||||
ionic
|
||||
ice
|
||||
mlx4
|
||||
@ -42,7 +43,6 @@ parameters, info versions, and other features it supports.
|
||||
mv88e6xxx
|
||||
netdevsim
|
||||
nfp
|
||||
sja1105
|
||||
qed
|
||||
ti-cpsw-switch
|
||||
am65-nuss-cpsw-switch
|
||||
|
@ -1,49 +0,0 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=======================
|
||||
sja1105 devlink support
|
||||
=======================
|
||||
|
||||
This document describes the devlink features implemented
|
||||
by the ``sja1105`` device driver.
|
||||
|
||||
Parameters
|
||||
==========
|
||||
|
||||
.. list-table:: Driver-specific parameters implemented
|
||||
:widths: 5 5 5 85
|
||||
|
||||
* - Name
|
||||
- Type
|
||||
- Mode
|
||||
- Description
|
||||
* - ``best_effort_vlan_filtering``
|
||||
- Boolean
|
||||
- runtime
|
||||
- Allow plain ETH_P_8021Q headers to be used as DSA tags.
|
||||
|
||||
Benefits:
|
||||
|
||||
- Can terminate untagged traffic over switch net
|
||||
devices even when enslaved to a bridge with
|
||||
vlan_filtering=1.
|
||||
- Can terminate VLAN-tagged traffic over switch net
|
||||
devices even when enslaved to a bridge with
|
||||
vlan_filtering=1, with some constraints (no more than
|
||||
7 non-pvid VLANs per user port).
|
||||
- Can do QoS based on VLAN PCP and VLAN membership
|
||||
admission control for autonomously forwarded frames
|
||||
(regardless of whether they can be terminated on the
|
||||
CPU or not).
|
||||
|
||||
Drawbacks:
|
||||
|
||||
- User cannot use VLANs in range 1024-3071. If the
|
||||
switch receives frames with such VIDs, it will
|
||||
misinterpret them as DSA tags.
|
||||
- Switch uses Shared VLAN Learning (FDB lookup uses
|
||||
only DMAC as key).
|
||||
- When VLANs span cross-chip topologies, the total
|
||||
number of permitted VLANs may be less than 7 per
|
||||
port, due to a maximum number of 32 VLAN retagging
|
||||
rules per switch.
|
@ -200,19 +200,6 @@ receive all frames regardless of the value of the MAC DA. This can be done by
|
||||
setting the ``promisc_on_master`` property of the ``struct dsa_device_ops``.
|
||||
Note that this assumes a DSA-unaware master driver, which is the norm.
|
||||
|
||||
Hardware manufacturers are strongly discouraged to do this, but some tagging
|
||||
protocols might not provide source port information on RX for all packets, but
|
||||
e.g. only for control traffic (link-local PDUs). In this case, by implementing
|
||||
the ``filter`` method of ``struct dsa_device_ops``, the tagger might select
|
||||
which packets are to be redirected on RX towards the virtual DSA user network
|
||||
interfaces, and which are to be left in the DSA master's RX data path.
|
||||
|
||||
It might also happen (although silicon vendors are strongly discouraged to
|
||||
produce hardware like this) that a tagging protocol splits the switch-specific
|
||||
information into a header portion and a tail portion, therefore not falling
|
||||
cleanly into any of the above 3 categories. DSA does not support this
|
||||
configuration.
|
||||
|
||||
Master network devices
|
||||
----------------------
|
||||
|
||||
@ -663,6 +650,22 @@ Bridge layer
|
||||
CPU port, and flooding towards the CPU port should also be enabled, due to a
|
||||
lack of an explicit address filtering mechanism in the DSA core.
|
||||
|
||||
- ``port_bridge_tx_fwd_offload``: bridge layer function invoked after
|
||||
``port_bridge_join`` when a driver sets ``ds->num_fwd_offloading_bridges`` to
|
||||
a non-zero value. Returning success in this function activates the TX
|
||||
forwarding offload bridge feature for this port, which enables the tagging
|
||||
protocol driver to inject data plane packets towards the bridging domain that
|
||||
the port is a part of. Data plane packets are subject to FDB lookup, hardware
|
||||
learning on the CPU port, and do not override the port STP state.
|
||||
Additionally, replication of data plane packets (multicast, flooding) is
|
||||
handled in hardware and the bridge driver will transmit a single skb for each
|
||||
packet that needs replication. The method is provided as a configuration
|
||||
point for drivers that need to configure the hardware for enabling this
|
||||
feature.
|
||||
|
||||
- ``port_bridge_tx_fwd_unoffload``: bridge layer function invoken when a driver
|
||||
leaves a bridge port which had the TX forwarding offload feature enabled.
|
||||
|
||||
Bridge VLAN filtering
|
||||
---------------------
|
||||
|
||||
|
@ -65,199 +65,6 @@ If that changed setting can be transmitted to the switch through the dynamic
|
||||
reconfiguration interface, it is; otherwise the switch is reset and
|
||||
reprogrammed with the updated static configuration.
|
||||
|
||||
Traffic support
|
||||
===============
|
||||
|
||||
The switches do not have hardware support for DSA tags, except for "slow
|
||||
protocols" for switch control as STP and PTP. For these, the switches have two
|
||||
programmable filters for link-local destination MACs.
|
||||
These are used to trap BPDUs and PTP traffic to the master netdevice, and are
|
||||
further used to support STP and 1588 ordinary clock/boundary clock
|
||||
functionality. For frames trapped to the CPU, source port and switch ID
|
||||
information is encoded by the hardware into the frames.
|
||||
|
||||
But by leveraging ``CONFIG_NET_DSA_TAG_8021Q`` (a software-defined DSA tagging
|
||||
format based on VLANs), general-purpose traffic termination through the network
|
||||
stack can be supported under certain circumstances.
|
||||
|
||||
Depending on VLAN awareness state, the following operating modes are possible
|
||||
with the switch:
|
||||
|
||||
- Mode 1 (VLAN-unaware): a port is in this mode when it is used as a standalone
|
||||
net device, or when it is enslaved to a bridge with ``vlan_filtering=0``.
|
||||
- Mode 2 (fully VLAN-aware): a port is in this mode when it is enslaved to a
|
||||
bridge with ``vlan_filtering=1``. Access to the entire VLAN range is given to
|
||||
the user through ``bridge vlan`` commands, but general-purpose (anything
|
||||
other than STP, PTP etc) traffic termination is not possible through the
|
||||
switch net devices. The other packets can be still by user space processed
|
||||
through the DSA master interface (similar to ``DSA_TAG_PROTO_NONE``).
|
||||
- Mode 3 (best-effort VLAN-aware): a port is in this mode when enslaved to a
|
||||
bridge with ``vlan_filtering=1``, and the devlink property of its parent
|
||||
switch named ``best_effort_vlan_filtering`` is set to ``true``. When
|
||||
configured like this, the range of usable VIDs is reduced (0 to 1023 and 3072
|
||||
to 4094), so is the number of usable VIDs (maximum of 7 non-pvid VLANs per
|
||||
port*), and shared VLAN learning is performed (FDB lookup is done only by
|
||||
DMAC, not also by VID).
|
||||
|
||||
To summarize, in each mode, the following types of traffic are supported over
|
||||
the switch net devices:
|
||||
|
||||
+-------------+-----------+--------------+------------+
|
||||
| | Mode 1 | Mode 2 | Mode 3 |
|
||||
+=============+===========+==============+============+
|
||||
| Regular | Yes | No | Yes |
|
||||
| traffic | | (use master) | |
|
||||
+-------------+-----------+--------------+------------+
|
||||
| Management | Yes | Yes | Yes |
|
||||
| traffic | | | |
|
||||
| (BPDU, PTP) | | | |
|
||||
+-------------+-----------+--------------+------------+
|
||||
|
||||
To configure the switch to operate in Mode 3, the following steps can be
|
||||
followed::
|
||||
|
||||
ip link add dev br0 type bridge
|
||||
# swp2 operates in Mode 1 now
|
||||
ip link set dev swp2 master br0
|
||||
# swp2 temporarily moves to Mode 2
|
||||
ip link set dev br0 type bridge vlan_filtering 1
|
||||
[ 61.204770] sja1105 spi0.1: Reset switch and programmed static config. Reason: VLAN filtering
|
||||
[ 61.239944] sja1105 spi0.1: Disabled switch tagging
|
||||
# swp3 now operates in Mode 3
|
||||
devlink dev param set spi/spi0.1 name best_effort_vlan_filtering value true cmode runtime
|
||||
[ 64.682927] sja1105 spi0.1: Reset switch and programmed static config. Reason: VLAN filtering
|
||||
[ 64.711925] sja1105 spi0.1: Enabled switch tagging
|
||||
# Cannot use VLANs in range 1024-3071 while in Mode 3.
|
||||
bridge vlan add dev swp2 vid 1025 untagged pvid
|
||||
RTNETLINK answers: Operation not permitted
|
||||
bridge vlan add dev swp2 vid 100
|
||||
bridge vlan add dev swp2 vid 101 untagged
|
||||
bridge vlan
|
||||
port vlan ids
|
||||
swp5 1 PVID Egress Untagged
|
||||
|
||||
swp2 1 PVID Egress Untagged
|
||||
100
|
||||
101 Egress Untagged
|
||||
|
||||
swp3 1 PVID Egress Untagged
|
||||
|
||||
swp4 1 PVID Egress Untagged
|
||||
|
||||
br0 1 PVID Egress Untagged
|
||||
bridge vlan add dev swp2 vid 102
|
||||
bridge vlan add dev swp2 vid 103
|
||||
bridge vlan add dev swp2 vid 104
|
||||
bridge vlan add dev swp2 vid 105
|
||||
bridge vlan add dev swp2 vid 106
|
||||
bridge vlan add dev swp2 vid 107
|
||||
# Cannot use mode than 7 VLANs per port while in Mode 3.
|
||||
[ 3885.216832] sja1105 spi0.1: No more free subvlans
|
||||
|
||||
\* "maximum of 7 non-pvid VLANs per port": Decoding VLAN-tagged packets on the
|
||||
CPU in mode 3 is possible through VLAN retagging of packets that go from the
|
||||
switch to the CPU. In cross-chip topologies, the port that goes to the CPU
|
||||
might also go to other switches. In that case, those other switches will see
|
||||
only a retagged packet (which only has meaning for the CPU). So if they are
|
||||
interested in this VLAN, they need to apply retagging in the reverse direction,
|
||||
to recover the original value from it. This consumes extra hardware resources
|
||||
for this switch. There is a maximum of 32 entries in the Retagging Table of
|
||||
each switch device.
|
||||
|
||||
As an example, consider this cross-chip topology::
|
||||
|
||||
+-------------------------------------------------+
|
||||
| Host SoC |
|
||||
| +-------------------------+ |
|
||||
| | DSA master for embedded | |
|
||||
| | switch (non-sja1105) | |
|
||||
| +--------+-------------------------+--------+ |
|
||||
| | embedded L2 switch | |
|
||||
| | | |
|
||||
| | +--------------+ +--------------+ | |
|
||||
| | |DSA master for| |DSA master for| | |
|
||||
| | | SJA1105 1 | | SJA1105 2 | | |
|
||||
+--+---+--------------+-----+--------------+---+--+
|
||||
|
||||
+-----------------------+ +-----------------------+
|
||||
| SJA1105 switch 1 | | SJA1105 switch 2 |
|
||||
+-----+-----+-----+-----+ +-----+-----+-----+-----+
|
||||
|sw1p0|sw1p1|sw1p2|sw1p3| |sw2p0|sw2p1|sw2p2|sw2p3|
|
||||
+-----+-----+-----+-----+ +-----+-----+-----+-----+
|
||||
|
||||
To reach the CPU, SJA1105 switch 1 (spi/spi2.1) uses the same port as is uses
|
||||
to reach SJA1105 switch 2 (spi/spi2.2), which would be port 4 (not drawn).
|
||||
Similarly for SJA1105 switch 2.
|
||||
|
||||
Also consider the following commands, that add VLAN 100 to every sja1105 user
|
||||
port::
|
||||
|
||||
devlink dev param set spi/spi2.1 name best_effort_vlan_filtering value true cmode runtime
|
||||
devlink dev param set spi/spi2.2 name best_effort_vlan_filtering value true cmode runtime
|
||||
ip link add dev br0 type bridge
|
||||
for port in sw1p0 sw1p1 sw1p2 sw1p3 \
|
||||
sw2p0 sw2p1 sw2p2 sw2p3; do
|
||||
ip link set dev $port master br0
|
||||
done
|
||||
ip link set dev br0 type bridge vlan_filtering 1
|
||||
for port in sw1p0 sw1p1 sw1p2 sw1p3 \
|
||||
sw2p0 sw2p1 sw2p2; do
|
||||
bridge vlan add dev $port vid 100
|
||||
done
|
||||
ip link add link br0 name br0.100 type vlan id 100 && ip link set dev br0.100 up
|
||||
ip addr add 192.168.100.3/24 dev br0.100
|
||||
bridge vlan add dev br0 vid 100 self
|
||||
|
||||
bridge vlan
|
||||
port vlan ids
|
||||
sw1p0 1 PVID Egress Untagged
|
||||
100
|
||||
|
||||
sw1p1 1 PVID Egress Untagged
|
||||
100
|
||||
|
||||
sw1p2 1 PVID Egress Untagged
|
||||
100
|
||||
|
||||
sw1p3 1 PVID Egress Untagged
|
||||
100
|
||||
|
||||
sw2p0 1 PVID Egress Untagged
|
||||
100
|
||||
|
||||
sw2p1 1 PVID Egress Untagged
|
||||
100
|
||||
|
||||
sw2p2 1 PVID Egress Untagged
|
||||
100
|
||||
|
||||
sw2p3 1 PVID Egress Untagged
|
||||
|
||||
br0 1 PVID Egress Untagged
|
||||
100
|
||||
|
||||
SJA1105 switch 1 consumes 1 retagging entry for each VLAN on each user port
|
||||
towards the CPU. It also consumes 1 retagging entry for each non-pvid VLAN that
|
||||
it is also interested in, which is configured on any port of any neighbor
|
||||
switch.
|
||||
|
||||
In this case, SJA1105 switch 1 consumes a total of 11 retagging entries, as
|
||||
follows:
|
||||
|
||||
- 8 retagging entries for VLANs 1 and 100 installed on its user ports
|
||||
(``sw1p0`` - ``sw1p3``)
|
||||
- 3 retagging entries for VLAN 100 installed on the user ports of SJA1105
|
||||
switch 2 (``sw2p0`` - ``sw2p2``), because it also has ports that are
|
||||
interested in it. The VLAN 1 is a pvid on SJA1105 switch 2 and does not need
|
||||
reverse retagging.
|
||||
|
||||
SJA1105 switch 2 also consumes 11 retagging entries, but organized as follows:
|
||||
|
||||
- 7 retagging entries for the bridge VLANs on its user ports (``sw2p0`` -
|
||||
``sw2p3``).
|
||||
- 4 retagging entries for VLAN 100 installed on the user ports of SJA1105
|
||||
switch 1 (``sw1p0`` - ``sw1p3``).
|
||||
|
||||
Switching features
|
||||
==================
|
||||
|
||||
@ -282,33 +89,10 @@ untagged), and therefore this mode is also supported.
|
||||
|
||||
Segregating the switch ports in multiple bridges is supported (e.g. 2 + 2), but
|
||||
all bridges should have the same level of VLAN awareness (either both have
|
||||
``vlan_filtering`` 0, or both 1). Also an inevitable limitation of the fact
|
||||
that VLAN awareness is global at the switch level is that once a bridge with
|
||||
``vlan_filtering`` enslaves at least one switch port, the other un-bridged
|
||||
ports are no longer available for standalone traffic termination.
|
||||
``vlan_filtering`` 0, or both 1).
|
||||
|
||||
Topology and loop detection through STP is supported.
|
||||
|
||||
L2 FDB manipulation (add/delete/dump) is currently possible for the first
|
||||
generation devices. Aging time of FDB entries, as well as enabling fully static
|
||||
management (no address learning and no flooding of unknown traffic) is not yet
|
||||
configurable in the driver.
|
||||
|
||||
A special comment about bridging with other netdevices (illustrated with an
|
||||
example):
|
||||
|
||||
A board has eth0, eth1, swp0@eth1, swp1@eth1, swp2@eth1, swp3@eth1.
|
||||
The switch ports (swp0-3) are under br0.
|
||||
It is desired that eth0 is turned into another switched port that communicates
|
||||
with swp0-3.
|
||||
|
||||
If br0 has vlan_filtering 0, then eth0 can simply be added to br0 with the
|
||||
intended results.
|
||||
If br0 has vlan_filtering 1, then a new br1 interface needs to be created that
|
||||
enslaves eth0 and eth1 (the DSA master of the switch ports). This is because in
|
||||
this mode, the switch ports beneath br0 are not capable of regular traffic, and
|
||||
are only used as a conduit for switchdev operations.
|
||||
|
||||
Offloads
|
||||
========
|
||||
|
||||
|
@ -595,6 +595,14 @@ Link extended substates:
|
||||
that is not formally
|
||||
supported, which led to
|
||||
signal integrity issues
|
||||
|
||||
``ETHTOOL_LINK_EXT_SUBSTATE_BSI_SERDES_REFERENCE_CLOCK_LOST`` The external clock signal for
|
||||
SerDes is too weak or
|
||||
unavailable.
|
||||
|
||||
``ETHTOOL_LINK_EXT_SUBSTATE_BSI_SERDES_ALOS`` The received signal for
|
||||
SerDes is too weak because
|
||||
analog loss of signal.
|
||||
================================================================= =============================
|
||||
|
||||
Cable issue substates:
|
||||
@ -939,12 +947,25 @@ Kernel response contents:
|
||||
``ETHTOOL_A_COALESCE_TX_USECS_HIGH`` u32 delay (us), high Tx
|
||||
``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH`` u32 max packets, high Tx
|
||||
``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL`` u32 rate sampling interval
|
||||
``ETHTOOL_A_COALESCE_USE_CQE_TX`` bool timer reset mode, Tx
|
||||
``ETHTOOL_A_COALESCE_USE_CQE_RX`` bool timer reset mode, Rx
|
||||
=========================================== ====== =======================
|
||||
|
||||
Attributes are only included in reply if their value is not zero or the
|
||||
corresponding bit in ``ethtool_ops::supported_coalesce_params`` is set (i.e.
|
||||
they are declared as supported by driver).
|
||||
|
||||
Timer reset mode (``ETHTOOL_A_COALESCE_USE_CQE_TX`` and
|
||||
``ETHTOOL_A_COALESCE_USE_CQE_RX``) controls the interaction between packet
|
||||
arrival and the various time based delay parameters. By default timers are
|
||||
expected to limit the max delay between any packet arrival/departure and a
|
||||
corresponding interrupt. In this mode timer should be started by packet
|
||||
arrival (sometimes delivery of previous interrupt) and reset when interrupt
|
||||
is delivered.
|
||||
Setting the appropriate attribute to 1 will enable ``CQE`` mode, where
|
||||
each packet event resets the timer. In this mode timer is used to force
|
||||
the interrupt if queue goes idle, while busy queues depend on the packet
|
||||
limit to trigger interrupts.
|
||||
|
||||
COALESCE_SET
|
||||
============
|
||||
@ -977,6 +998,8 @@ Request contents:
|
||||
``ETHTOOL_A_COALESCE_TX_USECS_HIGH`` u32 delay (us), high Tx
|
||||
``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH`` u32 max packets, high Tx
|
||||
``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL`` u32 rate sampling interval
|
||||
``ETHTOOL_A_COALESCE_USE_CQE_TX`` bool timer reset mode, Tx
|
||||
``ETHTOOL_A_COALESCE_USE_CQE_RX`` bool timer reset mode, Rx
|
||||
=========================================== ====== =======================
|
||||
|
||||
Request is rejected if it attributes declared as unsupported by driver (i.e.
|
||||
|
@ -320,13 +320,6 @@ Examples for low-level BPF:
|
||||
ret #-1
|
||||
drop: ret #0
|
||||
|
||||
**(Accelerated) VLAN w/ id 10**::
|
||||
|
||||
ld vlan_tci
|
||||
jneq #10, drop
|
||||
ret #-1
|
||||
drop: ret #0
|
||||
|
||||
**icmp random packet sampling, 1 in 4**::
|
||||
|
||||
ldh [12]
|
||||
@ -358,6 +351,22 @@ Examples for low-level BPF:
|
||||
bad: ret #0 /* SECCOMP_RET_KILL_THREAD */
|
||||
good: ret #0x7fff0000 /* SECCOMP_RET_ALLOW */
|
||||
|
||||
Examples for low-level BPF extension:
|
||||
|
||||
**Packet for interface index 13**::
|
||||
|
||||
ld ifidx
|
||||
jneq #13, drop
|
||||
ret #-1
|
||||
drop: ret #0
|
||||
|
||||
**(Accelerated) VLAN w/ id 10**::
|
||||
|
||||
ld vlan_tci
|
||||
jneq #10, drop
|
||||
ret #-1
|
||||
drop: ret #0
|
||||
|
||||
The above example code can be placed into a file (here called "foo"), and
|
||||
then be passed to the bpf_asm tool for generating opcodes, output that xt_bpf
|
||||
and cls_bpf understands and can directly be loaded with. Example with above
|
||||
@ -629,8 +638,8 @@ extension, PTP dissector/classifier, and much more. They are all internally
|
||||
converted by the kernel into the new instruction set representation and run
|
||||
in the eBPF interpreter. For in-kernel handlers, this all works transparently
|
||||
by using bpf_prog_create() for setting up the filter, resp.
|
||||
bpf_prog_destroy() for destroying it. The macro
|
||||
BPF_PROG_RUN(filter, ctx) transparently invokes eBPF interpreter or JITed
|
||||
bpf_prog_destroy() for destroying it. The function
|
||||
bpf_prog_run(filter, ctx) transparently invokes eBPF interpreter or JITed
|
||||
code to run the filter. 'filter' is a pointer to struct bpf_prog that we
|
||||
got from bpf_prog_create(), and 'ctx' the given context (e.g.
|
||||
skb pointer). All constraints and restrictions from bpf_check_classic() apply
|
||||
|
@ -57,6 +57,7 @@ Contents:
|
||||
gen_stats
|
||||
gtp
|
||||
ila
|
||||
ioam6-sysctl
|
||||
ipddp
|
||||
ip_dynaddr
|
||||
ipsec
|
||||
@ -68,6 +69,7 @@ Contents:
|
||||
l2tp
|
||||
lapb-module
|
||||
mac80211-injection
|
||||
mctp
|
||||
mpls-sysctl
|
||||
mptcp-sysctl
|
||||
multiqueue
|
||||
|
26
Documentation/networking/ioam6-sysctl.rst
Normal file
26
Documentation/networking/ioam6-sysctl.rst
Normal file
@ -0,0 +1,26 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=====================
|
||||
IOAM6 Sysfs variables
|
||||
=====================
|
||||
|
||||
|
||||
/proc/sys/net/conf/<iface>/ioam6_* variables:
|
||||
=============================================
|
||||
|
||||
ioam6_enabled - BOOL
|
||||
Accept (= enabled) or ignore (= disabled) IPv6 IOAM options on ingress
|
||||
for this interface.
|
||||
|
||||
* 0 - disabled (default)
|
||||
* 1 - enabled
|
||||
|
||||
ioam6_id - SHORT INTEGER
|
||||
Define the IOAM id of this interface.
|
||||
|
||||
Default is ~0.
|
||||
|
||||
ioam6_id_wide - INTEGER
|
||||
Define the wide IOAM id of this interface.
|
||||
|
||||
Default is ~0.
|
@ -1926,6 +1926,23 @@ fib_notify_on_flag_change - INTEGER
|
||||
- 1 - Emit notifications.
|
||||
- 2 - Emit notifications only for RTM_F_OFFLOAD_FAILED flag change.
|
||||
|
||||
ioam6_id - INTEGER
|
||||
Define the IOAM id of this node. Uses only 24 bits out of 32 in total.
|
||||
|
||||
Min: 0
|
||||
Max: 0xFFFFFF
|
||||
|
||||
Default: 0xFFFFFF
|
||||
|
||||
ioam6_id_wide - LONG INTEGER
|
||||
Define the wide IOAM id of this node. Uses only 56 bits out of 64 in
|
||||
total. Can be different from ioam6_id.
|
||||
|
||||
Min: 0
|
||||
Max: 0xFFFFFFFFFFFFFF
|
||||
|
||||
Default: 0xFFFFFFFFFFFFFF
|
||||
|
||||
IPv6 Fragmentation:
|
||||
|
||||
ip6frag_high_thresh - INTEGER
|
||||
|
213
Documentation/networking/mctp.rst
Normal file
213
Documentation/networking/mctp.rst
Normal file
@ -0,0 +1,213 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
==============================================
|
||||
Management Component Transport Protocol (MCTP)
|
||||
==============================================
|
||||
|
||||
net/mctp/ contains protocol support for MCTP, as defined by DMTF standard
|
||||
DSP0236. Physical interface drivers ("bindings" in the specification) are
|
||||
provided in drivers/net/mctp/.
|
||||
|
||||
The core code provides a socket-based interface to send and receive MCTP
|
||||
messages, through an AF_MCTP, SOCK_DGRAM socket.
|
||||
|
||||
Structure: interfaces & networks
|
||||
================================
|
||||
|
||||
The kernel models the local MCTP topology through two items: interfaces and
|
||||
networks.
|
||||
|
||||
An interface (or "link") is an instance of an MCTP physical transport binding
|
||||
(as defined by DSP0236, section 3.2.47), likely connected to a specific hardware
|
||||
device. This is represented as a ``struct netdevice``.
|
||||
|
||||
A network defines a unique address space for MCTP endpoints by endpoint-ID
|
||||
(described by DSP0236, section 3.2.31). A network has a user-visible identifier
|
||||
to allow references from userspace. Route definitions are specific to one
|
||||
network.
|
||||
|
||||
Interfaces are associated with one network. A network may be associated with one
|
||||
or more interfaces.
|
||||
|
||||
If multiple networks are present, each may contain endpoint IDs (EIDs) that are
|
||||
also present on other networks.
|
||||
|
||||
Sockets API
|
||||
===========
|
||||
|
||||
Protocol definitions
|
||||
--------------------
|
||||
|
||||
MCTP uses ``AF_MCTP`` / ``PF_MCTP`` for the address- and protocol- families.
|
||||
Since MCTP is message-based, only ``SOCK_DGRAM`` sockets are supported.
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
int sd = socket(AF_MCTP, SOCK_DGRAM, 0);
|
||||
|
||||
The only (current) value for the ``protocol`` argument is 0.
|
||||
|
||||
As with all socket address families, source and destination addresses are
|
||||
specified with a ``sockaddr`` type, with a single-byte endpoint address:
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
typedef __u8 mctp_eid_t;
|
||||
|
||||
struct mctp_addr {
|
||||
mctp_eid_t s_addr;
|
||||
};
|
||||
|
||||
struct sockaddr_mctp {
|
||||
unsigned short int smctp_family;
|
||||
int smctp_network;
|
||||
struct mctp_addr smctp_addr;
|
||||
__u8 smctp_type;
|
||||
__u8 smctp_tag;
|
||||
};
|
||||
|
||||
#define MCTP_NET_ANY 0x0
|
||||
#define MCTP_ADDR_ANY 0xff
|
||||
|
||||
|
||||
Syscall behaviour
|
||||
-----------------
|
||||
|
||||
The following sections describe the MCTP-specific behaviours of the standard
|
||||
socket system calls. These behaviours have been chosen to map closely to the
|
||||
existing sockets APIs.
|
||||
|
||||
``bind()`` : set local socket address
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Sockets that receive incoming request packets will bind to a local address,
|
||||
using the ``bind()`` syscall.
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
struct sockaddr_mctp addr;
|
||||
|
||||
addr.smctp_family = AF_MCTP;
|
||||
addr.smctp_network = MCTP_NET_ANY;
|
||||
addr.smctp_addr.s_addr = MCTP_ADDR_ANY;
|
||||
addr.smctp_type = MCTP_TYPE_PLDM;
|
||||
addr.smctp_tag = MCTP_TAG_OWNER;
|
||||
|
||||
int rc = bind(sd, (struct sockaddr *)&addr, sizeof(addr));
|
||||
|
||||
This establishes the local address of the socket. Incoming MCTP messages that
|
||||
match the network, address, and message type will be received by this socket.
|
||||
The reference to 'incoming' is important here; a bound socket will only receive
|
||||
messages with the TO bit set, to indicate an incoming request message, rather
|
||||
than a response.
|
||||
|
||||
The ``smctp_tag`` value will configure the tags accepted from the remote side of
|
||||
this socket. Given the above, the only valid value is ``MCTP_TAG_OWNER``, which
|
||||
will result in remotely "owned" tags being routed to this socket. Since
|
||||
``MCTP_TAG_OWNER`` is set, the 3 least-significant bits of ``smctp_tag`` are not
|
||||
used; callers must set them to zero.
|
||||
|
||||
A ``smctp_network`` value of ``MCTP_NET_ANY`` will configure the socket to
|
||||
receive incoming packets from any locally-connected network. A specific network
|
||||
value will cause the socket to only receive incoming messages from that network.
|
||||
|
||||
The ``smctp_addr`` field specifies a local address to bind to. A value of
|
||||
``MCTP_ADDR_ANY`` configures the socket to receive messages addressed to any
|
||||
local destination EID.
|
||||
|
||||
The ``smctp_type`` field specifies which message types to receive. Only the
|
||||
lower 7 bits of the type is matched on incoming messages (ie., the
|
||||
most-significant IC bit is not part of the match). This results in the socket
|
||||
receiving packets with and without a message integrity check footer.
|
||||
|
||||
``sendto()``, ``sendmsg()``, ``send()`` : transmit an MCTP message
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
An MCTP message is transmitted using one of the ``sendto()``, ``sendmsg()`` or
|
||||
``send()`` syscalls. Using ``sendto()`` as the primary example:
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
struct sockaddr_mctp addr;
|
||||
char buf[14];
|
||||
ssize_t len;
|
||||
|
||||
/* set message destination */
|
||||
addr.smctp_family = AF_MCTP;
|
||||
addr.smctp_network = 0;
|
||||
addr.smctp_addr.s_addr = 8;
|
||||
addr.smctp_tag = MCTP_TAG_OWNER;
|
||||
addr.smctp_type = MCTP_TYPE_ECHO;
|
||||
|
||||
/* arbitrary message to send, with message-type header */
|
||||
buf[0] = MCTP_TYPE_ECHO;
|
||||
memcpy(buf + 1, "hello, world!", sizeof(buf) - 1);
|
||||
|
||||
len = sendto(sd, buf, sizeof(buf), 0,
|
||||
(struct sockaddr_mctp *)&addr, sizeof(addr));
|
||||
|
||||
The network and address fields of ``addr`` define the remote address to send to.
|
||||
If ``smctp_tag`` has the ``MCTP_TAG_OWNER``, the kernel will ignore any bits set
|
||||
in ``MCTP_TAG_VALUE``, and generate a tag value suitable for the destination
|
||||
EID. If ``MCTP_TAG_OWNER`` is not set, the message will be sent with the tag
|
||||
value as specified. If a tag value cannot be allocated, the system call will
|
||||
report an errno of ``EAGAIN``.
|
||||
|
||||
The application must provide the message type byte as the first byte of the
|
||||
message buffer passed to ``sendto()``. If a message integrity check is to be
|
||||
included in the transmitted message, it must also be provided in the message
|
||||
buffer, and the most-significant bit of the message type byte must be 1.
|
||||
|
||||
The ``sendmsg()`` system call allows a more compact argument interface, and the
|
||||
message buffer to be specified as a scatter-gather list. At present no ancillary
|
||||
message types (used for the ``msg_control`` data passed to ``sendmsg()``) are
|
||||
defined.
|
||||
|
||||
Transmitting a message on an unconnected socket with ``MCTP_TAG_OWNER``
|
||||
specified will cause an allocation of a tag, if no valid tag is already
|
||||
allocated for that destination. The (destination-eid,tag) tuple acts as an
|
||||
implicit local socket address, to allow the socket to receive responses to this
|
||||
outgoing message. If any previous allocation has been performed (to for a
|
||||
different remote EID), that allocation is lost.
|
||||
|
||||
Sockets will only receive responses to requests they have sent (with TO=1) and
|
||||
may only respond (with TO=0) to requests they have received.
|
||||
|
||||
``recvfrom()``, ``recvmsg()``, ``recv()`` : receive an MCTP message
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
An MCTP message can be received by an application using one of the
|
||||
``recvfrom()``, ``recvmsg()``, or ``recv()`` system calls. Using ``recvfrom()``
|
||||
as the primary example:
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
struct sockaddr_mctp addr;
|
||||
socklen_t addrlen;
|
||||
char buf[14];
|
||||
ssize_t len;
|
||||
|
||||
addrlen = sizeof(addr);
|
||||
|
||||
len = recvfrom(sd, buf, sizeof(buf), 0,
|
||||
(struct sockaddr_mctp *)&addr, &addrlen);
|
||||
|
||||
/* We can expect addr to describe an MCTP address */
|
||||
assert(addrlen >= sizeof(buf));
|
||||
assert(addr.smctp_family == AF_MCTP);
|
||||
|
||||
printf("received %zd bytes from remote EID %d\n", rc, addr.smctp_addr);
|
||||
|
||||
The address argument to ``recvfrom`` and ``recvmsg`` is populated with the
|
||||
remote address of the incoming message, including tag value (this will be needed
|
||||
in order to reply to the message).
|
||||
|
||||
The first byte of the message buffer will contain the message type byte. If an
|
||||
integrity check follows the message, it will be included in the received buffer.
|
||||
|
||||
The ``recv()`` system call behaves in a similar way, but does not provide a
|
||||
remote address to the application. Therefore, these are only useful if the
|
||||
remote address is already known, or the message does not require a reply.
|
||||
|
||||
Like the send calls, sockets will only receive responses to requests they have
|
||||
sent (TO=1) and may only respond (TO=0) to requests they have received.
|
@ -45,3 +45,15 @@ allow_join_initial_addr_port - BOOLEAN
|
||||
This is a per-namespace sysctl.
|
||||
|
||||
Default: 1
|
||||
|
||||
stale_loss_cnt - INTEGER
|
||||
The number of MPTCP-level retransmission intervals with no traffic and
|
||||
pending outstanding data on a given subflow required to declare it stale.
|
||||
The packet scheduler ignores stale subflows.
|
||||
A low stale_loss_cnt value allows for fast active-backup switch-over,
|
||||
an high value maximize links utilization on edge scenarios e.g. lossy
|
||||
link with high BER or peer pausing the data processing.
|
||||
|
||||
This is a per-namespace sysctl.
|
||||
|
||||
Default: 4
|
||||
|
@ -222,6 +222,35 @@ ndo_do_ioctl:
|
||||
Synchronization: rtnl_lock() semaphore.
|
||||
Context: process
|
||||
|
||||
This is only called by network subsystems internally,
|
||||
not by user space calling ioctl as it was in before
|
||||
linux-5.14.
|
||||
|
||||
ndo_siocbond:
|
||||
Synchronization: rtnl_lock() semaphore.
|
||||
Context: process
|
||||
|
||||
Used by the bonding driver for the SIOCBOND family of
|
||||
ioctl commands.
|
||||
|
||||
ndo_siocwandev:
|
||||
Synchronization: rtnl_lock() semaphore.
|
||||
Context: process
|
||||
|
||||
Used by the drivers/net/wan framework to handle
|
||||
the SIOCWANDEV ioctl with the if_settings structure.
|
||||
|
||||
ndo_siocdevprivate:
|
||||
Synchronization: rtnl_lock() semaphore.
|
||||
Context: process
|
||||
|
||||
This is used to implement SIOCDEVPRIVATE ioctl helpers.
|
||||
These should not be added to new drivers, so don't use.
|
||||
|
||||
ndo_eth_ioctl:
|
||||
Synchronization: rtnl_lock() semaphore.
|
||||
Context: process
|
||||
|
||||
ndo_get_stats:
|
||||
Synchronization: rtnl_lock() semaphore, dev_base_lock rwlock, or RCU.
|
||||
Context: atomic (can't sleep under rwlock or RCU)
|
||||
|
@ -184,6 +184,13 @@ nf_conntrack_gre_timeout_stream - INTEGER (seconds)
|
||||
This extended timeout will be used in case there is an GRE stream
|
||||
detected.
|
||||
|
||||
nf_hooks_lwtunnel - BOOLEAN
|
||||
- 0 - disabled (default)
|
||||
- not 0 - enabled
|
||||
|
||||
If this option is enabled, the lightweight tunnel netfilter hooks are
|
||||
enabled. This option cannot be disabled once it is enabled.
|
||||
|
||||
nf_flowtable_tcp_timeout - INTEGER (seconds)
|
||||
default 30
|
||||
|
||||
|
@ -248,26 +248,24 @@ Usage:::
|
||||
|
||||
-i : ($DEV) output interface/device (required)
|
||||
-s : ($PKT_SIZE) packet size
|
||||
-d : ($DEST_IP) destination IP
|
||||
-d : ($DEST_IP) destination IP. CIDR (e.g. 198.18.0.0/15) is also allowed
|
||||
-m : ($DST_MAC) destination MAC-addr
|
||||
-p : ($DST_PORT) destination PORT range (e.g. 433-444) is also allowed
|
||||
-t : ($THREADS) threads to start
|
||||
-f : ($F_THREAD) index of first thread (zero indexed CPU number)
|
||||
-c : ($SKB_CLONE) SKB clones send before alloc new SKB
|
||||
-n : ($COUNT) num messages to send per thread, 0 means indefinitely
|
||||
-b : ($BURST) HW level bursting of SKBs
|
||||
-v : ($VERBOSE) verbose
|
||||
-x : ($DEBUG) debug
|
||||
-6 : ($IP6) IPv6
|
||||
-w : ($DELAY) Tx Delay value (ns)
|
||||
-a : ($APPEND) Script will not reset generator's state, but will append its config
|
||||
|
||||
The global variables being set are also listed. E.g. the required
|
||||
interface/device parameter "-i" sets variable $DEV. Copy the
|
||||
pktgen_sampleXX scripts and modify them to fit your own needs.
|
||||
|
||||
The old scripts::
|
||||
|
||||
pktgen.conf-1-2 # 1 CPU 2 dev
|
||||
pktgen.conf-1-1-rdos # 1 CPU 1 dev w. route DoS
|
||||
pktgen.conf-1-1-ip6 # 1 CPU 1 dev ipv6
|
||||
pktgen.conf-1-1-ip6-rdos # 1 CPU 1 dev ipv6 w. route DoS
|
||||
pktgen.conf-1-1-flows # 1 CPU 1 dev multiple flows.
|
||||
|
||||
|
||||
Interrupt affinity
|
||||
===================
|
||||
@ -398,7 +396,7 @@ Current commands and configuration options
|
||||
References:
|
||||
|
||||
- ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/
|
||||
- tp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/
|
||||
- ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/
|
||||
|
||||
Paper from Linux-Kongress in Erlangen 2004.
|
||||
- ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/pktgen_paper.pdf
|
||||
|
@ -625,7 +625,7 @@ interfaces of a DSA switch to share the same PHC.
|
||||
By design, PTP timestamping with a DSA switch does not need any special
|
||||
handling in the driver for the host port it is attached to. However, when the
|
||||
host port also supports PTP timestamping, DSA will take care of intercepting
|
||||
the ``.ndo_do_ioctl`` calls towards the host port, and block attempts to enable
|
||||
the ``.ndo_eth_ioctl`` calls towards the host port, and block attempts to enable
|
||||
hardware timestamping on it. This is because the SO_TIMESTAMPING API does not
|
||||
allow the delivery of multiple hardware timestamps for the same packet, so
|
||||
anybody else except for the DSA switch port must be prevented from doing so.
|
||||
@ -688,7 +688,7 @@ ethtool ioctl operations for them need to be mediated by their respective MAC
|
||||
driver. Therefore, as opposed to DSA switches, modifications need to be done
|
||||
to each individual MAC driver for PHY timestamping support. This entails:
|
||||
|
||||
- Checking, in ``.ndo_do_ioctl``, whether ``phy_has_hwtstamp(netdev->phydev)``
|
||||
- Checking, in ``.ndo_eth_ioctl``, whether ``phy_has_hwtstamp(netdev->phydev)``
|
||||
is true or not. If it is, then the MAC driver should not process this request
|
||||
but instead pass it on to the PHY using ``phy_mii_ioctl()``.
|
||||
|
||||
@ -747,7 +747,7 @@ For example, a typical driver design for TX timestamping might be to split the
|
||||
transmission part into 2 portions:
|
||||
|
||||
1. "TX": checks whether PTP timestamping has been previously enabled through
|
||||
the ``.ndo_do_ioctl`` ("``priv->hwtstamp_tx_enabled == true``") and the
|
||||
the ``.ndo_eth_ioctl`` ("``priv->hwtstamp_tx_enabled == true``") and the
|
||||
current skb requires a TX timestamp ("``skb_shinfo(skb)->tx_flags &
|
||||
SKBTX_HW_TSTAMP``"). If this is true, it sets the
|
||||
"``skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS``" flag. Note: as
|
||||
|
@ -144,6 +144,19 @@ default VRF are only handled by a socket not bound to any VRF::
|
||||
netfilter rules on the VRF device can be used to limit access to services
|
||||
running in the default VRF context as well.
|
||||
|
||||
Using VRF-aware applications (applications which simultaneously create sockets
|
||||
outside and inside VRFs) in conjunction with ``net.ipv4.tcp_l3mdev_accept=1``
|
||||
is possible but may lead to problems in some situations. With that sysctl
|
||||
value, it is unspecified which listening socket will be selected to handle
|
||||
connections for VRF traffic; ie. either a socket bound to the VRF or an unbound
|
||||
socket may be used to accept new connections from a VRF. This somewhat
|
||||
unexpected behavior can lead to problems if sockets are configured with extra
|
||||
options (ex. TCP MD5 keys) with the expectation that VRF traffic will
|
||||
exclusively be handled by sockets bound to VRFs, as would be the case with
|
||||
``net.ipv4.tcp_l3mdev_accept=0``. Finally and as a reminder, regardless of
|
||||
which listening socket is selected, established sockets will be created in the
|
||||
VRF based on the ingress interface, as documented earlier.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Using iproute2 for VRFs
|
||||
|
47
MAINTAINERS
47
MAINTAINERS
@ -3204,7 +3204,7 @@ S: Maintained
|
||||
W: https://www.open-mesh.org/
|
||||
Q: https://patchwork.open-mesh.org/project/batman/list/
|
||||
B: https://www.open-mesh.org/projects/batman-adv/issues
|
||||
C: irc://chat.freenode.net/batman
|
||||
C: ircs://irc.hackint.org/batadv
|
||||
T: git https://git.open-mesh.org/linux-merge.git
|
||||
F: Documentation/networking/batman-adv.rst
|
||||
F: include/uapi/linux/batadv_packet.h
|
||||
@ -3416,7 +3416,6 @@ F: drivers/net/ethernet/netronome/nfp/bpf/
|
||||
|
||||
BPF JIT for POWERPC (32-BIT AND 64-BIT)
|
||||
M: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
|
||||
M: Sandipan Das <sandipan@linux.ibm.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: bpf@vger.kernel.org
|
||||
S: Maintained
|
||||
@ -5702,6 +5701,7 @@ DPAA2 ETHERNET SWITCH DRIVER
|
||||
M: Ioana Ciornei <ioana.ciornei@nxp.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/freescale/dpaa2/switch-driver.rst
|
||||
F: drivers/net/ethernet/freescale/dpaa2/dpaa2-switch*
|
||||
F: drivers/net/ethernet/freescale/dpaa2/dpsw*
|
||||
|
||||
@ -6922,6 +6922,12 @@ M: Mark Einon <mark.einon@gmail.com>
|
||||
S: Odd Fixes
|
||||
F: drivers/net/ethernet/agere/
|
||||
|
||||
ETAS ES58X CAN/USB DRIVER
|
||||
M: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
|
||||
L: linux-can@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/can/usb/etas_es58x/
|
||||
|
||||
ETHERNET BRIDGE
|
||||
M: Roopa Prabhu <roopa@nvidia.com>
|
||||
M: Nikolay Aleksandrov <nikolay@nvidia.com>
|
||||
@ -9767,11 +9773,6 @@ M: David Sterba <dsterba@suse.com>
|
||||
S: Odd Fixes
|
||||
F: drivers/tty/ipwireless/
|
||||
|
||||
IPX NETWORK LAYER
|
||||
L: netdev@vger.kernel.org
|
||||
S: Obsolete
|
||||
F: include/uapi/linux/ipx.h
|
||||
|
||||
IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
|
||||
M: Marc Zyngier <maz@kernel.org>
|
||||
S: Maintained
|
||||
@ -10417,6 +10418,7 @@ F: net/core/skmsg.c
|
||||
F: net/core/sock_map.c
|
||||
F: net/ipv4/tcp_bpf.c
|
||||
F: net/ipv4/udp_bpf.c
|
||||
F: net/unix/unix_bpf.c
|
||||
|
||||
LANDLOCK SECURITY MODULE
|
||||
M: Mickaël Salaün <mic@digikod.net>
|
||||
@ -11050,6 +11052,18 @@ F: drivers/mailbox/arm_mhuv2.c
|
||||
F: include/linux/mailbox/arm_mhuv2_message.h
|
||||
F: Documentation/devicetree/bindings/mailbox/arm,mhuv2.yaml
|
||||
|
||||
MANAGEMENT COMPONENT TRANSPORT PROTOCOL (MCTP)
|
||||
M: Jeremy Kerr <jk@codeconstruct.com.au>
|
||||
M: Matt Johnston <matt@codeconstruct.com.au>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/networking/mctp.rst
|
||||
F: drivers/net/mctp/
|
||||
F: include/net/mctp.h
|
||||
F: include/net/mctpdevice.h
|
||||
F: include/net/netns/mctp.h
|
||||
F: net/mctp/
|
||||
|
||||
MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
|
||||
M: Michael Kerrisk <mtk.manpages@gmail.com>
|
||||
L: linux-man@vger.kernel.org
|
||||
@ -11347,6 +11361,12 @@ W: https://linuxtv.org
|
||||
T: git git://linuxtv.org/media_tree.git
|
||||
F: drivers/media/radio/radio-maxiradio*
|
||||
|
||||
MAXLINEAR ETHERNET PHY DRIVER
|
||||
M: Xu Liang <lxu@maxlinear.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/phy/mxl-gpy.c
|
||||
|
||||
MCBA MICROCHIP CAN BUS ANALYZER TOOL DRIVER
|
||||
R: Yasushi SHOJI <yashi@spacecubics.com>
|
||||
L: linux-can@vger.kernel.org
|
||||
@ -13890,6 +13910,12 @@ F: Documentation/devicetree/
|
||||
F: arch/*/boot/dts/
|
||||
F: include/dt-bindings/
|
||||
|
||||
OPENCOMPUTE PTP CLOCK DRIVER
|
||||
M: Jonathan Lemon <jonathan.lemon@gmail.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/ptp/ptp_ocp.c
|
||||
|
||||
OPENCORES I2C BUS DRIVER
|
||||
M: Peter Korsgaard <peter@korsgaard.com>
|
||||
M: Andrew Lunn <andrew@lunn.ch>
|
||||
@ -14953,13 +14979,6 @@ S: Maintained
|
||||
F: include/linux/printk.h
|
||||
F: kernel/printk/
|
||||
|
||||
PRISM54 WIRELESS DRIVER
|
||||
M: Luis Chamberlain <mcgrof@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Obsolete
|
||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/p54
|
||||
F: drivers/net/wireless/intersil/prism54/
|
||||
|
||||
PROC FILESYSTEM
|
||||
L: linux-kernel@vger.kernel.org
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
|
@ -129,6 +129,8 @@
|
||||
|
||||
#define SO_NETNS_COOKIE 71
|
||||
|
||||
#define SO_BUF_LOCK 72
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -189,7 +189,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
fec: fec@50038000 {
|
||||
fec: ethernet@50038000 {
|
||||
compatible = "fsl,imx35-fec", "fsl,imx27-fec";
|
||||
reg = <0x50038000 0x4000>;
|
||||
clocks = <&clks 46>, <&clks 8>;
|
||||
|
@ -222,20 +222,30 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet_novena>;
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <ðphy>;
|
||||
phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
txen-skew-ps = <0>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <3000>;
|
||||
txd1-skew-ps = <3000>;
|
||||
txd2-skew-ps = <3000>;
|
||||
txd3-skew-ps = <3000>;
|
||||
status = "okay";
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethphy: ethernet-phy {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
rxc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
txen-skew-ps = <0>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <3000>;
|
||||
txd1-skew-ps = <3000>;
|
||||
txd2-skew-ps = <3000>;
|
||||
txd3-skew-ps = <3000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
|
@ -316,12 +316,22 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <ðphy>;
|
||||
phy-reset-gpios = <&gpio7 18 GPIO_ACTIVE_LOW>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
status = "okay";
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethphy: ethernet-phy {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpmi {
|
||||
|
@ -190,23 +190,33 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <ðphy>;
|
||||
phy-reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
|
||||
fsl,err006687-workaround-present;
|
||||
status = "okay";
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethphy: ethernet-phy {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
|
@ -332,23 +332,33 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <ðphy>;
|
||||
phy-reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
|
||||
fsl,err006687-workaround-present;
|
||||
status = "okay";
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethphy: ethernet-phy {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
|
@ -265,23 +265,33 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <ðphy>;
|
||||
phy-reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
|
||||
fsl,err006687-workaround-present;
|
||||
status = "okay";
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethphy: ethernet-phy {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
|
@ -324,20 +324,30 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <ðphy>;
|
||||
phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
status = "okay";
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ethphy: ethernet-phy {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <3000>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <3000>;
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txd0-skew-ps = <0>;
|
||||
txd1-skew-ps = <0>;
|
||||
txd2-skew-ps = <0>;
|
||||
txd3-skew-ps = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
|
@ -216,7 +216,6 @@
|
||||
phy-mode = "rgmii-id";
|
||||
phy-reset-gpios = <&gpio7 15 GPIO_ACTIVE_LOW>;
|
||||
phy-reset-duration = <1>;
|
||||
phy-reset-delay = <1>;
|
||||
phy-supply = <®_fec1_pwdn>;
|
||||
phy-handle = <ðphy1_0>;
|
||||
fsl,magic-packet;
|
||||
|
@ -23,7 +23,6 @@
|
||||
phy-mode = "rgmii-id";
|
||||
phy-reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
|
||||
phy-reset-duration = <1>;
|
||||
phy-reset-delay = <1>;
|
||||
phy-supply = <®_fec2_pwdn>;
|
||||
phy-handle = <ðphy2_0>;
|
||||
fsl,magic-packet;
|
||||
|
@ -268,9 +268,23 @@ static struct platform_device ixp46x_i2c_controller = {
|
||||
.resource = ixp46x_i2c_resources
|
||||
};
|
||||
|
||||
static struct resource ixp46x_ptp_resources[] = {
|
||||
DEFINE_RES_MEM(IXP4XX_TIMESYNC_BASE_PHYS, SZ_4K),
|
||||
DEFINE_RES_IRQ_NAMED(IRQ_IXP4XX_GPIO8, "master"),
|
||||
DEFINE_RES_IRQ_NAMED(IRQ_IXP4XX_GPIO7, "slave"),
|
||||
};
|
||||
|
||||
static struct platform_device ixp46x_ptp = {
|
||||
.name = "ptp-ixp46x",
|
||||
.id = -1,
|
||||
.resource = ixp46x_ptp_resources,
|
||||
.num_resources = ARRAY_SIZE(ixp46x_ptp_resources),
|
||||
};
|
||||
|
||||
static struct platform_device *ixp46x_devices[] __initdata = {
|
||||
&ixp46x_hwrandom_device,
|
||||
&ixp46x_i2c_controller,
|
||||
&ixp46x_ptp,
|
||||
};
|
||||
|
||||
unsigned long ixp4xx_exp_bus_size;
|
||||
|
@ -920,7 +920,7 @@
|
||||
};
|
||||
|
||||
fec1: ethernet@30be0000 {
|
||||
compatible = "fsl,imx8mm-fec", "fsl,imx6sx-fec";
|
||||
compatible = "fsl,imx8mm-fec", "fsl,imx8mq-fec", "fsl,imx6sx-fec";
|
||||
reg = <0x30be0000 0x10000>;
|
||||
interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
@ -923,7 +923,7 @@
|
||||
};
|
||||
|
||||
fec1: ethernet@30be0000 {
|
||||
compatible = "fsl,imx8mn-fec", "fsl,imx6sx-fec";
|
||||
compatible = "fsl,imx8mn-fec", "fsl,imx8mq-fec", "fsl,imx6sx-fec";
|
||||
reg = <0x30be0000 0x10000>;
|
||||
interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
@ -17,9 +17,9 @@
|
||||
};
|
||||
|
||||
&fec1 {
|
||||
compatible = "fsl,imx8qxp-fec", "fsl,imx6sx-fec";
|
||||
compatible = "fsl,imx8qxp-fec", "fsl,imx8qm-fec", "fsl,imx6sx-fec";
|
||||
};
|
||||
|
||||
&fec2 {
|
||||
compatible = "fsl,imx8qxp-fec", "fsl,imx6sx-fec";
|
||||
compatible = "fsl,imx8qxp-fec", "fsl,imx8qm-fec", "fsl,imx6sx-fec";
|
||||
};
|
||||
|
@ -471,8 +471,9 @@
|
||||
<0x6 0x10004000 0x7fc000>,
|
||||
<0x6 0x11010000 0xaf0000>;
|
||||
reg-names = "cpu", "dev", "gcb";
|
||||
interrupt-names = "xtr";
|
||||
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "xtr", "fdma";
|
||||
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
|
||||
resets = <&reset 0>;
|
||||
reset-names = "switch";
|
||||
};
|
||||
|
@ -5,6 +5,9 @@
|
||||
#ifndef __ASM_COMPAT_H
|
||||
#define __ASM_COMPAT_H
|
||||
|
||||
#define compat_mode_t compat_mode_t
|
||||
typedef u16 compat_mode_t;
|
||||
|
||||
#include <asm-generic/compat.h>
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
@ -27,13 +30,9 @@ typedef u16 __compat_uid_t;
|
||||
typedef u16 __compat_gid_t;
|
||||
typedef u16 __compat_uid16_t;
|
||||
typedef u16 __compat_gid16_t;
|
||||
typedef u32 __compat_uid32_t;
|
||||
typedef u32 __compat_gid32_t;
|
||||
typedef u16 compat_mode_t;
|
||||
typedef u32 compat_dev_t;
|
||||
typedef s32 compat_nlink_t;
|
||||
typedef u16 compat_ipc_pid_t;
|
||||
typedef u32 compat_caddr_t;
|
||||
typedef __kernel_fsid_t compat_fsid_t;
|
||||
|
||||
struct compat_stat {
|
||||
@ -103,13 +102,6 @@ struct compat_statfs {
|
||||
|
||||
#define COMPAT_RLIM_INFINITY 0xffffffff
|
||||
|
||||
typedef u32 compat_old_sigset_t;
|
||||
|
||||
#define _COMPAT_NSIG 64
|
||||
#define _COMPAT_NSIG_BPW 32
|
||||
|
||||
typedef u32 compat_sigset_word;
|
||||
|
||||
#define COMPAT_OFF_T_MAX 0x7fffffff
|
||||
|
||||
#define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current)))
|
||||
|
@ -9,20 +9,25 @@
|
||||
#include <asm/page.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
typedef s32 __compat_uid_t;
|
||||
typedef s32 __compat_gid_t;
|
||||
typedef __compat_uid_t __compat_uid32_t;
|
||||
typedef __compat_gid_t __compat_gid32_t;
|
||||
#define __compat_uid32_t __compat_uid32_t
|
||||
#define __compat_gid32_t __compat_gid32_t
|
||||
|
||||
#define _COMPAT_NSIG 128 /* Don't ask !$@#% ... */
|
||||
#define _COMPAT_NSIG_BPW 32
|
||||
typedef u32 compat_sigset_word;
|
||||
|
||||
#include <asm-generic/compat.h>
|
||||
|
||||
#define COMPAT_USER_HZ 100
|
||||
#define COMPAT_UTS_MACHINE "mips\0\0\0"
|
||||
|
||||
typedef s32 __compat_uid_t;
|
||||
typedef s32 __compat_gid_t;
|
||||
typedef __compat_uid_t __compat_uid32_t;
|
||||
typedef __compat_gid_t __compat_gid32_t;
|
||||
typedef u32 compat_mode_t;
|
||||
typedef u32 compat_dev_t;
|
||||
typedef u32 compat_nlink_t;
|
||||
typedef s32 compat_ipc_pid_t;
|
||||
typedef s32 compat_caddr_t;
|
||||
typedef struct {
|
||||
s32 val[2];
|
||||
} compat_fsid_t;
|
||||
@ -89,13 +94,6 @@ struct compat_statfs {
|
||||
|
||||
#define COMPAT_RLIM_INFINITY 0x7fffffffUL
|
||||
|
||||
typedef u32 compat_old_sigset_t; /* at least 32 bits */
|
||||
|
||||
#define _COMPAT_NSIG 128 /* Don't ask !$@#% ... */
|
||||
#define _COMPAT_NSIG_BPW 32
|
||||
|
||||
typedef u32 compat_sigset_word;
|
||||
|
||||
#define COMPAT_OFF_T_MAX 0x7fffffff
|
||||
|
||||
static inline void __user *arch_compat_alloc_user_space(long len)
|
||||
|
@ -140,6 +140,8 @@
|
||||
|
||||
#define SO_NETNS_COOKIE 71
|
||||
|
||||
#define SO_BUF_LOCK 72
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -8,6 +8,9 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/thread_info.h>
|
||||
|
||||
#define compat_mode_t compat_mode_t
|
||||
typedef u16 compat_mode_t;
|
||||
|
||||
#include <asm-generic/compat.h>
|
||||
|
||||
#define COMPAT_USER_HZ 100
|
||||
@ -15,13 +18,9 @@
|
||||
|
||||
typedef u32 __compat_uid_t;
|
||||
typedef u32 __compat_gid_t;
|
||||
typedef u32 __compat_uid32_t;
|
||||
typedef u32 __compat_gid32_t;
|
||||
typedef u16 compat_mode_t;
|
||||
typedef u32 compat_dev_t;
|
||||
typedef u16 compat_nlink_t;
|
||||
typedef u16 compat_ipc_pid_t;
|
||||
typedef u32 compat_caddr_t;
|
||||
|
||||
struct compat_stat {
|
||||
compat_dev_t st_dev; /* dev_t is 32 bits on parisc */
|
||||
@ -96,13 +95,6 @@ struct compat_sigcontext {
|
||||
|
||||
#define COMPAT_RLIM_INFINITY 0xffffffff
|
||||
|
||||
typedef u32 compat_old_sigset_t; /* at least 32 bits */
|
||||
|
||||
#define _COMPAT_NSIG 64
|
||||
#define _COMPAT_NSIG_BPW 32
|
||||
|
||||
typedef u32 compat_sigset_word;
|
||||
|
||||
#define COMPAT_OFF_T_MAX 0x7fffffff
|
||||
|
||||
struct compat_ipc64_perm {
|
||||
|
@ -121,6 +121,8 @@
|
||||
|
||||
#define SO_NETNS_COOKIE 0x4045
|
||||
|
||||
#define SO_BUF_LOCK 0x4046
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
@ -19,13 +19,9 @@
|
||||
|
||||
typedef u32 __compat_uid_t;
|
||||
typedef u32 __compat_gid_t;
|
||||
typedef u32 __compat_uid32_t;
|
||||
typedef u32 __compat_gid32_t;
|
||||
typedef u32 compat_mode_t;
|
||||
typedef u32 compat_dev_t;
|
||||
typedef s16 compat_nlink_t;
|
||||
typedef u16 compat_ipc_pid_t;
|
||||
typedef u32 compat_caddr_t;
|
||||
typedef __kernel_fsid_t compat_fsid_t;
|
||||
|
||||
struct compat_stat {
|
||||
@ -85,13 +81,6 @@ struct compat_statfs {
|
||||
|
||||
#define COMPAT_RLIM_INFINITY 0xffffffff
|
||||
|
||||
typedef u32 compat_old_sigset_t;
|
||||
|
||||
#define _COMPAT_NSIG 64
|
||||
#define _COMPAT_NSIG_BPW 32
|
||||
|
||||
typedef u32 compat_sigset_word;
|
||||
|
||||
#define COMPAT_OFF_T_MAX 0x7fffffff
|
||||
|
||||
static inline void __user *arch_compat_alloc_user_space(long len)
|
||||
|
@ -53,8 +53,6 @@ extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver);
|
||||
extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver);
|
||||
int ccwgroup_create_dev(struct device *root, struct ccwgroup_driver *gdrv,
|
||||
int num_devices, const char *buf);
|
||||
struct ccwgroup_device *get_ccwgroupdev_by_busid(struct ccwgroup_driver *gdrv,
|
||||
char *bus_id);
|
||||
|
||||
extern int ccwgroup_set_online(struct ccwgroup_device *gdev);
|
||||
extern int ccwgroup_set_offline(struct ccwgroup_device *gdev);
|
||||
|
@ -9,6 +9,9 @@
|
||||
#include <linux/sched/task_stack.h>
|
||||
#include <linux/thread_info.h>
|
||||
|
||||
#define compat_mode_t compat_mode_t
|
||||
typedef u16 compat_mode_t;
|
||||
|
||||
#include <asm-generic/compat.h>
|
||||
|
||||
#define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p( \
|
||||
@ -55,13 +58,9 @@
|
||||
|
||||
typedef u16 __compat_uid_t;
|
||||
typedef u16 __compat_gid_t;
|
||||
typedef u32 __compat_uid32_t;
|
||||
typedef u32 __compat_gid32_t;
|
||||
typedef u16 compat_mode_t;
|
||||
typedef u16 compat_dev_t;
|
||||
typedef u16 compat_nlink_t;
|
||||
typedef u16 compat_ipc_pid_t;
|
||||
typedef u32 compat_caddr_t;
|
||||
typedef __kernel_fsid_t compat_fsid_t;
|
||||
|
||||
typedef struct {
|
||||
@ -155,13 +154,6 @@ struct compat_statfs64 {
|
||||
|
||||
#define COMPAT_RLIM_INFINITY 0xffffffff
|
||||
|
||||
typedef u32 compat_old_sigset_t; /* at least 32 bits */
|
||||
|
||||
#define _COMPAT_NSIG 64
|
||||
#define _COMPAT_NSIG_BPW 32
|
||||
|
||||
typedef u32 compat_sigset_word;
|
||||
|
||||
#define COMPAT_OFF_T_MAX 0x7fffffff
|
||||
|
||||
/*
|
||||
|
@ -6,6 +6,9 @@
|
||||
*/
|
||||
#include <linux/types.h>
|
||||
|
||||
#define compat_mode_t compat_mode_t
|
||||
typedef u16 compat_mode_t;
|
||||
|
||||
#include <asm-generic/compat.h>
|
||||
|
||||
#define COMPAT_USER_HZ 100
|
||||
@ -13,13 +16,9 @@
|
||||
|
||||
typedef u16 __compat_uid_t;
|
||||
typedef u16 __compat_gid_t;
|
||||
typedef u32 __compat_uid32_t;
|
||||
typedef u32 __compat_gid32_t;
|
||||
typedef u16 compat_mode_t;
|
||||
typedef u16 compat_dev_t;
|
||||
typedef s16 compat_nlink_t;
|
||||
typedef u16 compat_ipc_pid_t;
|
||||
typedef u32 compat_caddr_t;
|
||||
typedef __kernel_fsid_t compat_fsid_t;
|
||||
|
||||
struct compat_stat {
|
||||
@ -115,13 +114,6 @@ struct compat_statfs {
|
||||
|
||||
#define COMPAT_RLIM_INFINITY 0x7fffffff
|
||||
|
||||
typedef u32 compat_old_sigset_t;
|
||||
|
||||
#define _COMPAT_NSIG 64
|
||||
#define _COMPAT_NSIG_BPW 32
|
||||
|
||||
typedef u32 compat_sigset_word;
|
||||
|
||||
#define COMPAT_OFF_T_MAX 0x7fffffff
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
|
@ -122,6 +122,8 @@
|
||||
|
||||
#define SO_NETNS_COOKIE 0x0050
|
||||
|
||||
#define SO_BUF_LOCK 0x0051
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
|
||||
|
@ -1488,7 +1488,9 @@ static void vector_get_ethtool_stats(struct net_device *dev,
|
||||
}
|
||||
|
||||
static int vector_get_coalesce(struct net_device *netdev,
|
||||
struct ethtool_coalesce *ec)
|
||||
struct ethtool_coalesce *ec,
|
||||
struct kernel_ethtool_coalesce *kernel_coal,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct vector_private *vp = netdev_priv(netdev);
|
||||
|
||||
@ -1497,7 +1499,9 @@ static int vector_get_coalesce(struct net_device *netdev,
|
||||
}
|
||||
|
||||
static int vector_set_coalesce(struct net_device *netdev,
|
||||
struct ethtool_coalesce *ec)
|
||||
struct ethtool_coalesce *ec,
|
||||
struct kernel_ethtool_coalesce *kernel_coal,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct vector_private *vp = netdev_priv(netdev);
|
||||
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include <asm/user32.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#define compat_mode_t compat_mode_t
|
||||
typedef u16 compat_mode_t;
|
||||
|
||||
#include <asm-generic/compat.h>
|
||||
|
||||
#define COMPAT_USER_HZ 100
|
||||
@ -19,13 +22,9 @@
|
||||
|
||||
typedef u16 __compat_uid_t;
|
||||
typedef u16 __compat_gid_t;
|
||||
typedef u32 __compat_uid32_t;
|
||||
typedef u32 __compat_gid32_t;
|
||||
typedef u16 compat_mode_t;
|
||||
typedef u16 compat_dev_t;
|
||||
typedef u16 compat_nlink_t;
|
||||
typedef u16 compat_ipc_pid_t;
|
||||
typedef u32 compat_caddr_t;
|
||||
typedef __kernel_fsid_t compat_fsid_t;
|
||||
|
||||
struct compat_stat {
|
||||
@ -92,13 +91,6 @@ struct compat_statfs {
|
||||
|
||||
#define COMPAT_RLIM_INFINITY 0xffffffff
|
||||
|
||||
typedef u32 compat_old_sigset_t; /* at least 32 bits */
|
||||
|
||||
#define _COMPAT_NSIG 64
|
||||
#define _COMPAT_NSIG_BPW 32
|
||||
|
||||
typedef u32 compat_sigset_word;
|
||||
|
||||
#define COMPAT_OFF_T_MAX 0x7fffffff
|
||||
|
||||
struct compat_ipc64_perm {
|
||||
|
@ -29,6 +29,7 @@ typedef struct {
|
||||
#define SA_X32_ABI 0x01000000u
|
||||
|
||||
#ifndef CONFIG_COMPAT
|
||||
#define compat_sigset_t compat_sigset_t
|
||||
typedef sigset_t compat_sigset_t;
|
||||
#endif
|
||||
|
||||
|
@ -1961,6 +1961,9 @@ int arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *image, void *i
|
||||
if (flags & BPF_TRAMP_F_CALL_ORIG)
|
||||
stack_size += 8; /* room for return value of orig_call */
|
||||
|
||||
if (flags & BPF_TRAMP_F_IP_ARG)
|
||||
stack_size += 8; /* room for IP address argument */
|
||||
|
||||
if (flags & BPF_TRAMP_F_SKIP_FRAME)
|
||||
/* skip patched call instruction and point orig_call to actual
|
||||
* body of the kernel function.
|
||||
@ -1974,6 +1977,22 @@ int arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *image, void *i
|
||||
EMIT4(0x48, 0x83, 0xEC, stack_size); /* sub rsp, stack_size */
|
||||
EMIT1(0x53); /* push rbx */
|
||||
|
||||
if (flags & BPF_TRAMP_F_IP_ARG) {
|
||||
/* Store IP address of the traced function:
|
||||
* mov rax, QWORD PTR [rbp + 8]
|
||||
* sub rax, X86_PATCH_SIZE
|
||||
* mov QWORD PTR [rbp - stack_size], rax
|
||||
*/
|
||||
emit_ldx(&prog, BPF_DW, BPF_REG_0, BPF_REG_FP, 8);
|
||||
EMIT4(0x48, 0x83, 0xe8, X86_PATCH_SIZE);
|
||||
emit_stx(&prog, BPF_DW, BPF_REG_FP, BPF_REG_0, -stack_size);
|
||||
|
||||
/* Continue with stack_size for regs storage, stack will
|
||||
* be correctly restored with 'leave' instruction.
|
||||
*/
|
||||
stack_size -= 8;
|
||||
}
|
||||
|
||||
save_regs(m, &prog, nr_args, stack_size);
|
||||
|
||||
if (flags & BPF_TRAMP_F_CALL_ORIG) {
|
||||
|
@ -2167,10 +2167,10 @@ static int hrz_open (struct atm_vcc *atm_vcc)
|
||||
|
||||
// Part of the job is done by atm_pcr_goal which gives us a PCR
|
||||
// specification which says: EITHER grab the maximum available PCR
|
||||
// (and perhaps a lower bound which we musn't pass), OR grab this
|
||||
// (and perhaps a lower bound which we must not pass), OR grab this
|
||||
// amount, rounding down if you have to (and perhaps a lower bound
|
||||
// which we musn't pass) OR grab this amount, rounding up if you
|
||||
// have to (and perhaps an upper bound which we musn't pass). If any
|
||||
// which we must not pass) OR grab this amount, rounding up if you
|
||||
// have to (and perhaps an upper bound which we must not pass). If any
|
||||
// bounds ARE passed we fail. Note that rounding is only rounding to
|
||||
// match device limitations, we do not round down to satisfy
|
||||
// bandwidth availability even if this would not violate any given
|
||||
|
@ -3536,7 +3536,7 @@ static int idt77252_preset(struct idt77252_dev *card)
|
||||
return -1;
|
||||
}
|
||||
if (!(pci_command & PCI_COMMAND_IO)) {
|
||||
printk("%s: PCI_COMMAND: %04x (???)\n",
|
||||
printk("%s: PCI_COMMAND: %04x (?)\n",
|
||||
card->name, pci_command);
|
||||
deinit_card(card);
|
||||
return (-1);
|
||||
|
@ -236,6 +236,7 @@ EXPORT_SYMBOL(bcma_core_irq);
|
||||
|
||||
void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
|
||||
{
|
||||
device_initialize(&core->dev);
|
||||
core->dev.release = bcma_release_core_dev;
|
||||
core->dev.bus = &bcma_bus_type;
|
||||
dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
|
||||
@ -277,11 +278,10 @@ static void bcma_register_core(struct bcma_bus *bus, struct bcma_device *core)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = device_register(&core->dev);
|
||||
err = device_add(&core->dev);
|
||||
if (err) {
|
||||
bcma_err(bus, "Could not register dev for core 0x%03X\n",
|
||||
core->id.id);
|
||||
put_device(&core->dev);
|
||||
return;
|
||||
}
|
||||
core->dev_registered = true;
|
||||
@ -372,7 +372,7 @@ void bcma_unregister_cores(struct bcma_bus *bus)
|
||||
/* Now noone uses internally-handled cores, we can free them */
|
||||
list_for_each_entry_safe(core, tmp, &bus->cores, list) {
|
||||
list_del(&core->list);
|
||||
kfree(core);
|
||||
put_device(&core->dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,8 +141,7 @@ static const char *bcma_device_name(const struct bcma_device_id *id)
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
static u32 bcma_scan_read32(struct bcma_bus *bus, u8 current_coreidx,
|
||||
u16 offset)
|
||||
static u32 bcma_scan_read32(struct bcma_bus *bus, u16 offset)
|
||||
{
|
||||
return readl(bus->mmio + offset);
|
||||
}
|
||||
@ -443,7 +442,7 @@ void bcma_detect_chip(struct bcma_bus *bus)
|
||||
|
||||
bcma_scan_switch_core(bus, BCMA_ADDR_BASE);
|
||||
|
||||
tmp = bcma_scan_read32(bus, 0, BCMA_CC_ID);
|
||||
tmp = bcma_scan_read32(bus, BCMA_CC_ID);
|
||||
chipinfo->id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT;
|
||||
chipinfo->rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT;
|
||||
chipinfo->pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT;
|
||||
@ -465,7 +464,7 @@ int bcma_bus_scan(struct bcma_bus *bus)
|
||||
if (bus->nr_cores)
|
||||
return 0;
|
||||
|
||||
erombase = bcma_scan_read32(bus, 0, BCMA_CC_EROM);
|
||||
erombase = bcma_scan_read32(bus, BCMA_CC_EROM);
|
||||
if (bus->hosttype == BCMA_HOSTTYPE_SOC) {
|
||||
eromptr = ioremap(erombase, BCMA_CORE_SIZE);
|
||||
if (!eromptr)
|
||||
|
@ -387,6 +387,7 @@ struct bcm_subver_table {
|
||||
};
|
||||
|
||||
static const struct bcm_subver_table bcm_uart_subver_table[] = {
|
||||
{ 0x1111, "BCM4362A2" }, /* 000.017.017 */
|
||||
{ 0x4103, "BCM4330B1" }, /* 002.001.003 */
|
||||
{ 0x410d, "BCM4334B0" }, /* 002.001.013 */
|
||||
{ 0x410e, "BCM43341B0" }, /* 002.001.014 */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -138,6 +138,49 @@ struct intel_debug_features {
|
||||
#define INTEL_CNVX_TOP_STEP(cnvx_top) (((cnvx_top) & 0x0f000000) >> 24)
|
||||
#define INTEL_CNVX_TOP_PACK_SWAB(t, s) __swab16(((__u16)(((t) << 4) | (s))))
|
||||
|
||||
enum {
|
||||
INTEL_BOOTLOADER,
|
||||
INTEL_DOWNLOADING,
|
||||
INTEL_FIRMWARE_LOADED,
|
||||
INTEL_FIRMWARE_FAILED,
|
||||
INTEL_BOOTING,
|
||||
INTEL_BROKEN_INITIAL_NCMD,
|
||||
INTEL_BROKEN_LED,
|
||||
INTEL_ROM_LEGACY,
|
||||
|
||||
__INTEL_NUM_FLAGS,
|
||||
};
|
||||
|
||||
struct btintel_data {
|
||||
DECLARE_BITMAP(flags, __INTEL_NUM_FLAGS);
|
||||
};
|
||||
|
||||
#define btintel_set_flag(hdev, nr) \
|
||||
do { \
|
||||
struct btintel_data *intel = hci_get_priv((hdev)); \
|
||||
set_bit((nr), intel->flags); \
|
||||
} while (0)
|
||||
|
||||
#define btintel_clear_flag(hdev, nr) \
|
||||
do { \
|
||||
struct btintel_data *intel = hci_get_priv((hdev)); \
|
||||
clear_bit((nr), intel->flags); \
|
||||
} while (0)
|
||||
|
||||
#define btintel_wake_up_flag(hdev, nr) \
|
||||
do { \
|
||||
struct btintel_data *intel = hci_get_priv((hdev)); \
|
||||
wake_up_bit(intel->flags, (nr)); \
|
||||
} while (0)
|
||||
|
||||
#define btintel_get_flag(hdev) \
|
||||
(((struct btintel_data *)hci_get_priv(hdev))->flags)
|
||||
|
||||
#define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
|
||||
#define btintel_test_and_clear_flag(hdev, nr) test_and_clear_bit((nr), btintel_get_flag(hdev))
|
||||
#define btintel_wait_on_flag_timeout(hdev, nr, m, to) \
|
||||
wait_on_bit_timeout(btintel_get_flag(hdev), (nr), m, to)
|
||||
|
||||
#if IS_ENABLED(CONFIG_BT_INTEL)
|
||||
|
||||
int btintel_check_bdaddr(struct hci_dev *hdev);
|
||||
@ -145,19 +188,11 @@ int btintel_enter_mfg(struct hci_dev *hdev);
|
||||
int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched);
|
||||
int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
|
||||
int btintel_set_diag(struct hci_dev *hdev, bool enable);
|
||||
int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable);
|
||||
void btintel_hw_error(struct hci_dev *hdev, u8 code);
|
||||
|
||||
int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver);
|
||||
int btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *version);
|
||||
int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
|
||||
const void *param);
|
||||
int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name);
|
||||
int btintel_set_event_mask(struct hci_dev *hdev, bool debug);
|
||||
int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug);
|
||||
int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver);
|
||||
int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver);
|
||||
|
||||
struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read,
|
||||
u16 opcode_write);
|
||||
int btintel_send_intel_reset(struct hci_dev *hdev, u32 boot_param);
|
||||
@ -165,16 +200,10 @@ int btintel_read_boot_params(struct hci_dev *hdev,
|
||||
struct intel_boot_params *params);
|
||||
int btintel_download_firmware(struct hci_dev *dev, struct intel_version *ver,
|
||||
const struct firmware *fw, u32 *boot_param);
|
||||
int btintel_download_firmware_newgen(struct hci_dev *hdev,
|
||||
struct intel_version_tlv *ver,
|
||||
const struct firmware *fw,
|
||||
u32 *boot_param, u8 hw_variant,
|
||||
u8 sbe_type);
|
||||
void btintel_reset_to_bootloader(struct hci_dev *hdev);
|
||||
int btintel_read_debug_features(struct hci_dev *hdev,
|
||||
struct intel_debug_features *features);
|
||||
int btintel_set_debug_features(struct hci_dev *hdev,
|
||||
const struct intel_debug_features *features);
|
||||
int btintel_configure_setup(struct hci_dev *hdev);
|
||||
void btintel_bootup(struct hci_dev *hdev, const void *ptr, unsigned int len);
|
||||
void btintel_secure_send_result(struct hci_dev *hdev,
|
||||
const void *ptr, unsigned int len);
|
||||
#else
|
||||
|
||||
static inline int btintel_check_bdaddr(struct hci_dev *hdev)
|
||||
@ -202,44 +231,18 @@ static inline int btintel_set_diag(struct hci_dev *hdev, bool enable)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int btintel_version_info(struct hci_dev *hdev,
|
||||
struct intel_version *ver)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_version_info_tlv(struct hci_dev *hdev,
|
||||
struct intel_version_tlv *version)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type,
|
||||
u32 plen, const void *param)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_load_ddc_config(struct hci_dev *hdev,
|
||||
const char *ddc_name)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
@ -251,12 +254,6 @@ static inline int btintel_read_version(struct hci_dev *hdev,
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_read_version_tlv(struct hci_dev *hdev,
|
||||
struct intel_version_tlv *ver)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline struct regmap *btintel_regmap_init(struct hci_dev *hdev,
|
||||
u16 opcode_read,
|
||||
u16 opcode_write)
|
||||
@ -283,28 +280,18 @@ static inline int btintel_download_firmware(struct hci_dev *dev,
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_download_firmware_newgen(struct hci_dev *hdev,
|
||||
const struct firmware *fw,
|
||||
u32 *boot_param,
|
||||
u8 hw_variant, u8 sbe_type)
|
||||
static inline int btintel_configure_setup(struct hci_dev *hdev)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline void btintel_reset_to_bootloader(struct hci_dev *hdev)
|
||||
static inline void btintel_bootup(struct hci_dev *hdev,
|
||||
const void *ptr, unsigned int len)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int btintel_read_debug_features(struct hci_dev *hdev,
|
||||
struct intel_debug_features *features)
|
||||
static inline void btintel_secure_send_result(struct hci_dev *hdev,
|
||||
const void *ptr, unsigned int len)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int btintel_set_debug_features(struct hci_dev *hdev,
|
||||
const struct intel_debug_features *features)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1350,6 +1350,7 @@ static void btmrvl_sdio_coredump(struct device *dev)
|
||||
u8 *dbg_ptr, *end_ptr, *fw_dump_data, *fw_dump_ptr;
|
||||
u8 dump_num = 0, idx, i, read_reg, doneflag = 0;
|
||||
u32 memory_size, fw_dump_len = 0;
|
||||
int size = 0;
|
||||
|
||||
card = sdio_get_drvdata(func);
|
||||
priv = card->priv;
|
||||
@ -1478,7 +1479,7 @@ done:
|
||||
if (fw_dump_len == 0)
|
||||
return;
|
||||
|
||||
fw_dump_data = vzalloc(fw_dump_len+1);
|
||||
fw_dump_data = vzalloc(fw_dump_len + 1);
|
||||
if (!fw_dump_data) {
|
||||
BT_ERR("Vzalloc fw_dump_data fail!");
|
||||
return;
|
||||
@ -1493,20 +1494,18 @@ done:
|
||||
struct memory_type_mapping *entry = &mem_type_mapping_tbl[idx];
|
||||
|
||||
if (entry->mem_ptr) {
|
||||
strcpy(fw_dump_ptr, "========Start dump ");
|
||||
fw_dump_ptr += strlen("========Start dump ");
|
||||
size += scnprintf(fw_dump_ptr + size,
|
||||
fw_dump_len + 1 - size,
|
||||
"========Start dump %s========\n",
|
||||
entry->mem_name);
|
||||
|
||||
strcpy(fw_dump_ptr, entry->mem_name);
|
||||
fw_dump_ptr += strlen(entry->mem_name);
|
||||
memcpy(fw_dump_ptr + size, entry->mem_ptr,
|
||||
entry->mem_size);
|
||||
size += entry->mem_size;
|
||||
|
||||
strcpy(fw_dump_ptr, "========\n");
|
||||
fw_dump_ptr += strlen("========\n");
|
||||
|
||||
memcpy(fw_dump_ptr, entry->mem_ptr, entry->mem_size);
|
||||
fw_dump_ptr += entry->mem_size;
|
||||
|
||||
strcpy(fw_dump_ptr, "\n========End dump========\n");
|
||||
fw_dump_ptr += strlen("\n========End dump========\n");
|
||||
size += scnprintf(fw_dump_ptr + size,
|
||||
fw_dump_len + 1 - size,
|
||||
"\n========End dump========\n");
|
||||
|
||||
vfree(mem_type_mapping_tbl[idx].mem_ptr);
|
||||
mem_type_mapping_tbl[idx].mem_ptr = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2017 Redpine Signals Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
|
@ -681,11 +681,15 @@ out_free:
|
||||
}
|
||||
}
|
||||
|
||||
/* RTL8822CE supports the Microsoft vendor extension and uses 0xFCF0
|
||||
* for VsMsftOpCode.
|
||||
/* The following chips supports the Microsoft vendor extension,
|
||||
* therefore set the corresponding VsMsftOpCode.
|
||||
*/
|
||||
if (lmp_subver == RTL_ROM_LMP_8822B)
|
||||
switch (lmp_subver) {
|
||||
case RTL_ROM_LMP_8822B:
|
||||
case RTL_ROM_LMP_8852A:
|
||||
hci_set_msft_opcode(hdev, 0xFCF0);
|
||||
break;
|
||||
}
|
||||
|
||||
return btrtl_dev;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -51,6 +51,7 @@
|
||||
/**
|
||||
* struct bcm_device_data - device specific data
|
||||
* @no_early_set_baudrate: Disallow set baudrate before driver setup()
|
||||
* @drive_rts_on_open: drive RTS signal on ->open() when platform requires it
|
||||
*/
|
||||
struct bcm_device_data {
|
||||
bool no_early_set_baudrate;
|
||||
@ -77,6 +78,8 @@ struct bcm_device_data {
|
||||
* @btlp: Apple ACPI method to toggle BT_WAKE pin ("Bluetooth Low Power")
|
||||
* @btpu: Apple ACPI method to drive BT_REG_ON pin high ("Bluetooth Power Up")
|
||||
* @btpd: Apple ACPI method to drive BT_REG_ON pin low ("Bluetooth Power Down")
|
||||
* @gpio_count: internal counter for GPIO resources associated with ACPI device
|
||||
* @gpio_int_idx: index in _CRS for GpioInt() resource
|
||||
* @txco_clk: external reference frequency clock used by Bluetooth device
|
||||
* @lpo_clk: external LPO clock used by Bluetooth device
|
||||
* @supplies: VBAT and VDDIO supplies used by Bluetooth device
|
||||
@ -88,10 +91,13 @@ struct bcm_device_data {
|
||||
* set to 0 if @init_speed is already the preferred baudrate
|
||||
* @irq: interrupt triggered by HOST_WAKE_BT pin
|
||||
* @irq_active_low: whether @irq is active low
|
||||
* @irq_acquired: flag to show if IRQ handler has been assigned
|
||||
* @hu: pointer to HCI UART controller struct,
|
||||
* used to disable flow control during runtime suspend and system sleep
|
||||
* @is_suspended: whether flow control is currently disabled
|
||||
* @no_early_set_baudrate: don't set_baudrate before setup()
|
||||
* @drive_rts_on_open: drive RTS signal on ->open() when platform requires it
|
||||
* @pcm_int_params: keep the initial PCM configuration
|
||||
*/
|
||||
struct bcm_device {
|
||||
/* Must be the first member, hci_serdev.c expects this. */
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/serdev.h>
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
@ -21,6 +22,8 @@
|
||||
#include "btrtl.h"
|
||||
#include "hci_uart.h"
|
||||
|
||||
#define SUSPEND_TIMEOUT_MS 6000
|
||||
|
||||
#define HCI_3WIRE_ACK_PKT 0
|
||||
#define HCI_3WIRE_LINK_PKT 15
|
||||
|
||||
@ -51,8 +54,10 @@
|
||||
|
||||
/* H5 state flags */
|
||||
enum {
|
||||
H5_RX_ESC, /* SLIP escape mode */
|
||||
H5_TX_ACK_REQ, /* Pending ack to send */
|
||||
H5_RX_ESC, /* SLIP escape mode */
|
||||
H5_TX_ACK_REQ, /* Pending ack to send */
|
||||
H5_WAKEUP_DISABLE, /* Device cannot wake host */
|
||||
H5_HW_FLOW_CONTROL, /* Use HW flow control */
|
||||
};
|
||||
|
||||
struct h5 {
|
||||
@ -97,6 +102,10 @@ struct h5 {
|
||||
struct gpio_desc *device_wake_gpio;
|
||||
};
|
||||
|
||||
enum h5_driver_info {
|
||||
H5_INFO_WAKEUP_DISABLE = BIT(0),
|
||||
};
|
||||
|
||||
struct h5_vnd {
|
||||
int (*setup)(struct h5 *h5);
|
||||
void (*open)(struct h5 *h5);
|
||||
@ -106,6 +115,11 @@ struct h5_vnd {
|
||||
const struct acpi_gpio_mapping *acpi_gpio_map;
|
||||
};
|
||||
|
||||
struct h5_device_data {
|
||||
uint32_t driver_info;
|
||||
struct h5_vnd *vnd;
|
||||
};
|
||||
|
||||
static void h5_reset_rx(struct h5 *h5);
|
||||
|
||||
static void h5_link_control(struct hci_uart *hu, const void *data, size_t len)
|
||||
@ -573,6 +587,10 @@ static int h5_recv(struct hci_uart *hu, const void *data, int count)
|
||||
count -= processed;
|
||||
}
|
||||
|
||||
pm_runtime_get(&hu->serdev->dev);
|
||||
pm_runtime_mark_last_busy(&hu->serdev->dev);
|
||||
pm_runtime_put_autosuspend(&hu->serdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -609,6 +627,10 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb)
|
||||
break;
|
||||
}
|
||||
|
||||
pm_runtime_get_sync(&hu->serdev->dev);
|
||||
pm_runtime_mark_last_busy(&hu->serdev->dev);
|
||||
pm_runtime_put_autosuspend(&hu->serdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -791,6 +813,8 @@ static int h5_serdev_probe(struct serdev_device *serdev)
|
||||
{
|
||||
struct device *dev = &serdev->dev;
|
||||
struct h5 *h5;
|
||||
const struct h5_device_data *data;
|
||||
int err;
|
||||
|
||||
h5 = devm_kzalloc(dev, sizeof(*h5), GFP_KERNEL);
|
||||
if (!h5)
|
||||
@ -807,20 +831,19 @@ static int h5_serdev_probe(struct serdev_device *serdev)
|
||||
if (!match)
|
||||
return -ENODEV;
|
||||
|
||||
h5->vnd = (const struct h5_vnd *)match->driver_data;
|
||||
data = (const struct h5_device_data *)match->driver_data;
|
||||
h5->vnd = data->vnd;
|
||||
h5->id = (char *)match->id;
|
||||
|
||||
if (h5->vnd->acpi_gpio_map)
|
||||
devm_acpi_dev_add_driver_gpios(dev,
|
||||
h5->vnd->acpi_gpio_map);
|
||||
} else {
|
||||
const void *data;
|
||||
|
||||
data = of_device_get_match_data(dev);
|
||||
if (!data)
|
||||
return -ENODEV;
|
||||
|
||||
h5->vnd = (const struct h5_vnd *)data;
|
||||
h5->vnd = data->vnd;
|
||||
}
|
||||
|
||||
|
||||
@ -833,7 +856,14 @@ static int h5_serdev_probe(struct serdev_device *serdev)
|
||||
if (IS_ERR(h5->device_wake_gpio))
|
||||
return PTR_ERR(h5->device_wake_gpio);
|
||||
|
||||
return hci_uart_register_device(&h5->serdev_hu, &h5p);
|
||||
err = hci_uart_register_device(&h5->serdev_hu, &h5p);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (data->driver_info & H5_INFO_WAKEUP_DISABLE)
|
||||
set_bit(H5_WAKEUP_DISABLE, &h5->flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void h5_serdev_remove(struct serdev_device *serdev)
|
||||
@ -902,6 +932,9 @@ static int h5_btrtl_setup(struct h5 *h5)
|
||||
serdev_device_set_baudrate(h5->hu->serdev, controller_baudrate);
|
||||
serdev_device_set_flow_control(h5->hu->serdev, flow_control);
|
||||
|
||||
if (flow_control)
|
||||
set_bit(H5_HW_FLOW_CONTROL, &h5->flags);
|
||||
|
||||
err = btrtl_download_firmware(h5->hu->hdev, btrtl_dev);
|
||||
/* Give the device some time before the hci-core sends it a reset */
|
||||
usleep_range(10000, 20000);
|
||||
@ -916,11 +949,25 @@ out_free:
|
||||
|
||||
static void h5_btrtl_open(struct h5 *h5)
|
||||
{
|
||||
/*
|
||||
* Since h5_btrtl_resume() does a device_reprobe() the suspend handling
|
||||
* done by the hci_suspend_notifier is not necessary; it actually causes
|
||||
* delays and a bunch of errors to get logged, so disable it.
|
||||
*/
|
||||
if (test_bit(H5_WAKEUP_DISABLE, &h5->flags))
|
||||
set_bit(HCI_UART_NO_SUSPEND_NOTIFIER, &h5->hu->flags);
|
||||
|
||||
/* Devices always start with these fixed parameters */
|
||||
serdev_device_set_flow_control(h5->hu->serdev, false);
|
||||
serdev_device_set_parity(h5->hu->serdev, SERDEV_PARITY_EVEN);
|
||||
serdev_device_set_baudrate(h5->hu->serdev, 115200);
|
||||
|
||||
pm_runtime_set_active(&h5->hu->serdev->dev);
|
||||
pm_runtime_use_autosuspend(&h5->hu->serdev->dev);
|
||||
pm_runtime_set_autosuspend_delay(&h5->hu->serdev->dev,
|
||||
SUSPEND_TIMEOUT_MS);
|
||||
pm_runtime_enable(&h5->hu->serdev->dev);
|
||||
|
||||
/* The controller needs up to 500ms to wakeup */
|
||||
gpiod_set_value_cansleep(h5->enable_gpio, 1);
|
||||
gpiod_set_value_cansleep(h5->device_wake_gpio, 1);
|
||||
@ -929,21 +976,26 @@ static void h5_btrtl_open(struct h5 *h5)
|
||||
|
||||
static void h5_btrtl_close(struct h5 *h5)
|
||||
{
|
||||
pm_runtime_disable(&h5->hu->serdev->dev);
|
||||
|
||||
gpiod_set_value_cansleep(h5->device_wake_gpio, 0);
|
||||
gpiod_set_value_cansleep(h5->enable_gpio, 0);
|
||||
}
|
||||
|
||||
/* Suspend/resume support. On many devices the RTL BT device loses power during
|
||||
* suspend/resume, causing it to lose its firmware and all state. So we simply
|
||||
* turn it off on suspend and reprobe on resume. This mirrors how RTL devices
|
||||
* are handled in the USB driver, where the USB_QUIRK_RESET_RESUME is used which
|
||||
* turn it off on suspend and reprobe on resume. This mirrors how RTL devices
|
||||
* are handled in the USB driver, where the BTUSB_WAKEUP_DISABLE is used which
|
||||
* also causes a reprobe on resume.
|
||||
*/
|
||||
static int h5_btrtl_suspend(struct h5 *h5)
|
||||
{
|
||||
serdev_device_set_flow_control(h5->hu->serdev, false);
|
||||
gpiod_set_value_cansleep(h5->device_wake_gpio, 0);
|
||||
gpiod_set_value_cansleep(h5->enable_gpio, 0);
|
||||
|
||||
if (test_bit(H5_WAKEUP_DISABLE, &h5->flags))
|
||||
gpiod_set_value_cansleep(h5->enable_gpio, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -969,17 +1021,25 @@ static void h5_btrtl_reprobe_worker(struct work_struct *work)
|
||||
|
||||
static int h5_btrtl_resume(struct h5 *h5)
|
||||
{
|
||||
struct h5_btrtl_reprobe *reprobe;
|
||||
if (test_bit(H5_WAKEUP_DISABLE, &h5->flags)) {
|
||||
struct h5_btrtl_reprobe *reprobe;
|
||||
|
||||
reprobe = kzalloc(sizeof(*reprobe), GFP_KERNEL);
|
||||
if (!reprobe)
|
||||
return -ENOMEM;
|
||||
reprobe = kzalloc(sizeof(*reprobe), GFP_KERNEL);
|
||||
if (!reprobe)
|
||||
return -ENOMEM;
|
||||
|
||||
__module_get(THIS_MODULE);
|
||||
__module_get(THIS_MODULE);
|
||||
|
||||
INIT_WORK(&reprobe->work, h5_btrtl_reprobe_worker);
|
||||
reprobe->dev = get_device(&h5->hu->serdev->dev);
|
||||
queue_work(system_long_wq, &reprobe->work);
|
||||
} else {
|
||||
gpiod_set_value_cansleep(h5->device_wake_gpio, 1);
|
||||
|
||||
if (test_bit(H5_HW_FLOW_CONTROL, &h5->flags))
|
||||
serdev_device_set_flow_control(h5->hu->serdev, true);
|
||||
}
|
||||
|
||||
INIT_WORK(&reprobe->work, h5_btrtl_reprobe_worker);
|
||||
reprobe->dev = get_device(&h5->hu->serdev->dev);
|
||||
queue_work(system_long_wq, &reprobe->work);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1001,13 +1061,22 @@ static struct h5_vnd rtl_vnd = {
|
||||
.resume = h5_btrtl_resume,
|
||||
.acpi_gpio_map = acpi_btrtl_gpios,
|
||||
};
|
||||
|
||||
static const struct h5_device_data h5_data_rtl8822cs = {
|
||||
.vnd = &rtl_vnd,
|
||||
};
|
||||
|
||||
static const struct h5_device_data h5_data_rtl8723bs = {
|
||||
.driver_info = H5_INFO_WAKEUP_DISABLE,
|
||||
.vnd = &rtl_vnd,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static const struct acpi_device_id h5_acpi_match[] = {
|
||||
#ifdef CONFIG_BT_HCIUART_RTL
|
||||
{ "OBDA0623", (kernel_ulong_t)&rtl_vnd },
|
||||
{ "OBDA8723", (kernel_ulong_t)&rtl_vnd },
|
||||
{ "OBDA0623", (kernel_ulong_t)&h5_data_rtl8723bs },
|
||||
{ "OBDA8723", (kernel_ulong_t)&h5_data_rtl8723bs },
|
||||
#endif
|
||||
{ },
|
||||
};
|
||||
@ -1016,16 +1085,17 @@ MODULE_DEVICE_TABLE(acpi, h5_acpi_match);
|
||||
|
||||
static const struct dev_pm_ops h5_serdev_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(h5_serdev_suspend, h5_serdev_resume)
|
||||
SET_RUNTIME_PM_OPS(h5_serdev_suspend, h5_serdev_resume, NULL)
|
||||
};
|
||||
|
||||
static const struct of_device_id rtl_bluetooth_of_match[] = {
|
||||
#ifdef CONFIG_BT_HCIUART_RTL
|
||||
{ .compatible = "realtek,rtl8822cs-bt",
|
||||
.data = (const void *)&rtl_vnd },
|
||||
.data = (const void *)&h5_data_rtl8822cs },
|
||||
{ .compatible = "realtek,rtl8723bs-bt",
|
||||
.data = (const void *)&rtl_vnd },
|
||||
.data = (const void *)&h5_data_rtl8723bs },
|
||||
{ .compatible = "realtek,rtl8723ds-bt",
|
||||
.data = (const void *)&rtl_vnd },
|
||||
.data = (const void *)&h5_data_rtl8723bs },
|
||||
#endif
|
||||
{ },
|
||||
};
|
||||
|
@ -343,6 +343,9 @@ int hci_uart_register_device(struct hci_uart *hu,
|
||||
hdev->setup = hci_uart_setup;
|
||||
SET_HCIDEV_DEV(hdev, &hu->serdev->dev);
|
||||
|
||||
if (test_bit(HCI_UART_NO_SUSPEND_NOTIFIER, &hu->flags))
|
||||
set_bit(HCI_QUIRK_NO_SUSPEND_NOTIFIER, &hdev->quirks);
|
||||
|
||||
if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
|
||||
set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
|
||||
|
||||
|
@ -86,9 +86,10 @@ struct hci_uart {
|
||||
};
|
||||
|
||||
/* HCI_UART proto flag bits */
|
||||
#define HCI_UART_PROTO_SET 0
|
||||
#define HCI_UART_REGISTERED 1
|
||||
#define HCI_UART_PROTO_READY 2
|
||||
#define HCI_UART_PROTO_SET 0
|
||||
#define HCI_UART_REGISTERED 1
|
||||
#define HCI_UART_PROTO_READY 2
|
||||
#define HCI_UART_NO_SUSPEND_NOTIFIER 3
|
||||
|
||||
/* TX states */
|
||||
#define HCI_UART_SENDING 1
|
||||
|
@ -914,7 +914,8 @@ void fsl_mc_device_remove(struct fsl_mc_device *mc_dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fsl_mc_device_remove);
|
||||
|
||||
struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev)
|
||||
struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev,
|
||||
u16 if_id)
|
||||
{
|
||||
struct fsl_mc_device *mc_bus_dev, *endpoint;
|
||||
struct fsl_mc_obj_desc endpoint_desc = {{ 0 }};
|
||||
@ -925,6 +926,7 @@ struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev)
|
||||
mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
|
||||
strcpy(endpoint1.type, mc_dev->obj_desc.type);
|
||||
endpoint1.id = mc_dev->obj_desc.id;
|
||||
endpoint1.if_id = if_id;
|
||||
|
||||
err = dprc_get_connection(mc_bus_dev->mc_io, 0,
|
||||
mc_bus_dev->mc_handle,
|
||||
|
@ -32,6 +32,7 @@
|
||||
* @edl: emergency download mode firmware path (if any)
|
||||
* @bar_num: PCI base address register to use for MHI MMIO register space
|
||||
* @dma_data_width: DMA transfer word size (32 or 64 bits)
|
||||
* @mru_default: default MRU size for MBIM network packets
|
||||
* @sideband_wake: Devices using dedicated sideband GPIO for wakeup instead
|
||||
* of inband wake support (such as sdx24)
|
||||
*/
|
||||
@ -42,6 +43,7 @@ struct mhi_pci_dev_info {
|
||||
const char *edl;
|
||||
unsigned int bar_num;
|
||||
unsigned int dma_data_width;
|
||||
unsigned int mru_default;
|
||||
bool sideband_wake;
|
||||
};
|
||||
|
||||
@ -272,6 +274,7 @@ static const struct mhi_pci_dev_info mhi_qcom_sdx55_info = {
|
||||
.config = &modem_qcom_v1_mhiv_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
@ -664,6 +667,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
mhi_cntrl->status_cb = mhi_pci_status_cb;
|
||||
mhi_cntrl->runtime_get = mhi_pci_runtime_get;
|
||||
mhi_cntrl->runtime_put = mhi_pci_runtime_put;
|
||||
mhi_cntrl->mru = info->mru_default;
|
||||
|
||||
if (info->sideband_wake) {
|
||||
mhi_cntrl->wake_get = mhi_pci_wake_get_nop;
|
||||
|
@ -4050,16 +4050,15 @@ static int hdlcdev_close(struct net_device *dev)
|
||||
* called by network layer to process IOCTL call to network device
|
||||
*
|
||||
* dev pointer to network device structure
|
||||
* ifr pointer to network interface request structure
|
||||
* cmd IOCTL command code
|
||||
* ifs pointer to network interface settings structure
|
||||
*
|
||||
* returns 0 if success, otherwise error code
|
||||
*/
|
||||
static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
static int hdlcdev_wan_ioctl(struct net_device *dev, struct if_settings *ifs)
|
||||
{
|
||||
const size_t size = sizeof(sync_serial_settings);
|
||||
sync_serial_settings new_line;
|
||||
sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync;
|
||||
sync_serial_settings __user *line = ifs->ifs_ifsu.sync;
|
||||
MGSLPC_INFO *info = dev_to_port(dev);
|
||||
unsigned int flags;
|
||||
|
||||
@ -4070,17 +4069,14 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
if (info->port.count)
|
||||
return -EBUSY;
|
||||
|
||||
if (cmd != SIOCWANDEV)
|
||||
return hdlc_ioctl(dev, ifr, cmd);
|
||||
|
||||
memset(&new_line, 0, size);
|
||||
|
||||
switch(ifr->ifr_settings.type) {
|
||||
switch (ifs->type) {
|
||||
case IF_GET_IFACE: /* return current sync_serial_settings */
|
||||
|
||||
ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL;
|
||||
if (ifr->ifr_settings.size < size) {
|
||||
ifr->ifr_settings.size = size; /* data size wanted */
|
||||
ifs->type = IF_IFACE_SYNC_SERIAL;
|
||||
if (ifs->size < size) {
|
||||
ifs->size = size; /* data size wanted */
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
||||
@ -4148,9 +4144,8 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
tty_kref_put(tty);
|
||||
}
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return hdlc_ioctl(dev, ifr, cmd);
|
||||
return hdlc_ioctl(dev, ifs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4225,7 +4220,7 @@ static const struct net_device_ops hdlcdev_ops = {
|
||||
.ndo_open = hdlcdev_open,
|
||||
.ndo_stop = hdlcdev_close,
|
||||
.ndo_start_xmit = hdlc_start_xmit,
|
||||
.ndo_do_ioctl = hdlcdev_ioctl,
|
||||
.ndo_siocwandev = hdlcdev_wan_ioctl,
|
||||
.ndo_tx_timeout = hdlcdev_tx_timeout,
|
||||
};
|
||||
|
||||
|
@ -996,7 +996,7 @@ int mlx5_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
|
||||
MLX5_IB_CQ_PR_FLAGS_CQE_128_PAD));
|
||||
MLX5_SET(cqc, cqc, log_cq_size, ilog2(entries));
|
||||
MLX5_SET(cqc, cqc, uar_page, index);
|
||||
MLX5_SET(cqc, cqc, c_eqn, eqn);
|
||||
MLX5_SET(cqc, cqc, c_eqn_or_apu_element, eqn);
|
||||
MLX5_SET64(cqc, cqc, dbr_addr, cq->db.dma);
|
||||
if (cq->create_flags & IB_UVERBS_CQ_FLAGS_IGNORE_OVERRUN)
|
||||
MLX5_SET(cqc, cqc, oi, 1);
|
||||
|
@ -1436,11 +1436,10 @@ out:
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static bool is_apu_thread_cq(struct mlx5_ib_dev *dev, const void *in)
|
||||
static bool is_apu_cq(struct mlx5_ib_dev *dev, const void *in)
|
||||
{
|
||||
if (!MLX5_CAP_GEN(dev->mdev, apu) ||
|
||||
!MLX5_GET(cqc, MLX5_ADDR_OF(create_cq_in, in, cq_context),
|
||||
apu_thread_cq))
|
||||
!MLX5_GET(cqc, MLX5_ADDR_OF(create_cq_in, in, cq_context), apu_cq))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -1500,7 +1499,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_OBJ_CREATE)(
|
||||
err = mlx5_core_create_dct(dev, &obj->core_dct, cmd_in,
|
||||
cmd_in_len, cmd_out, cmd_out_len);
|
||||
} else if (opcode == MLX5_CMD_OP_CREATE_CQ &&
|
||||
!is_apu_thread_cq(dev, cmd_in)) {
|
||||
!is_apu_cq(dev, cmd_in)) {
|
||||
obj->flags |= DEVX_OBJ_FLAGS_CQ;
|
||||
obj->core_cq.comp = devx_cq_comp;
|
||||
err = mlx5_core_create_cq(dev->mdev, &obj->core_cq,
|
||||
|
@ -8,13 +8,15 @@
|
||||
#include "srq.h"
|
||||
|
||||
static int
|
||||
mlx5_ib_set_vport_rep(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
|
||||
mlx5_ib_set_vport_rep(struct mlx5_core_dev *dev,
|
||||
struct mlx5_eswitch_rep *rep,
|
||||
int vport_index)
|
||||
{
|
||||
struct mlx5_ib_dev *ibdev;
|
||||
int vport_index;
|
||||
|
||||
ibdev = mlx5_eswitch_uplink_get_proto_dev(dev->priv.eswitch, REP_IB);
|
||||
vport_index = rep->vport_index;
|
||||
if (!ibdev)
|
||||
return -EINVAL;
|
||||
|
||||
ibdev->port[vport_index].rep = rep;
|
||||
rep->rep_data[REP_IB].priv = ibdev;
|
||||
@ -26,19 +28,39 @@ mlx5_ib_set_vport_rep(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mlx5_ib_register_peer_vport_reps(struct mlx5_core_dev *mdev);
|
||||
|
||||
static int
|
||||
mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
|
||||
{
|
||||
u32 num_ports = mlx5_eswitch_get_total_vports(dev);
|
||||
const struct mlx5_ib_profile *profile;
|
||||
struct mlx5_core_dev *peer_dev;
|
||||
struct mlx5_ib_dev *ibdev;
|
||||
u32 peer_num_ports;
|
||||
int vport_index;
|
||||
int ret;
|
||||
|
||||
vport_index = rep->vport_index;
|
||||
|
||||
if (mlx5_lag_is_shared_fdb(dev)) {
|
||||
peer_dev = mlx5_lag_get_peer_mdev(dev);
|
||||
peer_num_ports = mlx5_eswitch_get_total_vports(peer_dev);
|
||||
if (mlx5_lag_is_master(dev)) {
|
||||
/* Only 1 ib port is the representor for both uplinks */
|
||||
num_ports += peer_num_ports - 1;
|
||||
} else {
|
||||
if (rep->vport == MLX5_VPORT_UPLINK)
|
||||
return 0;
|
||||
vport_index += peer_num_ports;
|
||||
dev = peer_dev;
|
||||
}
|
||||
}
|
||||
|
||||
if (rep->vport == MLX5_VPORT_UPLINK)
|
||||
profile = &raw_eth_profile;
|
||||
else
|
||||
return mlx5_ib_set_vport_rep(dev, rep);
|
||||
return mlx5_ib_set_vport_rep(dev, rep, vport_index);
|
||||
|
||||
ibdev = ib_alloc_device(mlx5_ib_dev, ib_dev);
|
||||
if (!ibdev)
|
||||
@ -64,6 +86,8 @@ mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
|
||||
goto fail_add;
|
||||
|
||||
rep->rep_data[REP_IB].priv = ibdev;
|
||||
if (mlx5_lag_is_shared_fdb(dev))
|
||||
mlx5_ib_register_peer_vport_reps(dev);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -82,18 +106,45 @@ static void *mlx5_ib_rep_to_dev(struct mlx5_eswitch_rep *rep)
|
||||
static void
|
||||
mlx5_ib_vport_rep_unload(struct mlx5_eswitch_rep *rep)
|
||||
{
|
||||
struct mlx5_core_dev *mdev = mlx5_eswitch_get_core_dev(rep->esw);
|
||||
struct mlx5_ib_dev *dev = mlx5_ib_rep_to_dev(rep);
|
||||
int vport_index = rep->vport_index;
|
||||
struct mlx5_ib_port *port;
|
||||
|
||||
port = &dev->port[rep->vport_index];
|
||||
if (WARN_ON(!mdev))
|
||||
return;
|
||||
|
||||
if (mlx5_lag_is_shared_fdb(mdev) &&
|
||||
!mlx5_lag_is_master(mdev)) {
|
||||
struct mlx5_core_dev *peer_mdev;
|
||||
|
||||
if (rep->vport == MLX5_VPORT_UPLINK)
|
||||
return;
|
||||
peer_mdev = mlx5_lag_get_peer_mdev(mdev);
|
||||
vport_index += mlx5_eswitch_get_total_vports(peer_mdev);
|
||||
}
|
||||
|
||||
if (!dev)
|
||||
return;
|
||||
|
||||
port = &dev->port[vport_index];
|
||||
write_lock(&port->roce.netdev_lock);
|
||||
port->roce.netdev = NULL;
|
||||
write_unlock(&port->roce.netdev_lock);
|
||||
rep->rep_data[REP_IB].priv = NULL;
|
||||
port->rep = NULL;
|
||||
|
||||
if (rep->vport == MLX5_VPORT_UPLINK)
|
||||
if (rep->vport == MLX5_VPORT_UPLINK) {
|
||||
struct mlx5_core_dev *peer_mdev;
|
||||
struct mlx5_eswitch *esw;
|
||||
|
||||
if (mlx5_lag_is_shared_fdb(mdev)) {
|
||||
peer_mdev = mlx5_lag_get_peer_mdev(mdev);
|
||||
esw = peer_mdev->priv.eswitch;
|
||||
mlx5_eswitch_unregister_vport_reps(esw, REP_IB);
|
||||
}
|
||||
__mlx5_ib_remove(dev, dev->profile, MLX5_IB_STAGE_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct mlx5_eswitch_rep_ops rep_ops = {
|
||||
@ -102,6 +153,18 @@ static const struct mlx5_eswitch_rep_ops rep_ops = {
|
||||
.get_proto_dev = mlx5_ib_rep_to_dev,
|
||||
};
|
||||
|
||||
static void mlx5_ib_register_peer_vport_reps(struct mlx5_core_dev *mdev)
|
||||
{
|
||||
struct mlx5_core_dev *peer_mdev = mlx5_lag_get_peer_mdev(mdev);
|
||||
struct mlx5_eswitch *esw;
|
||||
|
||||
if (!peer_mdev)
|
||||
return;
|
||||
|
||||
esw = peer_mdev->priv.eswitch;
|
||||
mlx5_eswitch_register_vport_reps(esw, &rep_ops, REP_IB);
|
||||
}
|
||||
|
||||
struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
|
||||
u16 vport_num)
|
||||
{
|
||||
@ -123,7 +186,7 @@ struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
|
||||
|
||||
rep = dev->port[port - 1].rep;
|
||||
|
||||
return mlx5_eswitch_add_send_to_vport_rule(esw, rep, sq->base.mqp.qpn);
|
||||
return mlx5_eswitch_add_send_to_vport_rule(esw, esw, rep, sq->base.mqp.qpn);
|
||||
}
|
||||
|
||||
static int mlx5r_rep_probe(struct auxiliary_device *adev,
|
||||
|
@ -126,6 +126,7 @@ static int get_port_state(struct ib_device *ibdev,
|
||||
|
||||
static struct mlx5_roce *mlx5_get_rep_roce(struct mlx5_ib_dev *dev,
|
||||
struct net_device *ndev,
|
||||
struct net_device *upper,
|
||||
u32 *port_num)
|
||||
{
|
||||
struct net_device *rep_ndev;
|
||||
@ -137,6 +138,14 @@ static struct mlx5_roce *mlx5_get_rep_roce(struct mlx5_ib_dev *dev,
|
||||
if (!port->rep)
|
||||
continue;
|
||||
|
||||
if (upper == ndev && port->rep->vport == MLX5_VPORT_UPLINK) {
|
||||
*port_num = i + 1;
|
||||
return &port->roce;
|
||||
}
|
||||
|
||||
if (upper && port->rep->vport == MLX5_VPORT_UPLINK)
|
||||
continue;
|
||||
|
||||
read_lock(&port->roce.netdev_lock);
|
||||
rep_ndev = mlx5_ib_get_rep_netdev(port->rep->esw,
|
||||
port->rep->vport);
|
||||
@ -196,11 +205,12 @@ static int mlx5_netdev_event(struct notifier_block *this,
|
||||
}
|
||||
|
||||
if (ibdev->is_rep)
|
||||
roce = mlx5_get_rep_roce(ibdev, ndev, &port_num);
|
||||
roce = mlx5_get_rep_roce(ibdev, ndev, upper, &port_num);
|
||||
if (!roce)
|
||||
return NOTIFY_DONE;
|
||||
if ((upper == ndev || (!upper && ndev == roce->netdev))
|
||||
&& ibdev->ib_active) {
|
||||
if ((upper == ndev ||
|
||||
((!upper || ibdev->is_rep) && ndev == roce->netdev)) &&
|
||||
ibdev->ib_active) {
|
||||
struct ib_event ibev = { };
|
||||
enum ib_port_state port_state;
|
||||
|
||||
@ -3012,7 +3022,7 @@ static int mlx5_eth_lag_init(struct mlx5_ib_dev *dev)
|
||||
struct mlx5_flow_table *ft;
|
||||
int err;
|
||||
|
||||
if (!ns || !mlx5_lag_is_roce(mdev))
|
||||
if (!ns || !mlx5_lag_is_active(mdev))
|
||||
return 0;
|
||||
|
||||
err = mlx5_cmd_create_vport_lag(mdev);
|
||||
@ -3074,9 +3084,11 @@ static int mlx5_enable_eth(struct mlx5_ib_dev *dev)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = mlx5_nic_vport_enable_roce(dev->mdev);
|
||||
if (err)
|
||||
return err;
|
||||
if (!dev->is_rep && dev->profile != &raw_eth_profile) {
|
||||
err = mlx5_nic_vport_enable_roce(dev->mdev);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
err = mlx5_eth_lag_init(dev);
|
||||
if (err)
|
||||
@ -3085,7 +3097,8 @@ static int mlx5_enable_eth(struct mlx5_ib_dev *dev)
|
||||
return 0;
|
||||
|
||||
err_disable_roce:
|
||||
mlx5_nic_vport_disable_roce(dev->mdev);
|
||||
if (!dev->is_rep && dev->profile != &raw_eth_profile)
|
||||
mlx5_nic_vport_disable_roce(dev->mdev);
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -3093,7 +3106,8 @@ err_disable_roce:
|
||||
static void mlx5_disable_eth(struct mlx5_ib_dev *dev)
|
||||
{
|
||||
mlx5_eth_lag_cleanup(dev);
|
||||
mlx5_nic_vport_disable_roce(dev->mdev);
|
||||
if (!dev->is_rep && dev->profile != &raw_eth_profile)
|
||||
mlx5_nic_vport_disable_roce(dev->mdev);
|
||||
}
|
||||
|
||||
static int mlx5_ib_rn_get_params(struct ib_device *device, u32 port_num,
|
||||
@ -3950,12 +3964,7 @@ static int mlx5_ib_roce_init(struct mlx5_ib_dev *dev)
|
||||
|
||||
/* Register only for native ports */
|
||||
err = mlx5_add_netdev_notifier(dev, port_num);
|
||||
if (err || dev->is_rep || !mlx5_is_roce_init_enabled(mdev))
|
||||
/*
|
||||
* We don't enable ETH interface for
|
||||
* 1. IB representors
|
||||
* 2. User disabled ROCE through devlink interface
|
||||
*/
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mlx5_enable_eth(dev);
|
||||
@ -3980,8 +3989,7 @@ static void mlx5_ib_roce_cleanup(struct mlx5_ib_dev *dev)
|
||||
ll = mlx5_port_type_cap_to_rdma_ll(port_type_cap);
|
||||
|
||||
if (ll == IB_LINK_LAYER_ETHERNET) {
|
||||
if (!dev->is_rep)
|
||||
mlx5_disable_eth(dev);
|
||||
mlx5_disable_eth(dev);
|
||||
|
||||
port_num = mlx5_core_native_port_num(dev->mdev) - 1;
|
||||
mlx5_remove_netdev_notifier(dev, port_num);
|
||||
@ -4037,7 +4045,7 @@ static int mlx5_ib_stage_ib_reg_init(struct mlx5_ib_dev *dev)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
if (!mlx5_lag_is_roce(dev->mdev))
|
||||
if (!mlx5_lag_is_active(dev->mdev))
|
||||
name = "mlx5_%d";
|
||||
else
|
||||
name = "mlx5_bond_%d";
|
||||
|
@ -114,14 +114,18 @@ out:
|
||||
static int fill_switchdev_info(struct mlx5_ib_dev *dev, u32 port_num,
|
||||
struct mlx5_ib_uapi_query_port *info)
|
||||
{
|
||||
struct mlx5_core_dev *mdev = dev->mdev;
|
||||
struct mlx5_eswitch_rep *rep;
|
||||
struct mlx5_core_dev *mdev;
|
||||
int err;
|
||||
|
||||
rep = dev->port[port_num - 1].rep;
|
||||
if (!rep)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mdev = mlx5_eswitch_get_core_dev(rep->esw);
|
||||
if (!mdev)
|
||||
return -EINVAL;
|
||||
|
||||
info->vport = rep->vport;
|
||||
info->flags |= MLX5_IB_UAPI_QUERY_PORT_VPORT;
|
||||
|
||||
@ -138,9 +142,9 @@ static int fill_switchdev_info(struct mlx5_ib_dev *dev, u32 port_num,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (mlx5_eswitch_vport_match_metadata_enabled(mdev->priv.eswitch)) {
|
||||
if (mlx5_eswitch_vport_match_metadata_enabled(rep->esw)) {
|
||||
info->reg_c0.value = mlx5_eswitch_get_vport_metadata_for_match(
|
||||
mdev->priv.eswitch, rep->vport);
|
||||
rep->esw, rep->vport);
|
||||
info->reg_c0.mask = mlx5_eswitch_get_vport_metadata_mask();
|
||||
info->flags |= MLX5_IB_UAPI_QUERY_PORT_VPORT_REG_C0;
|
||||
}
|
||||
|
@ -72,7 +72,9 @@ static void ipoib_get_drvinfo(struct net_device *netdev,
|
||||
}
|
||||
|
||||
static int ipoib_get_coalesce(struct net_device *dev,
|
||||
struct ethtool_coalesce *coal)
|
||||
struct ethtool_coalesce *coal,
|
||||
struct kernel_ethtool_coalesce *kernel_coal,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ipoib_dev_priv *priv = ipoib_priv(dev);
|
||||
|
||||
@ -83,7 +85,9 @@ static int ipoib_get_coalesce(struct net_device *dev,
|
||||
}
|
||||
|
||||
static int ipoib_set_coalesce(struct net_device *dev,
|
||||
struct ethtool_coalesce *coal)
|
||||
struct ethtool_coalesce *coal,
|
||||
struct kernel_ethtool_coalesce *kernel_coal,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ipoib_dev_priv *priv = ipoib_priv(dev);
|
||||
int ret;
|
||||
|
@ -1745,10 +1745,10 @@ static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
|
||||
{
|
||||
struct ipoib_dev_priv *priv = ipoib_priv(dev);
|
||||
|
||||
if (!priv->rn_ops->ndo_do_ioctl)
|
||||
if (!priv->rn_ops->ndo_eth_ioctl)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return priv->rn_ops->ndo_do_ioctl(dev, ifr, cmd);
|
||||
return priv->rn_ops->ndo_eth_ioctl(dev, ifr, cmd);
|
||||
}
|
||||
|
||||
static int ipoib_dev_init(struct net_device *dev)
|
||||
@ -2078,7 +2078,7 @@ static const struct net_device_ops ipoib_netdev_ops_pf = {
|
||||
.ndo_set_vf_guid = ipoib_set_vf_guid,
|
||||
.ndo_set_mac_address = ipoib_set_mac,
|
||||
.ndo_get_stats64 = ipoib_get_stats,
|
||||
.ndo_do_ioctl = ipoib_ioctl,
|
||||
.ndo_eth_ioctl = ipoib_ioctl,
|
||||
};
|
||||
|
||||
static const struct net_device_ops ipoib_netdev_ops_vf = {
|
||||
@ -2093,7 +2093,7 @@ static const struct net_device_ops ipoib_netdev_ops_vf = {
|
||||
.ndo_set_rx_mode = ipoib_set_mcast_list,
|
||||
.ndo_get_iflink = ipoib_get_iflink,
|
||||
.ndo_get_stats64 = ipoib_get_stats,
|
||||
.ndo_do_ioctl = ipoib_ioctl,
|
||||
.ndo_eth_ioctl = ipoib_ioctl,
|
||||
};
|
||||
|
||||
static const struct net_device_ops ipoib_netdev_default_pf = {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user