Skip to content

Commit

Permalink
Merge branch 'net-next-2024-03-30--03-00' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Mar 30, 2024
2 parents 8f1ff3c + d0efd00 commit 4164329
Show file tree
Hide file tree
Showing 263 changed files with 5,579 additions and 2,489 deletions.
2 changes: 2 additions & 0 deletions Documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def have_command(cmd):
"__rcu",
"__user",
"__force",
"__counted_by_le",
"__counted_by_be",

# include/linux/compiler_attributes.h:
"__alias",
Expand Down
56 changes: 56 additions & 0 deletions Documentation/devicetree/bindings/net/airoha,en8811h.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/airoha,en8811h.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Airoha EN8811H PHY

maintainers:
- Eric Woudstra <ericwouds@gmail.com>

description:
The Airoha EN8811H PHY has the ability to reverse polarity
on the lines to and/or from the MAC. It is reversed by
the booleans in the devicetree node of the phy.

allOf:
- $ref: ethernet-phy.yaml#

properties:
compatible:
enum:
- ethernet-phy-id03a2.a411

reg:
maxItems: 1

airoha,pnswap-rx:
type: boolean
description:
Reverse rx polarity of the SERDES. This is the receiving
side of the lines from the MAC towards the EN881H.

airoha,pnswap-tx:
type: boolean
description:
Reverse tx polarity of SERDES. This is the transmitting
side of the lines from EN8811H towards the MAC.

required:
- reg

unevaluatedProperties: false

examples:
- |
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethernet-phy@1 {
compatible = "ethernet-phy-id03a2.a411";
reg = <1>;
airoha,pnswap-rx;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ properties:

local-bd-address: true

qcom,local-bd-address-broken:
type: boolean
description:
boot firmware is incorrectly passing the address in big-endian order

required:
- compatible
Expand Down
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/net/stm32-dwmac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ properties:
Should be phandle/offset pair. The phandle to the syscon node which
encompases the glue register, and the offset of the control register

st,ext-phyclk:
description:
set this property in RMII mode when you have PHY without crystal 50MHz and want to
select RCC clock instead of ETH_REF_CLK. OR in RGMII mode when you want to select
RCC clock instead of ETH_CLK125.
type: boolean

st,eth-clk-sel:
description:
set this property in RGMII PHY when you want to select RCC clock instead of ETH_CLK125.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/mm/page_frags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ to be disabled when executing the fragment allocation.
The network stack uses two separate caches per CPU to handle fragment
allocation. The netdev_alloc_cache is used by callers making use of the
netdev_alloc_frag and __netdev_alloc_skb calls. The napi_alloc_cache is
used by callers of the __napi_alloc_frag and __napi_alloc_skb calls. The
used by callers of the __napi_alloc_frag and napi_alloc_skb calls. The
main difference between these two calls is the context in which they may be
called. The "netdev" prefixed functions are usable in any context as these
functions will disable interrupts, while the "napi" prefixed functions are
Expand Down
51 changes: 51 additions & 0 deletions Documentation/netlink/specs/tc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,19 @@ definitions:
-
name: offmask
type: s32
-
name: tc-u32-mark
type: struct
members:
-
name: val
type: u32
-
name: mask
type: u32
-
name: success
type: u32
-
name: tc-u32-sel
type: struct
Expand Down Expand Up @@ -1774,6 +1787,44 @@ attribute-sets:
-
name: key-ex
type: binary
-
name: tc-act-police-attrs
attributes:
-
name: tbf
type: binary
struct: tc-police
-
name: rate
type: binary # TODO
-
name: peakrate
type: binary # TODO
-
name: avrate
type: u32
-
name: result
type: u32
-
name: tm
type: binary
struct: tcf-t
-
name: pad
type: pad
-
name: rate64
type: u64
-
name: peakrate64
type: u64
-
name: pktrate64
type: u64
-
name: pktburst64
type: u64
-
name: tc-act-simple-attrs
attributes:
Expand Down
76 changes: 76 additions & 0 deletions Documentation/networking/devlink/devlink-eswitch-attr.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.. SPDX-License-Identifier: GPL-2.0
==========================
Devlink E-Switch Attribute
==========================

Devlink E-Switch supports two modes of operation: legacy and switchdev.
Legacy mode operates based on traditional MAC/VLAN steering rules. Switching
decisions are made based on MAC addresses, VLANs, etc. There is limited ability
to offload switching rules to hardware.

On the other hand, switchdev mode allows for more advanced offloading
capabilities of the E-Switch to hardware. In switchdev mode, more switching
rules and logic can be offloaded to the hardware switch ASIC. It enables
representor netdevices that represent the slow path of virtual functions (VFs)
or scalable-functions (SFs) of the device. See more information about
:ref:`Documentation/networking/switchdev.rst <switchdev>` and
:ref:`Documentation/networking/representors.rst <representors>`.

In addition, the devlink E-Switch also comes with other attributes listed
in the following section.

Attributes Description
======================

The following is a list of E-Switch attributes.

.. list-table:: E-Switch attributes
:widths: 8 5 45

* - Name
- Type
- Description
* - ``mode``
- enum
- The mode of the device. The mode can be one of the following:

* ``legacy`` operates based on traditional MAC/VLAN steering
rules.
* ``switchdev`` allows for more advanced offloading capabilities of
the E-Switch to hardware.
* - ``inline-mode``
- enum
- Some HWs need the VF driver to put part of the packet
headers on the TX descriptor so the e-switch can do proper
matching and steering. Support for both switchdev mode and legacy mode.

* ``none`` none.
* ``link`` L2 mode.
* ``network`` L3 mode.
* ``transport`` L4 mode.
* - ``encap-mode``
- enum
- The encapsulation mode of the device. Support for both switchdev mode
and legacy mode. The mode can be one of the following:

* ``none`` Disable encapsulation support.
* ``basic`` Enable encapsulation support.

Example Usage
=============

.. code:: shell
# enable switchdev mode
$ devlink dev eswitch set pci/0000:08:00.0 mode switchdev
# set inline-mode and encap-mode
$ devlink dev eswitch set pci/0000:08:00.0 inline-mode none encap-mode basic
# display devlink device eswitch attributes
$ devlink dev eswitch show pci/0000:08:00.0
pci/0000:08:00.0: mode switchdev inline-mode none encap-mode basic
# enable encap-mode with legacy mode
$ devlink dev eswitch set pci/0000:08:00.0 mode legacy inline-mode none encap-mode basic
1 change: 1 addition & 0 deletions Documentation/networking/devlink/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ general.
devlink-selftests
devlink-trap
devlink-linecard
devlink-eswitch-attr

Driver-specific documentation
-----------------------------
Expand Down
1 change: 1 addition & 0 deletions Documentation/networking/representors.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.. SPDX-License-Identifier: GPL-2.0
.. _representors:

=============================
Network Function Representors
Expand Down
2 changes: 1 addition & 1 deletion Documentation/translations/zh_CN/mm/page_frags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sk_buff->head使用,或者用于skb_shared_info的 “frags” 部分。

网络堆栈在每个CPU使用两个独立的缓存来处理碎片分配。netdev_alloc_cache被使用
netdev_alloc_frag和__netdev_alloc_skb调用的调用者使用。napi_alloc_cache
被调用__napi_alloc_frag和__napi_alloc_skb的调用者使用。这两个调用的主要区别是
被调用__napi_alloc_frag和napi_alloc_skb的调用者使用。这两个调用的主要区别是
它们可能被调用的环境。“netdev” 前缀的函数可以在任何上下文中使用,因为这些函数
将禁用中断,而 ”napi“ 前缀的函数只可以在softirq上下文中使用。

Expand Down
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -23661,7 +23661,6 @@ F: drivers/scsi/vmw_pvscsi.c
F: drivers/scsi/vmw_pvscsi.h

VMWARE VIRTUAL PTP CLOCK DRIVER
M: Jeff Sipek <jsipek@vmware.com>
R: Ajay Kaher <akaher@vmware.com>
R: Alexey Makhalov <amakhalov@vmware.com>
R: VMware PV-Drivers Reviewers <pv-drivers@vmware.com>
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,8 @@ ap_spi_fp: &spi10 {
vddrf-supply = <&pp1300_l2c>;
vddch0-supply = <&pp3300_l10c>;
max-speed = <3200000>;

qcom,local-bd-address-broken;
};
};

Expand Down
4 changes: 2 additions & 2 deletions crypto/af_alg.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ void af_alg_wmem_wakeup(struct sock *sk)
wake_up_interruptible_sync_poll(&wq->wait, EPOLLIN |
EPOLLRDNORM |
EPOLLRDBAND);
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
sk_wake_async_rcu(sk, SOCK_WAKE_WAITD, POLL_IN);
rcu_read_unlock();
}
EXPORT_SYMBOL_GPL(af_alg_wmem_wakeup);
Expand Down Expand Up @@ -914,7 +914,7 @@ static void af_alg_data_wakeup(struct sock *sk)
wake_up_interruptible_sync_poll(&wq->wait, EPOLLOUT |
EPOLLRDNORM |
EPOLLRDBAND);
sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT);
sk_wake_async_rcu(sk, SOCK_WAKE_SPACE, POLL_OUT);
rcu_read_unlock();
}

Expand Down
8 changes: 6 additions & 2 deletions drivers/bluetooth/btqca.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,11 +826,15 @@ EXPORT_SYMBOL_GPL(qca_uart_setup);

int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
{
bdaddr_t bdaddr_swapped;
struct sk_buff *skb;
int err;

skb = __hci_cmd_sync_ev(hdev, EDL_WRITE_BD_ADDR_OPCODE, 6, bdaddr,
HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
baswap(&bdaddr_swapped, bdaddr);

skb = __hci_cmd_sync_ev(hdev, EDL_WRITE_BD_ADDR_OPCODE, 6,
&bdaddr_swapped, HCI_EV_VENDOR,
HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
err = PTR_ERR(skb);
bt_dev_err(hdev, "QCA Change address cmd failed (%d)", err);
Expand Down
19 changes: 9 additions & 10 deletions drivers/bluetooth/hci_qca.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* Copyright (C) 2007 Texas Instruments, Inc.
* Copyright (c) 2010, 2012, 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Acknowledgements:
* This file is based on hci_ll.c, which was...
Expand Down Expand Up @@ -226,6 +225,7 @@ struct qca_serdev {
struct qca_power *bt_power;
u32 init_speed;
u32 oper_speed;
bool bdaddr_property_broken;
const char *firmware_name;
};

Expand Down Expand Up @@ -1843,6 +1843,7 @@ static int qca_setup(struct hci_uart *hu)
const char *firmware_name = qca_get_firmware_name(hu);
int ret;
struct qca_btsoc_version ver;
struct qca_serdev *qcadev;
const char *soc_name;

ret = qca_check_speeds(hu);
Expand Down Expand Up @@ -1904,16 +1905,11 @@ static int qca_setup(struct hci_uart *hu)
case QCA_WCN6750:
case QCA_WCN6855:
case QCA_WCN7850:
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);

/* Set BDA quirk bit for reading BDA value from fwnode property
* only if that property exist in DT.
*/
if (fwnode_property_present(dev_fwnode(hdev->dev.parent), "local-bd-address")) {
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
bt_dev_info(hdev, "setting quirk bit to read BDA from fwnode later");
} else {
bt_dev_dbg(hdev, "local-bd-address` is not present in the devicetree so not setting quirk bit for BDA");
}
qcadev = serdev_device_get_drvdata(hu->serdev);
if (qcadev->bdaddr_property_broken)
set_bit(HCI_QUIRK_BDADDR_PROPERTY_BROKEN, &hdev->quirks);

hci_set_aosp_capable(hdev);

Expand Down Expand Up @@ -2295,6 +2291,9 @@ static int qca_serdev_probe(struct serdev_device *serdev)
if (!qcadev->oper_speed)
BT_DBG("UART will pick default operating speed");

qcadev->bdaddr_property_broken = device_property_read_bool(&serdev->dev,
"qcom,local-bd-address-broken");

if (data)
qcadev->btsoc_type = data->soc_type;
else
Expand Down
Loading

0 comments on commit 4164329

Please sign in to comment.