Networking changes for 6.14.
Core ---- - More core refactoring to reduce the RTNL lock contention, including preparatory work for the per-network namespace RTNL lock, replacing RTNL lock with a per device-one to protect NAPI-related net device data and moving synchronize_net() calls outside such lock. - Extend drop reasons usage, adding net scheduler, AF_UNIX, bridge and more specific TCP coverage. - Reduce network namespace tear-down time by removing per-subsystems synchronize_net() in tipc and sched. - Add flow label selector support for fib rules, allowing traffic redirection based on such header field. Netfilter --------- - Do not remove netdev basechain when last device is gone, allowing netdev basechains without devices. - Revisit the flowtable teardown strategy, dealing better with fin, reset and re-open events. - Scale-up IP-vs connection dumping by avoiding linear search on each restart. Protocols --------- - A significant XDP socket refactor, consolidating and optimizing several helpers into the core - Better scaling of ICMP rate-limiting, by removing false-sharing in inet peers handling. - Introduces netlink notifications for multicast IPv4 and IPv6 address changes. - Add ipsec support for IP-TFS/AggFrag encapsulation, allowing aggregation and fragmentation of the inner IP. - Add sysctl to configure TIME-WAIT reuse delay for TCP sockets, to avoid local port exhaustion issues when the average connection lifetime is very short. - Support updating keys (re-keying) for connections using kernel TLS (for TLS 1.3 only). - Support ipv4-mapped ipv6 address clients in smc-r v2. - Add support for jumbo data packet transmission in RxRPC sockets, gluing multiple data packets in a single UDP packet. - Support RxRPC RACK-TLP to manage packet loss and retransmission in conjunction with the congestion control algorithm. Driver API ---------- - Introduce a unified and structured interface for reporting PHY statistics, exposing consistent data across different H/W via ethtool. - Make timestamping selectable, allow the user to select the desired hwtstamp provider (PHY or MAC) administratively. - Add support for configuring a header-data-split threshold (HDS) value via ethtool, to deal with partial or buggy H/W implementation. - Consolidate DSA drivers Energy Efficiency Ethernet support. - Add EEE management to phylink, making use of the phylib implementation. - Add phylib support for in-band capabilities negotiation. - Simplify how phylib-enabled mac drivers expose the supported interfaces. Tests and tooling ----------------- - Make the YNL tool package-friendly to make it easier to deploy it separately from the kernel. - Increase TCP selftest coverage importing several packetdrill test-cases. - Regenerate the ethtool uapi header from the YNL spec, to ease maintenance and future development. - Add YNL support for decoding the link types used in net self-tests, allowing a single build to run both net and drivers/net. Drivers ------- - Ethernet high-speed NICs: - nVidia/Mellanox (mlx5): - add cross E-Switch QoS support - add SW Steering support for ConnectX-8 - implement support for HW-Managed Flow Steering, improving the rule deletion/insertion rate - support for multi-host LAG - Intel (ixgbe, ice, igb): - ice: add support for devlink health events - ixgbe: add initial support for E610 chipset variant - igb: add support for AF_XDP zero-copy - Meta: - add support for basic RSS config - allow changing the number of channels - add hardware monitoring support - Broadcom (bnxt): - implement TCP data split and HDS threshold ethtool support, enabling Device Memory TCP. - Marvell Octeon: - implement egress ipsec offload support for the cn10k family - Hisilicon (HIBMC): - implement unicast MAC filtering - Ethernet NICs embedded and virtual: - Convert UDP tunnel drivers to NETDEV_PCPU_STAT_DSTATS, avoiding contented atomic operations for drop counters - Freescale: - quicc: phylink conversion - enetc: support Tx and Rx checksum offload and improve TSO performances - MediaTek: - airoha: introduce support for ETS and HTB Qdisc offload - Microchip: - lan78XX USB: preparation work for phylink conversion - Synopsys (stmmac): - support DWMAC IP on NXP Automotive SoCs S32G2xx/S32G3xx/S32R45 - refactor EEE support to leverage the new driver API - optimize DMA and cache access to increase raw RX performances by 40% - TI: - icssg-prueth: add multicast filtering support for VLAN interface - netkit: - add ability to configure head/tailroom - VXLAN: - accepts packets with user-defined reserved bit - Ethernet switches: - Microchip: - lan969x: add RGMII support - lan969x: improve TX and RX performance using the FDMA engine - nVidia/Mellanox: - move Tx header handling to PCI driver, to ease XDP support - Ethernet PHYs: - Texas Instruments DP83822: - add support for GPIO2 clock output - Realtek: - 8169: add support for RTL8125D rev.b - rtl822x: add hwmon support for the temperature sensor - Microchip: - add support for RDS PTP hardware - consolidate periodic output signal generation - CAN: - several DT-bindings to DT schema conversions - tcan4x5x: - add HW standby support - support nWKRQ voltage selection - kvaser: - allowing Bus Error Reporting runtime configuration - WiFi: - the on-going Multi-Link Operation (MLO) effort continues, affecting both the stack and in drivers - mac80211/cfg80211: - Emergency Preparedness Communication Services (EPCS) station mode support - support for adding and removing station links for MLO - add support for WiFi 7/EHT mesh over 320 MHz channels - report Tx power info for each link - RealTek (rtw88): - enable USB Rx aggregation and USB 3 to improve performance - LED support - RealTek (rtw89): - refactor power save to support Multi-Link Operations - add support for RTL8922AE-VS variant - MediaTek (mt76): - single wiphy multiband support (preparation for MLO) - p2p device support - add TP-Link TXE50UH USB adapter support - Qualcomm (ath10k): - support for the QCA6698AQ IP core - Qualcomm (ath12k): - enable MLO for QCN9274 - Bluetooth: - Allow sysfs to trigger hdev reset, to allow recovering devices not responsive from user-space - MediaTek: add support for MT7922, MT7925, MT7921e devices - Realtek: add support for RTL8851BE devices - Qualcomm: add support for WCN785x devices - ISO: allow BIG re-sync Signed-off-by: Paolo Abeni <pabeni@redhat.com> -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEg1AjqC77wbdLX2LbKSR5jcyPE6QFAmePf5YSHHBhYmVuaUBy ZWRoYXQuY29tAAoJECkkeY3MjxOkUcMQALblhkGTxurnfT+yK+Bsuhn2LoHl2RPN 4u2Kjkzm+2FYgcw6lS17cFXsnfAPlRIpmhnmKk1EBgsBdkuL29c+jtqnljA2bboD tIMhMgWiaLS3xgEMrLeKnseIo0G9mviQRphGeZPFTaLb4Ww/bd5LAp4ZGc5oij76 tURatC3b6MuO4Lt5U+jWKnRwviXku8udHkVHXlvPdirawHCVinmx3tvce/BI/MaD eUOp6ZeJCPCOLtk7b8WEyxxvdY0f6D9ed82qfPDHjb94SJv+Vxb38RZtNuApIjn9 S0KdlNih/4flDy17LDxGYSyFps78lUFRbpqmsUlnZkyLXpsph7/WTvAmMAFcrX0K UgQ/F/q5GAvcP5WZcCj5+tZaRmfKQraQirXMtYU/Uj50qCnSU7ssyACASt23GLZ8 OF8tCLlm9lLOU1B6Ofkul1Dbo5f0Xpaghga4dFb0kzSfbm78fTUnqBNsJ7jIkWfi fD6dO+fg+p2ZMD0CACGo3CNxQuJmaQWg6BIDeno6God8kZ6qBMxY/sFr4qozrvFH x/FgQq8dgc8WLmaPejKiNIPkdQepXrIiv3T9jgMVyEjJnWB/LBfyWKSQOdTfnLs+ rgr4YMV6XW4bx0fYqTI8B9jZ+FCWbG6sn4UtRTHITKcd3FSvd8Y+PHa5YyCUWvJM l8pePMGF0XVF =hrsp -----END PGP SIGNATURE----- Merge tag 'net-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "This is slightly smaller than usual, with the most interesting work being still around RTNL scope reduction. Core: - More core refactoring to reduce the RTNL lock contention, including preparatory work for the per-network namespace RTNL lock, replacing RTNL lock with a per device-one to protect NAPI-related net device data and moving synchronize_net() calls outside such lock. - Extend drop reasons usage, adding net scheduler, AF_UNIX, bridge and more specific TCP coverage. - Reduce network namespace tear-down time by removing per-subsystems synchronize_net() in tipc and sched. - Add flow label selector support for fib rules, allowing traffic redirection based on such header field. Netfilter: - Do not remove netdev basechain when last device is gone, allowing netdev basechains without devices. - Revisit the flowtable teardown strategy, dealing better with fin, reset and re-open events. - Scale-up IP-vs connection dumping by avoiding linear search on each restart. Protocols: - A significant XDP socket refactor, consolidating and optimizing several helpers into the core - Better scaling of ICMP rate-limiting, by removing false-sharing in inet peers handling. - Introduces netlink notifications for multicast IPv4 and IPv6 address changes. - Add ipsec support for IP-TFS/AggFrag encapsulation, allowing aggregation and fragmentation of the inner IP. - Add sysctl to configure TIME-WAIT reuse delay for TCP sockets, to avoid local port exhaustion issues when the average connection lifetime is very short. - Support updating keys (re-keying) for connections using kernel TLS (for TLS 1.3 only). - Support ipv4-mapped ipv6 address clients in smc-r v2. - Add support for jumbo data packet transmission in RxRPC sockets, gluing multiple data packets in a single UDP packet. - Support RxRPC RACK-TLP to manage packet loss and retransmission in conjunction with the congestion control algorithm. Driver API: - Introduce a unified and structured interface for reporting PHY statistics, exposing consistent data across different H/W via ethtool. - Make timestamping selectable, allow the user to select the desired hwtstamp provider (PHY or MAC) administratively. - Add support for configuring a header-data-split threshold (HDS) value via ethtool, to deal with partial or buggy H/W implementation. - Consolidate DSA drivers Energy Efficiency Ethernet support. - Add EEE management to phylink, making use of the phylib implementation. - Add phylib support for in-band capabilities negotiation. - Simplify how phylib-enabled mac drivers expose the supported interfaces. Tests and tooling: - Make the YNL tool package-friendly to make it easier to deploy it separately from the kernel. - Increase TCP selftest coverage importing several packetdrill test-cases. - Regenerate the ethtool uapi header from the YNL spec, to ease maintenance and future development. - Add YNL support for decoding the link types used in net self-tests, allowing a single build to run both net and drivers/net. Drivers: - Ethernet high-speed NICs: - nVidia/Mellanox (mlx5): - add cross E-Switch QoS support - add SW Steering support for ConnectX-8 - implement support for HW-Managed Flow Steering, improving the rule deletion/insertion rate - support for multi-host LAG - Intel (ixgbe, ice, igb): - ice: add support for devlink health events - ixgbe: add initial support for E610 chipset variant - igb: add support for AF_XDP zero-copy - Meta: - add support for basic RSS config - allow changing the number of channels - add hardware monitoring support - Broadcom (bnxt): - implement TCP data split and HDS threshold ethtool support, enabling Device Memory TCP. - Marvell Octeon: - implement egress ipsec offload support for the cn10k family - Hisilicon (HIBMC): - implement unicast MAC filtering - Ethernet NICs embedded and virtual: - Convert UDP tunnel drivers to NETDEV_PCPU_STAT_DSTATS, avoiding contented atomic operations for drop counters - Freescale: - quicc: phylink conversion - enetc: support Tx and Rx checksum offload and improve TSO performances - MediaTek: - airoha: introduce support for ETS and HTB Qdisc offload - Microchip: - lan78XX USB: preparation work for phylink conversion - Synopsys (stmmac): - support DWMAC IP on NXP Automotive SoCs S32G2xx/S32G3xx/S32R45 - refactor EEE support to leverage the new driver API - optimize DMA and cache access to increase raw RX performances by 40% - TI: - icssg-prueth: add multicast filtering support for VLAN interface - netkit: - add ability to configure head/tailroom - VXLAN: - accepts packets with user-defined reserved bit - Ethernet switches: - Microchip: - lan969x: add RGMII support - lan969x: improve TX and RX performance using the FDMA engine - nVidia/Mellanox: - move Tx header handling to PCI driver, to ease XDP support - Ethernet PHYs: - Texas Instruments DP83822: - add support for GPIO2 clock output - Realtek: - 8169: add support for RTL8125D rev.b - rtl822x: add hwmon support for the temperature sensor - Microchip: - add support for RDS PTP hardware - consolidate periodic output signal generation - CAN: - several DT-bindings to DT schema conversions - tcan4x5x: - add HW standby support - support nWKRQ voltage selection - kvaser: - allowing Bus Error Reporting runtime configuration - WiFi: - the on-going Multi-Link Operation (MLO) effort continues, affecting both the stack and in drivers - mac80211/cfg80211: - Emergency Preparedness Communication Services (EPCS) station mode support - support for adding and removing station links for MLO - add support for WiFi 7/EHT mesh over 320 MHz channels - report Tx power info for each link - RealTek (rtw88): - enable USB Rx aggregation and USB 3 to improve performance - LED support - RealTek (rtw89): - refactor power save to support Multi-Link Operations - add support for RTL8922AE-VS variant - MediaTek (mt76): - single wiphy multiband support (preparation for MLO) - p2p device support - add TP-Link TXE50UH USB adapter support - Qualcomm (ath10k): - support for the QCA6698AQ IP core - Qualcomm (ath12k): - enable MLO for QCN9274 - Bluetooth: - Allow sysfs to trigger hdev reset, to allow recovering devices not responsive from user-space - MediaTek: add support for MT7922, MT7925, MT7921e devices - Realtek: add support for RTL8851BE devices - Qualcomm: add support for WCN785x devices - ISO: allow BIG re-sync" * tag 'net-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1386 commits) net/rose: prevent integer overflows in rose_setsockopt() net: phylink: fix regression when binding a PHY net: ethernet: ti: am65-cpsw: streamline TX queue creation and cleanup net: ethernet: ti: am65-cpsw: streamline RX queue creation and cleanup net: ethernet: ti: am65-cpsw: ensure proper channel cleanup in error path ipv6: Convert inet6_rtm_deladdr() to per-netns RTNL. ipv6: Convert inet6_rtm_newaddr() to per-netns RTNL. ipv6: Move lifetime validation to inet6_rtm_newaddr(). ipv6: Set cfg.ifa_flags before device lookup in inet6_rtm_newaddr(). ipv6: Pass dev to inet6_addr_add(). ipv6: Convert inet6_ioctl() to per-netns RTNL. ipv6: Hold rtnl_net_lock() in addrconf_init() and addrconf_cleanup(). ipv6: Hold rtnl_net_lock() in addrconf_dad_work(). ipv6: Hold rtnl_net_lock() in addrconf_verify_work(). ipv6: Convert net.ipv6.conf.${DEV}.XXX sysctl to per-netns RTNL. ipv6: Add __in6_dev_get_rtnl_net(). net: stmmac: Drop redundant skb_mark_for_recycle() for SKB frags net: mii: Fix the Speed display when the network cable is not connected sysctl net: Remove macro checks for CONFIG_SYSCTL eth: bnxt: update header sizing defaults ...
This commit is contained in:
commit
0ad9617c78
1383 changed files with 63735 additions and 18929 deletions
21
.mailmap
21
.mailmap
|
@ -83,6 +83,13 @@ Anirudh Ghayal <quic_aghayal@quicinc.com> <aghayal@codeaurora.org>
|
|||
Antoine Tenart <atenart@kernel.org> <antoine.tenart@bootlin.com>
|
||||
Antoine Tenart <atenart@kernel.org> <antoine.tenart@free-electrons.com>
|
||||
Antonio Ospite <ao2@ao2.it> <ao2@amarulasolutions.com>
|
||||
Antonio Quartulli <antonio@mandelbit.com> <antonio@meshcoding.com>
|
||||
Antonio Quartulli <antonio@mandelbit.com> <antonio@open-mesh.com>
|
||||
Antonio Quartulli <antonio@mandelbit.com> <antonio.quartulli@open-mesh.com>
|
||||
Antonio Quartulli <antonio@mandelbit.com> <ordex@autistici.org>
|
||||
Antonio Quartulli <antonio@mandelbit.com> <ordex@ritirata.org>
|
||||
Antonio Quartulli <antonio@mandelbit.com> <antonio@openvpn.net>
|
||||
Antonio Quartulli <antonio@mandelbit.com> <a@unstable.cc>
|
||||
Anup Patel <anup@brainfault.org> <anup.patel@wdc.com>
|
||||
Archit Taneja <archit@ti.com>
|
||||
Ard Biesheuvel <ardb@kernel.org> <ard.biesheuvel@linaro.org>
|
||||
|
@ -430,6 +437,8 @@ Marcin Nowakowski <marcin.nowakowski@mips.com> <marcin.nowakowski@imgtec.com>
|
|||
Marc Zyngier <maz@kernel.org> <marc.zyngier@arm.com>
|
||||
Marek Behún <kabel@kernel.org> <marek.behun@nic.cz>
|
||||
Marek Behún <kabel@kernel.org> Marek Behun <marek.behun@nic.cz>
|
||||
Marek Lindner <marek.lindner@mailbox.org> <lindner_marek@yahoo.de>
|
||||
Marek Lindner <marek.lindner@mailbox.org> <mareklindner@neomailbox.ch>
|
||||
Mark Brown <broonie@sirena.org.uk>
|
||||
Mark Starovoytov <mstarovo@pm.me> <mstarovoitov@marvell.com>
|
||||
Markus Schneider-Pargmann <msp@baylibre.com> <mpa@pengutronix.de>
|
||||
|
@ -532,6 +541,8 @@ Oleksij Rempel <linux@rempel-privat.de> <external.Oleksij.Rempel@de.bosch.com>
|
|||
Oleksij Rempel <linux@rempel-privat.de> <fixed-term.Oleksij.Rempel@de.bosch.com>
|
||||
Oleksij Rempel <o.rempel@pengutronix.de>
|
||||
Oleksij Rempel <o.rempel@pengutronix.de> <ore@pengutronix.de>
|
||||
Oliver Hartkopp <socketcan@hartkopp.net> <oliver.hartkopp@volkswagen.de>
|
||||
Oliver Hartkopp <socketcan@hartkopp.net> <oliver@hartkopp.net>
|
||||
Oliver Upton <oliver.upton@linux.dev> <oupton@google.com>
|
||||
Ondřej Jirman <megi@xff.cz> <megous@megous.com>
|
||||
Oza Pawandeep <quic_poza@quicinc.com> <poza@codeaurora.org>
|
||||
|
@ -643,6 +654,11 @@ Simona Vetter <simona.vetter@ffwll.ch> <daniel@biene.ffwll.ch>
|
|||
Simon Horman <horms@kernel.org> <simon.horman@corigine.com>
|
||||
Simon Horman <horms@kernel.org> <simon.horman@netronome.com>
|
||||
Simon Kelley <simon@thekelleys.org.uk>
|
||||
Simon Wunderlich <sw@simonwunderlich.de> <simon.wunderlich@open-mesh.com>
|
||||
Simon Wunderlich <sw@simonwunderlich.de> <simon.wunderlich@s2003.tu-chemnitz.de>
|
||||
Simon Wunderlich <sw@simonwunderlich.de> <simon.wunderlich@saxnet.de>
|
||||
Simon Wunderlich <sw@simonwunderlich.de> <simon@open-mesh.com>
|
||||
Simon Wunderlich <sw@simonwunderlich.de> <siwu@hrz.tu-chemnitz.de>
|
||||
Sricharan Ramabadhran <quic_srichara@quicinc.com> <sricharan@codeaurora.org>
|
||||
Srinivas Ramana <quic_sramana@quicinc.com> <sramana@codeaurora.org>
|
||||
Sriram R <quic_srirrama@quicinc.com> <srirrama@codeaurora.org>
|
||||
|
@ -663,6 +679,11 @@ Sudarshan Rajagopalan <quic_sudaraja@quicinc.com> <sudaraja@codeaurora.org>
|
|||
Sudeep Holla <sudeep.holla@arm.com> Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
|
||||
Sumit Semwal <sumit.semwal@ti.com>
|
||||
Surabhi Vishnoi <quic_svishnoi@quicinc.com> <svishnoi@codeaurora.org>
|
||||
Sven Eckelmann <sven@narfation.org> <seckelmann@datto.com>
|
||||
Sven Eckelmann <sven@narfation.org> <sven.eckelmann@gmx.de>
|
||||
Sven Eckelmann <sven@narfation.org> <sven.eckelmann@open-mesh.com>
|
||||
Sven Eckelmann <sven@narfation.org> <sven.eckelmann@openmesh.com>
|
||||
Sven Eckelmann <sven@narfation.org> <sven@open-mesh.com>
|
||||
Takashi YOSHII <takashi.yoshii.zj@renesas.com>
|
||||
Tamizh Chelvam Raja <quic_tamizhr@quicinc.com> <tamizhr@codeaurora.org>
|
||||
Taniya Das <quic_tdas@quicinc.com> <tdas@codeaurora.org>
|
||||
|
|
|
@ -104,7 +104,7 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
|
|||
YNL_INDEX:=$(srctree)/Documentation/networking/netlink_spec/index.rst
|
||||
YNL_RST_DIR:=$(srctree)/Documentation/networking/netlink_spec
|
||||
YNL_YAML_DIR:=$(srctree)/Documentation/netlink/specs
|
||||
YNL_TOOL:=$(srctree)/tools/net/ynl/ynl-gen-rst.py
|
||||
YNL_TOOL:=$(srctree)/tools/net/ynl/pyynl/ynl_gen_rst.py
|
||||
|
||||
YNL_RST_FILES_TMP := $(patsubst %.yaml,%.rst,$(wildcard $(YNL_YAML_DIR)/*.yaml))
|
||||
YNL_RST_FILES := $(patsubst $(YNL_YAML_DIR)%,$(YNL_RST_DIR)%, $(YNL_RST_FILES_TMP))
|
||||
|
|
|
@ -227,11 +227,119 @@ Intended use
|
|||
|
||||
Drivers that opt to use this API first need to identify which of the above 3
|
||||
quirk combinations (for a total of 8) match what the hardware documentation
|
||||
describes. Then they should wrap the packing() function, creating a new
|
||||
xxx_packing() that calls it using the proper QUIRK_* one-hot bits set.
|
||||
describes.
|
||||
|
||||
There are 3 supported usage patterns, detailed below.
|
||||
|
||||
packing()
|
||||
^^^^^^^^^
|
||||
|
||||
This API function is deprecated.
|
||||
|
||||
The packing() function returns an int-encoded error code, which protects the
|
||||
programmer against incorrect API use. The errors are not expected to occur
|
||||
during runtime, therefore it is reasonable for xxx_packing() to return void
|
||||
and simply swallow those errors. Optionally it can dump stack or print the
|
||||
error description.
|
||||
during runtime, therefore it is reasonable to wrap packing() into a custom
|
||||
function which returns void and swallows those errors. Optionally it can
|
||||
dump stack or print the error description.
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
void my_packing(void *buf, u64 *val, int startbit, int endbit,
|
||||
size_t len, enum packing_op op)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* Adjust quirks accordingly */
|
||||
err = packing(buf, val, startbit, endbit, len, op, QUIRK_LSW32_IS_FIRST);
|
||||
if (likely(!err))
|
||||
return;
|
||||
|
||||
if (err == -EINVAL) {
|
||||
pr_err("Start bit (%d) expected to be larger than end (%d)\n",
|
||||
startbit, endbit);
|
||||
} else if (err == -ERANGE) {
|
||||
if ((startbit - endbit + 1) > 64)
|
||||
pr_err("Field %d-%d too large for 64 bits!\n",
|
||||
startbit, endbit);
|
||||
else
|
||||
pr_err("Cannot store %llx inside bits %d-%d (would truncate)\n",
|
||||
*val, startbit, endbit);
|
||||
}
|
||||
dump_stack();
|
||||
}
|
||||
|
||||
pack() and unpack()
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
These are const-correct variants of packing(), and eliminate the last "enum
|
||||
packing_op op" argument.
|
||||
|
||||
Calling pack(...) is equivalent, and preferred, to calling packing(..., PACK).
|
||||
|
||||
Calling unpack(...) is equivalent, and preferred, to calling packing(..., UNPACK).
|
||||
|
||||
pack_fields() and unpack_fields()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The library exposes optimized functions for the scenario where there are many
|
||||
fields represented in a buffer, and it encourages consumer drivers to avoid
|
||||
repetitive calls to pack() and unpack() for each field, but instead use
|
||||
pack_fields() and unpack_fields(), which reduces the code footprint.
|
||||
|
||||
These APIs use field definitions in arrays of ``struct packed_field_u8`` or
|
||||
``struct packed_field_u16``, allowing consumer drivers to minimize the size
|
||||
of these arrays according to their custom requirements.
|
||||
|
||||
The pack_fields() and unpack_fields() API functions are actually macros which
|
||||
automatically select the appropriate function at compile time, based on the
|
||||
type of the fields array passed in.
|
||||
|
||||
An additional benefit over pack() and unpack() is that sanity checks on the
|
||||
field definitions are handled at compile time with ``BUILD_BUG_ON`` rather
|
||||
than only when the offending code is executed. These functions return void and
|
||||
wrapping them to handle unexpected errors is not necessary.
|
||||
|
||||
It is recommended, but not required, that you wrap your packed buffer into a
|
||||
structured type with a fixed size. This generally makes it easier for the
|
||||
compiler to enforce that the correct size buffer is used.
|
||||
|
||||
Here is an example of how to use the fields APIs:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
/* Ordering inside the unpacked structure is flexible and can be different
|
||||
* from the packed buffer. Here, it is optimized to reduce padding.
|
||||
*/
|
||||
struct data {
|
||||
u64 field3;
|
||||
u32 field4;
|
||||
u16 field1;
|
||||
u8 field2;
|
||||
};
|
||||
|
||||
#define SIZE 13
|
||||
|
||||
typdef struct __packed { u8 buf[SIZE]; } packed_buf_t;
|
||||
|
||||
static const struct packed_field_u8 fields[] = {
|
||||
PACKED_FIELD(100, 90, struct data, field1),
|
||||
PACKED_FIELD(90, 87, struct data, field2),
|
||||
PACKED_FIELD(86, 30, struct data, field3),
|
||||
PACKED_FIELD(29, 0, struct data, field4),
|
||||
};
|
||||
|
||||
void unpack_your_data(const packed_buf_t *buf, struct data *unpacked)
|
||||
{
|
||||
BUILD_BUG_ON(sizeof(*buf) != SIZE;
|
||||
|
||||
unpack_fields(buf, sizeof(*buf), unpacked, fields,
|
||||
QUIRK_LITTLE_ENDIAN);
|
||||
}
|
||||
|
||||
void pack_your_data(const struct data *unpacked, packed_buf_t *buf)
|
||||
{
|
||||
BUILD_BUG_ON(sizeof(*buf) != SIZE;
|
||||
|
||||
pack_fields(buf, sizeof(*buf), unpacked, fields,
|
||||
QUIRK_LITTLE_ENDIAN);
|
||||
}
|
||||
|
|
|
@ -166,11 +166,11 @@ unevaluatedProperties: false
|
|||
examples:
|
||||
- |
|
||||
ethmac: ethernet@c9410000 {
|
||||
compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac";
|
||||
reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
|
||||
interrupts = <8>;
|
||||
interrupt-names = "macirq";
|
||||
clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>;
|
||||
clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment";
|
||||
phy-mode = "rgmii";
|
||||
compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac";
|
||||
reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
|
||||
interrupts = <8>;
|
||||
interrupt-names = "macirq";
|
||||
clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>;
|
||||
clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment";
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
|
|
@ -63,8 +63,8 @@ examples:
|
|||
#size-cells = <0>;
|
||||
|
||||
ethernet@1 {
|
||||
compatible = "usbb95,772b";
|
||||
reg = <1>;
|
||||
compatible = "usbb95,772b";
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -101,7 +101,10 @@ properties:
|
|||
max-speed: true
|
||||
|
||||
firmware-name:
|
||||
description: specify the name of nvm firmware to load
|
||||
minItems: 1
|
||||
items:
|
||||
- description: specify the name of nvm firmware to load
|
||||
- description: specify the name of rampatch firmware to load
|
||||
|
||||
local-bd-address: true
|
||||
|
||||
|
@ -154,16 +157,11 @@ allOf:
|
|||
- qcom,wcn6750-bt
|
||||
then:
|
||||
required:
|
||||
- enable-gpios
|
||||
- swctrl-gpios
|
||||
- vddio-supply
|
||||
- vddaon-supply
|
||||
- vddbtcxmx-supply
|
||||
- vddrfacmn-supply
|
||||
- vddrfa0p8-supply
|
||||
- vddrfa1p7-supply
|
||||
- vddrfa1p2-supply
|
||||
- vddasd-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
|
|
@ -85,16 +85,16 @@ examples:
|
|||
#size-cells = <1>;
|
||||
|
||||
mdio0: mdio@e14 {
|
||||
compatible = "brcm,genet-mdio-v4";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xe14 0x8>;
|
||||
compatible = "brcm,genet-mdio-v4";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xe14 0x8>;
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
phy1: ethernet-phy@1 {
|
||||
max-speed = <1000>;
|
||||
reg = <1>;
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -110,10 +110,10 @@ examples:
|
|||
interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>;
|
||||
|
||||
mdio1: mdio@e14 {
|
||||
compatible = "brcm,genet-mdio-v4";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xe14 0x8>;
|
||||
compatible = "brcm,genet-mdio-v4";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xe14 0x8>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -129,15 +129,15 @@ examples:
|
|||
interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>;
|
||||
|
||||
mdio2: mdio@e14 {
|
||||
compatible = "brcm,genet-mdio-v4";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xe14 0x8>;
|
||||
compatible = "brcm,genet-mdio-v4";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0xe14 0x8>;
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
phy0: ethernet-phy@0 {
|
||||
max-speed = <1000>;
|
||||
reg = <0>;
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -38,43 +38,43 @@ unevaluatedProperties: false
|
|||
|
||||
examples:
|
||||
- |
|
||||
mdio_mux_iproc: mdio-mux@66020000 {
|
||||
mdio-mux@66020000 {
|
||||
compatible = "brcm,mdio-mux-iproc";
|
||||
reg = <0x66020000 0x250>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mdio@0 {
|
||||
reg = <0x0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pci_phy0: pci-phy@0 {
|
||||
compatible = "brcm,ns2-pcie-phy";
|
||||
reg = <0x0>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
pci-phy@0 {
|
||||
compatible = "brcm,ns2-pcie-phy";
|
||||
reg = <0x0>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio@7 {
|
||||
reg = <0x7>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x7>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pci_phy1: pci-phy@0 {
|
||||
compatible = "brcm,ns2-pcie-phy";
|
||||
reg = <0x0>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
pci-phy@0 {
|
||||
compatible = "brcm,ns2-pcie-phy";
|
||||
reg = <0x0>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio@10 {
|
||||
reg = <0x10>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x10>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
gphy0: eth-phy@10 {
|
||||
reg = <0x10>;
|
||||
};
|
||||
eth-phy@10 {
|
||||
reg = <0x10>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/can/atmel,at91sam9263-can.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Microchip AT91 CAN Controller
|
||||
|
||||
maintainers:
|
||||
- Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
|
||||
allOf:
|
||||
- $ref: can-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- enum:
|
||||
- atmel,at91sam9263-can
|
||||
- atmel,at91sam9x5-can
|
||||
- items:
|
||||
- enum:
|
||||
- microchip,sam9x60-can
|
||||
- const: atmel,at91sam9x5-can
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: can_clk
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/clock/at91.h>
|
||||
can@f000c000 {
|
||||
compatible = "atmel,at91sam9263-can";
|
||||
reg = <0xf000c000 0x300>;
|
||||
interrupts = <30 IRQ_TYPE_LEVEL_HIGH 3>;
|
||||
clocks = <&pmc PMC_TYPE_PERIPHERAL 12>;
|
||||
clock-names = "can_clk";
|
||||
};
|
|
@ -1,15 +0,0 @@
|
|||
* AT91 CAN *
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "atmel,at91sam9263-can", "atmel,at91sam9x5-can" or
|
||||
"microchip,sam9x60-can"
|
||||
- reg: Should contain CAN controller registers location and length
|
||||
- interrupts: Should contain IRQ line for the CAN controller
|
||||
|
||||
Example:
|
||||
|
||||
can0: can@f000c000 {
|
||||
compatible = "atmel,at91sam9x5-can";
|
||||
reg = <0xf000c000 0x300>;
|
||||
interrupts = <40 4 5>
|
||||
};
|
|
@ -99,11 +99,11 @@ 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>;
|
||||
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 {
|
||||
|
|
|
@ -56,15 +56,15 @@ examples:
|
|||
#size-cells = <0>;
|
||||
|
||||
can@1 {
|
||||
compatible = "microchip,mcp2515";
|
||||
reg = <1>;
|
||||
clocks = <&clk24m>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
|
||||
vdd-supply = <®5v0>;
|
||||
xceiver-supply = <®5v0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
compatible = "microchip,mcp2515";
|
||||
reg = <1>;
|
||||
clocks = <&clk24m>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
|
||||
vdd-supply = <®5v0>;
|
||||
xceiver-supply = <®5v0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -15,7 +15,11 @@ allOf:
|
|||
|
||||
properties:
|
||||
compatible:
|
||||
const: microchip,mpfs-can
|
||||
oneOf:
|
||||
- items:
|
||||
- const: microchip,pic64gx-can
|
||||
- const: microchip,mpfs-can
|
||||
- const: microchip,mpfs-can
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
|
|
@ -63,7 +63,7 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
st,gcan:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
The phandle to the gcan node which allows to access the 512-bytes
|
||||
SRAM memory shared by the two bxCAN cells (CAN1 primary and CAN2
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
Texas Instruments TCAN4x5x CAN Controller
|
||||
================================================
|
||||
|
||||
This file provides device node information for the TCAN4x5x interface contains.
|
||||
|
||||
Required properties:
|
||||
- compatible:
|
||||
"ti,tcan4552", "ti,tcan4x5x"
|
||||
"ti,tcan4553", "ti,tcan4x5x" or
|
||||
"ti,tcan4x5x"
|
||||
- reg: 0
|
||||
- #address-cells: 1
|
||||
- #size-cells: 0
|
||||
- spi-max-frequency: Maximum frequency of the SPI bus the chip can
|
||||
operate at should be less than or equal to 18 MHz.
|
||||
- interrupt-parent: the phandle to the interrupt controller which provides
|
||||
the interrupt.
|
||||
- interrupts: interrupt specification for data-ready.
|
||||
|
||||
See Documentation/devicetree/bindings/net/can/bosch,m_can.yaml for additional
|
||||
required property details.
|
||||
|
||||
Optional properties:
|
||||
- reset-gpios: Hardwired output GPIO. If not defined then software
|
||||
reset.
|
||||
- device-state-gpios: Input GPIO that indicates if the device is in
|
||||
a sleep state or if the device is active. Not
|
||||
available with tcan4552/4553.
|
||||
- device-wake-gpios: Wake up GPIO to wake up the TCAN device. Not
|
||||
available with tcan4552/4553.
|
||||
- wakeup-source: Leave the chip running when suspended, and configure
|
||||
the RX interrupt to wake up the device.
|
||||
|
||||
Example:
|
||||
tcan4x5x: tcan4x5x@0 {
|
||||
compatible = "ti,tcan4x5x";
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <10000000>;
|
||||
bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
|
||||
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
||||
device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
|
||||
wakeup-source;
|
||||
};
|
199
Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml
Normal file
199
Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml
Normal file
|
@ -0,0 +1,199 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/can/ti,tcan4x5x.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Texas Instruments TCAN4x5x CAN Controller
|
||||
|
||||
maintainers:
|
||||
- Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- ti,tcan4552
|
||||
- ti,tcan4553
|
||||
- const: ti,tcan4x5x
|
||||
- const: ti,tcan4x5x
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
description: The GPIO parent interrupt.
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: cclk
|
||||
|
||||
reset-gpios:
|
||||
description: Hardwired output GPIO. If not defined then software reset.
|
||||
maxItems: 1
|
||||
|
||||
device-state-gpios:
|
||||
description:
|
||||
Input GPIO that indicates if the device is in a sleep state or if the
|
||||
device is active. Not available with tcan4552/4553.
|
||||
maxItems: 1
|
||||
|
||||
device-wake-gpios:
|
||||
description:
|
||||
Wake up GPIO to wake up the TCAN device.
|
||||
Not available with tcan4552/4553.
|
||||
maxItems: 1
|
||||
|
||||
bosch,mram-cfg:
|
||||
description: |
|
||||
Message RAM configuration data.
|
||||
Multiple M_CAN instances can share the same Message RAM
|
||||
and each element(e.g Rx FIFO or Tx Buffer and etc) number
|
||||
in Message RAM is also configurable, so this property is
|
||||
telling driver how the shared or private Message RAM are
|
||||
used by this M_CAN controller.
|
||||
|
||||
The format should be as follows:
|
||||
<offset sidf_elems xidf_elems rxf0_elems rxf1_elems rxb_elems txe_elems txb_elems>
|
||||
The 'offset' is an address offset of the Message RAM where
|
||||
the following elements start from. This is usually set to
|
||||
0x0 if you're using a private Message RAM. The remain cells
|
||||
are used to specify how many elements are used for each FIFO/Buffer.
|
||||
|
||||
M_CAN includes the following elements according to user manual:
|
||||
11-bit Filter 0-128 elements / 0-128 words
|
||||
29-bit Filter 0-64 elements / 0-128 words
|
||||
Rx FIFO 0 0-64 elements / 0-1152 words
|
||||
Rx FIFO 1 0-64 elements / 0-1152 words
|
||||
Rx Buffers 0-64 elements / 0-1152 words
|
||||
Tx Event FIFO 0-32 elements / 0-64 words
|
||||
Tx Buffers 0-32 elements / 0-576 words
|
||||
|
||||
Please refer to 2.4.1 Message RAM Configuration in Bosch
|
||||
M_CAN user manual for details.
|
||||
$ref: /schemas/types.yaml#/definitions/int32-array
|
||||
items:
|
||||
- description: The 'offset' is an address offset of the Message RAM where
|
||||
the following elements start from. This is usually set to 0x0 if
|
||||
you're using a private Message RAM.
|
||||
default: 0
|
||||
- description: 11-bit Filter 0-128 elements / 0-128 words
|
||||
minimum: 0
|
||||
maximum: 128
|
||||
- description: 29-bit Filter 0-64 elements / 0-128 words
|
||||
minimum: 0
|
||||
maximum: 64
|
||||
- description: Rx FIFO 0 0-64 elements / 0-1152 words
|
||||
minimum: 0
|
||||
maximum: 64
|
||||
- description: Rx FIFO 1 0-64 elements / 0-1152 words
|
||||
minimum: 0
|
||||
maximum: 64
|
||||
- description: Rx Buffers 0-64 elements / 0-1152 words
|
||||
minimum: 0
|
||||
maximum: 64
|
||||
- description: Tx Event FIFO 0-32 elements / 0-64 words
|
||||
minimum: 0
|
||||
maximum: 32
|
||||
- description: Tx Buffers 0-32 elements / 0-576 words
|
||||
minimum: 0
|
||||
maximum: 32
|
||||
minItems: 1
|
||||
|
||||
spi-max-frequency:
|
||||
description:
|
||||
Must be half or less of "clocks" frequency.
|
||||
maximum: 18000000
|
||||
|
||||
ti,nwkrq-voltage-vio:
|
||||
type: boolean
|
||||
description:
|
||||
nWKRQ Pin GPO buffer voltage configuration.
|
||||
Set nWKRQ to use VIO voltage rail.
|
||||
When not set nWKRQ will use internal voltage rail.
|
||||
|
||||
wakeup-source:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description:
|
||||
Enable CAN remote wakeup.
|
||||
|
||||
allOf:
|
||||
- $ref: can-controller.yaml#
|
||||
- $ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- ti,tcan4552
|
||||
- ti,tcan4553
|
||||
then:
|
||||
properties:
|
||||
device-state-gpios: false
|
||||
device-wake-gpios: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
- bosch,mram-cfg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
can@0 {
|
||||
compatible = "ti,tcan4x5x";
|
||||
reg = <0>;
|
||||
clocks = <&can0_osc>;
|
||||
clock-names = "cclk";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&can0_pins>;
|
||||
spi-max-frequency = <10000000>;
|
||||
bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
|
||||
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
|
||||
device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
|
||||
ti,nwkrq-voltage-vio;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
can@0 {
|
||||
compatible = "ti,tcan4552", "ti,tcan4x5x";
|
||||
reg = <0>;
|
||||
clocks = <&can0_osc>;
|
||||
clock-names = "cclk";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&can0_pins>;
|
||||
spi-max-frequency = <10000000>;
|
||||
bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
|
||||
reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
|
@ -129,6 +129,24 @@ properties:
|
|||
minimum: 0
|
||||
maximum: 383
|
||||
|
||||
rx-internal-delay-ps:
|
||||
description:
|
||||
RGMII Receive Clock Delay defined in pico seconds, used to select
|
||||
the DLL phase shift between 1000 ps (45 degree shift at 1Gbps) and
|
||||
3300 ps (147 degree shift at 1Gbps). A value of 0 ps will disable
|
||||
any delay. The Default is no delay.
|
||||
enum: [0, 1000, 1700, 2000, 2500, 3000, 3300]
|
||||
default: 0
|
||||
|
||||
tx-internal-delay-ps:
|
||||
description:
|
||||
RGMII Transmit Clock Delay defined in pico seconds, used to select
|
||||
the DLL phase shift between 1000 ps (45 degree shift at 1Gbps) and
|
||||
3300 ps (147 degree shift at 1Gbps). A value of 0 ps will disable
|
||||
any delay. The Default is no delay.
|
||||
enum: [0, 1000, 1700, 2000, 2500, 3000, 3300]
|
||||
default: 0
|
||||
|
||||
required:
|
||||
- reg
|
||||
- phys
|
||||
|
|
105
Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml
Normal file
105
Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml
Normal file
|
@ -0,0 +1,105 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
# Copyright 2021-2024 NXP
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/nxp,s32-dwmac.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NXP S32G2xx/S32G3xx/S32R45 GMAC ethernet controller
|
||||
|
||||
maintainers:
|
||||
- Jan Petrous (OSS) <jan.petrous@oss.nxp.com>
|
||||
|
||||
description:
|
||||
This device is a Synopsys DWC IP, integrated on NXP S32G/R SoCs.
|
||||
The SoC series S32G2xx and S32G3xx feature one DWMAC instance,
|
||||
the SoC S32R45 has two instances. The devices can use RGMII/RMII/MII
|
||||
interface over Pinctrl device or the output can be routed
|
||||
to the embedded SerDes for SGMII connectivity.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- const: nxp,s32g2-dwmac
|
||||
- items:
|
||||
- enum:
|
||||
- nxp,s32g3-dwmac
|
||||
- nxp,s32r45-dwmac
|
||||
- const: nxp,s32g2-dwmac
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: Main GMAC registers
|
||||
- description: GMAC PHY mode control register
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
interrupt-names:
|
||||
const: macirq
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Main GMAC clock
|
||||
- description: Transmit clock
|
||||
- description: Receive clock
|
||||
- description: PTP reference clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: stmmaceth
|
||||
- const: tx
|
||||
- const: rx
|
||||
- const: ptp_ref
|
||||
|
||||
required:
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
allOf:
|
||||
- $ref: snps,dwmac.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/phy/phy.h>
|
||||
bus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ethernet@4033c000 {
|
||||
compatible = "nxp,s32g2-dwmac";
|
||||
reg = <0x0 0x4033c000 0x0 0x2000>, /* gmac IP */
|
||||
<0x0 0x4007c004 0x0 0x4>; /* GMAC_0_CTRL_STS */
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
snps,mtl-rx-config = <&mtl_rx_setup>;
|
||||
snps,mtl-tx-config = <&mtl_tx_setup>;
|
||||
clocks = <&clks 24>, <&clks 17>, <&clks 16>, <&clks 15>;
|
||||
clock-names = "stmmaceth", "tx", "rx", "ptp_ref";
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
mtl_rx_setup: rx-queues-config {
|
||||
snps,rx-queues-to-use = <5>;
|
||||
};
|
||||
|
||||
mtl_tx_setup: tx-queues-config {
|
||||
snps,tx-queues-to-use = <5>;
|
||||
};
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "snps,dwmac-mdio";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
|
@ -239,7 +239,7 @@ examples:
|
|||
|
||||
qcom,gsi-loader = "self";
|
||||
memory-region = <&ipa_fw_mem>;
|
||||
firmware-name = "qcom/sc7180-trogdor/modem/modem.mdt";
|
||||
firmware-name = "qcom/sc7180-trogdor/modem/modem.mbn";
|
||||
|
||||
iommus = <&apps_smmu 0x440 0x0>,
|
||||
<&apps_smmu 0x442 0x0>;
|
||||
|
|
|
@ -67,6 +67,7 @@ properties:
|
|||
- ingenic,x2000-mac
|
||||
- loongson,ls2k-dwmac
|
||||
- loongson,ls7a-dwmac
|
||||
- nxp,s32g2-dwmac
|
||||
- qcom,qcs404-ethqos
|
||||
- qcom,sa8775p-ethqos
|
||||
- qcom,sc8280xp-ethqos
|
||||
|
|
|
@ -154,56 +154,56 @@ examples:
|
|||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/clock/stm32mp1-clks.h>
|
||||
//Example 1
|
||||
ethernet0: ethernet@5800a000 {
|
||||
compatible = "st,stm32mp1-dwmac", "snps,dwmac-4.20a";
|
||||
reg = <0x5800a000 0x2000>;
|
||||
reg-names = "stmmaceth";
|
||||
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
clock-names = "stmmaceth",
|
||||
"mac-clk-tx",
|
||||
"mac-clk-rx",
|
||||
"ethstp",
|
||||
"eth-ck";
|
||||
clocks = <&rcc ETHMAC>,
|
||||
<&rcc ETHTX>,
|
||||
<&rcc ETHRX>,
|
||||
<&rcc ETHSTP>,
|
||||
<&rcc ETHCK_K>;
|
||||
st,syscon = <&syscfg 0x4>;
|
||||
snps,pbl = <2>;
|
||||
snps,axi-config = <&stmmac_axi_config_0>;
|
||||
snps,tso;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
ethernet0: ethernet@5800a000 {
|
||||
compatible = "st,stm32mp1-dwmac", "snps,dwmac-4.20a";
|
||||
reg = <0x5800a000 0x2000>;
|
||||
reg-names = "stmmaceth";
|
||||
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
clock-names = "stmmaceth",
|
||||
"mac-clk-tx",
|
||||
"mac-clk-rx",
|
||||
"ethstp",
|
||||
"eth-ck";
|
||||
clocks = <&rcc ETHMAC>,
|
||||
<&rcc ETHTX>,
|
||||
<&rcc ETHRX>,
|
||||
<&rcc ETHSTP>,
|
||||
<&rcc ETHCK_K>;
|
||||
st,syscon = <&syscfg 0x4>;
|
||||
snps,pbl = <2>;
|
||||
snps,axi-config = <&stmmac_axi_config_0>;
|
||||
snps,tso;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
- |
|
||||
//Example 2 (MCU example)
|
||||
ethernet1: ethernet@40028000 {
|
||||
compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
|
||||
reg = <0x40028000 0x8000>;
|
||||
reg-names = "stmmaceth";
|
||||
interrupts = <0 61 0>, <0 62 0>;
|
||||
interrupt-names = "macirq", "eth_wake_irq";
|
||||
clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
|
||||
clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
|
||||
st,syscon = <&syscfg 0x4>;
|
||||
snps,pbl = <8>;
|
||||
snps,mixed-burst;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
ethernet1: ethernet@40028000 {
|
||||
compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
|
||||
reg = <0x40028000 0x8000>;
|
||||
reg-names = "stmmaceth";
|
||||
interrupts = <0 61 0>, <0 62 0>;
|
||||
interrupt-names = "macirq", "eth_wake_irq";
|
||||
clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
|
||||
clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
|
||||
st,syscon = <&syscfg 0x4>;
|
||||
snps,pbl = <8>;
|
||||
snps,mixed-burst;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
- |
|
||||
//Example 3
|
||||
ethernet2: ethernet@40027000 {
|
||||
compatible = "st,stm32-dwmac", "snps,dwmac-4.10a";
|
||||
reg = <0x40028000 0x8000>;
|
||||
reg-names = "stmmaceth";
|
||||
interrupts = <61>;
|
||||
interrupt-names = "macirq";
|
||||
clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
|
||||
clocks = <&rcc 62>, <&rcc 61>, <&rcc 60>;
|
||||
st,syscon = <&syscfg 0x4>;
|
||||
snps,pbl = <8>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
ethernet2: ethernet@40027000 {
|
||||
compatible = "st,stm32-dwmac", "snps,dwmac-4.10a";
|
||||
reg = <0x40028000 0x8000>;
|
||||
reg-names = "stmmaceth";
|
||||
interrupts = <61>;
|
||||
interrupt-names = "macirq";
|
||||
clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
|
||||
clocks = <&rcc 62>, <&rcc 61>, <&rcc 60>;
|
||||
st,syscon = <&syscfg 0x4>;
|
||||
snps,pbl = <8>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
|
|
@ -72,9 +72,9 @@ unevaluatedProperties: false
|
|||
examples:
|
||||
- |
|
||||
davinci_mdio: mdio@4a101000 {
|
||||
compatible = "ti,davinci_mdio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x4a101000 0x1000>;
|
||||
bus_freq = <1000000>;
|
||||
compatible = "ti,davinci_mdio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x4a101000 0x1000>;
|
||||
bus_freq = <1000000>;
|
||||
};
|
||||
|
|
|
@ -96,6 +96,32 @@ properties:
|
|||
- master
|
||||
- slave
|
||||
|
||||
ti,gpio2-clk-out:
|
||||
description: |
|
||||
DP83822 PHY only.
|
||||
The GPIO2 pin on the DP83822 can be configured as clock output. When
|
||||
omitted, the PHY's default will be left as is.
|
||||
|
||||
- 'mac-if': In MII mode the clock frequency is 25-MHz, in RMII Mode the
|
||||
clock frequency is 50-MHz and in RGMII Mode the clock frequency is
|
||||
25-MHz.
|
||||
- 'xi': XI clock(pass-through clock from XI pin).
|
||||
- 'int-ref': Internal reference clock 25-MHz.
|
||||
- 'rmii-master-mode-ref': RMII master mode reference clock 50-MHz. RMII
|
||||
master mode reference clock is identical to MAC IF clock in RMII master
|
||||
mode.
|
||||
- 'free-running': Free running clock 125-MHz.
|
||||
- 'recovered': Recovered clock is a 125-MHz recovered clock from a
|
||||
connected link partner.
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
enum:
|
||||
- mac-if
|
||||
- xi
|
||||
- int-ref
|
||||
- rmii-master-mode-ref
|
||||
- free-running
|
||||
- recovered
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
|
@ -110,6 +136,7 @@ examples:
|
|||
reg = <0>;
|
||||
rx-internal-delay-ps = <1>;
|
||||
tx-internal-delay-ps = <1>;
|
||||
ti,gpio2-clk-out = "xi";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -302,16 +302,16 @@ examples:
|
|||
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cpts@3d000 {
|
||||
compatible = "ti,am65-cpts";
|
||||
reg = <0x0 0x3d000 0x0 0x400>;
|
||||
clocks = <&k3_clks 18 2>;
|
||||
clock-names = "cpts";
|
||||
interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "cpts";
|
||||
ti,cpts-ext-ts-inputs = <4>;
|
||||
ti,cpts-periodic-outputs = <2>;
|
||||
cpts@3d000 {
|
||||
compatible = "ti,am65-cpts";
|
||||
reg = <0x0 0x3d000 0x0 0x400>;
|
||||
clocks = <&k3_clks 18 2>;
|
||||
clock-names = "cpts";
|
||||
interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "cpts";
|
||||
ti,cpts-ext-ts-inputs = <4>;
|
||||
ti,cpts-periodic-outputs = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -131,23 +131,23 @@ examples:
|
|||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
cpts@310d0000 {
|
||||
compatible = "ti,am65-cpts";
|
||||
reg = <0x310d0000 0x400>;
|
||||
reg-names = "cpts";
|
||||
clocks = <&main_cpts_mux>;
|
||||
clock-names = "cpts";
|
||||
interrupts-extended = <&k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "cpts";
|
||||
ti,cpts-periodic-outputs = <6>;
|
||||
ti,cpts-ext-ts-inputs = <8>;
|
||||
compatible = "ti,am65-cpts";
|
||||
reg = <0x310d0000 0x400>;
|
||||
reg-names = "cpts";
|
||||
clocks = <&main_cpts_mux>;
|
||||
clock-names = "cpts";
|
||||
interrupts-extended = <&k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "cpts";
|
||||
ti,cpts-periodic-outputs = <6>;
|
||||
ti,cpts-ext-ts-inputs = <8>;
|
||||
|
||||
main_cpts_mux: refclk-mux {
|
||||
#clock-cells = <0>;
|
||||
clocks = <&k3_clks 118 5>, <&k3_clks 118 11>,
|
||||
<&k3_clks 157 91>, <&k3_clks 157 77>,
|
||||
<&k3_clks 157 102>, <&k3_clks 157 80>,
|
||||
<&k3_clks 120 3>, <&k3_clks 121 3>;
|
||||
assigned-clocks = <&main_cpts_mux>;
|
||||
assigned-clock-parents = <&k3_clks 118 11>;
|
||||
};
|
||||
main_cpts_mux: refclk-mux {
|
||||
#clock-cells = <0>;
|
||||
clocks = <&k3_clks 118 5>, <&k3_clks 118 11>,
|
||||
<&k3_clks 157 91>, <&k3_clks 157 77>,
|
||||
<&k3_clks 157 102>, <&k3_clks 157 80>,
|
||||
<&k3_clks 120 3>, <&k3_clks 121 3>;
|
||||
assigned-clocks = <&main_cpts_mux>;
|
||||
assigned-clock-parents = <&k3_clks 118 11>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -79,15 +79,14 @@ examples:
|
|||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
mmc {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
wifi@1 {
|
||||
compatible = "marvell,sd8897";
|
||||
reg = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
|
||||
marvell,wakeup-pin = <3>;
|
||||
wifi@1 {
|
||||
compatible = "marvell,sd8897";
|
||||
reg = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
|
||||
marvell,wakeup-pin = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,204 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
# Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/wireless/qcom,ath12k-wsi.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Technologies ath12k wireless devices (PCIe) with WSI interface
|
||||
|
||||
maintainers:
|
||||
- Jeff Johnson <jjohnson@kernel.org>
|
||||
- Kalle Valo <kvalo@kernel.org>
|
||||
|
||||
description: |
|
||||
Qualcomm Technologies IEEE 802.11be PCIe devices with WSI interface.
|
||||
|
||||
The ath12k devices (QCN9274) feature WSI support. WSI stands for
|
||||
WLAN Serial Interface. It is used for the exchange of specific
|
||||
control information across radios based on the doorbell mechanism.
|
||||
This WSI connection is essential to exchange control information
|
||||
among these devices.
|
||||
|
||||
The WSI interface includes TX and RX ports, which are used to connect
|
||||
multiple WSI-supported devices together, forming a WSI group.
|
||||
|
||||
Diagram to represent one WSI connection (one WSI group) among
|
||||
three devices.
|
||||
|
||||
+-------+ +-------+ +-------+
|
||||
| pcie1 | | pcie2 | | pcie3 |
|
||||
| | | | | |
|
||||
+----->| wsi |------->| wsi |------->| wsi |-----+
|
||||
| | grp 0 | | grp 0 | | grp 0 | |
|
||||
| +-------+ +-------+ +-------+ |
|
||||
+------------------------------------------------------+
|
||||
|
||||
Diagram to represent two WSI connections (two separate WSI groups)
|
||||
among four devices.
|
||||
|
||||
+-------+ +-------+ +-------+ +-------+
|
||||
| pcie0 | | pcie1 | | pcie2 | | pcie3 |
|
||||
| | | | | | | |
|
||||
+-->| wsi |--->| wsi |--+ +-->| wsi |--->| wsi |--+
|
||||
| | grp 0 | | grp 0 | | | | grp 1 | | grp 1 | |
|
||||
| +-------+ +-------+ | | +-------+ +-------+ |
|
||||
+---------------------------+ +---------------------------+
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- pci17cb,1109 # QCN9274
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
qcom,ath12k-calibration-variant:
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
description:
|
||||
String to uniquely identify variant of the calibration data for designs
|
||||
with colliding bus and device ids
|
||||
|
||||
qcom,wsi-controller:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description:
|
||||
The WSI controller device in the WSI group aids (is capable) to
|
||||
synchronize the Timing Synchronization Function (TSF) clock across
|
||||
all devices in the WSI group.
|
||||
|
||||
ports:
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
properties:
|
||||
port@0:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
This is the TX port of WSI interface. It is attached to the RX
|
||||
port of the next device in the WSI connection.
|
||||
|
||||
port@1:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
This is the RX port of WSI interface. It is attached to the TX
|
||||
port of the previous device in the WSI connection.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
pcie {
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
pcie@0 {
|
||||
device_type = "pci";
|
||||
reg = <0x0 0x0 0x0 0x0 0x0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@0 {
|
||||
compatible = "pci17cb,1109";
|
||||
reg = <0x0 0x0 0x0 0x0 0x0>;
|
||||
|
||||
qcom,ath12k-calibration-variant = "RDP433_1";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
wifi1_wsi_tx: endpoint {
|
||||
remote-endpoint = <&wifi2_wsi_rx>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
|
||||
wifi1_wsi_rx: endpoint {
|
||||
remote-endpoint = <&wifi3_wsi_tx>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pcie@1 {
|
||||
device_type = "pci";
|
||||
reg = <0x0 0x0 0x1 0x0 0x0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@0 {
|
||||
compatible = "pci17cb,1109";
|
||||
reg = <0x0 0x0 0x0 0x0 0x0>;
|
||||
|
||||
qcom,ath12k-calibration-variant = "RDP433_2";
|
||||
qcom,wsi-controller;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
wifi2_wsi_tx: endpoint {
|
||||
remote-endpoint = <&wifi3_wsi_rx>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
|
||||
wifi2_wsi_rx: endpoint {
|
||||
remote-endpoint = <&wifi1_wsi_tx>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pcie@2 {
|
||||
device_type = "pci";
|
||||
reg = <0x0 0x0 0x2 0x0 0x0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@0 {
|
||||
compatible = "pci17cb,1109";
|
||||
reg = <0x0 0x0 0x0 0x0 0x0>;
|
||||
|
||||
qcom,ath12k-calibration-variant = "RDP433_3";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
wifi3_wsi_tx: endpoint {
|
||||
remote-endpoint = <&wifi1_wsi_rx>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
|
||||
wifi3_wsi_rx: endpoint {
|
||||
remote-endpoint = <&wifi2_wsi_tx>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
|
@ -106,6 +106,9 @@ properties:
|
|||
name-prefix:
|
||||
description: For enum the prefix of the values, optional.
|
||||
type: string
|
||||
enum-cnt-name:
|
||||
description: Name of the render-max counter enum entry.
|
||||
type: string
|
||||
# End genetlink-c
|
||||
|
||||
attribute-sets:
|
||||
|
|
|
@ -117,6 +117,9 @@ properties:
|
|||
name-prefix:
|
||||
description: For enum the prefix of the values, optional.
|
||||
type: string
|
||||
enum-cnt-name:
|
||||
description: Name of the render-max counter enum entry.
|
||||
type: string
|
||||
# End genetlink-c
|
||||
# Start genetlink-legacy
|
||||
members:
|
||||
|
|
|
@ -221,7 +221,7 @@ properties:
|
|||
type: &attr-type
|
||||
description: The netlink attribute type
|
||||
enum: [ unused, pad, flag, binary, bitfield32,
|
||||
u8, u16, u32, u64, s8, s16, s32, s64,
|
||||
uint, sint, u8, u16, u32, u64, s8, s16, s32, s64,
|
||||
string, nest, indexed-array, nest-type-value,
|
||||
sub-message ]
|
||||
doc:
|
||||
|
|
|
@ -5,6 +5,7 @@ name: ethtool
|
|||
protocol: genetlink-legacy
|
||||
|
||||
doc: Partial family for Ethtool Netlink.
|
||||
uapi-header: linux/ethtool_netlink_generated.h
|
||||
|
||||
definitions:
|
||||
-
|
||||
|
@ -12,43 +13,99 @@ definitions:
|
|||
enum-name:
|
||||
type: enum
|
||||
entries: [ vxlan, geneve, vxlan-gpe ]
|
||||
enum-cnt-name: __ethtool-udp-tunnel-type-cnt
|
||||
render-max: true
|
||||
-
|
||||
name: stringset
|
||||
type: enum
|
||||
entries: []
|
||||
header: linux/ethtool.h # skip rendering, no actual definition
|
||||
-
|
||||
name: header-flags
|
||||
type: flags
|
||||
entries: [ compact-bitsets, omit-reply, stats ]
|
||||
name-prefix: ethtool-flag-
|
||||
doc: common ethtool header flags
|
||||
entries:
|
||||
-
|
||||
name: compact-bitsets
|
||||
doc: use compact bitsets in reply
|
||||
-
|
||||
name: omit-reply
|
||||
doc: provide optional reply for SET or ACT requests
|
||||
-
|
||||
name: stats
|
||||
doc: request statistics, if supported by the driver
|
||||
-
|
||||
name: module-fw-flash-status
|
||||
type: enum
|
||||
entries: [ started, in_progress, completed, error ]
|
||||
doc: plug-in module firmware flashing status
|
||||
header: linux/ethtool.h
|
||||
entries:
|
||||
-
|
||||
name: started
|
||||
doc: The firmware flashing process has started.
|
||||
-
|
||||
name: in_progress
|
||||
doc: The firmware flashing process is in progress.
|
||||
-
|
||||
name: completed
|
||||
doc: The firmware flashing process was completed successfully.
|
||||
-
|
||||
name: error
|
||||
doc: The firmware flashing process was stopped due to an error.
|
||||
-
|
||||
name: c33-pse-ext-state
|
||||
enum-name:
|
||||
doc: "groups of PSE extended states functions. IEEE 802.3-2022 33.2.4.4 Variables"
|
||||
type: enum
|
||||
name-prefix: ethtool-c33-pse-ext-state-
|
||||
header: linux/ethtool.h
|
||||
entries:
|
||||
- none
|
||||
- error-condition
|
||||
- mr-mps-valid
|
||||
- mr-pse-enable
|
||||
- option-detect-ted
|
||||
- option-vport-lim
|
||||
- ovld-detected
|
||||
- power-not-available
|
||||
- short-detected
|
||||
-
|
||||
name: none
|
||||
doc: none
|
||||
-
|
||||
name: error-condition
|
||||
doc: Group of error_condition states
|
||||
-
|
||||
name: mr-mps-valid
|
||||
doc: Group of mr_mps_valid states
|
||||
-
|
||||
name: mr-pse-enable
|
||||
doc: Group of mr_pse_enable states
|
||||
-
|
||||
name: option-detect-ted
|
||||
doc: Group of option_detect_ted states
|
||||
-
|
||||
name: option-vport-lim
|
||||
doc: Group of option_vport_lim states
|
||||
-
|
||||
name: ovld-detected
|
||||
doc: Group of ovld_detected states
|
||||
-
|
||||
name: power-not-available
|
||||
doc: Group of power_not_available states
|
||||
-
|
||||
name: short-detected
|
||||
doc: Group of short_detected states
|
||||
-
|
||||
name: phy-upstream-type
|
||||
enum-name:
|
||||
type: enum
|
||||
entries: [ mac, phy ]
|
||||
-
|
||||
name: tcp-data-split
|
||||
type: enum
|
||||
entries: [ unknown, disabled, enabled ]
|
||||
|
||||
attribute-sets:
|
||||
-
|
||||
name: header
|
||||
attr-cnt-name: __ethtool-a-header-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: dev-index
|
||||
type: u32
|
||||
|
@ -65,7 +122,12 @@ attribute-sets:
|
|||
|
||||
-
|
||||
name: bitset-bit
|
||||
attr-cnt-name: __ethtool-a-bitset-bit-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: index
|
||||
type: u32
|
||||
|
@ -77,7 +139,12 @@ attribute-sets:
|
|||
type: flag
|
||||
-
|
||||
name: bitset-bits
|
||||
attr-cnt-name: __ethtool-a-bitset-bits-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: bit
|
||||
type: nest
|
||||
|
@ -85,7 +152,12 @@ attribute-sets:
|
|||
nested-attributes: bitset-bit
|
||||
-
|
||||
name: bitset
|
||||
attr-cnt-name: __ethtool-a-bitset-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: nomask
|
||||
type: flag
|
||||
|
@ -104,7 +176,12 @@ attribute-sets:
|
|||
type: binary
|
||||
-
|
||||
name: string
|
||||
attr-cnt-name: __ethtool-a-string-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: index
|
||||
type: u32
|
||||
|
@ -113,7 +190,16 @@ attribute-sets:
|
|||
type: string
|
||||
-
|
||||
name: strings
|
||||
attr-cnt-name: __ethtool-a-strings-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: string
|
||||
type: nest
|
||||
|
@ -121,7 +207,12 @@ attribute-sets:
|
|||
nested-attributes: string
|
||||
-
|
||||
name: stringset
|
||||
attr-cnt-name: __ethtool-a-stringset-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: id
|
||||
type: u32
|
||||
|
@ -135,7 +226,12 @@ attribute-sets:
|
|||
nested-attributes: strings
|
||||
-
|
||||
name: stringsets
|
||||
attr-cnt-name: __ethtool-a-stringsets-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: stringset
|
||||
type: nest
|
||||
|
@ -143,7 +239,12 @@ attribute-sets:
|
|||
nested-attributes: stringset
|
||||
-
|
||||
name: strset
|
||||
attr-cnt-name: __ethtool-a-strset-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -158,7 +259,12 @@ attribute-sets:
|
|||
|
||||
-
|
||||
name: privflags
|
||||
attr-cnt-name: __ethtool-a-privflags-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -170,7 +276,12 @@ attribute-sets:
|
|||
|
||||
-
|
||||
name: rings
|
||||
attr-cnt-name: __ethtool-a-rings-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -205,6 +316,7 @@ attribute-sets:
|
|||
-
|
||||
name: tcp-data-split
|
||||
type: u8
|
||||
enum: tcp-data-split
|
||||
-
|
||||
name: cqe-size
|
||||
type: u32
|
||||
|
@ -220,34 +332,57 @@ attribute-sets:
|
|||
-
|
||||
name: tx-push-buf-len-max
|
||||
type: u32
|
||||
-
|
||||
name: hds-thresh
|
||||
type: u32
|
||||
-
|
||||
name: hds-thresh-max
|
||||
type: u32
|
||||
|
||||
-
|
||||
name: mm-stat
|
||||
attr-cnt-name: __ethtool-a-mm-stat-cnt
|
||||
doc: MAC Merge (802.3)
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
-
|
||||
name: reassembly-errors
|
||||
doc: aMACMergeFrameAssErrorCount
|
||||
type: u64
|
||||
-
|
||||
name: smd-errors
|
||||
doc: aMACMergeFrameSmdErrorCount
|
||||
type: u64
|
||||
-
|
||||
name: reassembly-ok
|
||||
doc: aMACMergeFrameAssOkCount
|
||||
type: u64
|
||||
-
|
||||
name: rx-frag-count
|
||||
doc: aMACMergeFragCountRx
|
||||
type: u64
|
||||
-
|
||||
name: tx-frag-count
|
||||
doc: aMACMergeFragCountTx
|
||||
type: u64
|
||||
-
|
||||
name: hold-count
|
||||
doc: aMACMergeHoldCount
|
||||
type: u64
|
||||
-
|
||||
name: mm
|
||||
attr-cnt-name: __ethtool-a-mm-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -285,7 +420,12 @@ attribute-sets:
|
|||
nested-attributes: mm-stat
|
||||
-
|
||||
name: linkinfo
|
||||
attr-cnt-name: __ethtool-a-linkinfo-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -307,7 +447,12 @@ attribute-sets:
|
|||
type: u8
|
||||
-
|
||||
name: linkmodes
|
||||
attr-cnt-name: __ethtool-a-linkmodes-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -343,7 +488,12 @@ attribute-sets:
|
|||
type: u8
|
||||
-
|
||||
name: linkstate
|
||||
attr-cnt-name: __ethtool-a-linkstate-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -368,7 +518,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: debug
|
||||
attr-cnt-name: __ethtool-a-debug-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -379,7 +534,12 @@ attribute-sets:
|
|||
nested-attributes: bitset
|
||||
-
|
||||
name: wol
|
||||
attr-cnt-name: __ethtool-a-wol-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -393,7 +553,12 @@ attribute-sets:
|
|||
type: binary
|
||||
-
|
||||
name: features
|
||||
attr-cnt-name: __ethtool-a-features-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -416,7 +581,12 @@ attribute-sets:
|
|||
nested-attributes: bitset
|
||||
-
|
||||
name: channels
|
||||
attr-cnt-name: __ethtool-a-channels-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -448,7 +618,12 @@ attribute-sets:
|
|||
|
||||
-
|
||||
name: irq-moderation
|
||||
attr-cnt-name: __ethtool-a-irq-moderation-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: usec
|
||||
type: u32
|
||||
|
@ -460,7 +635,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: profile
|
||||
attr-cnt-name: __ethtool-a-profile-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: irq-moderation
|
||||
type: nest
|
||||
|
@ -468,7 +648,12 @@ attribute-sets:
|
|||
nested-attributes: irq-moderation
|
||||
-
|
||||
name: coalesce
|
||||
attr-cnt-name: __ethtool-a-coalesce-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -565,7 +750,12 @@ attribute-sets:
|
|||
|
||||
-
|
||||
name: pause-stat
|
||||
attr-cnt-name: __ethtool-a-pause-stat-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
|
@ -577,7 +767,12 @@ attribute-sets:
|
|||
type: u64
|
||||
-
|
||||
name: pause
|
||||
attr-cnt-name: __ethtool-a-pause-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -600,7 +795,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: eee
|
||||
attr-cnt-name: __ethtool-a-eee-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -627,7 +827,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: ts-stat
|
||||
attr-cnt-name: __ethtool-a-ts-stat-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: tx-pkts
|
||||
type: uint
|
||||
|
@ -637,9 +842,31 @@ attribute-sets:
|
|||
-
|
||||
name: tx-err
|
||||
type: uint
|
||||
-
|
||||
name: tx-onestep-pkts-unconfirmed
|
||||
type: uint
|
||||
-
|
||||
name: ts-hwtstamp-provider
|
||||
attr-cnt-name: __ethtool-a-ts-hwtstamp-provider-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: index
|
||||
type: u32
|
||||
-
|
||||
name: qualifier
|
||||
type: u32
|
||||
-
|
||||
name: tsinfo
|
||||
attr-cnt-name: __ethtool-a-tsinfo-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -663,21 +890,38 @@ attribute-sets:
|
|||
name: stats
|
||||
type: nest
|
||||
nested-attributes: ts-stat
|
||||
-
|
||||
name: hwtstamp-provider
|
||||
type: nest
|
||||
nested-attributes: ts-hwtstamp-provider
|
||||
-
|
||||
name: cable-result
|
||||
attr-cnt-name: __ethtool-a-cable-result-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: pair
|
||||
doc: ETHTOOL_A_CABLE_PAIR
|
||||
type: u8
|
||||
-
|
||||
name: code
|
||||
doc: ETHTOOL_A_CABLE_RESULT_CODE
|
||||
type: u8
|
||||
-
|
||||
name: src
|
||||
doc: ETHTOOL_A_CABLE_INF_SRC
|
||||
type: u32
|
||||
-
|
||||
name: cable-fault-length
|
||||
attr-cnt-name: __ethtool-a-cable-fault-length-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: pair
|
||||
type: u8
|
||||
|
@ -689,7 +933,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: cable-nest
|
||||
attr-cnt-name: __ethtool-a-cable-nest-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: result
|
||||
type: nest
|
||||
|
@ -700,20 +949,31 @@ attribute-sets:
|
|||
nested-attributes: cable-fault-length
|
||||
-
|
||||
name: cable-test
|
||||
attr-cnt-name: __ethtool-a-cable-test-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
nested-attributes: header
|
||||
-
|
||||
name: cable-test-ntf
|
||||
attr-cnt-name: __ethtool-a-cable-test-ntf-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
nested-attributes: header
|
||||
-
|
||||
name: status
|
||||
doc: _STARTED/_COMPLETE
|
||||
type: u8
|
||||
-
|
||||
name: nest
|
||||
|
@ -721,7 +981,12 @@ attribute-sets:
|
|||
nested-attributes: cable-nest
|
||||
-
|
||||
name: cable-test-tdr-cfg
|
||||
attr-cnt-name: __ethtool-a-cable-test-tdr-cfg-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: first
|
||||
type: u32
|
||||
|
@ -736,7 +1001,12 @@ attribute-sets:
|
|||
type: u8
|
||||
-
|
||||
name: cable-test-tdr-ntf
|
||||
attr-cnt-name: __ethtool-a-cable-test-tdr-ntf-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -750,7 +1020,12 @@ attribute-sets:
|
|||
nested-attributes: cable-nest
|
||||
-
|
||||
name: cable-test-tdr
|
||||
attr-cnt-name: __ethtool-a-cable-test-tdr-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -761,7 +1036,12 @@ attribute-sets:
|
|||
nested-attributes: cable-test-tdr-cfg
|
||||
-
|
||||
name: tunnel-udp-entry
|
||||
attr-cnt-name: __ethtool-a-tunnel-udp-entry-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: port
|
||||
type: u16
|
||||
|
@ -772,7 +1052,12 @@ attribute-sets:
|
|||
enum: udp-tunnel-type
|
||||
-
|
||||
name: tunnel-udp-table
|
||||
attr-cnt-name: __ethtool-a-tunnel-udp-table-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: size
|
||||
type: u32
|
||||
|
@ -787,14 +1072,24 @@ attribute-sets:
|
|||
nested-attributes: tunnel-udp-entry
|
||||
-
|
||||
name: tunnel-udp
|
||||
attr-cnt-name: __ethtool-a-tunnel-udp-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: table
|
||||
type: nest
|
||||
nested-attributes: tunnel-udp-table
|
||||
-
|
||||
name: tunnel-info
|
||||
attr-cnt-name: __ethtool-a-tunnel-info-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -805,7 +1100,12 @@ attribute-sets:
|
|||
nested-attributes: tunnel-udp
|
||||
-
|
||||
name: fec-stat
|
||||
attr-cnt-name: __ethtool-a-fec-stat-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
|
@ -823,7 +1123,12 @@ attribute-sets:
|
|||
sub-type: u64
|
||||
-
|
||||
name: fec
|
||||
attr-cnt-name: __ethtool-a-fec-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -844,7 +1149,12 @@ attribute-sets:
|
|||
nested-attributes: fec-stat
|
||||
-
|
||||
name: module-eeprom
|
||||
attr-cnt-name: __ethtool-a-module-eeprom-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -869,7 +1179,12 @@ attribute-sets:
|
|||
type: binary
|
||||
-
|
||||
name: stats-grp
|
||||
attr-cnt-name: __ethtool-a-stats-grp-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
|
@ -912,7 +1227,12 @@ attribute-sets:
|
|||
name: hist-val
|
||||
-
|
||||
name: stats
|
||||
attr-cnt-name: __ethtool-a-stats-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: pad
|
||||
type: pad
|
||||
|
@ -933,7 +1253,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: phc-vclocks
|
||||
attr-cnt-name: __ethtool-a-phc-vclocks-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -947,7 +1272,12 @@ attribute-sets:
|
|||
sub-type: s32
|
||||
-
|
||||
name: module
|
||||
attr-cnt-name: __ethtool-a-module-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -960,7 +1290,13 @@ attribute-sets:
|
|||
type: u8
|
||||
-
|
||||
name: c33-pse-pw-limit
|
||||
attr-cnt-name: __ethtool-a-c33-pse-pw-limit-cnt
|
||||
attr-max-name: __ethtool-a-c33-pse-pw-limit-max
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: min
|
||||
type: u32
|
||||
|
@ -969,7 +1305,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: pse
|
||||
attr-cnt-name: __ethtool-a-pse-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -1027,7 +1368,12 @@ attribute-sets:
|
|||
nested-attributes: c33-pse-pw-limit
|
||||
-
|
||||
name: rss
|
||||
attr-cnt-name: __ethtool-a-rss-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -1053,7 +1399,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: plca
|
||||
attr-cnt-name: __ethtool-a-plca-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -1084,7 +1435,12 @@ attribute-sets:
|
|||
type: u32
|
||||
-
|
||||
name: module-fw-flash
|
||||
attr-cnt-name: __ethtool-a-module-fw-flash-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -1110,7 +1466,12 @@ attribute-sets:
|
|||
type: uint
|
||||
-
|
||||
name: phy
|
||||
attr-cnt-name: __ethtool-a-phy-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
|
@ -1137,6 +1498,33 @@ attribute-sets:
|
|||
-
|
||||
name: downstream-sfp-name
|
||||
type: string
|
||||
-
|
||||
name: tsconfig
|
||||
attr-cnt-name: __ethtool-a-tsconfig-cnt
|
||||
attributes:
|
||||
-
|
||||
name: unspec
|
||||
type: unused
|
||||
value: 0
|
||||
-
|
||||
name: header
|
||||
type: nest
|
||||
nested-attributes: header
|
||||
-
|
||||
name: hwtstamp-provider
|
||||
type: nest
|
||||
nested-attributes: ts-hwtstamp-provider
|
||||
-
|
||||
name: tx-types
|
||||
type: nest
|
||||
nested-attributes: bitset
|
||||
-
|
||||
name: rx-filters
|
||||
type: nest
|
||||
nested-attributes: bitset
|
||||
-
|
||||
name: hwtstamp-flags
|
||||
type: u32
|
||||
|
||||
operations:
|
||||
enum-model: directional
|
||||
|
@ -1398,6 +1786,8 @@ operations:
|
|||
- rx-push
|
||||
- tx-push-buf-len
|
||||
- tx-push-buf-len-max
|
||||
- hds-thresh
|
||||
- hds-thresh-max
|
||||
dump: *ring-get-op
|
||||
-
|
||||
name: rings-set
|
||||
|
@ -1578,6 +1968,7 @@ operations:
|
|||
request:
|
||||
attributes:
|
||||
- header
|
||||
- hwtstamp-provider
|
||||
reply:
|
||||
attributes:
|
||||
- header
|
||||
|
@ -1586,6 +1977,7 @@ operations:
|
|||
- rx-filters
|
||||
- phc-index
|
||||
- stats
|
||||
- hwtstamp-provider
|
||||
dump: *tsinfo-get-op
|
||||
-
|
||||
name: cable-test-act
|
||||
|
@ -1960,3 +2352,32 @@ operations:
|
|||
name: phy-ntf
|
||||
doc: Notification for change in PHY devices.
|
||||
notify: phy-get
|
||||
-
|
||||
name: tsconfig-get
|
||||
doc: Get hwtstamp config.
|
||||
|
||||
attribute-set: tsconfig
|
||||
|
||||
do: &tsconfig-get-op
|
||||
request:
|
||||
attributes:
|
||||
- header
|
||||
reply:
|
||||
attributes: &tsconfig
|
||||
- header
|
||||
- hwtstamp-provider
|
||||
- tx-types
|
||||
- rx-filters
|
||||
- hwtstamp-flags
|
||||
dump: *tsconfig-get-op
|
||||
-
|
||||
name: tsconfig-set
|
||||
doc: Set hwtstamp config.
|
||||
|
||||
attribute-set: tsconfig
|
||||
|
||||
do:
|
||||
request:
|
||||
attributes: *tsconfig
|
||||
reply:
|
||||
attributes: *tsconfig
|
||||
|
|
|
@ -1825,6 +1825,48 @@ attribute-sets:
|
|||
-
|
||||
name: erspan-hwid
|
||||
type: u16
|
||||
-
|
||||
name: linkinfo-vti-attrs
|
||||
name-prefix: ifla-vti-
|
||||
attributes:
|
||||
-
|
||||
name: link
|
||||
type: u32
|
||||
-
|
||||
name: ikey
|
||||
type: u32
|
||||
-
|
||||
name: okey
|
||||
type: u32
|
||||
-
|
||||
name: local
|
||||
type: binary
|
||||
display-hint: ipv4
|
||||
-
|
||||
name: remote
|
||||
type: binary
|
||||
display-hint: ipv4
|
||||
-
|
||||
name: fwmark
|
||||
type: u32
|
||||
-
|
||||
name: linkinfo-vti6-attrs
|
||||
subset-of: linkinfo-vti-attrs
|
||||
attributes:
|
||||
-
|
||||
name: link
|
||||
-
|
||||
name: ikey
|
||||
-
|
||||
name: okey
|
||||
-
|
||||
name: local
|
||||
display-hint: ipv6
|
||||
-
|
||||
name: remote
|
||||
display-hint: ipv6
|
||||
-
|
||||
name: fwmark
|
||||
-
|
||||
name: linkinfo-geneve-attrs
|
||||
name-prefix: ifla-geneve-
|
||||
|
@ -1941,6 +1983,42 @@ attribute-sets:
|
|||
-
|
||||
name: fwmark
|
||||
type: u32
|
||||
-
|
||||
name: linkinfo-ip6tnl-attrs
|
||||
subset-of: linkinfo-iptun-attrs
|
||||
attributes:
|
||||
-
|
||||
name: link
|
||||
-
|
||||
name: local
|
||||
display-hint: ipv6
|
||||
-
|
||||
name: remote
|
||||
display-hint: ipv6
|
||||
-
|
||||
name: ttl
|
||||
-
|
||||
name: encap-limit
|
||||
-
|
||||
name: flowinfo
|
||||
-
|
||||
name: flags
|
||||
# ip6tnl unlike ipip and sit has 32b flags
|
||||
type: u32
|
||||
-
|
||||
name: proto
|
||||
-
|
||||
name: encap-type
|
||||
-
|
||||
name: encap-flags
|
||||
-
|
||||
name: encap-sport
|
||||
-
|
||||
name: encap-dport
|
||||
-
|
||||
name: collect-metadata
|
||||
-
|
||||
name: fwmark
|
||||
-
|
||||
name: linkinfo-tun-attrs
|
||||
name-prefix: ifla-tun-
|
||||
|
@ -2086,6 +2164,9 @@ attribute-sets:
|
|||
-
|
||||
name: mctp-net
|
||||
type: u32
|
||||
-
|
||||
name: phys-binding
|
||||
type: u8
|
||||
-
|
||||
name: stats-attrs
|
||||
name-prefix: ifla-stats-
|
||||
|
@ -2166,6 +2247,12 @@ attribute-sets:
|
|||
name: peer-scrub
|
||||
type: u32
|
||||
enum: netkit-scrub
|
||||
-
|
||||
name: headroom
|
||||
type: u16
|
||||
-
|
||||
name: tailroom
|
||||
type: u16
|
||||
|
||||
sub-messages:
|
||||
-
|
||||
|
@ -2192,6 +2279,9 @@ sub-messages:
|
|||
-
|
||||
value: ipip
|
||||
attribute-set: linkinfo-iptun-attrs
|
||||
-
|
||||
value: ip6tnl
|
||||
attribute-set: linkinfo-ip6tnl-attrs
|
||||
-
|
||||
value: sit
|
||||
attribute-set: linkinfo-iptun-attrs
|
||||
|
@ -2204,6 +2294,12 @@ sub-messages:
|
|||
-
|
||||
value: vrf
|
||||
attribute-set: linkinfo-vrf-attrs
|
||||
-
|
||||
value: vti
|
||||
attribute-set: linkinfo-vti-attrs
|
||||
-
|
||||
value: vti6
|
||||
attribute-set: linkinfo-vti6-attrs
|
||||
-
|
||||
value: netkit
|
||||
attribute-set: linkinfo-netkit-attrs
|
||||
|
|
|
@ -177,6 +177,11 @@ attribute-sets:
|
|||
-
|
||||
name: rta-nh-id
|
||||
type: u32
|
||||
-
|
||||
name: rta-flowlabel
|
||||
type: u32
|
||||
byte-order: big-endian
|
||||
display-hint: hex
|
||||
-
|
||||
name: rta-metrics
|
||||
attributes:
|
||||
|
@ -260,6 +265,7 @@ operations:
|
|||
- rta-dport
|
||||
- rta-mark
|
||||
- rta-uid
|
||||
- rta-flowlabel
|
||||
reply:
|
||||
value: 24
|
||||
attributes: &all-route-attrs
|
||||
|
@ -299,6 +305,7 @@ operations:
|
|||
- rta-sport
|
||||
- rta-dport
|
||||
- rta-nh-id
|
||||
- rta-flowlabel
|
||||
dump:
|
||||
request:
|
||||
value: 26
|
||||
|
|
|
@ -172,6 +172,16 @@ attribute-sets:
|
|||
-
|
||||
name: dscp
|
||||
type: u8
|
||||
-
|
||||
name: flowlabel
|
||||
type: u32
|
||||
byte-order: big-endian
|
||||
display-hint: hex
|
||||
-
|
||||
name: flowlabel-mask
|
||||
type: u32
|
||||
byte-order: big-endian
|
||||
display-hint: hex
|
||||
|
||||
operations:
|
||||
enum-model: directional
|
||||
|
@ -203,6 +213,8 @@ operations:
|
|||
- sport-range
|
||||
- dport-range
|
||||
- dscp
|
||||
- flowlabel
|
||||
- flowlabel-mask
|
||||
-
|
||||
name: newrule-ntf
|
||||
doc: Notify a rule creation
|
||||
|
|
|
@ -164,5 +164,5 @@ Mailing-list:
|
|||
|
||||
You can also contact the Authors:
|
||||
|
||||
* Marek Lindner <mareklindner@neomailbox.ch>
|
||||
* Marek Lindner <marek.lindner@mailbox.org>
|
||||
* Simon Wunderlich <sw@simonwunderlich.de>
|
||||
|
|
|
@ -1963,7 +1963,7 @@ obtain its hardware address from the first slave, which might not
|
|||
match the hardware address of the VLAN interfaces (which was
|
||||
ultimately copied from an earlier slave).
|
||||
|
||||
There are two methods to insure that the VLAN device operates
|
||||
There are two methods to ensure that the VLAN device operates
|
||||
with the correct hardware address if all slaves are removed from a
|
||||
bond interface:
|
||||
|
||||
|
@ -2078,7 +2078,7 @@ as an unsolicited ARP reply (because ARP matches replies on an
|
|||
interface basis), and is discarded. The MII monitor is not affected
|
||||
by the state of the routing table.
|
||||
|
||||
The solution here is simply to insure that slaves do not have
|
||||
The solution here is simply to ensure that slaves do not have
|
||||
routes of their own, and if for some reason they must, those routes do
|
||||
not supersede routes of their master. This should generally be the
|
||||
case, but unusual configurations or errant manual or automatic static
|
||||
|
@ -2295,7 +2295,7 @@ active-backup:
|
|||
the switches have an ISL and play together well. If the
|
||||
network configuration is such that one switch is specifically
|
||||
a backup switch (e.g., has lower capacity, higher cost, etc),
|
||||
then the primary option can be used to insure that the
|
||||
then the primary option can be used to ensure that the
|
||||
preferred link is always used when it is available.
|
||||
|
||||
broadcast:
|
||||
|
@ -2322,7 +2322,7 @@ monitor can provide a higher level of reliability in detecting end to
|
|||
end connectivity failures (which may be caused by the failure of any
|
||||
individual component to pass traffic for any reason). Additionally,
|
||||
the ARP monitor should be configured with multiple targets (at least
|
||||
one for each switch in the network). This will insure that,
|
||||
one for each switch in the network). This will ensure that,
|
||||
regardless of which switch is active, the ARP monitor has a suitable
|
||||
target to query.
|
||||
|
||||
|
|
|
@ -299,6 +299,18 @@ Use ethtool to view and set link-down-on-close, as follows::
|
|||
ethtool --show-priv-flags ethX
|
||||
ethtool --set-priv-flags ethX link-down-on-close [on|off]
|
||||
|
||||
Setting the mdd-auto-reset-vf Private Flag
|
||||
------------------------------------------
|
||||
|
||||
When the mdd-auto-reset-vf private flag is set to "on", the problematic VF will
|
||||
be automatically reset if a malformed descriptor is detected. If the flag is
|
||||
set to "off", the problematic VF will be disabled.
|
||||
|
||||
Use ethtool to view and set mdd-auto-reset-vf, as follows::
|
||||
|
||||
ethtool --show-priv-flags ethX
|
||||
ethtool --set-priv-flags ethX mdd-auto-reset-vf [on|off]
|
||||
|
||||
Viewing Link Messages
|
||||
---------------------
|
||||
Link messages will not be displayed to the console if the distribution is
|
||||
|
|
|
@ -53,6 +53,9 @@ parameters.
|
|||
* ``smfs`` Software managed flow steering. In SMFS mode, the HW
|
||||
steering entities are created and manage through the driver without
|
||||
firmware intervention.
|
||||
* ``hmfs`` Hardware managed flow steering. In HMFS mode, the driver
|
||||
is configuring steering rules directly to the HW using Work Queues with
|
||||
a special new type of WQE (Work Queue Element).
|
||||
|
||||
SMFS mode is faster and provides better rule insertion rate compared to
|
||||
default DMFS mode.
|
||||
|
|
|
@ -713,17 +713,23 @@ driver supports reporting such events.
|
|||
|
||||
- **Monitor Error Counters**:
|
||||
|
||||
- While some NIC drivers and PHYs provide error counters, there is no unified
|
||||
set of PHY-specific counters across all hardware. Additionally, not all
|
||||
PHYs provide useful information related to errors like CRC errors, frame
|
||||
drops, or link flaps. Therefore, this step is dependent on the specific
|
||||
hardware and driver support.
|
||||
- Use `ethtool -S <interface> --all-groups` to retrieve standardized interface
|
||||
statistics if the driver supports the unified interface:
|
||||
|
||||
- **Next Steps**: Use `ethtool -S <interface>` to check if your driver
|
||||
provides useful error counters. In some cases, counters may provide
|
||||
information about errors like link flaps or physical layer problems (e.g.,
|
||||
excessive CRC errors), but results can vary significantly depending on the
|
||||
PHY.
|
||||
- **Command:** `ethtool -S <interface> --all-groups`
|
||||
|
||||
- **Example Output (if supported)**:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
phydev-RxFrames: 100391
|
||||
phydev-RxErrors: 0
|
||||
phydev-TxFrames: 9
|
||||
phydev-TxErrors: 0
|
||||
|
||||
- If the unified interface is not supported, use `ethtool -S <interface>` to
|
||||
retrieve MAC and PHY counters. Note that non-standardized PHY counter names
|
||||
vary by driver and must be interpreted accordingly:
|
||||
|
||||
- **Command:** `ethtool -S <interface>`
|
||||
|
||||
|
@ -740,6 +746,17 @@ driver supports reporting such events.
|
|||
condition) or kernel log messages (e.g., link up/down events) to further
|
||||
diagnose the issue.
|
||||
|
||||
- **Compare Counters**:
|
||||
|
||||
- Compare the egress and ingress frame counts reported by the PHY and MAC.
|
||||
|
||||
- A small difference may occur due to sampling rate differences between the
|
||||
MAC and PHY drivers, or if the PHY and MAC are not always fully
|
||||
synchronized in their UP or DOWN states.
|
||||
|
||||
- Significant discrepancies indicate potential issues in the data path
|
||||
between the MAC and PHY.
|
||||
|
||||
When All Else Fails...
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -237,6 +237,8 @@ Userspace to kernel:
|
|||
``ETHTOOL_MSG_MM_SET`` set MAC merge layer parameters
|
||||
``ETHTOOL_MSG_MODULE_FW_FLASH_ACT`` flash transceiver module firmware
|
||||
``ETHTOOL_MSG_PHY_GET`` get Ethernet PHY information
|
||||
``ETHTOOL_MSG_TSCONFIG_GET`` get hw timestamping configuration
|
||||
``ETHTOOL_MSG_TSCONFIG_SET`` set hw timestamping configuration
|
||||
===================================== =================================
|
||||
|
||||
Kernel to userspace:
|
||||
|
@ -286,6 +288,8 @@ Kernel to userspace:
|
|||
``ETHTOOL_MSG_MODULE_FW_FLASH_NTF`` transceiver module flash updates
|
||||
``ETHTOOL_MSG_PHY_GET_REPLY`` Ethernet PHY information
|
||||
``ETHTOOL_MSG_PHY_NTF`` Ethernet PHY information change
|
||||
``ETHTOOL_MSG_TSCONFIG_GET_REPLY`` hw timestamping configuration
|
||||
``ETHTOOL_MSG_TSCONFIG_SET_REPLY`` new hw timestamping configuration
|
||||
======================================== =================================
|
||||
|
||||
``GET`` requests are sent by userspace applications to retrieve device
|
||||
|
@ -895,6 +899,10 @@ Kernel response contents:
|
|||
``ETHTOOL_A_RINGS_RX_PUSH`` u8 flag of RX Push mode
|
||||
``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN`` u32 size of TX push buffer
|
||||
``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX`` u32 max size of TX push buffer
|
||||
``ETHTOOL_A_RINGS_HDS_THRESH`` u32 threshold of
|
||||
header / data split
|
||||
``ETHTOOL_A_RINGS_HDS_THRESH_MAX`` u32 max threshold of
|
||||
header / data split
|
||||
======================================= ====== ===========================
|
||||
|
||||
``ETHTOOL_A_RINGS_TCP_DATA_SPLIT`` indicates whether the device is usable with
|
||||
|
@ -937,10 +945,12 @@ Request contents:
|
|||
``ETHTOOL_A_RINGS_RX_JUMBO`` u32 size of RX jumbo ring
|
||||
``ETHTOOL_A_RINGS_TX`` u32 size of TX ring
|
||||
``ETHTOOL_A_RINGS_RX_BUF_LEN`` u32 size of buffers on the ring
|
||||
``ETHTOOL_A_RINGS_TCP_DATA_SPLIT`` u8 TCP header / data split
|
||||
``ETHTOOL_A_RINGS_CQE_SIZE`` u32 Size of TX/RX CQE
|
||||
``ETHTOOL_A_RINGS_TX_PUSH`` u8 flag of TX Push mode
|
||||
``ETHTOOL_A_RINGS_RX_PUSH`` u8 flag of RX Push mode
|
||||
``ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN`` u32 size of TX push buffer
|
||||
``ETHTOOL_A_RINGS_HDS_THRESH`` u32 threshold of header / data split
|
||||
==================================== ====== ===========================
|
||||
|
||||
Kernel checks that requested ring sizes do not exceed limits reported by
|
||||
|
@ -957,6 +967,10 @@ A bigger CQE can have more receive buffer pointers, and in turn the NIC can
|
|||
transfer a bigger frame from wire. Based on the NIC hardware, the overall
|
||||
completion queue size can be adjusted in the driver if CQE size is modified.
|
||||
|
||||
``ETHTOOL_A_RINGS_HDS_THRESH`` specifies the threshold value of
|
||||
header / data split feature. If a received packet size is larger than this
|
||||
threshold value, header and data will be split.
|
||||
|
||||
CHANNELS_GET
|
||||
============
|
||||
|
||||
|
@ -1245,9 +1259,10 @@ Gets timestamping information like ``ETHTOOL_GET_TS_INFO`` ioctl request.
|
|||
|
||||
Request contents:
|
||||
|
||||
===================================== ====== ==========================
|
||||
``ETHTOOL_A_TSINFO_HEADER`` nested request header
|
||||
===================================== ====== ==========================
|
||||
======================================== ====== ============================
|
||||
``ETHTOOL_A_TSINFO_HEADER`` nested request header
|
||||
``ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER`` nested PTP hw clock provider
|
||||
======================================== ====== ============================
|
||||
|
||||
Kernel response contents:
|
||||
|
||||
|
@ -1266,11 +1281,17 @@ would be empty (no bit set).
|
|||
|
||||
Additional hardware timestamping statistics response contents:
|
||||
|
||||
===================================== ====== ===================================
|
||||
``ETHTOOL_A_TS_STAT_TX_PKTS`` uint Packets with Tx HW timestamps
|
||||
``ETHTOOL_A_TS_STAT_TX_LOST`` uint Tx HW timestamp not arrived count
|
||||
``ETHTOOL_A_TS_STAT_TX_ERR`` uint HW error request Tx timestamp count
|
||||
===================================== ====== ===================================
|
||||
================================================== ====== =====================
|
||||
``ETHTOOL_A_TS_STAT_TX_PKTS`` uint Packets with Tx
|
||||
HW timestamps
|
||||
``ETHTOOL_A_TS_STAT_TX_LOST`` uint Tx HW timestamp
|
||||
not arrived count
|
||||
``ETHTOOL_A_TS_STAT_TX_ERR`` uint HW error request
|
||||
Tx timestamp count
|
||||
``ETHTOOL_A_TS_STAT_TX_ONESTEP_PKTS_UNCONFIRMED`` uint Packets with one-step
|
||||
HW TX timestamps with
|
||||
unconfirmed delivery
|
||||
================================================== ====== =====================
|
||||
|
||||
CABLE_TEST
|
||||
==========
|
||||
|
@ -1611,6 +1632,7 @@ the ``ETHTOOL_A_STATS_GROUPS`` bitset. Currently defined values are:
|
|||
ETHTOOL_STATS_ETH_PHY eth-phy Basic IEEE 802.3 PHY statistics (30.3.2.1.*)
|
||||
ETHTOOL_STATS_ETH_CTRL eth-ctrl Basic IEEE 802.3 MAC Ctrl statistics (30.3.3.*)
|
||||
ETHTOOL_STATS_RMON rmon RMON (RFC 2819) statistics
|
||||
ETHTOOL_STATS_PHY phy Additional PHY statistics, not defined by IEEE
|
||||
====================== ======== ===============================================
|
||||
|
||||
Each group should have a corresponding ``ETHTOOL_A_STATS_GRP`` in the reply.
|
||||
|
@ -2243,6 +2265,75 @@ Kernel response contents:
|
|||
When ``ETHTOOL_A_PHY_UPSTREAM_TYPE`` is PHY_UPSTREAM_PHY, the PHY's parent is
|
||||
another PHY.
|
||||
|
||||
TSCONFIG_GET
|
||||
============
|
||||
|
||||
Retrieves the information about the current hardware timestamping source and
|
||||
configuration.
|
||||
|
||||
It is similar to the deprecated ``SIOCGHWTSTAMP`` ioctl request.
|
||||
|
||||
Request contents:
|
||||
|
||||
==================================== ====== ==========================
|
||||
``ETHTOOL_A_TSCONFIG_HEADER`` nested request header
|
||||
==================================== ====== ==========================
|
||||
|
||||
Kernel response contents:
|
||||
|
||||
======================================== ====== ============================
|
||||
``ETHTOOL_A_TSCONFIG_HEADER`` nested request header
|
||||
``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER`` nested PTP hw clock provider
|
||||
``ETHTOOL_A_TSCONFIG_TX_TYPES`` bitset hwtstamp Tx type
|
||||
``ETHTOOL_A_TSCONFIG_RX_FILTERS`` bitset hwtstamp Rx filter
|
||||
``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS`` u32 hwtstamp flags
|
||||
======================================== ====== ============================
|
||||
|
||||
When set the ``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER`` attribute identifies the
|
||||
source of the hw timestamping provider. It is composed by
|
||||
``ETHTOOL_A_TS_HWTSTAMP_PROVIDER_INDEX`` attribute which describe the index of
|
||||
the PTP device and ``ETHTOOL_A_TS_HWTSTAMP_PROVIDER_QUALIFIER`` which describe
|
||||
the qualifier of the timestamp.
|
||||
|
||||
When set the ``ETHTOOL_A_TSCONFIG_TX_TYPES``, ``ETHTOOL_A_TSCONFIG_RX_FILTERS``
|
||||
and the ``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS`` attributes identify the Tx
|
||||
type, the Rx filter and the flags configured for the current hw timestamping
|
||||
provider. The attributes are propagated to the driver through the following
|
||||
structure:
|
||||
|
||||
.. kernel-doc:: include/linux/net_tstamp.h
|
||||
:identifiers: kernel_hwtstamp_config
|
||||
|
||||
TSCONFIG_SET
|
||||
============
|
||||
|
||||
Set the information about the current hardware timestamping source and
|
||||
configuration.
|
||||
|
||||
It is similar to the deprecated ``SIOCSHWTSTAMP`` ioctl request.
|
||||
|
||||
Request contents:
|
||||
|
||||
======================================== ====== ============================
|
||||
``ETHTOOL_A_TSCONFIG_HEADER`` nested request header
|
||||
``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER`` nested PTP hw clock provider
|
||||
``ETHTOOL_A_TSCONFIG_TX_TYPES`` bitset hwtstamp Tx type
|
||||
``ETHTOOL_A_TSCONFIG_RX_FILTERS`` bitset hwtstamp Rx filter
|
||||
``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS`` u32 hwtstamp flags
|
||||
======================================== ====== ============================
|
||||
|
||||
Kernel response contents:
|
||||
|
||||
======================================== ====== ============================
|
||||
``ETHTOOL_A_TSCONFIG_HEADER`` nested request header
|
||||
``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER`` nested PTP hw clock provider
|
||||
``ETHTOOL_A_TSCONFIG_TX_TYPES`` bitset hwtstamp Tx type
|
||||
``ETHTOOL_A_TSCONFIG_RX_FILTERS`` bitset hwtstamp Rx filter
|
||||
``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS`` u32 hwtstamp flags
|
||||
======================================== ====== ============================
|
||||
|
||||
For a description of each attribute, see ``TSCONFIG_GET``.
|
||||
|
||||
Request translation
|
||||
===================
|
||||
|
||||
|
@ -2351,4 +2442,6 @@ are netlink only.
|
|||
n/a ``ETHTOOL_MSG_MM_SET``
|
||||
n/a ``ETHTOOL_MSG_MODULE_FW_FLASH_ACT``
|
||||
n/a ``ETHTOOL_MSG_PHY_GET``
|
||||
``SIOCGHWTSTAMP`` ``ETHTOOL_MSG_TSCONFIG_GET``
|
||||
``SIOCSHWTSTAMP`` ``ETHTOOL_MSG_TSCONFIG_SET``
|
||||
=================================== =====================================
|
||||
|
|
|
@ -72,7 +72,8 @@ exports a management (e.g. MLME) and data API.
|
|||
possibly with some kinds of acceleration like automatic CRC computation and
|
||||
comparison, automagic ACK handling, address matching, etc.
|
||||
|
||||
Those types of devices require different approach to be hooked into Linux kernel.
|
||||
Each type of device requires a different approach to be hooked into the Linux
|
||||
kernel.
|
||||
|
||||
HardMAC
|
||||
-------
|
||||
|
@ -81,10 +82,10 @@ See the header include/net/ieee802154_netdev.h. You have to implement Linux
|
|||
net_device, with .type = ARPHRD_IEEE802154. Data is exchanged with socket family
|
||||
code via plain sk_buffs. On skb reception skb->cb must contain additional
|
||||
info as described in the struct ieee802154_mac_cb. During packet transmission
|
||||
the skb->cb is used to provide additional data to device's header_ops->create
|
||||
function. Be aware that this data can be overridden later (when socket code
|
||||
submits skb to qdisc), so if you need something from that cb later, you should
|
||||
store info in the skb->data on your own.
|
||||
the skb->cb is used to provide additional data to the device's
|
||||
header_ops->create function. Be aware that this data can be overridden later
|
||||
(when socket code submits skb to qdisc), so if you need something from that cb
|
||||
later, you should store info in the skb->data on your own.
|
||||
|
||||
To hook the MLME interface you have to populate the ml_priv field of your
|
||||
net_device with a pointer to struct ieee802154_mlme_ops instance. The fields
|
||||
|
@ -94,8 +95,9 @@ All other fields are required.
|
|||
SoftMAC
|
||||
-------
|
||||
|
||||
The MAC is the middle layer in the IEEE 802.15.4 Linux stack. This moment it
|
||||
provides interface for drivers registration and management of slave interfaces.
|
||||
The MAC is the middle layer in the IEEE 802.15.4 Linux stack. At the moment, it
|
||||
provides an interface for driver registration and management of slave
|
||||
interfaces.
|
||||
|
||||
NOTE: Currently the only monitor device type is supported - it's IEEE 802.15.4
|
||||
stack interface for network sniffers (e.g. WireShark).
|
||||
|
|
|
@ -86,6 +86,7 @@ Contents:
|
|||
netdevices
|
||||
netfilter-sysctl
|
||||
netif-msg
|
||||
netmem
|
||||
nexthop-group-resilient
|
||||
nf_conntrack-sysctl
|
||||
nf_flowtable
|
||||
|
|
|
@ -1000,6 +1000,20 @@ tcp_tw_reuse - INTEGER
|
|||
|
||||
Default: 2
|
||||
|
||||
tcp_tw_reuse_delay - UNSIGNED INTEGER
|
||||
The delay in milliseconds before a TIME-WAIT socket can be reused by a
|
||||
new connection, if TIME-WAIT socket reuse is enabled. The actual reuse
|
||||
threshold is within [N, N+1] range, where N is the requested delay in
|
||||
milliseconds, to ensure the delay interval is never shorter than the
|
||||
configured value.
|
||||
|
||||
This setting contains an assumption about the other TCP timestamp clock
|
||||
tick interval. It should not be set to a value lower than the peer's
|
||||
clock tick for PAWS (Protection Against Wrapped Sequence numbers)
|
||||
mechanism work correctly for the reused connection.
|
||||
|
||||
Default: 1000 (milliseconds)
|
||||
|
||||
tcp_window_scaling - BOOLEAN
|
||||
Enable window scaling as defined in RFC1323.
|
||||
|
||||
|
|
|
@ -108,3 +108,19 @@ stale_loss_cnt - INTEGER
|
|||
This is a per-namespace sysctl.
|
||||
|
||||
Default: 4
|
||||
|
||||
syn_retrans_before_tcp_fallback - INTEGER
|
||||
The number of SYN + MP_CAPABLE retransmissions before falling back to
|
||||
TCP, i.e. dropping the MPTCP options. In other words, if all the packets
|
||||
are dropped on the way, there will be:
|
||||
|
||||
* The initial SYN with MPTCP support
|
||||
* This number of SYN retransmitted with MPTCP support
|
||||
* The next SYN retransmissions will be without MPTCP support
|
||||
|
||||
0 means the first retransmission will be done without MPTCP options.
|
||||
>= 128 means that all SYN retransmissions will keep the MPTCP options. A
|
||||
lower number might increase false-positive MPTCP blackholes detections.
|
||||
This is a per-namespace sysctl.
|
||||
|
||||
Default: 2
|
||||
|
|
|
@ -89,7 +89,7 @@ Observability
|
|||
=============
|
||||
The relation between PF, irq, napi, and queue can be observed via netlink spec::
|
||||
|
||||
$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml --dump queue-get --json='{"ifindex": 13}'
|
||||
$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml --dump queue-get --json='{"ifindex": 13}'
|
||||
[{'id': 0, 'ifindex': 13, 'napi-id': 539, 'type': 'rx'},
|
||||
{'id': 1, 'ifindex': 13, 'napi-id': 540, 'type': 'rx'},
|
||||
{'id': 2, 'ifindex': 13, 'napi-id': 541, 'type': 'rx'},
|
||||
|
@ -101,7 +101,7 @@ The relation between PF, irq, napi, and queue can be observed via netlink spec::
|
|||
{'id': 3, 'ifindex': 13, 'napi-id': 542, 'type': 'tx'},
|
||||
{'id': 4, 'ifindex': 13, 'napi-id': 543, 'type': 'tx'}]
|
||||
|
||||
$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml --dump napi-get --json='{"ifindex": 13}'
|
||||
$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml --dump napi-get --json='{"ifindex": 13}'
|
||||
[{'id': 543, 'ifindex': 13, 'irq': 42},
|
||||
{'id': 542, 'ifindex': 13, 'irq': 41},
|
||||
{'id': 541, 'ifindex': 13, 'irq': 40},
|
||||
|
|
|
@ -199,13 +199,13 @@ parameters mentioned above use hyphens instead of underscores:
|
|||
|
||||
Per-NAPI configuration can be done programmatically in a user application
|
||||
or by using a script included in the kernel source tree:
|
||||
``tools/net/ynl/cli.py``.
|
||||
``tools/net/ynl/pyynl/cli.py``.
|
||||
|
||||
For example, using the script:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ kernel-source/tools/net/ynl/cli.py \
|
||||
$ kernel-source/tools/net/ynl/pyynl/cli.py \
|
||||
--spec Documentation/netlink/specs/netdev.yaml \
|
||||
--do napi-set \
|
||||
--json='{"id": 345,
|
||||
|
|
|
@ -79,6 +79,7 @@ u8 sysctl_tcp_retries1
|
|||
u8 sysctl_tcp_retries2
|
||||
u8 sysctl_tcp_orphan_retries
|
||||
u8 sysctl_tcp_tw_reuse timewait_sock_ops
|
||||
unsigned_int sysctl_tcp_tw_reuse_delay timewait_sock_ops
|
||||
int sysctl_tcp_fin_timeout TCP_LAST_ACK/tcp_rcv_state_process
|
||||
unsigned_int sysctl_tcp_notsent_lowat read_mostly tcp_notsent_lowat/tcp_stream_memory_free
|
||||
u8 sysctl_tcp_sack tcp_syn_options
|
||||
|
|
|
@ -124,7 +124,7 @@ To remove a target::
|
|||
|
||||
The interface exposes these parameters of a netconsole target to userspace:
|
||||
|
||||
============== ================================= ============
|
||||
=============== ================================= ============
|
||||
enabled Is this target currently enabled? (read-write)
|
||||
extended Extended mode enabled (read-write)
|
||||
release Prepend kernel release to message (read-write)
|
||||
|
@ -135,7 +135,8 @@ The interface exposes these parameters of a netconsole target to userspace:
|
|||
remote_ip Remote agent's IP address (read-write)
|
||||
local_mac Local interface's MAC address (read-only)
|
||||
remote_mac Remote agent's MAC address (read-write)
|
||||
============== ================================= ============
|
||||
transmit_errors Number of packet send errors (read-only)
|
||||
=============== ================================= ============
|
||||
|
||||
The "enabled" attribute is also used to control whether the parameters of
|
||||
a target can be updated or not -- you can modify the parameters of only
|
||||
|
|
|
@ -297,3 +297,13 @@ napi->poll:
|
|||
Context:
|
||||
softirq
|
||||
will be called with interrupts disabled by netconsole.
|
||||
|
||||
NETDEV_INTERNAL symbol namespace
|
||||
================================
|
||||
|
||||
Symbols exported as NETDEV_INTERNAL can only be used in networking
|
||||
core and drivers which exclusively flow via the main networking list and trees.
|
||||
Note that the inverse is not true, most symbols outside of NETDEV_INTERNAL
|
||||
are not expected to be used by random code outside netdev either.
|
||||
Symbols may lack the designation because they predate the namespaces,
|
||||
or simply due to an oversight.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
This file is populated during the build of the documentation (htmldocs) by the
|
||||
tools/net/ynl/ynl-gen-rst.py script.
|
||||
tools/net/ynl/pyynl/ynl_gen_rst.py script.
|
||||
|
|
79
Documentation/networking/netmem.rst
Normal file
79
Documentation/networking/netmem.rst
Normal file
|
@ -0,0 +1,79 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
==================================
|
||||
Netmem Support for Network Drivers
|
||||
==================================
|
||||
|
||||
This document outlines the requirements for network drivers to support netmem,
|
||||
an abstract memory type that enables features like device memory TCP. By
|
||||
supporting netmem, drivers can work with various underlying memory types
|
||||
with little to no modification.
|
||||
|
||||
Benefits of Netmem :
|
||||
|
||||
* Flexibility: Netmem can be backed by different memory types (e.g., struct
|
||||
page, DMA-buf), allowing drivers to support various use cases such as device
|
||||
memory TCP.
|
||||
* Future-proof: Drivers with netmem support are ready for upcoming
|
||||
features that rely on it.
|
||||
* Simplified Development: Drivers interact with a consistent API,
|
||||
regardless of the underlying memory implementation.
|
||||
|
||||
Driver Requirements
|
||||
===================
|
||||
|
||||
1. The driver must support page_pool.
|
||||
|
||||
2. The driver must support the tcp-data-split ethtool option.
|
||||
|
||||
3. The driver must use the page_pool netmem APIs for payload memory. The netmem
|
||||
APIs currently 1-to-1 correspond with page APIs. Conversion to netmem should
|
||||
be achievable by switching the page APIs to netmem APIs and tracking memory
|
||||
via netmem_refs in the driver rather than struct page * :
|
||||
|
||||
- page_pool_alloc -> page_pool_alloc_netmem
|
||||
- page_pool_get_dma_addr -> page_pool_get_dma_addr_netmem
|
||||
- page_pool_put_page -> page_pool_put_netmem
|
||||
|
||||
Not all page APIs have netmem equivalents at the moment. If your driver
|
||||
relies on a missing netmem API, feel free to add and propose to netdev@, or
|
||||
reach out to the maintainers and/or almasrymina@google.com for help adding
|
||||
the netmem API.
|
||||
|
||||
4. The driver must use the following PP_FLAGS:
|
||||
|
||||
- PP_FLAG_DMA_MAP: netmem is not dma-mappable by the driver. The driver
|
||||
must delegate the dma mapping to the page_pool, which knows when
|
||||
dma-mapping is (or is not) appropriate.
|
||||
- PP_FLAG_DMA_SYNC_DEV: netmem dma addr is not necessarily dma-syncable
|
||||
by the driver. The driver must delegate the dma syncing to the page_pool,
|
||||
which knows when dma-syncing is (or is not) appropriate.
|
||||
- PP_FLAG_ALLOW_UNREADABLE_NETMEM. The driver must specify this flag iff
|
||||
tcp-data-split is enabled.
|
||||
|
||||
5. The driver must not assume the netmem is readable and/or backed by pages.
|
||||
The netmem returned by the page_pool may be unreadable, in which case
|
||||
netmem_address() will return NULL. The driver must correctly handle
|
||||
unreadable netmem, i.e. don't attempt to handle its contents when
|
||||
netmem_address() is NULL.
|
||||
|
||||
Ideally, drivers should not have to check the underlying netmem type via
|
||||
helpers like netmem_is_net_iov() or convert the netmem to any of its
|
||||
underlying types via netmem_to_page() or netmem_to_net_iov(). In most cases,
|
||||
netmem or page_pool helpers that abstract this complexity are provided
|
||||
(and more can be added).
|
||||
|
||||
6. The driver must use page_pool_dma_sync_netmem_for_cpu() in lieu of
|
||||
dma_sync_single_range_for_cpu(). For some memory providers, dma_syncing for
|
||||
CPU will be done by the page_pool, for others (particularly dmabuf memory
|
||||
provider), dma syncing for CPU is the responsibility of the userspace using
|
||||
dmabuf APIs. The driver must delegate the entire dma-syncing operation to
|
||||
the page_pool which will do it correctly.
|
||||
|
||||
7. Avoid implementing driver-specific recycling on top of the page_pool. Drivers
|
||||
cannot hold onto a struct page to do their own recycling as the netmem may
|
||||
not be backed by a struct page. However, you may hold onto a page_pool
|
||||
reference with page_pool_fragment_netmem() or page_pool_ref_netmem() for
|
||||
that purpose, but be mindful that some netmem types might have longer
|
||||
circulation times, such as when userspace holds a reference in zerocopy
|
||||
scenarios.
|
|
@ -525,8 +525,8 @@ implicitly defined. ts[0] holds a software timestamp if set, ts[1]
|
|||
is again deprecated and ts[2] holds a hardware timestamp if set.
|
||||
|
||||
|
||||
3. Hardware Timestamping configuration: SIOCSHWTSTAMP and SIOCGHWTSTAMP
|
||||
=======================================================================
|
||||
3. Hardware Timestamping configuration: ETHTOOL_MSG_TSCONFIG_SET/GET
|
||||
====================================================================
|
||||
|
||||
Hardware time stamping must also be initialized for each device driver
|
||||
that is expected to do hardware time stamping. The parameter is defined in
|
||||
|
@ -539,12 +539,14 @@ include/uapi/linux/net_tstamp.h as::
|
|||
};
|
||||
|
||||
Desired behavior is passed into the kernel and to a specific device by
|
||||
calling ioctl(SIOCSHWTSTAMP) with a pointer to a struct ifreq whose
|
||||
ifr_data points to a struct hwtstamp_config. The tx_type and
|
||||
rx_filter are hints to the driver what it is expected to do. If
|
||||
the requested fine-grained filtering for incoming packets is not
|
||||
supported, the driver may time stamp more than just the requested types
|
||||
of packets.
|
||||
calling the tsconfig netlink socket ``ETHTOOL_MSG_TSCONFIG_SET``.
|
||||
The ``ETHTOOL_A_TSCONFIG_TX_TYPES``, ``ETHTOOL_A_TSCONFIG_RX_FILTERS`` and
|
||||
``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS`` netlink attributes are then used to set
|
||||
the struct hwtstamp_config accordingly.
|
||||
|
||||
The ``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER`` netlink nested attribute is used
|
||||
to select the source of the hardware time stamping. It is composed of an index
|
||||
for the device source and a qualifier for the type of time stamping.
|
||||
|
||||
Drivers are free to use a more permissive configuration than the requested
|
||||
configuration. It is expected that drivers should only implement directly the
|
||||
|
@ -563,9 +565,16 @@ Only a processes with admin rights may change the configuration. User
|
|||
space is responsible to ensure that multiple processes don't interfere
|
||||
with each other and that the settings are reset.
|
||||
|
||||
Any process can read the actual configuration by passing this
|
||||
structure to ioctl(SIOCGHWTSTAMP) in the same way. However, this has
|
||||
not been implemented in all drivers.
|
||||
Any process can read the actual configuration by requesting tsconfig netlink
|
||||
socket ``ETHTOOL_MSG_TSCONFIG_GET``.
|
||||
|
||||
The legacy configuration is the use of the ioctl(SIOCSHWTSTAMP) with a pointer
|
||||
to a struct ifreq whose ifr_data points to a struct hwtstamp_config.
|
||||
The tx_type and rx_filter are hints to the driver what it is expected to do.
|
||||
If the requested fine-grained filtering for incoming packets is not
|
||||
supported, the driver may time stamp more than just the requested types
|
||||
of packets. ioctl(SIOCGHWTSTAMP) is used in the same way as the
|
||||
ioctl(SIOCSHWTSTAMP). However, this has not been implemented in all drivers.
|
||||
|
||||
::
|
||||
|
||||
|
@ -610,9 +619,10 @@ not been implemented in all drivers.
|
|||
--------------------------------------------------------
|
||||
|
||||
A driver which supports hardware time stamping must support the
|
||||
SIOCSHWTSTAMP ioctl and update the supplied struct hwtstamp_config with
|
||||
the actual values as described in the section on SIOCSHWTSTAMP. It
|
||||
should also support SIOCGHWTSTAMP.
|
||||
ndo_hwtstamp_set NDO or the legacy SIOCSHWTSTAMP ioctl and update the
|
||||
supplied struct hwtstamp_config with the actual values as described in
|
||||
the section on SIOCSHWTSTAMP. It should also support ndo_hwtstamp_get or
|
||||
the legacy SIOCGHWTSTAMP.
|
||||
|
||||
Time stamps for received packets must be stored in the skb. To get a pointer
|
||||
to the shared time stamp structure of the skb call skb_hwtstamps(). Then
|
||||
|
|
|
@ -200,6 +200,32 @@ received without a cmsg buffer set.
|
|||
|
||||
recv will never return data from mixed types of TLS records.
|
||||
|
||||
TLS 1.3 Key Updates
|
||||
-------------------
|
||||
|
||||
In TLS 1.3, KeyUpdate handshake messages signal that the sender is
|
||||
updating its TX key. Any message sent after a KeyUpdate will be
|
||||
encrypted using the new key. The userspace library can pass the new
|
||||
key to the kernel using the TLS_TX and TLS_RX socket options, as for
|
||||
the initial keys. TLS version and cipher cannot be changed.
|
||||
|
||||
To prevent attempting to decrypt incoming records using the wrong key,
|
||||
decryption will be paused when a KeyUpdate message is received by the
|
||||
kernel, until the new key has been provided using the TLS_RX socket
|
||||
option. Any read occurring after the KeyUpdate has been read and
|
||||
before the new key is provided will fail with EKEYEXPIRED. poll() will
|
||||
not report any read events from the socket until the new key is
|
||||
provided. There is no pausing on the transmit side.
|
||||
|
||||
Userspace should make sure that the crypto_info provided has been set
|
||||
properly. In particular, the kernel will not check for key/nonce
|
||||
reuse.
|
||||
|
||||
The number of successful and failed key updates is tracked in the
|
||||
``TlsTxRekeyOk``, ``TlsRxRekeyOk``, ``TlsTxRekeyError``,
|
||||
``TlsRxRekeyError`` statistics. The ``TlsRxRekeyReceived`` statistic
|
||||
counts KeyUpdate handshake messages that have been received.
|
||||
|
||||
Integrating in to userspace TLS library
|
||||
---------------------------------------
|
||||
|
||||
|
@ -286,3 +312,13 @@ TLS implementation exposes the following per-namespace statistics
|
|||
- ``TlsRxNoPadViolation`` -
|
||||
number of data RX records which had to be re-decrypted due to
|
||||
``TLS_RX_EXPECT_NO_PAD`` mis-prediction.
|
||||
|
||||
- ``TlsTxRekeyOk``, ``TlsRxRekeyOk`` -
|
||||
number of successful rekeys on existing sessions for TX and RX
|
||||
|
||||
- ``TlsTxRekeyError``, ``TlsRxRekeyError`` -
|
||||
number of failed rekeys on existing sessions for TX and RX
|
||||
|
||||
- ``TlsRxRekeyReceived`` -
|
||||
number of received KeyUpdate handshake messages, requiring userspace
|
||||
to provide a new RX key
|
||||
|
|
|
@ -169,7 +169,8 @@ the stack in xfrm_input().
|
|||
|
||||
hand the packet to napi_gro_receive() as usual
|
||||
|
||||
In ESN mode, xdo_dev_state_advance_esn() is called from xfrm_replay_advance_esn().
|
||||
In ESN mode, xdo_dev_state_advance_esn() is called from
|
||||
xfrm_replay_advance_esn() for RX, and xfrm_replay_overflow_offload_esn for TX.
|
||||
Driver will check packet seq number and update HW ESN state machine if needed.
|
||||
|
||||
Packet offload mode:
|
||||
|
|
|
@ -470,6 +470,52 @@ in a way which would break what would normally be considered uAPI.
|
|||
new ``netdevsim`` features must be accompanied by selftests under
|
||||
``tools/testing/selftests/``.
|
||||
|
||||
Supported status for drivers
|
||||
----------------------------
|
||||
|
||||
.. note: The following requirements apply only to Ethernet NIC drivers.
|
||||
|
||||
Netdev defines additional requirements for drivers which want to acquire
|
||||
the ``Supported`` status in the MAINTAINERS file. ``Supported`` drivers must
|
||||
be running all upstream driver tests and reporting the results twice a day.
|
||||
Drivers which do not comply with this requirement should use the ``Maintained``
|
||||
status. There is currently no difference in how ``Supported`` and ``Maintained``
|
||||
drivers are treated upstream.
|
||||
|
||||
The exact rules a driver must follow to acquire the ``Supported`` status:
|
||||
|
||||
1. Must run all tests under ``drivers/net`` and ``drivers/net/hw`` targets
|
||||
of Linux selftests. Running and reporting private / internal tests is
|
||||
also welcome, but upstream tests are a must.
|
||||
|
||||
2. The minimum run frequency is once every 12 hours. Must test the
|
||||
designated branch from the selected branch feed. Note that branches
|
||||
are auto-constructed and exposed to intentional malicious patch posting,
|
||||
so the test systems must be isolated.
|
||||
|
||||
3. Drivers supporting multiple generations of devices must test at
|
||||
least one device from each generation. A testbed manifest (exact
|
||||
format TBD) should describe the device models tested.
|
||||
|
||||
4. The tests must run reliably, if multiple branches are skipped or tests
|
||||
are failing due to execution environment problems the ``Supported``
|
||||
status will be withdrawn.
|
||||
|
||||
5. Test failures due to bugs either in the driver or the test itself,
|
||||
or lack of support for the feature the test is targgeting are
|
||||
*not* a basis for losing the ``Supported`` status.
|
||||
|
||||
netdev CI will maintain an official page of supported devices, listing their
|
||||
recent test results.
|
||||
|
||||
The driver maintainer may arrange for someone else to run the test,
|
||||
there is no requirement for the person listed as maintainer (or their
|
||||
employer) to be responsible for running the tests. Collaboration between
|
||||
vendors, hosting GH CI, other repos under linux-netdev, etc. is most welcome.
|
||||
|
||||
See https://github.com/linux-netdev/nipa/wiki for more information about
|
||||
netdev CI. Feel free to reach out to maintainers or the list with any questions.
|
||||
|
||||
Reviewer guidance
|
||||
-----------------
|
||||
|
||||
|
|
|
@ -56,7 +56,9 @@ If ``name-prefix`` is specified it replaces the ``$family-$enum``
|
|||
portion of the entry name.
|
||||
|
||||
Boolean ``render-max`` controls creation of the max values
|
||||
(which are enabled by default for attribute enums).
|
||||
(which are enabled by default for attribute enums). These max
|
||||
values are named ``__$pfx-MAX`` and ``$pfx-MAX``. The name
|
||||
of the first value can be overridden via ``enum-cnt-name`` property.
|
||||
|
||||
Attributes
|
||||
==========
|
||||
|
|
|
@ -15,7 +15,7 @@ developing Netlink related code. The tool is implemented in Python
|
|||
and can use a YAML specification to issue Netlink requests
|
||||
to the kernel. Only Generic Netlink is supported.
|
||||
|
||||
The tool is located at ``tools/net/ynl/cli.py``. It accepts
|
||||
The tool is located at ``tools/net/ynl/pyynl/cli.py``. It accepts
|
||||
a handul of arguments, the most important ones are:
|
||||
|
||||
- ``--spec`` - point to the spec file
|
||||
|
@ -27,7 +27,7 @@ YAML specs can be found under ``Documentation/netlink/specs/``.
|
|||
|
||||
Example use::
|
||||
|
||||
$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml \
|
||||
$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml \
|
||||
--do rings-get \
|
||||
--json '{"header":{"dev-index": 18}}'
|
||||
{'header': {'dev-index': 18, 'dev-name': 'eni1np1'},
|
||||
|
@ -75,7 +75,7 @@ the two marker lines like above to a file, add that file to git,
|
|||
and run the regeneration tool. Grep the tree for ``YNL-GEN``
|
||||
to see other examples.
|
||||
|
||||
The code generation itself is performed by ``tools/net/ynl/ynl-gen-c.py``
|
||||
The code generation itself is performed by ``tools/net/ynl/pyynl/ynl_gen_c.py``
|
||||
but it takes a few arguments so calling it directly for each file
|
||||
quickly becomes tedious.
|
||||
|
||||
|
@ -84,7 +84,7 @@ YNL lib
|
|||
|
||||
``tools/net/ynl/lib/`` contains an implementation of a C library
|
||||
(based on libmnl) which integrates with code generated by
|
||||
``tools/net/ynl/ynl-gen-c.py`` to create easy to use netlink wrappers.
|
||||
``tools/net/ynl/pyynl/ynl_gen_c.py`` to create easy to use netlink wrappers.
|
||||
|
||||
YNL basics
|
||||
----------
|
||||
|
|
127
MAINTAINERS
127
MAINTAINERS
|
@ -951,7 +951,7 @@ M: Arthur Kiyanovski <akiyano@amazon.com>
|
|||
R: David Arinzon <darinzon@amazon.com>
|
||||
R: Saeed Bishara <saeedb@amazon.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/amazon/ena.rst
|
||||
F: drivers/net/ethernet/amazon/
|
||||
|
||||
|
@ -1132,7 +1132,7 @@ AMD PDS CORE DRIVER
|
|||
M: Shannon Nelson <shannon.nelson@amd.com>
|
||||
M: Brett Creeley <brett.creeley@amd.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/amd/pds_core.rst
|
||||
F: drivers/net/ethernet/amd/pds_core/
|
||||
F: include/linux/pds/
|
||||
|
@ -1215,7 +1215,7 @@ F: include/uapi/drm/amdxdna_accel.h
|
|||
AMD XGBE DRIVER
|
||||
M: "Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi
|
||||
F: drivers/net/ethernet/amd/xgbe/
|
||||
|
||||
|
@ -1721,14 +1721,14 @@ F: drivers/edac/xgene_edac.c
|
|||
APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER
|
||||
M: Iyappan Subramanian <iyappan@os.amperecomputing.com>
|
||||
M: Keyur Chudgar <keyur@os.amperecomputing.com>
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/apm/xgene-v2/
|
||||
|
||||
APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER
|
||||
M: Iyappan Subramanian <iyappan@os.amperecomputing.com>
|
||||
M: Keyur Chudgar <keyur@os.amperecomputing.com>
|
||||
M: Quan Nguyen <quan@os.amperecomputing.com>
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt
|
||||
F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt
|
||||
F: drivers/net/ethernet/apm/xgene/
|
||||
|
@ -1766,7 +1766,7 @@ F: drivers/hwmon/aquacomputer_d5next.c
|
|||
AQUANTIA ETHERNET DRIVER (atlantic)
|
||||
M: Igor Russkikh <irusskikh@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: https://www.marvell.com/
|
||||
Q: https://patchwork.kernel.org/project/netdevbpf/list/
|
||||
F: Documentation/networking/device_drivers/ethernet/aquantia/atlantic.rst
|
||||
|
@ -1775,7 +1775,7 @@ F: drivers/net/ethernet/aquantia/atlantic/
|
|||
AQUANTIA ETHERNET DRIVER PTP SUBSYSTEM
|
||||
M: Egor Pomozov <epomozov@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: http://www.aquantia.com
|
||||
F: drivers/net/ethernet/aquantia/atlantic/aq_ptp*
|
||||
|
||||
|
@ -2311,7 +2311,7 @@ F: arch/arm/mach-highbank/
|
|||
ARM/CAVIUM THUNDER NETWORK DRIVER
|
||||
M: Sunil Goutham <sgoutham@marvell.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/cavium/thunder/
|
||||
|
||||
ARM/CIRRUS LOGIC BK3 MACHINE SUPPORT
|
||||
|
@ -2853,6 +2853,13 @@ S: Maintained
|
|||
F: arch/arm64/boot/dts/freescale/s32g*.dts*
|
||||
F: drivers/pinctrl/nxp/
|
||||
|
||||
ARM/NXP S32G/S32R DWMAC ETHERNET DRIVER
|
||||
M: Jan Petrous <jan.petrous@oss.nxp.com>
|
||||
L: NXP S32 Linux Team <s32@nxp.com>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml
|
||||
F: drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
|
||||
|
||||
ARM/Orion SoC/Technologic Systems TS-78xx platform support
|
||||
M: Alexander Clouter <alex@digriz.org.uk>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
|
@ -3679,7 +3686,7 @@ F: include/uapi/linux/sonet.h
|
|||
ATMEL MACB ETHERNET DRIVER
|
||||
M: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
M: Claudiu Beznea <claudiu.beznea@tuxon.dev>
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/cadence/
|
||||
|
||||
ATMEL MAXTOUCH DRIVER
|
||||
|
@ -3887,9 +3894,9 @@ S: Maintained
|
|||
F: drivers/platform/x86/barco-p50-gpio.c
|
||||
|
||||
BATMAN ADVANCED
|
||||
M: Marek Lindner <mareklindner@neomailbox.ch>
|
||||
M: Marek Lindner <marek.lindner@mailbox.org>
|
||||
M: Simon Wunderlich <sw@simonwunderlich.de>
|
||||
M: Antonio Quartulli <a@unstable.cc>
|
||||
M: Antonio Quartulli <antonio@mandelbit.com>
|
||||
M: Sven Eckelmann <sven@narfation.org>
|
||||
L: b.a.t.m.a.n@lists.open-mesh.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
|
@ -4407,7 +4414,7 @@ F: drivers/net/ethernet/broadcom/asp2/
|
|||
BROADCOM B44 10/100 ETHERNET DRIVER
|
||||
M: Michael Chan <michael.chan@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/broadcom/b44.*
|
||||
|
||||
BROADCOM B53/SF2 ETHERNET SWITCH DRIVER
|
||||
|
@ -4591,7 +4598,7 @@ BROADCOM BNX2 GIGABIT ETHERNET DRIVER
|
|||
M: Rasesh Mody <rmody@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/broadcom/bnx2.*
|
||||
F: drivers/net/ethernet/broadcom/bnx2_*
|
||||
|
||||
|
@ -4615,13 +4622,14 @@ BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
|
|||
M: Sudarsana Kalluru <skalluru@marvell.com>
|
||||
M: Manish Chopra <manishc@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/broadcom/bnx2x/
|
||||
|
||||
BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER
|
||||
M: Michael Chan <michael.chan@broadcom.com>
|
||||
M: Pavan Chebbi <pavan.chebbi@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/firmware/broadcom/tee_bnxt_fw.c
|
||||
F: drivers/net/ethernet/broadcom/bnxt/
|
||||
F: include/linux/firmware/broadcom/tee_bnxt_fw.h
|
||||
|
@ -4717,7 +4725,7 @@ M: Doug Berger <opendmb@gmail.com>
|
|||
M: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/brcm,bcmgenet.yaml
|
||||
F: Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
|
||||
F: drivers/net/ethernet/broadcom/genet/
|
||||
|
@ -4869,7 +4877,7 @@ BROADCOM SYSTEMPORT ETHERNET DRIVER
|
|||
M: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/brcm,systemport.yaml
|
||||
F: drivers/net/ethernet/broadcom/bcmsysport.*
|
||||
F: drivers/net/ethernet/broadcom/unimac.h
|
||||
|
@ -4878,7 +4886,7 @@ BROADCOM TG3 GIGABIT ETHERNET DRIVER
|
|||
M: Pavan Chebbi <pavan.chebbi@broadcom.com>
|
||||
M: Michael Chan <mchan@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/broadcom/tg3.*
|
||||
|
||||
BROADCOM VK DRIVER
|
||||
|
@ -4900,7 +4908,7 @@ M: Rasesh Mody <rmody@marvell.com>
|
|||
M: Sudarsana Kalluru <skalluru@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/brocade/bna/
|
||||
|
||||
BSG (block layer generic sg v4 driver)
|
||||
|
@ -5126,6 +5134,7 @@ F: include/uapi/linux/can/gw.h
|
|||
F: include/uapi/linux/can/isotp.h
|
||||
F: include/uapi/linux/can/raw.h
|
||||
F: net/can/
|
||||
F: net/sched/em_canid.c
|
||||
|
||||
CAN-J1939 NETWORK LAYER
|
||||
M: Robin van der Gracht <robin@protonic.nl>
|
||||
|
@ -5589,7 +5598,7 @@ F: drivers/scsi/snic/
|
|||
CISCO VIC ETHERNET NIC DRIVER
|
||||
M: Christian Benvenuti <benve@cisco.com>
|
||||
M: Satish Kharat <satishkh@cisco.com>
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/cisco/enic/
|
||||
|
||||
CISCO VIC LOW LATENCY NIC DRIVER
|
||||
|
@ -6187,7 +6196,7 @@ F: drivers/media/dvb-frontends/cxd2820r*
|
|||
CXGB3 ETHERNET DRIVER (CXGB3)
|
||||
M: Potnuri Bharat Teja <bharat@chelsio.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: http://www.chelsio.com
|
||||
F: drivers/net/ethernet/chelsio/cxgb3/
|
||||
|
||||
|
@ -6208,14 +6217,14 @@ F: drivers/crypto/chelsio
|
|||
CXGB4 ETHERNET DRIVER (CXGB4)
|
||||
M: Potnuri Bharat Teja <bharat@chelsio.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: http://www.chelsio.com
|
||||
F: drivers/net/ethernet/chelsio/cxgb4/
|
||||
|
||||
CXGB4 INLINE CRYPTO DRIVER
|
||||
M: Ayush Sawal <ayush.sawal@chelsio.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: http://www.chelsio.com
|
||||
F: drivers/net/ethernet/chelsio/inline_crypto/
|
||||
|
||||
|
@ -6237,7 +6246,7 @@ F: include/uapi/rdma/cxgb4-abi.h
|
|||
CXGB4VF ETHERNET DRIVER (CXGB4VF)
|
||||
M: Potnuri Bharat Teja <bharat@chelsio.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: http://www.chelsio.com
|
||||
F: drivers/net/ethernet/chelsio/cxgb4vf/
|
||||
|
||||
|
@ -8415,7 +8424,7 @@ M: Ajit Khaparde <ajit.khaparde@broadcom.com>
|
|||
M: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
|
||||
M: Somnath Kotur <somnath.kotur@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: http://www.emulex.com
|
||||
F: drivers/net/ethernet/emulex/benet/
|
||||
|
||||
|
@ -9455,7 +9464,7 @@ F: samples/ftrace
|
|||
FUNGIBLE ETHERNET DRIVERS
|
||||
M: Dimitris Michailidis <dmichail@fungible.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/fungible/
|
||||
|
||||
FUSE: FILESYSTEM IN USERSPACE
|
||||
|
@ -9760,7 +9769,7 @@ M: Jeroen de Borst <jeroendb@google.com>
|
|||
M: Praveen Kaligineedi <pkaligineedi@google.com>
|
||||
R: Shailend Chand <shailend@google.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/google/gve.rst
|
||||
F: drivers/net/ethernet/google
|
||||
|
||||
|
@ -10300,7 +10309,6 @@ F: drivers/input/touchscreen/himax_hx83112b.c
|
|||
|
||||
HIPPI
|
||||
M: Jes Sorensen <jes@trained-monkey.org>
|
||||
L: linux-hippi@sunsite.dk
|
||||
S: Maintained
|
||||
F: drivers/net/hippi/
|
||||
F: include/linux/hippidevice.h
|
||||
|
@ -10982,7 +10990,7 @@ M: Rick Lindsley <ricklind@linux.ibm.com>
|
|||
R: Nick Child <nnac123@linux.ibm.com>
|
||||
R: Thomas Falcon <tlfalcon@linux.ibm.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/ibm/ibmvnic.*
|
||||
|
||||
IBM Power VFIO Support
|
||||
|
@ -10993,7 +11001,7 @@ F: drivers/vfio/vfio_iommu_spapr_tce.c
|
|||
IBM Power Virtual Ethernet Device Driver
|
||||
M: Nick Child <nnac123@linux.ibm.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/ibm/ibmveth.*
|
||||
|
||||
IBM Power Virtual FC Device Drivers
|
||||
|
@ -11526,7 +11534,7 @@ INTEL ETHERNET DRIVERS
|
|||
M: Tony Nguyen <anthony.l.nguyen@intel.com>
|
||||
M: Przemek Kitszel <przemyslaw.kitszel@intel.com>
|
||||
L: intel-wired-lan@lists.osuosl.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: https://www.intel.com/content/www/us/en/support.html
|
||||
Q: https://patchwork.ozlabs.org/project/intel-wired-lan/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git
|
||||
|
@ -13141,7 +13149,7 @@ LIBETH COMMON ETHERNET LIBRARY
|
|||
M: Alexander Lobakin <aleksander.lobakin@intel.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: intel-wired-lan@lists.osuosl.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
S: Maintained
|
||||
T: git https://github.com/alobakin/linux.git
|
||||
F: drivers/net/ethernet/intel/libeth/
|
||||
F: include/net/libeth/
|
||||
|
@ -13151,7 +13159,7 @@ LIBIE COMMON INTEL ETHERNET LIBRARY
|
|||
M: Alexander Lobakin <aleksander.lobakin@intel.com>
|
||||
L: intel-wired-lan@lists.osuosl.org (moderated for non-subscribers)
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
T: git https://github.com/alobakin/linux.git
|
||||
F: drivers/net/ethernet/intel/libie/
|
||||
F: include/linux/net/intel/libie/
|
||||
|
@ -13965,7 +13973,7 @@ MARVELL OCTEON ENDPOINT DRIVER
|
|||
M: Veerasenareddy Burru <vburru@marvell.com>
|
||||
M: Sathesh Edara <sedara@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/marvell/octeon_ep
|
||||
|
||||
MARVELL OCTEON ENDPOINT VF DRIVER
|
||||
|
@ -13974,7 +13982,7 @@ M: Sathesh Edara <sedara@marvell.com>
|
|||
M: Shinas Rasheed <srasheed@marvell.com>
|
||||
M: Satananda Burla <sburla@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/marvell/octeon_ep_vf
|
||||
|
||||
MARVELL OCTEONTX2 PHYSICAL FUNCTION DRIVER
|
||||
|
@ -13982,8 +13990,9 @@ M: Sunil Goutham <sgoutham@marvell.com>
|
|||
M: Geetha sowjanya <gakula@marvell.com>
|
||||
M: Subbaraya Sundeep <sbhatta@marvell.com>
|
||||
M: hariprasad <hkelam@marvell.com>
|
||||
M: Bharat Bhushan <bbhushan2@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/marvell/octeontx2/nic/
|
||||
F: include/linux/soc/marvell/octeontx2/
|
||||
|
||||
|
@ -13995,7 +14004,7 @@ M: Jerin Jacob <jerinj@marvell.com>
|
|||
M: hariprasad <hkelam@marvell.com>
|
||||
M: Subbaraya Sundeep <sbhatta@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
|
||||
F: drivers/net/ethernet/marvell/octeontx2/af/
|
||||
|
||||
|
@ -14883,7 +14892,7 @@ F: drivers/i2c/busses/i2c-mlxbf.c
|
|||
MELLANOX ETHERNET DRIVER (mlx4_en)
|
||||
M: Tariq Toukan <tariqt@nvidia.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: https://www.nvidia.com/networking/
|
||||
Q: https://patchwork.kernel.org/project/netdevbpf/list/
|
||||
F: drivers/net/ethernet/mellanox/mlx4/en_*
|
||||
|
@ -14892,7 +14901,7 @@ MELLANOX ETHERNET DRIVER (mlx5e)
|
|||
M: Saeed Mahameed <saeedm@nvidia.com>
|
||||
M: Tariq Toukan <tariqt@nvidia.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: https://www.nvidia.com/networking/
|
||||
Q: https://patchwork.kernel.org/project/netdevbpf/list/
|
||||
F: drivers/net/ethernet/mellanox/mlx5/core/en_*
|
||||
|
@ -14900,7 +14909,7 @@ F: drivers/net/ethernet/mellanox/mlx5/core/en_*
|
|||
MELLANOX ETHERNET INNOVA DRIVERS
|
||||
R: Boris Pismenny <borisp@nvidia.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: https://www.nvidia.com/networking/
|
||||
Q: https://patchwork.kernel.org/project/netdevbpf/list/
|
||||
F: drivers/net/ethernet/mellanox/mlx5/core/en_accel/*
|
||||
|
@ -14939,7 +14948,7 @@ MELLANOX MLX4 core VPI driver
|
|||
M: Tariq Toukan <tariqt@nvidia.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-rdma@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: https://www.nvidia.com/networking/
|
||||
Q: https://patchwork.kernel.org/project/netdevbpf/list/
|
||||
F: drivers/net/ethernet/mellanox/mlx4/
|
||||
|
@ -14961,7 +14970,7 @@ M: Leon Romanovsky <leonro@nvidia.com>
|
|||
M: Tariq Toukan <tariqt@nvidia.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-rdma@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
W: https://www.nvidia.com/networking/
|
||||
Q: https://patchwork.kernel.org/project/netdevbpf/list/
|
||||
F: Documentation/networking/device_drivers/ethernet/mellanox/
|
||||
|
@ -15195,7 +15204,7 @@ META ETHERNET DRIVERS
|
|||
M: Alexander Duyck <alexanderduyck@fb.com>
|
||||
M: Jakub Kicinski <kuba@kernel.org>
|
||||
R: kernel-team@meta.com
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/meta/
|
||||
F: drivers/net/ethernet/meta/
|
||||
|
||||
|
@ -16203,7 +16212,8 @@ M: Breno Leitao <leitao@debian.org>
|
|||
S: Maintained
|
||||
F: Documentation/networking/netconsole.rst
|
||||
F: drivers/net/netconsole.c
|
||||
F: tools/testing/selftests/drivers/net/netcons_basic.sh
|
||||
F: tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
|
||||
F: tools/testing/selftests/drivers/net/netcons\*
|
||||
|
||||
NETDEVSIM
|
||||
M: Jakub Kicinski <kuba@kernel.org>
|
||||
|
@ -16220,7 +16230,7 @@ F: net/sched/sch_netem.c
|
|||
NETERION 10GbE DRIVERS (s2io)
|
||||
M: Jon Mason <jdmason@kudzu.us>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/neterion/s2io.rst
|
||||
F: drivers/net/ethernet/neterion/
|
||||
|
||||
|
@ -16319,7 +16329,7 @@ F: include/linux/inetdevice.h
|
|||
F: include/linux/netdev*
|
||||
F: include/linux/platform_data/wiznet.h
|
||||
F: include/uapi/linux/cn_proc.h
|
||||
F: include/uapi/linux/ethtool_netlink.h
|
||||
F: include/uapi/linux/ethtool_netlink*
|
||||
F: include/uapi/linux/if_*
|
||||
F: include/uapi/linux/net_shaper.h
|
||||
F: include/uapi/linux/netdev*
|
||||
|
@ -16545,7 +16555,7 @@ M: Manish Chopra <manishc@marvell.com>
|
|||
M: Rahul Verma <rahulv@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/qlogic/netxen/
|
||||
|
||||
NET_FAILOVER MODULE
|
||||
|
@ -17677,6 +17687,7 @@ F: Documentation/core-api/packing.rst
|
|||
F: include/linux/packing.h
|
||||
F: lib/packing.c
|
||||
F: lib/packing_test.c
|
||||
F: scripts/gen_packed_field_checks.c
|
||||
|
||||
PADATA PARALLEL EXECUTION MECHANISM
|
||||
M: Steffen Klassert <steffen.klassert@secunet.com>
|
||||
|
@ -18321,7 +18332,7 @@ PENSANDO ETHERNET DRIVERS
|
|||
M: Shannon Nelson <shannon.nelson@amd.com>
|
||||
M: Brett Creeley <brett.creeley@amd.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/device_drivers/ethernet/pensando/ionic.rst
|
||||
F: drivers/net/ethernet/pensando/
|
||||
|
||||
|
@ -19088,7 +19099,7 @@ F: drivers/scsi/qedi/
|
|||
QLOGIC QL4xxx ETHERNET DRIVER
|
||||
M: Manish Chopra <manishc@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/qlogic/qed/
|
||||
F: drivers/net/ethernet/qlogic/qede/
|
||||
F: include/linux/qed/
|
||||
|
@ -19116,7 +19127,7 @@ F: drivers/scsi/qla2xxx/
|
|||
QLOGIC QLA3XXX NETWORK DRIVER
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/qlogic/qla3xxx.*
|
||||
|
||||
QLOGIC QLA4XXX iSCSI DRIVER
|
||||
|
@ -19132,7 +19143,7 @@ M: Shahed Shaikh <shshaikh@marvell.com>
|
|||
M: Manish Chopra <manishc@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/qlogic/qlcnic/
|
||||
|
||||
QM1D1B0004 MEDIA DRIVER
|
||||
|
@ -19873,7 +19884,7 @@ M: Paul Barker <paul.barker.ct@bp.renesas.com>
|
|||
M: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-renesas-soc@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/renesas,etheravb.yaml
|
||||
F: drivers/net/ethernet/renesas/Kconfig
|
||||
F: drivers/net/ethernet/renesas/Makefile
|
||||
|
@ -19893,7 +19904,7 @@ RENESAS ETHERNET TSN DRIVER
|
|||
M: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-renesas-soc@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/renesas,ethertsn.yaml
|
||||
F: drivers/net/ethernet/renesas/rtsn.*
|
||||
|
||||
|
@ -20043,7 +20054,7 @@ RENESAS SUPERH ETHERNET DRIVER
|
|||
M: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-renesas-soc@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/renesas,ether.yaml
|
||||
F: drivers/net/ethernet/renesas/Kconfig
|
||||
F: drivers/net/ethernet/renesas/Makefile
|
||||
|
@ -20886,7 +20897,7 @@ F: include/linux/platform_data/spi-s3c64xx.h
|
|||
SAMSUNG SXGBE DRIVERS
|
||||
M: Byungho An <bh74.an@samsung.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/samsung/sxgbe/
|
||||
|
||||
SAMSUNG THERMAL DRIVER
|
||||
|
@ -21288,7 +21299,7 @@ M: Edward Cree <ecree.xilinx@gmail.com>
|
|||
M: Martin Habets <habetsm.xilinx@gmail.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-net-drivers@amd.com
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/networking/devlink/sfc.rst
|
||||
F: drivers/net/ethernet/sfc/
|
||||
|
||||
|
@ -22770,7 +22781,7 @@ F: include/linux/platform_data/dma-dw.h
|
|||
SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET DRIVER
|
||||
M: Jose Abreu <Jose.Abreu@synopsys.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/synopsys/
|
||||
|
||||
SYNOPSYS DESIGNWARE ETHERNET XPCS DRIVER
|
||||
|
@ -23170,7 +23181,7 @@ F: drivers/phy/tegra/xusb*
|
|||
TEHUTI ETHERNET DRIVER
|
||||
M: Andy Gospodarek <andy@greyhouse.net>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/tehuti/tehuti.*
|
||||
|
||||
TEHUTI TN40XX ETHERNET DRIVER
|
||||
|
|
4
Makefile
4
Makefile
|
@ -1368,6 +1368,10 @@ PHONY += scripts_unifdef
|
|||
scripts_unifdef: scripts_basic
|
||||
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
|
||||
|
||||
PHONY += scripts_gen_packed_field_checks
|
||||
scripts_gen_packed_field_checks: scripts_basic
|
||||
$(Q)$(MAKE) $(build)=scripts scripts/gen_packed_field_checks
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Install
|
||||
|
||||
|
|
|
@ -148,6 +148,8 @@
|
|||
|
||||
#define SCM_TS_OPT_ID 81
|
||||
|
||||
#define SO_RCVPRIORITY 82
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
|
|
@ -159,6 +159,8 @@
|
|||
|
||||
#define SCM_TS_OPT_ID 81
|
||||
|
||||
#define SO_RCVPRIORITY 82
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
|
|
@ -140,6 +140,8 @@
|
|||
|
||||
#define SCM_TS_OPT_ID 0x404C
|
||||
|
||||
#define SO_RCVPRIORITY 0x404D
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64
|
||||
|
|
|
@ -141,6 +141,8 @@
|
|||
|
||||
#define SCM_TS_OPT_ID 0x005a
|
||||
|
||||
#define SO_RCVPRIORITY 0x005b
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
|
||||
|
|
|
@ -553,6 +553,9 @@ static const char *btbcm_get_board_name(struct device *dev)
|
|||
|
||||
/* get rid of any '/' in the compatible string */
|
||||
board_type = devm_kstrdup(dev, tmp, GFP_KERNEL);
|
||||
if (!board_type)
|
||||
return NULL;
|
||||
|
||||
strreplace(board_type, '/', '-');
|
||||
|
||||
return board_type;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/string_choices.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <acpi/acpi_bus.h>
|
||||
#include <linux/unaligned.h>
|
||||
|
@ -506,13 +507,13 @@ int btintel_version_info_tlv(struct hci_dev *hdev,
|
|||
|
||||
bt_dev_info(hdev, "Device revision is %u", version->dev_rev_id);
|
||||
bt_dev_info(hdev, "Secure boot is %s",
|
||||
version->secure_boot ? "enabled" : "disabled");
|
||||
str_enabled_disabled(version->secure_boot));
|
||||
bt_dev_info(hdev, "OTP lock is %s",
|
||||
version->otp_lock ? "enabled" : "disabled");
|
||||
str_enabled_disabled(version->otp_lock));
|
||||
bt_dev_info(hdev, "API lock is %s",
|
||||
version->api_lock ? "enabled" : "disabled");
|
||||
str_enabled_disabled(version->api_lock));
|
||||
bt_dev_info(hdev, "Debug lock is %s",
|
||||
version->debug_lock ? "enabled" : "disabled");
|
||||
str_enabled_disabled(version->debug_lock));
|
||||
bt_dev_info(hdev, "Minimum firmware build %u week %u %u",
|
||||
version->min_fw_build_nn, version->min_fw_build_cw,
|
||||
2000 + version->min_fw_build_yy);
|
||||
|
@ -927,16 +928,16 @@ int btintel_read_boot_params(struct hci_dev *hdev,
|
|||
le16_to_cpu(params->dev_revid));
|
||||
|
||||
bt_dev_info(hdev, "Secure boot is %s",
|
||||
params->secure_boot ? "enabled" : "disabled");
|
||||
str_enabled_disabled(params->secure_boot));
|
||||
|
||||
bt_dev_info(hdev, "OTP lock is %s",
|
||||
params->otp_lock ? "enabled" : "disabled");
|
||||
str_enabled_disabled(params->otp_lock));
|
||||
|
||||
bt_dev_info(hdev, "API lock is %s",
|
||||
params->api_lock ? "enabled" : "disabled");
|
||||
str_enabled_disabled(params->api_lock));
|
||||
|
||||
bt_dev_info(hdev, "Debug lock is %s",
|
||||
params->debug_lock ? "enabled" : "disabled");
|
||||
str_enabled_disabled(params->debug_lock));
|
||||
|
||||
bt_dev_info(hdev, "Minimum firmware build %u week %u %u",
|
||||
params->min_fw_build_nn, params->min_fw_build_cw,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/string_choices.h>
|
||||
#include <net/bluetooth/bluetooth.h>
|
||||
#include <net/bluetooth/hci_core.h>
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
|
@ -88,7 +89,7 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
|
|||
else
|
||||
adapter->psmode = 0;
|
||||
BT_DBG("PS Mode:%s",
|
||||
(adapter->psmode) ? "Enable" : "Disable");
|
||||
str_enable_disable(adapter->psmode));
|
||||
} else {
|
||||
BT_DBG("PS Mode command failed");
|
||||
}
|
||||
|
|
|
@ -1329,7 +1329,6 @@ int btmtk_usb_setup(struct hci_dev *hdev)
|
|||
fwname = FIRMWARE_MT7668;
|
||||
break;
|
||||
case 0x7922:
|
||||
case 0x7961:
|
||||
case 0x7925:
|
||||
/* Reset the device to ensure it's in the initial state before
|
||||
* downloading the firmware to ensure.
|
||||
|
@ -1337,7 +1336,8 @@ int btmtk_usb_setup(struct hci_dev *hdev)
|
|||
|
||||
if (!test_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags))
|
||||
btmtk_usb_subsys_reset(hdev, dev_id);
|
||||
|
||||
fallthrough;
|
||||
case 0x7961:
|
||||
btmtk_fw_get_filename(fw_bin_name, sizeof(fw_bin_name), dev_id,
|
||||
fw_version, fw_flavor);
|
||||
|
||||
|
|
|
@ -1249,7 +1249,7 @@ static int btmtksdio_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void btmtksdio_cmd_timeout(struct hci_dev *hdev)
|
||||
static void btmtksdio_reset(struct hci_dev *hdev)
|
||||
{
|
||||
struct btmtksdio_dev *bdev = hci_get_drvdata(hdev);
|
||||
u32 status;
|
||||
|
@ -1360,7 +1360,7 @@ static int btmtksdio_probe(struct sdio_func *func,
|
|||
|
||||
hdev->open = btmtksdio_open;
|
||||
hdev->close = btmtksdio_close;
|
||||
hdev->cmd_timeout = btmtksdio_cmd_timeout;
|
||||
hdev->reset = btmtksdio_reset;
|
||||
hdev->flush = btmtksdio_flush;
|
||||
hdev->setup = btmtksdio_setup;
|
||||
hdev->shutdown = btmtksdio_shutdown;
|
||||
|
|
|
@ -272,6 +272,39 @@ int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(qca_send_pre_shutdown_cmd);
|
||||
|
||||
static bool qca_filename_has_extension(const char *filename)
|
||||
{
|
||||
const char *suffix = strrchr(filename, '.');
|
||||
|
||||
/* File extensions require a dot, but not as the first or last character */
|
||||
if (!suffix || suffix == filename || *(suffix + 1) == '\0')
|
||||
return 0;
|
||||
|
||||
/* Avoid matching directories with names that look like files with extensions */
|
||||
return !strchr(suffix, '/');
|
||||
}
|
||||
|
||||
static bool qca_get_alt_nvm_file(char *filename, size_t max_size)
|
||||
{
|
||||
char fwname[64];
|
||||
const char *suffix;
|
||||
|
||||
/* nvm file name has an extension, replace with .bin */
|
||||
if (qca_filename_has_extension(filename)) {
|
||||
suffix = strrchr(filename, '.');
|
||||
strscpy(fwname, filename, suffix - filename + 1);
|
||||
snprintf(fwname + (suffix - filename),
|
||||
sizeof(fwname) - (suffix - filename), ".bin");
|
||||
/* If nvm file is already the default one, return false to skip the retry. */
|
||||
if (strcmp(fwname, filename) == 0)
|
||||
return false;
|
||||
|
||||
snprintf(filename, max_size, "%s", fwname);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int qca_tlv_check_data(struct hci_dev *hdev,
|
||||
struct qca_fw_config *config,
|
||||
u8 *fw_data, size_t fw_size,
|
||||
|
@ -564,6 +597,19 @@ static int qca_download_firmware(struct hci_dev *hdev,
|
|||
config->fwname, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
/* If the board-specific file is missing, try loading the default
|
||||
* one, unless that was attempted already.
|
||||
*/
|
||||
else if (config->type == TLV_TYPE_NVM &&
|
||||
qca_get_alt_nvm_file(config->fwname, sizeof(config->fwname))) {
|
||||
bt_dev_info(hdev, "QCA Downloading %s", config->fwname);
|
||||
ret = request_firmware(&fw, config->fwname, &hdev->dev);
|
||||
if (ret) {
|
||||
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
|
||||
config->fwname, ret);
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
|
||||
config->fwname, ret);
|
||||
|
@ -700,39 +746,43 @@ static int qca_check_bdaddr(struct hci_dev *hdev, const struct qca_fw_config *co
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void qca_generate_hsp_nvm_name(char *fwname, size_t max_size,
|
||||
static void qca_get_nvm_name_by_board(char *fwname, size_t max_size,
|
||||
const char *stem, enum qca_btsoc_type soc_type,
|
||||
struct qca_btsoc_version ver, u8 rom_ver, u16 bid)
|
||||
{
|
||||
const char *variant;
|
||||
const char *prefix;
|
||||
|
||||
/* hsp gf chip */
|
||||
if ((le32_to_cpu(ver.soc_id) & QCA_HSP_GF_SOC_MASK) == QCA_HSP_GF_SOC_ID)
|
||||
variant = "g";
|
||||
else
|
||||
variant = "";
|
||||
/* Set the default value to variant and prefix */
|
||||
variant = "";
|
||||
prefix = "b";
|
||||
|
||||
if (bid == 0x0)
|
||||
snprintf(fwname, max_size, "qca/hpnv%02x%s.bin", rom_ver, variant);
|
||||
else
|
||||
snprintf(fwname, max_size, "qca/hpnv%02x%s.%x", rom_ver, variant, bid);
|
||||
}
|
||||
if (soc_type == QCA_QCA2066)
|
||||
prefix = "";
|
||||
|
||||
static inline void qca_get_nvm_name_generic(struct qca_fw_config *cfg,
|
||||
const char *stem, u8 rom_ver, u16 bid)
|
||||
{
|
||||
if (bid == 0x0)
|
||||
snprintf(cfg->fwname, sizeof(cfg->fwname), "qca/%snv%02x.bin", stem, rom_ver);
|
||||
else if (bid & 0xff00)
|
||||
snprintf(cfg->fwname, sizeof(cfg->fwname),
|
||||
"qca/%snv%02x.b%x", stem, rom_ver, bid);
|
||||
else
|
||||
snprintf(cfg->fwname, sizeof(cfg->fwname),
|
||||
"qca/%snv%02x.b%02x", stem, rom_ver, bid);
|
||||
if (soc_type == QCA_WCN6855 || soc_type == QCA_QCA2066) {
|
||||
/* If the chip is manufactured by GlobalFoundries */
|
||||
if ((le32_to_cpu(ver.soc_id) & QCA_HSP_GF_SOC_MASK) == QCA_HSP_GF_SOC_ID)
|
||||
variant = "g";
|
||||
}
|
||||
|
||||
if (rom_ver != 0) {
|
||||
if (bid == 0x0 || bid == 0xffff)
|
||||
snprintf(fwname, max_size, "qca/%s%02x%s.bin", stem, rom_ver, variant);
|
||||
else
|
||||
snprintf(fwname, max_size, "qca/%s%02x%s.%s%02x", stem, rom_ver,
|
||||
variant, prefix, bid);
|
||||
} else {
|
||||
if (bid == 0x0 || bid == 0xffff)
|
||||
snprintf(fwname, max_size, "qca/%s%s.bin", stem, variant);
|
||||
else
|
||||
snprintf(fwname, max_size, "qca/%s%s.%s%02x", stem, variant, prefix, bid);
|
||||
}
|
||||
}
|
||||
|
||||
int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
||||
enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
|
||||
const char *firmware_name)
|
||||
const char *firmware_name, const char *rampatch_name)
|
||||
{
|
||||
struct qca_fw_config config = {};
|
||||
int err;
|
||||
|
@ -761,44 +811,48 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
|||
|
||||
/* Download rampatch file */
|
||||
config.type = TLV_TYPE_PATCH;
|
||||
switch (soc_type) {
|
||||
case QCA_WCN3990:
|
||||
case QCA_WCN3991:
|
||||
case QCA_WCN3998:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/crbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_WCN3988:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/apbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_QCA2066:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hpbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_QCA6390:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/htbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_WCN6750:
|
||||
/* Choose mbn file by default.If mbn file is not found
|
||||
* then choose tlv file
|
||||
*/
|
||||
config.type = ELF_TYPE_PATCH;
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/msbtfw%02x.mbn", rom_ver);
|
||||
break;
|
||||
case QCA_WCN6855:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hpbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_WCN7850:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hmtbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
default:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/rampatch_%08x.bin", soc_ver);
|
||||
if (rampatch_name) {
|
||||
snprintf(config.fwname, sizeof(config.fwname), "qca/%s", rampatch_name);
|
||||
} else {
|
||||
switch (soc_type) {
|
||||
case QCA_WCN3990:
|
||||
case QCA_WCN3991:
|
||||
case QCA_WCN3998:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/crbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_WCN3988:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/apbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_QCA2066:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hpbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_QCA6390:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/htbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_WCN6750:
|
||||
/* Choose mbn file by default.If mbn file is not found
|
||||
* then choose tlv file
|
||||
*/
|
||||
config.type = ELF_TYPE_PATCH;
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/msbtfw%02x.mbn", rom_ver);
|
||||
break;
|
||||
case QCA_WCN6855:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hpbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
case QCA_WCN7850:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hmtbtfw%02x.tlv", rom_ver);
|
||||
break;
|
||||
default:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/rampatch_%08x.bin", soc_ver);
|
||||
}
|
||||
}
|
||||
|
||||
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
|
||||
|
@ -816,8 +870,14 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
|||
/* Download NVM configuration */
|
||||
config.type = TLV_TYPE_NVM;
|
||||
if (firmware_name) {
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/%s", firmware_name);
|
||||
/* The firmware name has an extension, use it directly */
|
||||
if (qca_filename_has_extension(firmware_name)) {
|
||||
snprintf(config.fwname, sizeof(config.fwname), "qca/%s", firmware_name);
|
||||
} else {
|
||||
qca_read_fw_board_id(hdev, &boardid);
|
||||
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
|
||||
firmware_name, soc_type, ver, 0, boardid);
|
||||
}
|
||||
} else {
|
||||
switch (soc_type) {
|
||||
case QCA_WCN3990:
|
||||
|
@ -836,8 +896,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
|||
"qca/apnv%02x.bin", rom_ver);
|
||||
break;
|
||||
case QCA_QCA2066:
|
||||
qca_generate_hsp_nvm_name(config.fwname,
|
||||
sizeof(config.fwname), ver, rom_ver, boardid);
|
||||
qca_get_nvm_name_by_board(config.fwname,
|
||||
sizeof(config.fwname), "hpnv", soc_type, ver,
|
||||
rom_ver, boardid);
|
||||
break;
|
||||
case QCA_QCA6390:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
|
@ -848,13 +909,14 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
|||
"qca/msnv%02x.bin", rom_ver);
|
||||
break;
|
||||
case QCA_WCN6855:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/hpnv%02x.bin", rom_ver);
|
||||
qca_read_fw_board_id(hdev, &boardid);
|
||||
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
|
||||
"hpnv", soc_type, ver, rom_ver, boardid);
|
||||
break;
|
||||
case QCA_WCN7850:
|
||||
qca_get_nvm_name_generic(&config, "hmt", rom_ver, boardid);
|
||||
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
|
||||
"hmtnv", soc_type, ver, rom_ver, boardid);
|
||||
break;
|
||||
|
||||
default:
|
||||
snprintf(config.fwname, sizeof(config.fwname),
|
||||
"qca/nvm_%08x.bin", soc_ver);
|
||||
|
|
|
@ -161,7 +161,7 @@ enum qca_btsoc_type {
|
|||
int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr);
|
||||
int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
||||
enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
|
||||
const char *firmware_name);
|
||||
const char *firmware_name, const char *rampatch_name);
|
||||
int qca_read_soc_version(struct hci_dev *hdev, struct qca_btsoc_version *ver,
|
||||
enum qca_btsoc_type);
|
||||
int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
|
||||
|
@ -176,7 +176,8 @@ static inline int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdad
|
|||
static inline int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
|
||||
enum qca_btsoc_type soc_type,
|
||||
struct qca_btsoc_version ver,
|
||||
const char *firmware_name)
|
||||
const char *firmware_name,
|
||||
const char *rampatch_name)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
|
|
@ -1351,12 +1351,14 @@ int btrtl_setup_realtek(struct hci_dev *hdev)
|
|||
|
||||
btrtl_set_quirks(hdev, btrtl_dev);
|
||||
|
||||
hci_set_hw_info(hdev,
|
||||
if (btrtl_dev->ic_info) {
|
||||
hci_set_hw_info(hdev,
|
||||
"RTL lmp_subver=%u hci_rev=%u hci_ver=%u hci_bus=%u",
|
||||
btrtl_dev->ic_info->lmp_subver,
|
||||
btrtl_dev->ic_info->hci_rev,
|
||||
btrtl_dev->ic_info->hci_ver,
|
||||
btrtl_dev->ic_info->hci_bus);
|
||||
}
|
||||
|
||||
btrtl_free(btrtl_dev);
|
||||
return ret;
|
||||
|
|
|
@ -377,6 +377,8 @@ static const struct usb_device_id quirks_table[] = {
|
|||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3623), .driver_info = BTUSB_QCA_WCN6855 |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x2c7c, 0x0130), .driver_info = BTUSB_QCA_WCN6855 |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Broadcom BCM2035 */
|
||||
{ USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },
|
||||
|
@ -481,6 +483,9 @@ static const struct usb_device_id quirks_table[] = {
|
|||
{ USB_DEVICE(0x13d3, 0x3549), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Realtek 8851BE Bluetooth devices */
|
||||
{ USB_DEVICE(0x13d3, 0x3600), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Realtek 8852AE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0bda, 0x2852), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
@ -600,6 +605,8 @@ static const struct usb_device_id quirks_table[] = {
|
|||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3567), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3576), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3578), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3583), .driver_info = BTUSB_MEDIATEK |
|
||||
|
@ -610,6 +617,8 @@ static const struct usb_device_id quirks_table[] = {
|
|||
/* MediaTek MT7922 Bluetooth devices */
|
||||
{ USB_DEVICE(0x13d3, 0x3585), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3610), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* MediaTek MT7922A Bluetooth devices */
|
||||
{ USB_DEVICE(0x0489, 0xe0d8), .driver_info = BTUSB_MEDIATEK |
|
||||
|
@ -674,6 +683,8 @@ static const struct usb_device_id quirks_table[] = {
|
|||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3608), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3628), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Additional Realtek 8723AE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK },
|
||||
|
@ -879,7 +890,6 @@ struct btusb_data {
|
|||
int (*disconnect)(struct hci_dev *hdev);
|
||||
|
||||
int oob_wake_irq; /* irq for out-of-band wake-on-bt */
|
||||
unsigned cmd_timeout_cnt;
|
||||
|
||||
struct qca_dump_info qca_dump;
|
||||
};
|
||||
|
@ -906,15 +916,12 @@ static void btusb_reset(struct hci_dev *hdev)
|
|||
usb_queue_reset_device(data->intf);
|
||||
}
|
||||
|
||||
static void btusb_intel_cmd_timeout(struct hci_dev *hdev)
|
||||
static void btusb_intel_reset(struct hci_dev *hdev)
|
||||
{
|
||||
struct btusb_data *data = hci_get_drvdata(hdev);
|
||||
struct gpio_desc *reset_gpio = data->reset_gpio;
|
||||
struct btintel_data *intel_data = hci_get_priv(hdev);
|
||||
|
||||
if (++data->cmd_timeout_cnt < 5)
|
||||
return;
|
||||
|
||||
if (intel_data->acpi_reset_method) {
|
||||
if (test_and_set_bit(INTEL_ACPI_RESET_ACTIVE, intel_data->flags)) {
|
||||
bt_dev_err(hdev, "acpi: last reset failed ? Not resetting again");
|
||||
|
@ -987,7 +994,7 @@ static inline void btusb_rtl_alloc_devcoredump(struct hci_dev *hdev,
|
|||
}
|
||||
}
|
||||
|
||||
static void btusb_rtl_cmd_timeout(struct hci_dev *hdev)
|
||||
static void btusb_rtl_reset(struct hci_dev *hdev)
|
||||
{
|
||||
struct btusb_data *data = hci_get_drvdata(hdev);
|
||||
struct gpio_desc *reset_gpio = data->reset_gpio;
|
||||
|
@ -997,9 +1004,6 @@ static void btusb_rtl_cmd_timeout(struct hci_dev *hdev)
|
|||
|
||||
btusb_rtl_alloc_devcoredump(hdev, &hdr, NULL, 0);
|
||||
|
||||
if (++data->cmd_timeout_cnt < 5)
|
||||
return;
|
||||
|
||||
if (!reset_gpio) {
|
||||
btusb_reset(hdev);
|
||||
return;
|
||||
|
@ -1034,19 +1038,16 @@ static void btusb_rtl_hw_error(struct hci_dev *hdev, u8 code)
|
|||
btusb_rtl_alloc_devcoredump(hdev, &hdr, NULL, 0);
|
||||
}
|
||||
|
||||
static void btusb_qca_cmd_timeout(struct hci_dev *hdev)
|
||||
static void btusb_qca_reset(struct hci_dev *hdev)
|
||||
{
|
||||
struct btusb_data *data = hci_get_drvdata(hdev);
|
||||
struct gpio_desc *reset_gpio = data->reset_gpio;
|
||||
|
||||
if (test_bit(BTUSB_HW_SSR_ACTIVE, &data->flags)) {
|
||||
bt_dev_info(hdev, "Ramdump in progress, defer cmd_timeout");
|
||||
bt_dev_info(hdev, "Ramdump in progress, defer reset");
|
||||
return;
|
||||
}
|
||||
|
||||
if (++data->cmd_timeout_cnt < 5)
|
||||
return;
|
||||
|
||||
if (reset_gpio) {
|
||||
bt_dev_err(hdev, "Reset qca device via bt_en gpio");
|
||||
|
||||
|
@ -3645,6 +3646,32 @@ static const struct file_operations force_poll_sync_fops = {
|
|||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
static ssize_t isoc_alt_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct btusb_data *data = dev_get_drvdata(dev);
|
||||
|
||||
return sysfs_emit(buf, "%d\n", data->isoc_altsetting);
|
||||
}
|
||||
|
||||
static ssize_t isoc_alt_store(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct btusb_data *data = dev_get_drvdata(dev);
|
||||
int alt;
|
||||
int ret;
|
||||
|
||||
if (kstrtoint(buf, 10, &alt))
|
||||
return -EINVAL;
|
||||
|
||||
ret = btusb_switch_alt_setting(data->hdev, alt);
|
||||
return ret < 0 ? ret : count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR_RW(isoc_alt);
|
||||
|
||||
static int btusb_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *id)
|
||||
{
|
||||
|
@ -3841,7 +3868,7 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
|
||||
/* Transport specific configuration */
|
||||
hdev->send = btusb_send_frame_intel;
|
||||
hdev->cmd_timeout = btusb_intel_cmd_timeout;
|
||||
hdev->reset = btusb_intel_reset;
|
||||
|
||||
if (id->driver_info & BTUSB_INTEL_NO_WBS_SUPPORT)
|
||||
btintel_set_flag(hdev, INTEL_ROM_LEGACY_NO_WBS_SUPPORT);
|
||||
|
@ -3861,7 +3888,7 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
hdev->setup = btusb_mtk_setup;
|
||||
hdev->shutdown = btusb_mtk_shutdown;
|
||||
hdev->manufacturer = 70;
|
||||
hdev->cmd_timeout = btmtk_reset_sync;
|
||||
hdev->reset = btmtk_reset_sync;
|
||||
hdev->set_bdaddr = btmtk_set_bdaddr;
|
||||
hdev->send = btusb_send_frame_mtk;
|
||||
set_bit(HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN, &hdev->quirks);
|
||||
|
@ -3893,7 +3920,7 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
data->setup_on_usb = btusb_setup_qca;
|
||||
hdev->shutdown = btusb_shutdown_qca;
|
||||
hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
|
||||
hdev->cmd_timeout = btusb_qca_cmd_timeout;
|
||||
hdev->reset = btusb_qca_reset;
|
||||
set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
|
||||
btusb_check_needs_reset_resume(intf);
|
||||
}
|
||||
|
@ -3907,7 +3934,7 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
data->setup_on_usb = btusb_setup_qca;
|
||||
hdev->shutdown = btusb_shutdown_qca;
|
||||
hdev->set_bdaddr = btusb_set_bdaddr_wcn6855;
|
||||
hdev->cmd_timeout = btusb_qca_cmd_timeout;
|
||||
hdev->reset = btusb_qca_reset;
|
||||
set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
|
||||
hci_set_msft_opcode(hdev, 0xFD70);
|
||||
}
|
||||
|
@ -3926,7 +3953,7 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
btrtl_set_driver_name(hdev, btusb_driver.name);
|
||||
hdev->setup = btusb_setup_realtek;
|
||||
hdev->shutdown = btrtl_shutdown_realtek;
|
||||
hdev->cmd_timeout = btusb_rtl_cmd_timeout;
|
||||
hdev->reset = btusb_rtl_reset;
|
||||
hdev->hw_error = btusb_rtl_hw_error;
|
||||
|
||||
/* Realtek devices need to set remote wakeup on auto-suspend */
|
||||
|
@ -4008,6 +4035,10 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
data->isoc, data);
|
||||
if (err < 0)
|
||||
goto out_free_dev;
|
||||
|
||||
err = device_create_file(&intf->dev, &dev_attr_isoc_alt);
|
||||
if (err)
|
||||
goto out_free_dev;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_HCIBTUSB_BCM) && data->diag) {
|
||||
|
@ -4054,8 +4085,10 @@ static void btusb_disconnect(struct usb_interface *intf)
|
|||
hdev = data->hdev;
|
||||
usb_set_intfdata(data->intf, NULL);
|
||||
|
||||
if (data->isoc)
|
||||
if (data->isoc) {
|
||||
device_remove_file(&intf->dev, &dev_attr_isoc_alt);
|
||||
usb_set_intfdata(data->isoc, NULL);
|
||||
}
|
||||
|
||||
if (data->diag)
|
||||
usb_set_intfdata(data->diag, NULL);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <linux/pwrseq/consumer.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/serdev.h>
|
||||
#include <linux/string_choices.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/unaligned.h>
|
||||
|
||||
|
@ -228,7 +229,7 @@ struct qca_serdev {
|
|||
u32 init_speed;
|
||||
u32 oper_speed;
|
||||
bool bdaddr_property_broken;
|
||||
const char *firmware_name;
|
||||
const char *firmware_name[2];
|
||||
};
|
||||
|
||||
static int qca_regulator_enable(struct qca_serdev *qcadev);
|
||||
|
@ -258,7 +259,18 @@ static const char *qca_get_firmware_name(struct hci_uart *hu)
|
|||
if (hu->serdev) {
|
||||
struct qca_serdev *qsd = serdev_device_get_drvdata(hu->serdev);
|
||||
|
||||
return qsd->firmware_name;
|
||||
return qsd->firmware_name[0];
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static const char *qca_get_rampatch_name(struct hci_uart *hu)
|
||||
{
|
||||
if (hu->serdev) {
|
||||
struct qca_serdev *qsd = serdev_device_get_drvdata(hu->serdev);
|
||||
|
||||
return qsd->firmware_name[1];
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -332,8 +344,8 @@ static void serial_clock_vote(unsigned long vote, struct hci_uart *hu)
|
|||
else
|
||||
__serial_clock_off(hu->tty);
|
||||
|
||||
BT_DBG("Vote serial clock %s(%s)", new_vote ? "true" : "false",
|
||||
vote ? "true" : "false");
|
||||
BT_DBG("Vote serial clock %s(%s)", str_true_false(new_vote),
|
||||
str_true_false(vote));
|
||||
|
||||
diff = jiffies_to_msecs(jiffies - qca->vote_last_jif);
|
||||
|
||||
|
@ -1638,7 +1650,7 @@ static void qca_hw_error(struct hci_dev *hdev, u8 code)
|
|||
clear_bit(QCA_HW_ERROR_EVENT, &qca->flags);
|
||||
}
|
||||
|
||||
static void qca_cmd_timeout(struct hci_dev *hdev)
|
||||
static void qca_reset(struct hci_dev *hdev)
|
||||
{
|
||||
struct hci_uart *hu = hci_get_drvdata(hdev);
|
||||
struct qca_data *qca = hu->priv;
|
||||
|
@ -1855,6 +1867,7 @@ static int qca_setup(struct hci_uart *hu)
|
|||
unsigned int retries = 0;
|
||||
enum qca_btsoc_type soc_type = qca_soc_type(hu);
|
||||
const char *firmware_name = qca_get_firmware_name(hu);
|
||||
const char *rampatch_name = qca_get_rampatch_name(hu);
|
||||
int ret;
|
||||
struct qca_btsoc_version ver;
|
||||
struct qca_serdev *qcadev;
|
||||
|
@ -1963,12 +1976,12 @@ retry:
|
|||
|
||||
/* Setup patch / NVM configurations */
|
||||
ret = qca_uart_setup(hdev, qca_baudrate, soc_type, ver,
|
||||
firmware_name);
|
||||
firmware_name, rampatch_name);
|
||||
if (!ret) {
|
||||
clear_bit(QCA_IBS_DISABLED, &qca->flags);
|
||||
qca_debugfs_init(hdev);
|
||||
hu->hdev->hw_error = qca_hw_error;
|
||||
hu->hdev->cmd_timeout = qca_cmd_timeout;
|
||||
hu->hdev->reset = qca_reset;
|
||||
if (hu->serdev) {
|
||||
if (device_can_wakeup(hu->serdev->ctrl->dev.parent))
|
||||
hu->hdev->wakeup = qca_wakeup;
|
||||
|
@ -2202,7 +2215,7 @@ static int qca_power_off(struct hci_dev *hdev)
|
|||
enum qca_btsoc_type soc_type = qca_soc_type(hu);
|
||||
|
||||
hu->hdev->hw_error = NULL;
|
||||
hu->hdev->cmd_timeout = NULL;
|
||||
hu->hdev->reset = NULL;
|
||||
|
||||
del_timer_sync(&qca->wake_retrans_timer);
|
||||
del_timer_sync(&qca->tx_idle_timer);
|
||||
|
@ -2309,8 +2322,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
|
|||
qcadev->serdev_hu.serdev = serdev;
|
||||
data = device_get_match_data(&serdev->dev);
|
||||
serdev_device_set_drvdata(serdev, qcadev);
|
||||
device_property_read_string(&serdev->dev, "firmware-name",
|
||||
&qcadev->firmware_name);
|
||||
device_property_read_string_array(&serdev->dev, "firmware-name",
|
||||
qcadev->firmware_name, ARRAY_SIZE(qcadev->firmware_name));
|
||||
device_property_read_u32(&serdev->dev, "max-speed",
|
||||
&qcadev->oper_speed);
|
||||
if (!qcadev->oper_speed)
|
||||
|
|
|
@ -943,7 +943,7 @@ int mlx5_ib_fs_add_op_fc(struct mlx5_ib_dev *dev, u32 port_num,
|
|||
}
|
||||
|
||||
dst.type = MLX5_FLOW_DESTINATION_TYPE_COUNTER;
|
||||
dst.counter_id = mlx5_fc_id(opfc->fc);
|
||||
dst.counter = opfc->fc;
|
||||
|
||||
flow_act.action =
|
||||
MLX5_FLOW_CONTEXT_ACTION_COUNT | MLX5_FLOW_CONTEXT_ACTION_ALLOW;
|
||||
|
@ -1113,8 +1113,8 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
|
|||
handler->ibcounters = flow_act.counters;
|
||||
dest_arr[dest_num].type =
|
||||
MLX5_FLOW_DESTINATION_TYPE_COUNTER;
|
||||
dest_arr[dest_num].counter_id =
|
||||
mlx5_fc_id(mcounters->hw_cntrs_hndl);
|
||||
dest_arr[dest_num].counter =
|
||||
mcounters->hw_cntrs_hndl;
|
||||
dest_num++;
|
||||
}
|
||||
|
||||
|
@ -1603,7 +1603,7 @@ static bool raw_fs_is_multicast(struct mlx5_ib_flow_matcher *fs_matcher,
|
|||
static struct mlx5_ib_flow_handler *raw_fs_rule_add(
|
||||
struct mlx5_ib_dev *dev, struct mlx5_ib_flow_matcher *fs_matcher,
|
||||
struct mlx5_flow_context *flow_context, struct mlx5_flow_act *flow_act,
|
||||
u32 counter_id, void *cmd_in, int inlen, int dest_id, int dest_type)
|
||||
struct mlx5_fc *counter, void *cmd_in, int inlen, int dest_id, int dest_type)
|
||||
{
|
||||
struct mlx5_flow_destination *dst;
|
||||
struct mlx5_ib_flow_prio *ft_prio;
|
||||
|
@ -1652,8 +1652,12 @@ static struct mlx5_ib_flow_handler *raw_fs_rule_add(
|
|||
}
|
||||
|
||||
if (flow_act->action & MLX5_FLOW_CONTEXT_ACTION_COUNT) {
|
||||
if (WARN_ON(!counter)) {
|
||||
err = -EINVAL;
|
||||
goto unlock;
|
||||
}
|
||||
dst[dst_num].type = MLX5_FLOW_DESTINATION_TYPE_COUNTER;
|
||||
dst[dst_num].counter_id = counter_id;
|
||||
dst[dst_num].counter = counter;
|
||||
dst_num++;
|
||||
}
|
||||
|
||||
|
@ -1878,7 +1882,8 @@ static int get_dests(struct uverbs_attr_bundle *attrs,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool is_flow_counter(void *obj, u32 offset, u32 *counter_id)
|
||||
static bool
|
||||
is_flow_counter(void *obj, u32 offset, u32 *counter_id, u32 *fc_bulk_size)
|
||||
{
|
||||
struct devx_obj *devx_obj = obj;
|
||||
u16 opcode = MLX5_GET(general_obj_in_cmd_hdr, devx_obj->dinbox, opcode);
|
||||
|
@ -1888,6 +1893,7 @@ static bool is_flow_counter(void *obj, u32 offset, u32 *counter_id)
|
|||
if (offset && offset >= devx_obj->flow_counter_bulk_size)
|
||||
return false;
|
||||
|
||||
*fc_bulk_size = devx_obj->flow_counter_bulk_size;
|
||||
*counter_id = MLX5_GET(dealloc_flow_counter_in,
|
||||
devx_obj->dinbox,
|
||||
flow_counter_id);
|
||||
|
@ -1904,13 +1910,13 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
|
|||
{
|
||||
struct mlx5_flow_context flow_context = {.flow_tag =
|
||||
MLX5_FS_DEFAULT_FLOW_TAG};
|
||||
u32 *offset_attr, offset = 0, counter_id = 0;
|
||||
int dest_id, dest_type = -1, inlen, len, ret, i;
|
||||
struct mlx5_ib_flow_handler *flow_handler;
|
||||
struct mlx5_ib_flow_matcher *fs_matcher;
|
||||
struct ib_uobject **arr_flow_actions;
|
||||
struct ib_uflow_resources *uflow_res;
|
||||
struct mlx5_flow_act flow_act = {};
|
||||
struct mlx5_fc *counter = NULL;
|
||||
struct ib_qp *qp = NULL;
|
||||
void *devx_obj, *cmd_in;
|
||||
struct ib_uobject *uobj;
|
||||
|
@ -1937,6 +1943,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
|
|||
len = uverbs_attr_get_uobjs_arr(attrs,
|
||||
MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_DEVX, &arr_flow_actions);
|
||||
if (len) {
|
||||
u32 *offset_attr, fc_bulk_size, offset = 0, counter_id = 0;
|
||||
devx_obj = arr_flow_actions[0]->object;
|
||||
|
||||
if (uverbs_attr_is_valid(attrs,
|
||||
|
@ -1956,8 +1963,11 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
|
|||
offset = *offset_attr;
|
||||
}
|
||||
|
||||
if (!is_flow_counter(devx_obj, offset, &counter_id))
|
||||
if (!is_flow_counter(devx_obj, offset, &counter_id, &fc_bulk_size))
|
||||
return -EINVAL;
|
||||
counter = mlx5_fc_local_create(counter_id, offset, fc_bulk_size);
|
||||
if (IS_ERR(counter))
|
||||
return PTR_ERR(counter);
|
||||
|
||||
flow_act.action |= MLX5_FLOW_CONTEXT_ACTION_COUNT;
|
||||
}
|
||||
|
@ -1968,8 +1978,10 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
|
|||
MLX5_IB_ATTR_CREATE_FLOW_MATCH_VALUE);
|
||||
|
||||
uflow_res = flow_resources_alloc(MLX5_IB_CREATE_FLOW_MAX_FLOW_ACTIONS);
|
||||
if (!uflow_res)
|
||||
return -ENOMEM;
|
||||
if (!uflow_res) {
|
||||
ret = -ENOMEM;
|
||||
goto destroy_counter;
|
||||
}
|
||||
|
||||
len = uverbs_attr_get_uobjs_arr(attrs,
|
||||
MLX5_IB_ATTR_CREATE_FLOW_ARR_FLOW_ACTIONS, &arr_flow_actions);
|
||||
|
@ -1996,7 +2008,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
|
|||
|
||||
flow_handler =
|
||||
raw_fs_rule_add(dev, fs_matcher, &flow_context, &flow_act,
|
||||
counter_id, cmd_in, inlen, dest_id, dest_type);
|
||||
counter, cmd_in, inlen, dest_id, dest_type);
|
||||
if (IS_ERR(flow_handler)) {
|
||||
ret = PTR_ERR(flow_handler);
|
||||
goto err_out;
|
||||
|
@ -2007,6 +2019,9 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
|
|||
return 0;
|
||||
err_out:
|
||||
ib_uverbs_flow_resources_free(uflow_res);
|
||||
destroy_counter:
|
||||
if (counter)
|
||||
mlx5_fc_local_destroy(counter);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -294,20 +294,6 @@ get_Bprotocol4mask(u_int m)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
struct Bprotocol *
|
||||
get_Bprotocol4id(u_int id)
|
||||
{
|
||||
u_int m;
|
||||
|
||||
if (id < ISDN_P_B_START || id > 63) {
|
||||
printk(KERN_WARNING "%s id not in range %d\n",
|
||||
__func__, id);
|
||||
return NULL;
|
||||
}
|
||||
m = 1 << (id & ISDN_P_B_MASK);
|
||||
return get_Bprotocol4mask(m);
|
||||
}
|
||||
|
||||
int
|
||||
mISDN_register_Bprotocol(struct Bprotocol *bp)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,6 @@ extern void __add_layer2(struct mISDNchannel *, struct mISDNstack *);
|
|||
|
||||
extern u_int get_all_Bprotocols(void);
|
||||
struct Bprotocol *get_Bprotocol4mask(u_int);
|
||||
struct Bprotocol *get_Bprotocol4id(u_int);
|
||||
|
||||
extern int mISDN_inittimer(u_int *);
|
||||
extern void mISDN_timer_cleanup(void);
|
||||
|
|
|
@ -84,7 +84,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
|
||||
if (skb_copy_bits(skb, BAREUDP_BASE_HLEN, &ipversion,
|
||||
sizeof(ipversion))) {
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
dev_dstats_rx_dropped(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
ipversion >>= 4;
|
||||
|
@ -94,7 +94,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
} else if (ipversion == 6 && bareudp->multi_proto_mode) {
|
||||
proto = htons(ETH_P_IPV6);
|
||||
} else {
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
dev_dstats_rx_dropped(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
} else if (bareudp->ethertype == htons(ETH_P_MPLS_UC)) {
|
||||
|
@ -108,7 +108,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
ipv4_is_multicast(tunnel_hdr->daddr)) {
|
||||
proto = htons(ETH_P_MPLS_MC);
|
||||
} else {
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
dev_dstats_rx_dropped(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
} else {
|
||||
|
@ -124,7 +124,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
(addr_type & IPV6_ADDR_MULTICAST)) {
|
||||
proto = htons(ETH_P_MPLS_MC);
|
||||
} else {
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
dev_dstats_rx_dropped(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
proto,
|
||||
!net_eq(bareudp->net,
|
||||
dev_net(bareudp->dev)))) {
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
dev_dstats_rx_dropped(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
|
||||
tun_dst = udp_tun_rx_dst(skb, family, key, 0, 0);
|
||||
if (!tun_dst) {
|
||||
dev_core_stats_rx_dropped_inc(bareudp->dev);
|
||||
dev_dstats_rx_dropped(bareudp->dev);
|
||||
goto drop;
|
||||
}
|
||||
skb_dst_set(skb, &tun_dst->dst);
|
||||
|
@ -194,7 +194,7 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
len = skb->len;
|
||||
err = gro_cells_receive(&bareudp->gro_cells, skb);
|
||||
if (likely(err == NET_RX_SUCCESS))
|
||||
dev_sw_netstats_rx_add(bareudp->dev, len);
|
||||
dev_dstats_rx_add(bareudp->dev, len);
|
||||
|
||||
return 0;
|
||||
drop:
|
||||
|
@ -589,7 +589,7 @@ static void bareudp_setup(struct net_device *dev)
|
|||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
dev->lltx = true;
|
||||
dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
|
||||
dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
|
||||
dev->pcpu_stat_type = NETDEV_PCPU_STAT_DSTATS;
|
||||
}
|
||||
|
||||
static int bareudp_validate(struct nlattr *tb[], struct nlattr *data[],
|
||||
|
|
|
@ -85,8 +85,6 @@ const char *can_get_state_str(const enum can_state state)
|
|||
default:
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
return "<unknown>";
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(can_get_state_str);
|
||||
|
||||
|
|
|
@ -1073,9 +1073,10 @@ static int grcan_open(struct net_device *dev)
|
|||
if (err)
|
||||
goto exit_close_candev;
|
||||
|
||||
napi_enable(&priv->napi);
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
napi_enable(&priv->napi);
|
||||
grcan_start(dev);
|
||||
if (!(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
|
||||
netif_start_queue(dev);
|
||||
|
|
|
@ -999,7 +999,8 @@ static int kvaser_pciefd_setup_can_ctrls(struct kvaser_pciefd *pcie)
|
|||
can->can.ctrlmode_supported = CAN_CTRLMODE_LISTENONLY |
|
||||
CAN_CTRLMODE_FD |
|
||||
CAN_CTRLMODE_FD_NON_ISO |
|
||||
CAN_CTRLMODE_CC_LEN8_DLC;
|
||||
CAN_CTRLMODE_CC_LEN8_DLC |
|
||||
CAN_CTRLMODE_BERR_REPORTING;
|
||||
|
||||
status = ioread32(can->reg_base + KVASER_PCIEFD_KCAN_STAT_REG);
|
||||
if (!(status & KVASER_PCIEFD_KCAN_STAT_FD)) {
|
||||
|
@ -1234,11 +1235,15 @@ static int kvaser_pciefd_handle_data_packet(struct kvaser_pciefd *pcie,
|
|||
}
|
||||
|
||||
static void kvaser_pciefd_change_state(struct kvaser_pciefd_can *can,
|
||||
const struct can_berr_counter *bec,
|
||||
struct can_frame *cf,
|
||||
enum can_state new_state,
|
||||
enum can_state tx_state,
|
||||
enum can_state rx_state)
|
||||
{
|
||||
enum can_state old_state;
|
||||
|
||||
old_state = can->can.state;
|
||||
can_change_state(can->can.dev, cf, tx_state, rx_state);
|
||||
|
||||
if (new_state == CAN_STATE_BUS_OFF) {
|
||||
|
@ -1254,6 +1259,18 @@ static void kvaser_pciefd_change_state(struct kvaser_pciefd_can *can,
|
|||
can_bus_off(ndev);
|
||||
}
|
||||
}
|
||||
if (old_state == CAN_STATE_BUS_OFF &&
|
||||
new_state == CAN_STATE_ERROR_ACTIVE &&
|
||||
can->can.restart_ms) {
|
||||
can->can.can_stats.restarts++;
|
||||
if (cf)
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
}
|
||||
if (cf && new_state != CAN_STATE_BUS_OFF) {
|
||||
cf->can_id |= CAN_ERR_CNT;
|
||||
cf->data[6] = bec->txerr;
|
||||
cf->data[7] = bec->rxerr;
|
||||
}
|
||||
}
|
||||
|
||||
static void kvaser_pciefd_packet_to_state(struct kvaser_pciefd_rx_packet *p,
|
||||
|
@ -1288,7 +1305,7 @@ static int kvaser_pciefd_rx_error_frame(struct kvaser_pciefd_can *can,
|
|||
struct can_berr_counter bec;
|
||||
enum can_state old_state, new_state, tx_state, rx_state;
|
||||
struct net_device *ndev = can->can.dev;
|
||||
struct sk_buff *skb;
|
||||
struct sk_buff *skb = NULL;
|
||||
struct can_frame *cf = NULL;
|
||||
|
||||
old_state = can->can.state;
|
||||
|
@ -1297,16 +1314,10 @@ static int kvaser_pciefd_rx_error_frame(struct kvaser_pciefd_can *can,
|
|||
bec.rxerr = FIELD_GET(KVASER_PCIEFD_SPACK_RXERR_MASK, p->header[0]);
|
||||
|
||||
kvaser_pciefd_packet_to_state(p, &bec, &new_state, &tx_state, &rx_state);
|
||||
skb = alloc_can_err_skb(ndev, &cf);
|
||||
if (can->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
|
||||
skb = alloc_can_err_skb(ndev, &cf);
|
||||
if (new_state != old_state) {
|
||||
kvaser_pciefd_change_state(can, cf, new_state, tx_state, rx_state);
|
||||
if (old_state == CAN_STATE_BUS_OFF &&
|
||||
new_state == CAN_STATE_ERROR_ACTIVE &&
|
||||
can->can.restart_ms) {
|
||||
can->can.can_stats.restarts++;
|
||||
if (skb)
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
}
|
||||
kvaser_pciefd_change_state(can, &bec, cf, new_state, tx_state, rx_state);
|
||||
}
|
||||
|
||||
can->err_rep_cnt++;
|
||||
|
@ -1319,18 +1330,19 @@ static int kvaser_pciefd_rx_error_frame(struct kvaser_pciefd_can *can,
|
|||
can->bec.txerr = bec.txerr;
|
||||
can->bec.rxerr = bec.rxerr;
|
||||
|
||||
if (!skb) {
|
||||
ndev->stats.rx_dropped++;
|
||||
return -ENOMEM;
|
||||
if (can->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) {
|
||||
if (!skb) {
|
||||
netdev_warn(ndev, "No memory left for err_skb\n");
|
||||
ndev->stats.rx_dropped++;
|
||||
return -ENOMEM;
|
||||
}
|
||||
kvaser_pciefd_set_skb_timestamp(can->kv_pcie, skb, p->timestamp);
|
||||
cf->can_id |= CAN_ERR_BUSERROR | CAN_ERR_CNT;
|
||||
cf->data[6] = bec.txerr;
|
||||
cf->data[7] = bec.rxerr;
|
||||
netif_rx(skb);
|
||||
}
|
||||
|
||||
kvaser_pciefd_set_skb_timestamp(can->kv_pcie, skb, p->timestamp);
|
||||
cf->can_id |= CAN_ERR_BUSERROR | CAN_ERR_CNT;
|
||||
cf->data[6] = bec.txerr;
|
||||
cf->data[7] = bec.rxerr;
|
||||
|
||||
netif_rx(skb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1359,6 +1371,7 @@ static int kvaser_pciefd_handle_status_resp(struct kvaser_pciefd_can *can,
|
|||
{
|
||||
struct can_berr_counter bec;
|
||||
enum can_state old_state, new_state, tx_state, rx_state;
|
||||
int ret = 0;
|
||||
|
||||
old_state = can->can.state;
|
||||
|
||||
|
@ -1372,25 +1385,15 @@ static int kvaser_pciefd_handle_status_resp(struct kvaser_pciefd_can *can,
|
|||
struct can_frame *cf;
|
||||
|
||||
skb = alloc_can_err_skb(ndev, &cf);
|
||||
if (!skb) {
|
||||
kvaser_pciefd_change_state(can, &bec, cf, new_state, tx_state, rx_state);
|
||||
if (skb) {
|
||||
kvaser_pciefd_set_skb_timestamp(can->kv_pcie, skb, p->timestamp);
|
||||
netif_rx(skb);
|
||||
} else {
|
||||
ndev->stats.rx_dropped++;
|
||||
return -ENOMEM;
|
||||
netdev_warn(ndev, "No memory left for err_skb\n");
|
||||
ret = -ENOMEM;
|
||||
}
|
||||
|
||||
kvaser_pciefd_change_state(can, cf, new_state, tx_state, rx_state);
|
||||
if (old_state == CAN_STATE_BUS_OFF &&
|
||||
new_state == CAN_STATE_ERROR_ACTIVE &&
|
||||
can->can.restart_ms) {
|
||||
can->can.can_stats.restarts++;
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
}
|
||||
|
||||
kvaser_pciefd_set_skb_timestamp(can->kv_pcie, skb, p->timestamp);
|
||||
|
||||
cf->data[6] = bec.txerr;
|
||||
cf->data[7] = bec.rxerr;
|
||||
|
||||
netif_rx(skb);
|
||||
}
|
||||
can->bec.txerr = bec.txerr;
|
||||
can->bec.rxerr = bec.rxerr;
|
||||
|
@ -1398,7 +1401,7 @@ static int kvaser_pciefd_handle_status_resp(struct kvaser_pciefd_can *can,
|
|||
if (bec.txerr || bec.rxerr)
|
||||
mod_timer(&can->bec_poll_timer, KVASER_PCIEFD_BEC_POLL_FREQ);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int kvaser_pciefd_handle_status_packet(struct kvaser_pciefd *pcie,
|
||||
|
|
|
@ -1785,6 +1785,13 @@ static void m_can_stop(struct net_device *dev)
|
|||
|
||||
/* set the state as STOPPED */
|
||||
cdev->can.state = CAN_STATE_STOPPED;
|
||||
|
||||
if (cdev->ops->deinit) {
|
||||
ret = cdev->ops->deinit(cdev);
|
||||
if (ret)
|
||||
netdev_err(dev, "failed to deinitialize: %pe\n",
|
||||
ERR_PTR(ret));
|
||||
}
|
||||
}
|
||||
|
||||
static int m_can_close(struct net_device *dev)
|
||||
|
@ -2466,6 +2473,7 @@ int m_can_class_suspend(struct device *dev)
|
|||
{
|
||||
struct m_can_classdev *cdev = dev_get_drvdata(dev);
|
||||
struct net_device *ndev = cdev->net;
|
||||
int ret = 0;
|
||||
|
||||
if (netif_running(ndev)) {
|
||||
netif_stop_queue(ndev);
|
||||
|
@ -2478,6 +2486,9 @@ int m_can_class_suspend(struct device *dev)
|
|||
if (cdev->pm_wake_source) {
|
||||
hrtimer_cancel(&cdev->hrtimer);
|
||||
m_can_write(cdev, M_CAN_IE, IR_RF0N);
|
||||
|
||||
if (cdev->ops->deinit)
|
||||
ret = cdev->ops->deinit(cdev);
|
||||
} else {
|
||||
m_can_stop(ndev);
|
||||
}
|
||||
|
@ -2489,7 +2500,7 @@ int m_can_class_suspend(struct device *dev)
|
|||
|
||||
cdev->can.state = CAN_STATE_SLEEPING;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(m_can_class_suspend);
|
||||
|
||||
|
@ -2497,14 +2508,13 @@ int m_can_class_resume(struct device *dev)
|
|||
{
|
||||
struct m_can_classdev *cdev = dev_get_drvdata(dev);
|
||||
struct net_device *ndev = cdev->net;
|
||||
int ret = 0;
|
||||
|
||||
pinctrl_pm_select_default_state(dev);
|
||||
|
||||
cdev->can.state = CAN_STATE_ERROR_ACTIVE;
|
||||
|
||||
if (netif_running(ndev)) {
|
||||
int ret;
|
||||
|
||||
ret = m_can_clk_start(cdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -2517,6 +2527,10 @@ int m_can_class_resume(struct device *dev)
|
|||
* again.
|
||||
*/
|
||||
cdev->active_interrupts |= IR_RF0N | IR_TEFN;
|
||||
|
||||
if (cdev->ops->init)
|
||||
ret = cdev->ops->init(cdev);
|
||||
|
||||
m_can_write(cdev, M_CAN_IE, cdev->active_interrupts);
|
||||
} else {
|
||||
ret = m_can_start(ndev);
|
||||
|
@ -2530,7 +2544,7 @@ int m_can_class_resume(struct device *dev)
|
|||
netif_start_queue(ndev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(m_can_class_resume);
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ struct m_can_ops {
|
|||
int (*write_fifo)(struct m_can_classdev *cdev, int addr_offset,
|
||||
const void *val, size_t val_count);
|
||||
int (*init)(struct m_can_classdev *cdev);
|
||||
int (*deinit)(struct m_can_classdev *cdev);
|
||||
};
|
||||
|
||||
struct m_can_tx_op {
|
||||
|
|
|
@ -92,6 +92,8 @@
|
|||
#define TCAN4X5X_MODE_STANDBY BIT(6)
|
||||
#define TCAN4X5X_MODE_NORMAL BIT(7)
|
||||
|
||||
#define TCAN4X5X_NWKRQ_VOLTAGE_VIO BIT(19)
|
||||
|
||||
#define TCAN4X5X_DISABLE_WAKE_MSK (BIT(31) | BIT(30))
|
||||
#define TCAN4X5X_DISABLE_INH_MSK BIT(9)
|
||||
|
||||
|
@ -267,9 +269,24 @@ static int tcan4x5x_init(struct m_can_classdev *cdev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (tcan4x5x->nwkrq_voltage_vio) {
|
||||
ret = regmap_set_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG,
|
||||
TCAN4X5X_NWKRQ_VOLTAGE_VIO);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tcan4x5x_deinit(struct m_can_classdev *cdev)
|
||||
{
|
||||
struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev);
|
||||
|
||||
return regmap_update_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG,
|
||||
TCAN4X5X_MODE_SEL_MASK, TCAN4X5X_MODE_STANDBY);
|
||||
};
|
||||
|
||||
static int tcan4x5x_disable_wake(struct m_can_classdev *cdev)
|
||||
{
|
||||
struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev);
|
||||
|
@ -318,6 +335,14 @@ static const struct tcan4x5x_version_info
|
|||
return &tcan4x5x_versions[TCAN4X5X];
|
||||
}
|
||||
|
||||
static void tcan4x5x_get_dt_data(struct m_can_classdev *cdev)
|
||||
{
|
||||
struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev);
|
||||
|
||||
tcan4x5x->nwkrq_voltage_vio =
|
||||
of_property_read_bool(cdev->dev->of_node, "ti,nwkrq-voltage-vio");
|
||||
}
|
||||
|
||||
static int tcan4x5x_get_gpios(struct m_can_classdev *cdev,
|
||||
const struct tcan4x5x_version_info *version_info)
|
||||
{
|
||||
|
@ -359,6 +384,7 @@ static int tcan4x5x_get_gpios(struct m_can_classdev *cdev,
|
|||
|
||||
static const struct m_can_ops tcan4x5x_ops = {
|
||||
.init = tcan4x5x_init,
|
||||
.deinit = tcan4x5x_deinit,
|
||||
.read_reg = tcan4x5x_read_reg,
|
||||
.write_reg = tcan4x5x_write_reg,
|
||||
.write_fifo = tcan4x5x_write_fifo,
|
||||
|
@ -392,7 +418,7 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
|
|||
priv->power = NULL;
|
||||
}
|
||||
|
||||
m_can_class_get_clocks(mcan_class);
|
||||
mcan_class->cclk = devm_clk_get(mcan_class->dev, "cclk");
|
||||
if (IS_ERR(mcan_class->cclk)) {
|
||||
dev_err(&spi->dev, "no CAN clock source defined\n");
|
||||
freq = TCAN4X5X_EXT_CLK_DEF;
|
||||
|
@ -453,6 +479,8 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
|
|||
goto out_power;
|
||||
}
|
||||
|
||||
tcan4x5x_get_dt_data(mcan_class);
|
||||
|
||||
tcan4x5x_check_wake(priv);
|
||||
|
||||
ret = tcan4x5x_write_tcan_reg(mcan_class, TCAN4X5X_INT_EN, 0);
|
||||
|
|
|
@ -42,6 +42,8 @@ struct tcan4x5x_priv {
|
|||
|
||||
struct tcan4x5x_map_buf map_buf_rx;
|
||||
struct tcan4x5x_map_buf map_buf_tx;
|
||||
|
||||
bool nwkrq_voltage_vio;
|
||||
};
|
||||
|
||||
static inline void
|
||||
|
|
|
@ -230,18 +230,9 @@ static int sp_probe(struct platform_device *pdev)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res_mem)
|
||||
return -ENODEV;
|
||||
|
||||
if (!devm_request_mem_region(&pdev->dev, res_mem->start,
|
||||
resource_size(res_mem), DRV_NAME))
|
||||
return -EBUSY;
|
||||
|
||||
addr = devm_ioremap(&pdev->dev, res_mem->start,
|
||||
resource_size(res_mem));
|
||||
if (!addr)
|
||||
return -ENOMEM;
|
||||
addr = devm_platform_get_and_ioremap_resource(pdev, 0, &res_mem);
|
||||
if (IS_ERR(addr))
|
||||
return PTR_ERR(addr);
|
||||
|
||||
if (of) {
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
|
|
|
@ -570,7 +570,7 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status)
|
|||
else
|
||||
state = CAN_STATE_ERROR_ACTIVE;
|
||||
}
|
||||
if (skb && state != CAN_STATE_BUS_OFF) {
|
||||
if (likely(skb) && state != CAN_STATE_BUS_OFF) {
|
||||
cf->can_id |= CAN_ERR_CNT;
|
||||
cf->data[6] = txerr;
|
||||
cf->data[7] = rxerr;
|
||||
|
|
|
@ -818,7 +818,8 @@ static int kvaser_usb_init_one(struct kvaser_usb *dev, int channel)
|
|||
init_completion(&priv->stop_comp);
|
||||
init_completion(&priv->flush_comp);
|
||||
init_completion(&priv->get_busparams_comp);
|
||||
priv->can.ctrlmode_supported = CAN_CTRLMODE_CC_LEN8_DLC;
|
||||
priv->can.ctrlmode_supported = CAN_CTRLMODE_CC_LEN8_DLC |
|
||||
CAN_CTRLMODE_BERR_REPORTING;
|
||||
|
||||
priv->dev = dev;
|
||||
priv->netdev = netdev;
|
||||
|
|
|
@ -926,6 +926,42 @@ kvaser_usb_hydra_bus_status_to_can_state(const struct kvaser_usb_net_priv *priv,
|
|||
}
|
||||
}
|
||||
|
||||
static void kvaser_usb_hydra_change_state(struct kvaser_usb_net_priv *priv,
|
||||
const struct can_berr_counter *bec,
|
||||
struct can_frame *cf,
|
||||
enum can_state new_state)
|
||||
{
|
||||
struct net_device *netdev = priv->netdev;
|
||||
enum can_state old_state = priv->can.state;
|
||||
enum can_state tx_state, rx_state;
|
||||
|
||||
tx_state = (bec->txerr >= bec->rxerr) ?
|
||||
new_state : CAN_STATE_ERROR_ACTIVE;
|
||||
rx_state = (bec->txerr <= bec->rxerr) ?
|
||||
new_state : CAN_STATE_ERROR_ACTIVE;
|
||||
can_change_state(netdev, cf, tx_state, rx_state);
|
||||
|
||||
if (new_state == CAN_STATE_BUS_OFF && old_state < CAN_STATE_BUS_OFF) {
|
||||
if (priv->can.restart_ms == 0)
|
||||
kvaser_usb_hydra_send_simple_cmd_async(priv, CMD_STOP_CHIP_REQ);
|
||||
|
||||
can_bus_off(netdev);
|
||||
}
|
||||
|
||||
if (priv->can.restart_ms &&
|
||||
old_state >= CAN_STATE_BUS_OFF &&
|
||||
new_state < CAN_STATE_BUS_OFF) {
|
||||
priv->can.can_stats.restarts++;
|
||||
if (cf)
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
}
|
||||
if (cf && new_state != CAN_STATE_BUS_OFF) {
|
||||
cf->can_id |= CAN_ERR_CNT;
|
||||
cf->data[6] = bec->txerr;
|
||||
cf->data[7] = bec->rxerr;
|
||||
}
|
||||
}
|
||||
|
||||
static void kvaser_usb_hydra_update_state(struct kvaser_usb_net_priv *priv,
|
||||
u8 bus_status,
|
||||
const struct can_berr_counter *bec)
|
||||
|
@ -951,41 +987,11 @@ static void kvaser_usb_hydra_update_state(struct kvaser_usb_net_priv *priv,
|
|||
return;
|
||||
|
||||
skb = alloc_can_err_skb(netdev, &cf);
|
||||
if (skb) {
|
||||
enum can_state tx_state, rx_state;
|
||||
|
||||
tx_state = (bec->txerr >= bec->rxerr) ?
|
||||
new_state : CAN_STATE_ERROR_ACTIVE;
|
||||
rx_state = (bec->txerr <= bec->rxerr) ?
|
||||
new_state : CAN_STATE_ERROR_ACTIVE;
|
||||
can_change_state(netdev, cf, tx_state, rx_state);
|
||||
}
|
||||
|
||||
if (new_state == CAN_STATE_BUS_OFF && old_state < CAN_STATE_BUS_OFF) {
|
||||
if (!priv->can.restart_ms)
|
||||
kvaser_usb_hydra_send_simple_cmd_async
|
||||
(priv, CMD_STOP_CHIP_REQ);
|
||||
|
||||
can_bus_off(netdev);
|
||||
}
|
||||
|
||||
if (!skb) {
|
||||
kvaser_usb_hydra_change_state(priv, bec, cf, new_state);
|
||||
if (skb)
|
||||
netif_rx(skb);
|
||||
else
|
||||
netdev_warn(netdev, "No memory left for err_skb\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->can.restart_ms &&
|
||||
old_state >= CAN_STATE_BUS_OFF &&
|
||||
new_state < CAN_STATE_BUS_OFF)
|
||||
priv->can.can_stats.restarts++;
|
||||
|
||||
if (new_state != CAN_STATE_BUS_OFF) {
|
||||
cf->can_id |= CAN_ERR_CNT;
|
||||
cf->data[6] = bec->txerr;
|
||||
cf->data[7] = bec->rxerr;
|
||||
}
|
||||
|
||||
netif_rx(skb);
|
||||
}
|
||||
|
||||
static void kvaser_usb_hydra_state_event(const struct kvaser_usb *dev,
|
||||
|
@ -1078,9 +1084,8 @@ kvaser_usb_hydra_error_frame(struct kvaser_usb_net_priv *priv,
|
|||
{
|
||||
struct net_device *netdev = priv->netdev;
|
||||
struct net_device_stats *stats = &netdev->stats;
|
||||
struct can_frame *cf;
|
||||
struct sk_buff *skb;
|
||||
struct skb_shared_hwtstamps *shhwtstamps;
|
||||
struct can_frame *cf = NULL;
|
||||
struct sk_buff *skb = NULL;
|
||||
struct can_berr_counter bec;
|
||||
enum can_state new_state, old_state;
|
||||
u8 bus_status;
|
||||
|
@ -1096,52 +1101,26 @@ kvaser_usb_hydra_error_frame(struct kvaser_usb_net_priv *priv,
|
|||
kvaser_usb_hydra_bus_status_to_can_state(priv, bus_status, &bec,
|
||||
&new_state);
|
||||
|
||||
skb = alloc_can_err_skb(netdev, &cf);
|
||||
if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
|
||||
skb = alloc_can_err_skb(netdev, &cf);
|
||||
if (new_state != old_state)
|
||||
kvaser_usb_hydra_change_state(priv, &bec, cf, new_state);
|
||||
|
||||
if (new_state != old_state) {
|
||||
if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) {
|
||||
if (skb) {
|
||||
enum can_state tx_state, rx_state;
|
||||
struct skb_shared_hwtstamps *shhwtstamps = skb_hwtstamps(skb);
|
||||
|
||||
tx_state = (bec.txerr >= bec.rxerr) ?
|
||||
new_state : CAN_STATE_ERROR_ACTIVE;
|
||||
rx_state = (bec.txerr <= bec.rxerr) ?
|
||||
new_state : CAN_STATE_ERROR_ACTIVE;
|
||||
|
||||
can_change_state(netdev, cf, tx_state, rx_state);
|
||||
|
||||
if (priv->can.restart_ms &&
|
||||
old_state >= CAN_STATE_BUS_OFF &&
|
||||
new_state < CAN_STATE_BUS_OFF)
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
}
|
||||
|
||||
if (new_state == CAN_STATE_BUS_OFF) {
|
||||
if (!priv->can.restart_ms)
|
||||
kvaser_usb_hydra_send_simple_cmd_async
|
||||
(priv, CMD_STOP_CHIP_REQ);
|
||||
|
||||
can_bus_off(netdev);
|
||||
shhwtstamps->hwtstamp = hwtstamp;
|
||||
cf->can_id |= CAN_ERR_BUSERROR | CAN_ERR_CNT;
|
||||
cf->data[6] = bec.txerr;
|
||||
cf->data[7] = bec.rxerr;
|
||||
netif_rx(skb);
|
||||
} else {
|
||||
stats->rx_dropped++;
|
||||
netdev_warn(netdev, "No memory left for err_skb\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (!skb) {
|
||||
stats->rx_dropped++;
|
||||
netdev_warn(netdev, "No memory left for err_skb\n");
|
||||
return;
|
||||
}
|
||||
|
||||
shhwtstamps = skb_hwtstamps(skb);
|
||||
shhwtstamps->hwtstamp = hwtstamp;
|
||||
|
||||
cf->can_id |= CAN_ERR_BUSERROR;
|
||||
if (new_state != CAN_STATE_BUS_OFF) {
|
||||
cf->can_id |= CAN_ERR_CNT;
|
||||
cf->data[6] = bec.txerr;
|
||||
cf->data[7] = bec.rxerr;
|
||||
}
|
||||
|
||||
netif_rx(skb);
|
||||
|
||||
priv->bec.txerr = bec.txerr;
|
||||
priv->bec.rxerr = bec.rxerr;
|
||||
}
|
||||
|
|
|
@ -1120,10 +1120,8 @@ kvaser_usb_leaf_rx_error_update_can_state(struct kvaser_usb_net_priv *priv,
|
|||
static void kvaser_usb_leaf_rx_error(const struct kvaser_usb *dev,
|
||||
const struct kvaser_usb_err_summary *es)
|
||||
{
|
||||
struct can_frame *cf;
|
||||
struct can_frame tmp_cf = { .can_id = CAN_ERR_FLAG,
|
||||
.len = CAN_ERR_DLC };
|
||||
struct sk_buff *skb;
|
||||
struct can_frame *cf = NULL;
|
||||
struct sk_buff *skb = NULL;
|
||||
struct net_device_stats *stats;
|
||||
struct kvaser_usb_net_priv *priv;
|
||||
struct kvaser_usb_net_leaf_priv *leaf;
|
||||
|
@ -1143,18 +1141,10 @@ static void kvaser_usb_leaf_rx_error(const struct kvaser_usb *dev,
|
|||
if (!netif_running(priv->netdev))
|
||||
return;
|
||||
|
||||
/* Update all of the CAN interface's state and error counters before
|
||||
* trying any memory allocation that can actually fail with -ENOMEM.
|
||||
*
|
||||
* We send a temporary stack-allocated error CAN frame to
|
||||
* can_change_state() for the very same reason.
|
||||
*
|
||||
* TODO: Split can_change_state() responsibility between updating the
|
||||
* CAN interface's state and counters, and the setting up of CAN error
|
||||
* frame ID and data to userspace. Remove stack allocation afterwards.
|
||||
*/
|
||||
old_state = priv->can.state;
|
||||
kvaser_usb_leaf_rx_error_update_can_state(priv, es, &tmp_cf);
|
||||
if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
|
||||
skb = alloc_can_err_skb(priv->netdev, &cf);
|
||||
kvaser_usb_leaf_rx_error_update_can_state(priv, es, cf);
|
||||
new_state = priv->can.state;
|
||||
|
||||
/* If there are errors, request status updates periodically as we do
|
||||
|
@ -1168,13 +1158,6 @@ static void kvaser_usb_leaf_rx_error(const struct kvaser_usb *dev,
|
|||
schedule_delayed_work(&leaf->chip_state_req_work,
|
||||
msecs_to_jiffies(500));
|
||||
|
||||
skb = alloc_can_err_skb(priv->netdev, &cf);
|
||||
if (!skb) {
|
||||
stats->rx_dropped++;
|
||||
return;
|
||||
}
|
||||
memcpy(cf, &tmp_cf, sizeof(*cf));
|
||||
|
||||
if (new_state != old_state) {
|
||||
if (es->status &
|
||||
(M16C_STATE_BUS_OFF | M16C_STATE_BUS_RESET)) {
|
||||
|
@ -1187,11 +1170,20 @@ static void kvaser_usb_leaf_rx_error(const struct kvaser_usb *dev,
|
|||
if (priv->can.restart_ms &&
|
||||
old_state == CAN_STATE_BUS_OFF &&
|
||||
new_state < CAN_STATE_BUS_OFF) {
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
if (cf)
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
netif_carrier_on(priv->netdev);
|
||||
}
|
||||
}
|
||||
|
||||
if (!skb) {
|
||||
if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) {
|
||||
stats->rx_dropped++;
|
||||
netdev_warn(priv->netdev, "No memory left for err_skb\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
switch (dev->driver_info->family) {
|
||||
case KVASER_LEAF:
|
||||
if (es->leaf.error_factor) {
|
||||
|
|
|
@ -2224,25 +2224,19 @@ int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
|
|||
}
|
||||
EXPORT_SYMBOL(b53_eee_init);
|
||||
|
||||
int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)
|
||||
bool b53_support_eee(struct dsa_switch *ds, int port)
|
||||
{
|
||||
struct b53_device *dev = ds->priv;
|
||||
|
||||
if (is5325(dev) || is5365(dev))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return 0;
|
||||
return !is5325(dev) && !is5365(dev);
|
||||
}
|
||||
EXPORT_SYMBOL(b53_get_mac_eee);
|
||||
EXPORT_SYMBOL(b53_support_eee);
|
||||
|
||||
int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)
|
||||
{
|
||||
struct b53_device *dev = ds->priv;
|
||||
struct ethtool_keee *p = &dev->ports[port].eee;
|
||||
|
||||
if (is5325(dev) || is5365(dev))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
p->eee_enabled = e->eee_enabled;
|
||||
b53_eee_enable_set(ds, port, e->eee_enabled);
|
||||
|
||||
|
@ -2298,7 +2292,7 @@ static const struct dsa_switch_ops b53_switch_ops = {
|
|||
.phylink_get_caps = b53_phylink_get_caps,
|
||||
.port_enable = b53_enable_port,
|
||||
.port_disable = b53_disable_port,
|
||||
.get_mac_eee = b53_get_mac_eee,
|
||||
.support_eee = b53_support_eee,
|
||||
.set_mac_eee = b53_set_mac_eee,
|
||||
.port_bridge_join = b53_br_join,
|
||||
.port_bridge_leave = b53_br_leave,
|
||||
|
|
|
@ -384,7 +384,7 @@ int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);
|
|||
void b53_disable_port(struct dsa_switch *ds, int port);
|
||||
void b53_brcm_hdr_setup(struct dsa_switch *ds, int port);
|
||||
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy);
|
||||
int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
|
||||
bool b53_support_eee(struct dsa_switch *ds, int port);
|
||||
int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -99,8 +99,8 @@ static void b53_serdes_an_restart(struct phylink_pcs *pcs)
|
|||
SERDES_MII_BLK, reg);
|
||||
}
|
||||
|
||||
static void b53_serdes_get_state(struct phylink_pcs *pcs,
|
||||
struct phylink_link_state *state)
|
||||
static void b53_serdes_get_state(struct phylink_pcs *pcs, unsigned int neg_mode,
|
||||
struct phylink_link_state *state)
|
||||
{
|
||||
struct b53_device *dev = pcs_to_b53_pcs(pcs)->dev;
|
||||
u8 lane = pcs_to_b53_pcs(pcs)->lane;
|
||||
|
|
|
@ -1232,7 +1232,7 @@ static const struct dsa_switch_ops bcm_sf2_ops = {
|
|||
.set_wol = bcm_sf2_sw_set_wol,
|
||||
.port_enable = bcm_sf2_port_setup,
|
||||
.port_disable = bcm_sf2_port_disable,
|
||||
.get_mac_eee = b53_get_mac_eee,
|
||||
.support_eee = b53_support_eee,
|
||||
.set_mac_eee = b53_set_mac_eee,
|
||||
.port_bridge_join = b53_br_join,
|
||||
.port_bridge_leave = b53_br_leave,
|
||||
|
|
|
@ -127,10 +127,14 @@ static const struct of_device_id ksz9477_dt_ids[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);
|
||||
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(ksz_i2c_pm_ops,
|
||||
ksz_switch_suspend, ksz_switch_resume);
|
||||
|
||||
static struct i2c_driver ksz9477_i2c_driver = {
|
||||
.driver = {
|
||||
.name = "ksz9477-switch",
|
||||
.of_match_table = ksz9477_dt_ids,
|
||||
.pm = &ksz_i2c_pm_ops,
|
||||
},
|
||||
.probe = ksz9477_i2c_probe,
|
||||
.remove = ksz9477_i2c_remove,
|
||||
|
|
|
@ -1339,6 +1339,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
.supports_rgmii = {false, false, true},
|
||||
.internal_phy = {true, true, false},
|
||||
.gbit_capable = {false, false, true},
|
||||
.ptp_capable = true,
|
||||
.wr_table = &ksz8563_register_set,
|
||||
.rd_table = &ksz8563_register_set,
|
||||
},
|
||||
|
@ -1550,6 +1551,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
.internal_phy = {true, true, true, true,
|
||||
true, false, false},
|
||||
.gbit_capable = {true, true, true, true, true, true, true},
|
||||
.ptp_capable = true,
|
||||
.wr_table = &ksz9477_register_set,
|
||||
.rd_table = &ksz9477_register_set,
|
||||
},
|
||||
|
@ -1677,6 +1679,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
.supports_rgmii = {false, false, true},
|
||||
.internal_phy = {true, true, false},
|
||||
.gbit_capable = {true, true, true},
|
||||
.ptp_capable = true,
|
||||
},
|
||||
|
||||
[KSZ8567] = {
|
||||
|
@ -1712,6 +1715,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
true, false, false},
|
||||
.gbit_capable = {false, false, false, false, false,
|
||||
true, true},
|
||||
.ptp_capable = true,
|
||||
},
|
||||
|
||||
[KSZ9567] = {
|
||||
|
@ -1744,6 +1748,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
.internal_phy = {true, true, true, true,
|
||||
true, false, false},
|
||||
.gbit_capable = {true, true, true, true, true, true, true},
|
||||
.ptp_capable = true,
|
||||
},
|
||||
|
||||
[LAN9370] = {
|
||||
|
@ -1773,6 +1778,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
.supports_rmii = {false, false, false, false, true},
|
||||
.supports_rgmii = {false, false, false, false, true},
|
||||
.internal_phy = {true, true, true, true, false},
|
||||
.ptp_capable = true,
|
||||
},
|
||||
|
||||
[LAN9371] = {
|
||||
|
@ -1802,6 +1808,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
.supports_rmii = {false, false, false, false, true, true},
|
||||
.supports_rgmii = {false, false, false, false, true, true},
|
||||
.internal_phy = {true, true, true, true, false, false},
|
||||
.ptp_capable = true,
|
||||
},
|
||||
|
||||
[LAN9372] = {
|
||||
|
@ -1835,6 +1842,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
true, true, false, false},
|
||||
.internal_phy = {true, true, true, true,
|
||||
false, false, true, true},
|
||||
.ptp_capable = true,
|
||||
},
|
||||
|
||||
[LAN9373] = {
|
||||
|
@ -1868,6 +1876,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
true, true, false, false},
|
||||
.internal_phy = {true, true, true, false,
|
||||
false, false, true, true},
|
||||
.ptp_capable = true,
|
||||
},
|
||||
|
||||
[LAN9374] = {
|
||||
|
@ -1901,6 +1910,7 @@ const struct ksz_chip_data ksz_switch_chips[] = {
|
|||
true, true, false, false},
|
||||
.internal_phy = {true, true, true, true,
|
||||
false, false, true, true},
|
||||
.ptp_capable = true,
|
||||
},
|
||||
|
||||
[LAN9646] = {
|
||||
|
@ -2544,7 +2554,11 @@ static int ksz_mdio_register(struct ksz_device *dev)
|
|||
bus->read = ksz_sw_mdio_read;
|
||||
bus->write = ksz_sw_mdio_write;
|
||||
bus->name = "ksz user smi";
|
||||
snprintf(bus->id, MII_BUS_ID_SIZE, "SMI-%d", ds->index);
|
||||
if (ds->dst->index != 0) {
|
||||
snprintf(bus->id, MII_BUS_ID_SIZE, "SMI-%d-%d", ds->dst->index, ds->index);
|
||||
} else {
|
||||
snprintf(bus->id, MII_BUS_ID_SIZE, "SMI-%d", ds->index);
|
||||
}
|
||||
}
|
||||
|
||||
ret = ksz_parse_dt_phy_config(dev, bus, mdio_np);
|
||||
|
@ -2805,16 +2819,21 @@ static int ksz_setup(struct dsa_switch *ds)
|
|||
if (ret)
|
||||
goto out_girq;
|
||||
|
||||
ret = ksz_ptp_irq_setup(ds, dp->index);
|
||||
if (ret)
|
||||
goto out_pirq;
|
||||
if (dev->info->ptp_capable) {
|
||||
ret = ksz_ptp_irq_setup(ds, dp->index);
|
||||
if (ret)
|
||||
goto out_pirq;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ret = ksz_ptp_clock_register(ds);
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "Failed to register PTP clock: %d\n", ret);
|
||||
goto out_ptpirq;
|
||||
if (dev->info->ptp_capable) {
|
||||
ret = ksz_ptp_clock_register(ds);
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "Failed to register PTP clock: %d\n",
|
||||
ret);
|
||||
goto out_ptpirq;
|
||||
}
|
||||
}
|
||||
|
||||
ret = ksz_mdio_register(dev);
|
||||
|
@ -2834,9 +2853,10 @@ static int ksz_setup(struct dsa_switch *ds)
|
|||
return 0;
|
||||
|
||||
out_ptp_clock_unregister:
|
||||
ksz_ptp_clock_unregister(ds);
|
||||
if (dev->info->ptp_capable)
|
||||
ksz_ptp_clock_unregister(ds);
|
||||
out_ptpirq:
|
||||
if (dev->irq > 0)
|
||||
if (dev->irq > 0 && dev->info->ptp_capable)
|
||||
dsa_switch_for_each_user_port(dp, dev->ds)
|
||||
ksz_ptp_irq_free(ds, dp->index);
|
||||
out_pirq:
|
||||
|
@ -2855,11 +2875,13 @@ static void ksz_teardown(struct dsa_switch *ds)
|
|||
struct ksz_device *dev = ds->priv;
|
||||
struct dsa_port *dp;
|
||||
|
||||
ksz_ptp_clock_unregister(ds);
|
||||
if (dev->info->ptp_capable)
|
||||
ksz_ptp_clock_unregister(ds);
|
||||
|
||||
if (dev->irq > 0) {
|
||||
dsa_switch_for_each_user_port(dp, dev->ds) {
|
||||
ksz_ptp_irq_free(ds, dp->index);
|
||||
if (dev->info->ptp_capable)
|
||||
ksz_ptp_irq_free(ds, dp->index);
|
||||
|
||||
ksz_irq_free(&dev->ports[dp->index].pirq);
|
||||
}
|
||||
|
@ -3444,12 +3466,12 @@ static int ksz_max_mtu(struct dsa_switch *ds, int port)
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static int ksz_validate_eee(struct dsa_switch *ds, int port)
|
||||
static bool ksz_support_eee(struct dsa_switch *ds, int port)
|
||||
{
|
||||
struct ksz_device *dev = ds->priv;
|
||||
|
||||
if (!dev->info->internal_phy[port])
|
||||
return -EOPNOTSUPP;
|
||||
return false;
|
||||
|
||||
switch (dev->chip_id) {
|
||||
case KSZ8563_CHIP_ID:
|
||||
|
@ -3461,41 +3483,16 @@ static int ksz_validate_eee(struct dsa_switch *ds, int port)
|
|||
case KSZ9896_CHIP_ID:
|
||||
case KSZ9897_CHIP_ID:
|
||||
case LAN9646_CHIP_ID:
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static int ksz_get_mac_eee(struct dsa_switch *ds, int port,
|
||||
struct ethtool_keee *e)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ksz_validate_eee(ds, port);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* There is no documented control of Tx LPI configuration. */
|
||||
e->tx_lpi_enabled = true;
|
||||
|
||||
/* There is no documented control of Tx LPI timer. According to tests
|
||||
* Tx LPI timer seems to be set by default to minimal value.
|
||||
*/
|
||||
e->tx_lpi_timer = 0;
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
static int ksz_set_mac_eee(struct dsa_switch *ds, int port,
|
||||
struct ethtool_keee *e)
|
||||
{
|
||||
struct ksz_device *dev = ds->priv;
|
||||
int ret;
|
||||
|
||||
ret = ksz_validate_eee(ds, port);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!e->tx_lpi_enabled) {
|
||||
dev_err(dev->dev, "Disabling EEE Tx LPI is not supported\n");
|
||||
|
@ -4593,6 +4590,23 @@ static int ksz_hsr_leave(struct dsa_switch *ds, int port,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ksz_suspend(struct dsa_switch *ds)
|
||||
{
|
||||
struct ksz_device *dev = ds->priv;
|
||||
|
||||
cancel_delayed_work_sync(&dev->mib_read);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ksz_resume(struct dsa_switch *ds)
|
||||
{
|
||||
struct ksz_device *dev = ds->priv;
|
||||
|
||||
if (dev->mib_read_interval)
|
||||
schedule_delayed_work(&dev->mib_read, dev->mib_read_interval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct dsa_switch_ops ksz_switch_ops = {
|
||||
.get_tag_protocol = ksz_get_tag_protocol,
|
||||
.connect_tag_protocol = ksz_connect_tag_protocol,
|
||||
|
@ -4633,6 +4647,8 @@ static const struct dsa_switch_ops ksz_switch_ops = {
|
|||
.port_max_mtu = ksz_max_mtu,
|
||||
.get_wol = ksz_get_wol,
|
||||
.set_wol = ksz_set_wol,
|
||||
.suspend = ksz_suspend,
|
||||
.resume = ksz_resume,
|
||||
.get_ts_info = ksz_get_ts_info,
|
||||
.port_hwtstamp_get = ksz_hwtstamp_get,
|
||||
.port_hwtstamp_set = ksz_hwtstamp_set,
|
||||
|
@ -4641,7 +4657,7 @@ static const struct dsa_switch_ops ksz_switch_ops = {
|
|||
.cls_flower_add = ksz_cls_flower_add,
|
||||
.cls_flower_del = ksz_cls_flower_del,
|
||||
.port_setup_tc = ksz_setup_tc,
|
||||
.get_mac_eee = ksz_get_mac_eee,
|
||||
.support_eee = ksz_support_eee,
|
||||
.set_mac_eee = ksz_set_mac_eee,
|
||||
.port_get_default_prio = ksz_port_get_default_prio,
|
||||
.port_set_default_prio = ksz_port_set_default_prio,
|
||||
|
@ -5132,6 +5148,24 @@ void ksz_switch_remove(struct ksz_device *dev)
|
|||
}
|
||||
EXPORT_SYMBOL(ksz_switch_remove);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
int ksz_switch_suspend(struct device *dev)
|
||||
{
|
||||
struct ksz_device *priv = dev_get_drvdata(dev);
|
||||
|
||||
return dsa_switch_suspend(priv->ds);
|
||||
}
|
||||
EXPORT_SYMBOL(ksz_switch_suspend);
|
||||
|
||||
int ksz_switch_resume(struct device *dev)
|
||||
{
|
||||
struct ksz_device *priv = dev_get_drvdata(dev);
|
||||
|
||||
return dsa_switch_resume(priv->ds);
|
||||
}
|
||||
EXPORT_SYMBOL(ksz_switch_resume);
|
||||
#endif
|
||||
|
||||
MODULE_AUTHOR("Woojung Huh <Woojung.Huh@microchip.com>");
|
||||
MODULE_DESCRIPTION("Microchip KSZ Series Switch DSA Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
@ -92,6 +92,7 @@ struct ksz_chip_data {
|
|||
bool supports_rgmii[KSZ_MAX_NUM_PORTS];
|
||||
bool internal_phy[KSZ_MAX_NUM_PORTS];
|
||||
bool gbit_capable[KSZ_MAX_NUM_PORTS];
|
||||
bool ptp_capable;
|
||||
const struct regmap_access_table *wr_table;
|
||||
const struct regmap_access_table *rd_table;
|
||||
};
|
||||
|
@ -444,6 +445,8 @@ struct ksz_dev_ops {
|
|||
struct ksz_device *ksz_switch_alloc(struct device *base, void *priv);
|
||||
int ksz_switch_register(struct ksz_device *dev);
|
||||
void ksz_switch_remove(struct ksz_device *dev);
|
||||
int ksz_switch_suspend(struct device *dev);
|
||||
int ksz_switch_resume(struct device *dev);
|
||||
|
||||
void ksz_init_mib_timer(struct ksz_device *dev);
|
||||
bool ksz_is_port_mac_global_usable(struct dsa_switch *ds, int port);
|
||||
|
|
|
@ -239,10 +239,14 @@ static const struct spi_device_id ksz_spi_ids[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(spi, ksz_spi_ids);
|
||||
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(ksz_spi_pm_ops,
|
||||
ksz_switch_suspend, ksz_switch_resume);
|
||||
|
||||
static struct spi_driver ksz_spi_driver = {
|
||||
.driver = {
|
||||
.name = "ksz-switch",
|
||||
.of_match_table = ksz_dt_ids,
|
||||
.pm = &ksz_spi_pm_ops,
|
||||
},
|
||||
.id_table = ksz_spi_ids,
|
||||
.probe = ksz_spi_probe,
|
||||
|
|
|
@ -2994,7 +2994,7 @@ static int mt753x_pcs_validate(struct phylink_pcs *pcs,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mt7530_pcs_get_state(struct phylink_pcs *pcs,
|
||||
static void mt7530_pcs_get_state(struct phylink_pcs *pcs, unsigned int neg_mode,
|
||||
struct phylink_link_state *state)
|
||||
{
|
||||
struct mt7530_priv *priv = pcs_to_mt753x_pcs(pcs)->priv;
|
||||
|
@ -3085,18 +3085,6 @@ mt753x_setup(struct dsa_switch *ds)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int mt753x_get_mac_eee(struct dsa_switch *ds, int port,
|
||||
struct ethtool_keee *e)
|
||||
{
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
u32 eeecr = mt7530_read(priv, MT753X_PMEEECR_P(port));
|
||||
|
||||
e->tx_lpi_enabled = !(eeecr & LPI_MODE_EN);
|
||||
e->tx_lpi_timer = LPI_THRESH_GET(eeecr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mt753x_set_mac_eee(struct dsa_switch *ds, int port,
|
||||
struct ethtool_keee *e)
|
||||
{
|
||||
|
@ -3238,7 +3226,7 @@ const struct dsa_switch_ops mt7530_switch_ops = {
|
|||
.port_mirror_add = mt753x_port_mirror_add,
|
||||
.port_mirror_del = mt753x_port_mirror_del,
|
||||
.phylink_get_caps = mt753x_phylink_get_caps,
|
||||
.get_mac_eee = mt753x_get_mac_eee,
|
||||
.support_eee = dsa_supports_eee,
|
||||
.set_mac_eee = mt753x_set_mac_eee,
|
||||
.conduit_state_change = mt753x_conduit_state_change,
|
||||
.port_setup_tc = mt753x_setup_tc,
|
||||
|
|
|
@ -1289,9 +1289,6 @@ static size_t mv88e6095_stats_get_stat(struct mv88e6xxx_chip *chip, int port,
|
|||
const struct mv88e6xxx_hw_stat *stat,
|
||||
uint64_t *data)
|
||||
{
|
||||
if (!(stat->type & (STATS_TYPE_BANK0 | STATS_TYPE_PORT)))
|
||||
return 0;
|
||||
|
||||
*data = _mv88e6xxx_get_ethtool_stat(chip, stat, port, 0,
|
||||
MV88E6XXX_G1_STATS_OP_HIST_RX);
|
||||
return 1;
|
||||
|
@ -1301,9 +1298,6 @@ static size_t mv88e6250_stats_get_stat(struct mv88e6xxx_chip *chip, int port,
|
|||
const struct mv88e6xxx_hw_stat *stat,
|
||||
uint64_t *data)
|
||||
{
|
||||
if (!(stat->type & STATS_TYPE_BANK0))
|
||||
return 0;
|
||||
|
||||
*data = _mv88e6xxx_get_ethtool_stat(chip, stat, port, 0,
|
||||
MV88E6XXX_G1_STATS_OP_HIST_RX);
|
||||
return 1;
|
||||
|
@ -1313,9 +1307,6 @@ static size_t mv88e6320_stats_get_stat(struct mv88e6xxx_chip *chip, int port,
|
|||
const struct mv88e6xxx_hw_stat *stat,
|
||||
uint64_t *data)
|
||||
{
|
||||
if (!(stat->type & (STATS_TYPE_BANK0 | STATS_TYPE_BANK1)))
|
||||
return 0;
|
||||
|
||||
*data = _mv88e6xxx_get_ethtool_stat(chip, stat, port,
|
||||
MV88E6XXX_G1_STATS_OP_BANK_1_BIT_9,
|
||||
MV88E6XXX_G1_STATS_OP_HIST_RX);
|
||||
|
@ -1326,9 +1317,6 @@ static size_t mv88e6390_stats_get_stat(struct mv88e6xxx_chip *chip, int port,
|
|||
const struct mv88e6xxx_hw_stat *stat,
|
||||
uint64_t *data)
|
||||
{
|
||||
if (!(stat->type & (STATS_TYPE_BANK0 | STATS_TYPE_BANK1)))
|
||||
return 0;
|
||||
|
||||
*data = _mv88e6xxx_get_ethtool_stat(chip, stat, port,
|
||||
MV88E6XXX_G1_STATS_OP_BANK_1_BIT_10,
|
||||
0);
|
||||
|
@ -1341,6 +1329,9 @@ static size_t mv88e6xxx_stats_get_stat(struct mv88e6xxx_chip *chip, int port,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!(stat->type & chip->info->stats_type))
|
||||
return 0;
|
||||
|
||||
if (chip->info->ops->stats_get_stat) {
|
||||
mv88e6xxx_reg_lock(chip);
|
||||
ret = chip->info->ops->stats_get_stat(chip, port, stat, data);
|
||||
|
@ -1522,13 +1513,6 @@ static void mv88e6xxx_get_regs(struct dsa_switch *ds, int port,
|
|||
mv88e6xxx_reg_unlock(chip);
|
||||
}
|
||||
|
||||
static int mv88e6xxx_get_mac_eee(struct dsa_switch *ds, int port,
|
||||
struct ethtool_keee *e)
|
||||
{
|
||||
/* Nothing to do on the port's MAC */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mv88e6xxx_set_mac_eee(struct dsa_switch *ds, int port,
|
||||
struct ethtool_keee *e)
|
||||
{
|
||||
|
@ -5645,6 +5629,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 5,
|
||||
.stats_type = STATS_TYPE_BANK0,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.dual_chip = true,
|
||||
.ops = &mv88e6250_ops,
|
||||
|
@ -5665,6 +5650,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 5,
|
||||
.stats_type = STATS_TYPE_BANK0,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.dual_chip = true,
|
||||
.ops = &mv88e6250_ops,
|
||||
|
@ -5687,6 +5673,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 8,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5708,6 +5695,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.global2_addr = 0x1c,
|
||||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 8,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.multi_chip = true,
|
||||
.ops = &mv88e6095_ops,
|
||||
|
@ -5730,6 +5718,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 8,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5754,6 +5743,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5776,6 +5766,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.global2_addr = 0x1c,
|
||||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.multi_chip = true,
|
||||
.ops = &mv88e6131_ops,
|
||||
|
@ -5800,6 +5791,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.atu_move_port_mask = 0x1f,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
|
||||
|
@ -5823,6 +5815,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5848,6 +5841,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5872,6 +5866,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5897,6 +5892,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5921,6 +5917,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5946,6 +5943,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -5968,6 +5966,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.global2_addr = 0x1c,
|
||||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 8,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.multi_chip = true,
|
||||
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
|
||||
|
@ -5992,6 +5991,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
|
@ -6016,6 +6016,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6039,6 +6040,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6063,6 +6065,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 10,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6087,6 +6090,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 10,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6114,6 +6118,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.dual_chip = true,
|
||||
.ptp_support = true,
|
||||
|
@ -6138,6 +6143,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6161,6 +6167,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.dual_chip = true,
|
||||
.ptp_support = true,
|
||||
|
@ -6184,6 +6191,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6208,6 +6216,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 8,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6233,6 +6242,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 8,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.multi_chip = true,
|
||||
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
|
||||
|
@ -6259,6 +6269,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.atu_move_port_mask = 0x1f,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
|
||||
|
@ -6283,6 +6294,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6307,6 +6319,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6332,6 +6345,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 15000,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 10,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
|
||||
.atu_move_port_mask = 0xf,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6359,6 +6373,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 10,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6383,6 +6398,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6408,6 +6424,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 9,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -6433,6 +6450,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|||
.age_time_coeff = 3750,
|
||||
.g1_irqs = 10,
|
||||
.g2_irqs = 14,
|
||||
.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
|
||||
.atu_move_port_mask = 0x1f,
|
||||
.pvt = true,
|
||||
.multi_chip = true,
|
||||
|
@ -7074,7 +7092,7 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
|
|||
.get_sset_count = mv88e6xxx_get_sset_count,
|
||||
.port_max_mtu = mv88e6xxx_get_max_mtu,
|
||||
.port_change_mtu = mv88e6xxx_change_mtu,
|
||||
.get_mac_eee = mv88e6xxx_get_mac_eee,
|
||||
.support_eee = dsa_supports_eee,
|
||||
.set_mac_eee = mv88e6xxx_set_mac_eee,
|
||||
.get_eeprom_len = mv88e6xxx_get_eeprom_len,
|
||||
.get_eeprom = mv88e6xxx_get_eeprom,
|
||||
|
|
|
@ -144,6 +144,7 @@ struct mv88e6xxx_info {
|
|||
unsigned int age_time_coeff;
|
||||
unsigned int g1_irqs;
|
||||
unsigned int g2_irqs;
|
||||
int stats_type;
|
||||
bool pvt;
|
||||
|
||||
/* Mark certain ports as invalid. This is required for example for the
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue