projects/linux·commit 033771c0

Merge tag 'net-6.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

033771c0 · Linus Torvalds <[email protected]> · 2024-07-04 10:11:12 -07:00

Pull networking fixes from Jakub Kicinski:
 "Including fixes from bluetooth, wireless and netfilter.

  There's one fix for power management with Intel's e1000e here,
  Thorsten tells us there's another problem that started in v6.9. We're
  trying to wrap that up but I don't think it's blocking.

  Current release - new code bugs:

   - wifi: mac80211: disable softirqs for queued frame handling

   - af_unix: fix uninit-value in __unix_walk_scc(), with the new
     garbage collection algo

  Previous releases - regressions:

   - Bluetooth:
      - qca: fix BT enable failure for QCA6390 after warm reboot
      - add quirk to ignore reserved PHY bits in LE Extended Adv Report,
        abused by some Broadcom controllers found on Apple machines

   - wifi: wilc1000: fix ies_len type in connect path

  Previous releases - always broken:

   - tcp: fix DSACK undo in fast recovery to call tcp_try_to_open(),
     avoid premature timeouts

   - net: make sure skb_datagram_iter maps fragments page by page, in
     case we somehow get compound highmem mixed in

   - eth: bnx2x: fix multiple UBSAN array-index-out-of-bounds when more
     queues are used

  Misc:

   - MAINTAINERS: Remembering Larry Finger"

* tag 'net-6.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits)
  bnxt_en: Fix the resource check condition for RSS contexts
  mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file
  inet_diag: Initialize pad field in struct inet_diag_req_v2
  tcp: Don't flag tcp_sk(sk)->rx_opt.saw_unknown for TCP AO.
  selftests: make order checking verbose in msg_zerocopy selftest
  selftests: fix OOM in msg_zerocopy selftest
  ice: use proper macro for testing bit
  ice: Reject pin requests with unsupported flags
  ice: Don't process extts if PTP is disabled
  ice: Fix improper extts handling
  selftest: af_unix: Add test case for backtrack after finalising SCC.
  af_unix: Fix uninit-value in __unix_walk_scc()
  bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set()
  net: rswitch: Avoid use-after-free in rswitch_poll()
  netfilter: nf_tables: unconditionally flush pending work before notifier
  wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference
  wifi: iwlwifi: mvm: avoid link lookup in statistics
  wifi: iwlwifi: mvm: don't wake up rx_sync_waitq upon RFKILL
  wifi: iwlwifi: properly set WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK
  wifi: wilc1000: fix ies_len type in connect path
  ...
Commit
033771c085c2ed73cb29dd25e1ec8c4b2991cad9
Parents
d470e9f5 · 5d350dc3

Merge commit. Changes below are compared with the first parent: d470e9f5.

Changes

67 files changed · +630 −378

FileStatusAddDelContent
CREDITSmodified+4−0View file
MAINTAINERSmodified+5−8View file
drivers/bluetooth/btintel_pcie.cmodified+1−1View file
drivers/bluetooth/btnxpuart.cmodified+1−1View file
drivers/bluetooth/hci_bcm4377.cmodified+9−1View file
drivers/bluetooth/hci_qca.cmodified+15−3View file
drivers/net/bonding/bond_options.cmodified+3−3View file
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.cmodified+1−0View file
drivers/net/ethernet/broadcom/bnx2x/bnx2x.hmodified+1−1View file
drivers/net/ethernet/broadcom/bnxt/bnxt.cmodified+5−1View file
drivers/net/ethernet/intel/e1000e/netdev.cmodified+66−66View file
drivers/net/ethernet/intel/ice/ice_hwmon.cmodified+1−1View file
drivers/net/ethernet/intel/ice/ice_ptp.cmodified+101−30View file
drivers/net/ethernet/intel/ice/ice_ptp.hmodified+9−0View file
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.cmodified+35−13View file
drivers/net/ethernet/mellanox/mlx5/core/en_main.cmodified+5−0View file
drivers/net/ethernet/mellanox/mlx5/core/eq.cmodified+1−3View file
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.cmodified+29−8View file
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.cmodified+17−5View file
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.hmodified+10−0View file
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.cmodified+1−3View file
drivers/net/ethernet/mellanox/mlxsw/core_linecards.cmodified+1−0View file
drivers/net/ethernet/renesas/rswitch.cmodified+2−2View file
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.cmodified+1−1View file
drivers/net/ethernet/stmicro/stmmac/stmmac_main.cmodified+4−3View file
drivers/net/ethernet/wangxun/libwx/wx_hw.cmodified+1−0View file
drivers/net/ethernet/wangxun/libwx/wx_lib.cmodified+7−3View file
drivers/net/ethernet/wangxun/libwx/wx_type.hmodified+1−0View file
drivers/net/ethernet/wangxun/ngbe/ngbe_main.cmodified+2−0View file
drivers/net/ethernet/wangxun/txgbe/txgbe_irq.cmodified+47−77View file
drivers/net/ethernet/wangxun/txgbe/txgbe_irq.hmodified+1−1View file
drivers/net/ethernet/wangxun/txgbe/txgbe_main.cmodified+5−4View file
drivers/net/ntb_netdev.cmodified+1−1View file
drivers/net/phy/aquantia/aquantia.hmodified+5−0View file
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.cmodified+7−7View file
drivers/net/wireless/intel/iwlwifi/mvm/ops.cmodified+3−5View file
drivers/net/wireless/intel/iwlwifi/mvm/rx.cmodified+7−8View file
drivers/net/wireless/microchip/wilc1000/hif.cmodified+2−1View file
drivers/net/wireless/ti/wlcore/cmd.cmodified+0−7View file
drivers/net/wireless/ti/wlcore/main.cmodified+8−9View file
drivers/net/wireless/ti/wlcore/tx.cmodified+2−5View file
drivers/net/wireless/ti/wlcore/wlcore_i.hmodified+6−0View file
include/linux/mlx5/mlx5_ifc.hmodified+5−1View file
include/linux/phy.hmodified+1−1View file
include/net/bluetooth/hci.hmodified+11−0View file
include/net/bluetooth/hci_sync.hmodified+2−0View file
include/net/mac80211.hmodified+1−1View file
net/bluetooth/hci_conn.cmodified+12−3View file
net/bluetooth/hci_core.cmodified+22−54View file
net/bluetooth/hci_event.cmodified+30−3View file
net/bluetooth/hci_sync.cmodified+13−0View file
net/bluetooth/iso.cmodified+1−2View file
net/bluetooth/l2cap_core.cmodified+3−0View file
net/bluetooth/l2cap_sock.cmodified+11−3View file
net/core/datagram.cmodified+13−6View file
net/ipv4/inet_diag.cmodified+2−0View file
net/ipv4/tcp_input.cmodified+8−1View file
net/ipv4/tcp_metrics.cmodified+1−0View file
net/mac80211/main.cmodified+1−0View file
net/mac80211/util.cmodified+2−0View file
net/mac802154/main.cmodified+8−6View file
net/mac802154/tx.cmodified+4−4View file
net/netfilter/nf_tables_api.cmodified+1−2View file
net/unix/garbage.cmodified+5−4View file
net/wireless/nl80211.cmodified+5−1View file
tools/testing/selftests/net/af_unix/scm_rights.cmodified+23−2View file
tools/testing/selftests/net/msg_zerocopy.cmodified+12−2View file

Only the first 600 diff lines are shown. Download the complete patch.

CREDITS

View file
diff --git a/CREDITS b/CREDITS
index 0107047..1a1a545 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1214,6 +1214,10 @@ D: UDF filesystem
S: (ask for current address)
S: USA
+N: Larry Finger
+D: Maintainer of wireless drivers, too many to list here
+
N: Jürgen Fischer
D: Author of Adaptec AHA-152x SCSI driver

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index cd2ca0c..5b1bb46 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3601,10 +3601,9 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
F: drivers/net/wireless/broadcom/b43/
B43LEGACY WIRELESS DRIVER
-M: Larry Finger <[email protected]>
-S: Maintained
+S: Orphan
W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
F: drivers/net/wireless/broadcom/b43legacy/
@@ -18374,7 +18373,7 @@ M: Jeff Johnson <[email protected]>
S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath12k
-T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
F: drivers/net/wireless/ath/ath12k/
N: ath12k
@@ -18384,7 +18383,7 @@ M: Jeff Johnson <[email protected]>
S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
-T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
F: drivers/net/wireless/ath/ath10k/
N: ath10k
@@ -18395,7 +18394,7 @@ L: [email protected]
S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k
B: https://wireless.wiki.kernel.org/en/users/Drivers/ath11k/bugreport
-T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
F: drivers/net/wireless/ath/ath11k/
N: ath11k
@@ -18404,7 +18403,7 @@ M: Toke Høiland-Jørgensen <[email protected]>
S: Maintained
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
-T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
F: Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
F: drivers/net/wireless/ath/ath9k/
@@ -19509,7 +19508,6 @@ F: drivers/net/wireless/realtek/rtl818x/rtl8180/
RTL8187 WIRELESS DRIVER
M: Hin-Tak Leung <[email protected]>
-M: Larry Finger <[email protected]>
S: Maintained
T: git https://github.com/pkshih/rtw.git
@@ -21247,7 +21245,6 @@ W: http://wiki.laptop.org/go/DCON
F: drivers/staging/olpc_dcon/
STAGING - REALTEK RTL8712U DRIVERS
-M: Larry Finger <[email protected]>
M: Florian Schilhabel <[email protected]>.
S: Odd Fixes
F: drivers/staging/rtl8712/

drivers/bluetooth/btintel_pcie.c

View file
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 5b6805d..dd3c062 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -382,7 +382,7 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data,
/* The first 4 bytes indicates the Intel PCIe specific packet type */
pdata = skb_pull_data(skb, BTINTEL_PCIE_HCI_TYPE_LEN);
- if (!data) {
+ if (!pdata) {
bt_dev_err(hdev, "Corrupted packet received");
ret = -EILSEQ;
goto exit_error;

drivers/bluetooth/btnxpuart.c

View file
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 9d0c7e2..9bfa9a6 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -281,7 +281,7 @@ static u8 crc8_table[CRC8_TABLE_SIZE];
/* Default configurations */
#define DEFAULT_H2C_WAKEUP_MODE WAKEUP_METHOD_BREAK
-#define DEFAULT_PS_MODE PS_MODE_DISABLE
+#define DEFAULT_PS_MODE PS_MODE_ENABLE
#define FW_INIT_BAUDRATE HCI_NXP_PRI_BAUDRATE
static struct sk_buff *nxp_drv_send_cmd(struct hci_dev *hdev, u16 opcode,

drivers/bluetooth/hci_bcm4377.c

View file
diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
index 0c2f152..d90858e 100644
--- a/drivers/bluetooth/hci_bcm4377.c
+++ b/drivers/bluetooth/hci_bcm4377.c
@@ -495,6 +495,10 @@ struct bcm4377_data;
* extended scanning
* broken_mws_transport_config: Set to true if the chip erroneously claims to
* support MWS Transport Configuration
+ * broken_le_ext_adv_report_phy: Set to true if this chip stuffs flags inside
+ * reserved bits of Primary/Secondary_PHY inside
+ * LE Extended Advertising Report events which
+ * have to be ignored
* send_calibration: Optional callback to send calibration data
* send_ptb: Callback to send "PTB" regulatory/calibration data
*/
@@ -513,6 +517,7 @@ struct bcm4377_hw {
unsigned long broken_ext_scan : 1;
unsigned long broken_mws_transport_config : 1;
unsigned long broken_le_coded : 1;
+ unsigned long broken_le_ext_adv_report_phy : 1;
int (*send_calibration)(struct bcm4377_data *bcm4377);
int (*send_ptb)(struct bcm4377_data *bcm4377,
@@ -716,7 +721,7 @@ static void bcm4377_handle_ack(struct bcm4377_data *bcm4377,
ring->events[msgid] = NULL;
}
- bitmap_release_region(ring->msgids, msgid, ring->n_entries);
+ bitmap_release_region(ring->msgids, msgid, 0);
unlock:
spin_unlock_irqrestore(&ring->lock, flags);
@@ -2373,6 +2378,8 @@ static int bcm4377_probe(struct pci_dev *pdev, const struct pci_device_id *id)
set_bit(HCI_QUIRK_BROKEN_EXT_SCAN, &hdev->quirks);
if (bcm4377->hw->broken_le_coded)
set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
+ if (bcm4377->hw->broken_le_ext_adv_report_phy)
+ set_bit(HCI_QUIRK_FIXUP_LE_EXT_ADV_REPORT_PHY, &hdev->quirks);
pci_set_drvdata(pdev, bcm4377);
hci_set_drvdata(hdev, bcm4377);
@@ -2477,6 +2484,7 @@ static const struct bcm4377_hw bcm4377_hw_variants[] = {
.clear_pciecfg_subsystem_ctrl_bit19 = true,
.broken_mws_transport_config = true,
.broken_le_coded = true,
+ .broken_le_ext_adv_report_phy = true,
.send_calibration = bcm4387_send_calibration,
.send_ptb = bcm4378_send_ptb,
},

drivers/bluetooth/hci_qca.c

View file
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 0c9c9ee..9a0bc86 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2450,15 +2450,27 @@ static void qca_serdev_shutdown(struct device *dev)
struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev);
struct hci_uart *hu = &qcadev->serdev_hu;
struct hci_dev *hdev = hu->hdev;
- struct qca_data *qca = hu->priv;
const u8 ibs_wake_cmd[] = { 0xFD };
const u8 edl_reset_soc_cmd[] = { 0x01, 0x00, 0xFC, 0x01, 0x05 };
if (qcadev->btsoc_type == QCA_QCA6390) {
- if (test_bit(QCA_BT_OFF, &qca->flags) ||
- !test_bit(HCI_RUNNING, &hdev->flags))
+ /* The purpose of sending the VSC is to reset SOC into a initial
+ * state and the state will ensure next hdev->setup() success.
+ * if HCI_QUIRK_NON_PERSISTENT_SETUP is set, it means that
+ * hdev->setup() can do its job regardless of SoC state, so
+ * don't need to send the VSC.
+ * if HCI_SETUP is set, it means that hdev->setup() was never
+ * invoked and the SOC is already in the initial state, so
+ * don't also need to send the VSC.
+ */
+ if (test_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks) ||
+ hci_dev_test_flag(hdev, HCI_SETUP))
return;
+ /* The serdev must be in open state when conrol logic arrives
+ * here, so also fix the use-after-free issue caused by that
+ * the serdev is flushed or wrote after it is closed.
+ */
serdev_device_write_flush(serdev);
ret = serdev_device_write_buf(serdev, ibs_wake_cmd,
sizeof(ibs_wake_cmd));

drivers/net/bonding/bond_options.c

View file
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 0cacd70..bc80fb6 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -1214,9 +1214,9 @@ static int bond_option_arp_ip_targets_set(struct bonding *bond,
__be32 target;
if (newval->string) {
- if (!in4_pton(newval->string+1, -1, (u8 *)&target, -1, NULL)) {
- netdev_err(bond->dev, "invalid ARP target %pI4 specified\n",
- &target);
+ if (strlen(newval->string) < 1 ||
+ !in4_pton(newval->string + 1, -1, (u8 *)&target, -1, NULL)) {
+ netdev_err(bond->dev, "invalid ARP target specified\n");
return ret;
}
if (newval->string[0] == '+')

drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c

View file
diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
index 7292c81..0241694 100644
--- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
+++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
@@ -125,6 +125,7 @@ static const struct kvaser_usb_driver_info kvaser_usb_driver_info_leaf_err_liste
static const struct kvaser_usb_driver_info kvaser_usb_driver_info_leafimx = {
.quirks = 0,
+ .family = KVASER_LEAF,
.ops = &kvaser_usb_leaf_dev_ops,
};

drivers/net/ethernet/broadcom/bnx2x/bnx2x.h

View file
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index e2a4e10..9580ab8 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -1262,7 +1262,7 @@ enum {
struct bnx2x_fw_stats_req {
struct stats_query_header hdr;
- struct stats_query_entry query[FP_SB_MAX_E1x+
+ struct stats_query_entry query[FP_SB_MAX_E2 +
BNX2X_FIRST_QUEUE_QUERY_IDX];
};

drivers/net/ethernet/broadcom/bnxt/bnxt.c

View file
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index a6d69a4..5308505 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -12669,7 +12669,11 @@ bool bnxt_rfs_capable(struct bnxt *bp, bool new_rss_ctx)
if (!BNXT_NEW_RM(bp))
return true;
- if (hwr.vnic == bp->hw_resc.resv_vnics &&
+ /* Do not reduce VNIC and RSS ctx reservations. There is a FW
+ * issue that will mess up the default VNIC if we reduce the
+ * reservations.
+ */
+ if (hwr.vnic <= bp->hw_resc.resv_vnics &&
hwr.rss_ctx <= bp->hw_resc.resv_rsscos_ctxs)
return true;

drivers/net/ethernet/intel/e1000e/netdev.c

View file
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index da5c59d..3cd161c 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6363,49 +6363,49 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
mac_data |= E1000_EXTCNF_CTRL_GATE_PHY_CFG;
ew32(EXTCNF_CTRL, mac_data);
- /* Enable the Dynamic Power Gating in the MAC */
- mac_data = er32(FEXTNVM7);
- mac_data |= BIT(22);
- ew32(FEXTNVM7, mac_data);
-
/* Disable disconnected cable conditioning for Power Gating */
mac_data = er32(DPGFR);
mac_data |= BIT(2);
ew32(DPGFR, mac_data);
- /* Don't wake from dynamic Power Gating with clock request */
- mac_data = er32(FEXTNVM12);
- mac_data |= BIT(12);
- ew32(FEXTNVM12, mac_data);
-
- /* Ungate PGCB clock */
- mac_data = er32(FEXTNVM9);
- mac_data &= ~BIT(28);
- ew32(FEXTNVM9, mac_data);
-
- /* Enable K1 off to enable mPHY Power Gating */
- mac_data = er32(FEXTNVM6);
- mac_data |= BIT(31);
- ew32(FEXTNVM6, mac_data);
-
- /* Enable mPHY power gating for any link and speed */
- mac_data = er32(FEXTNVM8);
- mac_data |= BIT(9);
- ew32(FEXTNVM8, mac_data);
-
/* Enable the Dynamic Clock Gating in the DMA and MAC */
mac_data = er32(CTRL_EXT);
mac_data |= E1000_CTRL_EXT_DMA_DYN_CLK_EN;
ew32(CTRL_EXT, mac_data);
-
- /* No MAC DPG gating SLP_S0 in modern standby
- * Switch the logic of the lanphypc to use PMC counter
- */
- mac_data = er32(FEXTNVM5);
- mac_data |= BIT(7);
- ew32(FEXTNVM5, mac_data);
}
+ /* Enable the Dynamic Power Gating in the MAC */
+ mac_data = er32(FEXTNVM7);
+ mac_data |= BIT(22);
+ ew32(FEXTNVM7, mac_data);
+
+ /* Don't wake from dynamic Power Gating with clock request */
+ mac_data = er32(FEXTNVM12);
+ mac_data |= BIT(12);
+ ew32(FEXTNVM12, mac_data);
+
+ /* Ungate PGCB clock */
+ mac_data = er32(FEXTNVM9);
+ mac_data &= ~BIT(28);
+ ew32(FEXTNVM9, mac_data);
+
+ /* Enable K1 off to enable mPHY Power Gating */
+ mac_data = er32(FEXTNVM6);
+ mac_data |= BIT(31);
+ ew32(FEXTNVM6, mac_data);
+
+ /* Enable mPHY power gating for any link and speed */
+ mac_data = er32(FEXTNVM8);
+ mac_data |= BIT(9);
+ ew32(FEXTNVM8, mac_data);
+
+ /* No MAC DPG gating SLP_S0 in modern standby
+ * Switch the logic of the lanphypc to use PMC counter
+ */
+ mac_data = er32(FEXTNVM5);
+ mac_data |= BIT(7);
+ ew32(FEXTNVM5, mac_data);
+
/* Disable the time synchronization clock */
mac_data = er32(FEXTNVM7);
mac_data |= BIT(31);
@@ -6498,33 +6498,6 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
} else {
/* Request driver unconfigure the device from S0ix */
- /* Disable the Dynamic Power Gating in the MAC */
- mac_data = er32(FEXTNVM7);
- mac_data &= 0xFFBFFFFF;
- ew32(FEXTNVM7, mac_data);
-
- /* Disable mPHY power gating for any link and speed */
- mac_data = er32(FEXTNVM8);
- mac_data &= ~BIT(9);
- ew32(FEXTNVM8, mac_data);
-
- /* Disable K1 off */
- mac_data = er32(FEXTNVM6);
- mac_data &= ~BIT(31);
- ew32(FEXTNVM6, mac_data);
-
- /* Disable Ungate PGCB clock */
- mac_data = er32(FEXTNVM9);
- mac_data |= BIT(28);
- ew32(FEXTNVM9, mac_data);
-
- /* Cancel not waking from dynamic
- * Power Gating with clock request
- */
- mac_data = er32(FEXTNVM12);
- mac_data &= ~BIT(12);
- ew32(FEXTNVM12, mac_data);
-
/* Cancel disable disconnected cable conditioning
* for Power Gating
*/
@@ -6537,13 +6510,6 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
mac_data &= 0xFFF7FFFF;
ew32(CTRL_EXT, mac_data);
- /* Revert the lanphypc logic to use the internal Gbe counter
- * and not the PMC counter
- */
- mac_data = er32(FEXTNVM5);
- mac_data &= 0xFFFFFF7F;
- ew32(FEXTNVM5, mac_data);
-
/* Enable the periodic inband message,
* Request PCIe clock in K1 page770_17[10:9] =01b
*/
@@ -6581,6 +6547,40 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
mac_data &= ~BIT(31);
mac_data |= BIT(0);
ew32(FEXTNVM7, mac_data);
+
+ /* Disable the Dynamic Power Gating in the MAC */
+ mac_data = er32(FEXTNVM7);
+ mac_data &= 0xFFBFFFFF;
+ ew32(FEXTNVM7, mac_data);
+
+ /* Disable mPHY power gating for any link and speed */
+ mac_data = er32(FEXTNVM8);
+ mac_data &= ~BIT(9);
+ ew32(FEXTNVM8, mac_data);
+
+ /* Disable K1 off */
+ mac_data = er32(FEXTNVM6);
+ mac_data &= ~BIT(31);
+ ew32(FEXTNVM6, mac_data);
+
+ /* Disable Ungate PGCB clock */
+ mac_data = er32(FEXTNVM9);
+ mac_data |= BIT(28);
+ ew32(FEXTNVM9, mac_data);
+
+ /* Cancel not waking from dynamic
+ * Power Gating with clock request
+ */
+ mac_data = er32(FEXTNVM12);
+ mac_data &= ~BIT(12);
+ ew32(FEXTNVM12, mac_data);
+
+ /* Revert the lanphypc logic to use the internal Gbe counter
+ * and not the PMC counter
+ */
+ mac_data = er32(FEXTNVM5);
+ mac_data &= 0xFFFFFF7F;
+ ew32(FEXTNVM5, mac_data);
}
static int e1000e_pm_freeze(struct device *dev)

drivers/net/ethernet/intel/ice/ice_hwmon.c

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_hwmon.c b/drivers/net/ethernet/intel/ice/ice_hwmon.c
index e4c2c1b..b7aa681 100644
--- a/drivers/net/ethernet/intel/ice/ice_hwmon.c
+++ b/drivers/net/ethernet/intel/ice/ice_hwmon.c
@@ -96,7 +96,7 @@ static bool ice_is_internal_reading_supported(struct ice_pf *pf)
unsigned long sensors = pf->hw.dev_caps.supported_sensors;
- return _test_bit(ICE_SENSOR_SUPPORT_E810_INT_TEMP_BIT, &sensors);
+ return test_bit(ICE_SENSOR_SUPPORT_E810_INT_TEMP_BIT, &sensors);
};
void ice_hwmon_init(struct ice_pf *pf)

drivers/net/ethernet/intel/ice/ice_ptp.c

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 0f17fc1..fefaf52 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -1559,6 +1559,10 @@ void ice_ptp_extts_event(struct ice_pf *pf)
u8 chan, tmr_idx;
u32 hi, lo;
+ /* Don't process timestamp events if PTP is not ready */
+ if (pf->ptp.state != ICE_PTP_READY)
+ return;
+
tmr_idx = hw->func_caps.ts_func_info.tmr_index_owned;
/* Event time is captured by one of the two matched registers
* GLTSYN_EVNT_L: 32 LSB of sampled time event
@@ -1584,27 +1588,33 @@ void ice_ptp_extts_event(struct ice_pf *pf)
/**
* ice_ptp_cfg_extts - Configure EXTTS pin and channel
* @pf: Board private structure
- * @ena: true to enable; false to disable
* @chan: GPIO channel (0-3)
- * @gpio_pin: GPIO pin
- * @extts_flags: request flags from the ptp_extts_request.flags
+ * @config: desired EXTTS configuration.
+ * @store: If set to true, the values will be stored
+ *
+ * Configure an external timestamp event on the requested channel.
+ *
+ * Return: 0 on success, -EOPNOTUSPP on unsupported flags
*/
-static int
-ice_ptp_cfg_extts(struct ice_pf *pf, bool ena, unsigned int chan, u32 gpio_pin,
- unsigned int extts_flags)
+static int ice_ptp_cfg_extts(struct ice_pf *pf, unsigned int chan,
+ struct ice_extts_channel *config, bool store)
{
u32 func, aux_reg, gpio_reg, irq_reg;
struct ice_hw *hw = &pf->hw;
u8 tmr_idx;
- if (chan > (unsigned int)pf->ptp.info.n_ext_ts)
- return -EINVAL;
+ /* Reject requests with unsupported flags */
+ if (config->flags & ~(PTP_ENABLE_FEATURE |
+ PTP_RISING_EDGE |
+ PTP_FALLING_EDGE |
+ PTP_STRICT_FLAGS))
+ return -EOPNOTSUPP;
tmr_idx = hw->func_caps.ts_func_info.tmr_index_owned;
irq_reg = rd32(hw, PFINT_OICR_ENA);
- if (ena) {
+ if (config->ena) {
/* Enable the interrupt */
irq_reg |= PFINT_OICR_TSYN_EVNT_M;
aux_reg = GLTSYN_AUX_IN_0_INT_ENA_M;
@@ -1613,9 +1623,9 @@ ice_ptp_cfg_extts(struct ice_pf *pf, bool ena, unsigned int chan, u32 gpio_pin,
#define GLTSYN_AUX_IN_0_EVNTLVL_FALLING_EDGE BIT(1)
/* set event level to requested edge */
- if (extts_flags & PTP_FALLING_EDGE)
+ if (config->flags & PTP_FALLING_EDGE)
aux_reg |= GLTSYN_AUX_IN_0_EVNTLVL_FALLING_EDGE;
- if (extts_flags & PTP_RISING_EDGE)
+ if (config->flags & PTP_RISING_EDGE)
aux_reg |= GLTSYN_AUX_IN_0_EVNTLVL_RISING_EDGE;
/* Write GPIO CTL reg.
@@ -1636,12 +1646,52 @@ ice_ptp_cfg_extts(struct ice_pf *pf, bool ena, unsigned int chan, u32 gpio_pin,
wr32(hw, PFINT_OICR_ENA, irq_reg);
wr32(hw, GLTSYN_AUX_IN(chan, tmr_idx), aux_reg);
- wr32(hw, GLGEN_GPIO_CTL(gpio_pin), gpio_reg);
+ wr32(hw, GLGEN_GPIO_CTL(config->gpio_pin), gpio_reg);
+
+ if (store)
+ memcpy(&pf->ptp.extts_channels[chan], config, sizeof(*config));
return 0;
}
/**
+ * ice_ptp_disable_all_extts - Disable all EXTTS channels
+ * @pf: Board private structure
+ */
+static void ice_ptp_disable_all_extts(struct ice_pf *pf)
+{
+ struct ice_extts_channel extts_cfg = {};
+ int i;
+
+ for (i = 0; i < pf->ptp.info.n_ext_ts; i++) {
+ if (pf->ptp.extts_channels[i].ena) {
+ extts_cfg.gpio_pin = pf->ptp.extts_channels[i].gpio_pin;
+ extts_cfg.ena = false;
+ ice_ptp_cfg_extts(pf, i, &extts_cfg, false);
+ }
+ }
+
+ synchronize_irq(pf->oicr_irq.virq);
+}
+
+/**
+ * ice_ptp_enable_all_extts - Enable all EXTTS channels
+ * @pf: Board private structure
+ *
+ * Called during reset to restore user configuration.
+ */
+static void ice_ptp_enable_all_extts(struct ice_pf *pf)
+{
+ int i;
+
+ for (i = 0; i < pf->ptp.info.n_ext_ts; i++) {
+ if (pf->ptp.extts_channels[i].ena)
+ ice_ptp_cfg_extts(pf, i, &pf->ptp.extts_channels[i],
+ false);
+ }
+}
+
+/**
* ice_ptp_cfg_clkout - Configure clock to generate periodic wave
* @pf: Board private structure
* @chan: GPIO channel (0-3)
@@ -1659,6 +1709,9 @@ static int ice_ptp_cfg_clkout(struct ice_pf *pf, unsigned int chan,
u32 func, val, gpio_pin;
u8 tmr_idx;
+ if (config && config->flags & ~PTP_PEROUT_PHASE)
+ return -EOPNOTSUPP;
+
tmr_idx = hw->func_caps.ts_func_info.tmr_index_owned;
/* 0. Reset mode & out_en in AUX_OUT */
@@ -1795,17 +1848,18 @@ ice_ptp_gpio_enable_e810(struct ptp_clock_info *info,
struct ptp_clock_request *rq, int on)
{
struct ice_pf *pf = ptp_info_to_pf(info);
- struct ice_perout_channel clk_cfg = {0};
bool sma_pres = false;
unsigned int chan;
u32 gpio_pin;
- int err;
if (ice_is_feature_supported(pf, ICE_F_SMA_CTRL))
sma_pres = true;
switch (rq->type) {
case PTP_CLK_REQ_PEROUT:
+ {
+ struct ice_perout_channel clk_cfg = {};
+
chan = rq->perout.index;
if (sma_pres) {
if (chan == ice_pin_desc_e810t[SMA1].chan)
@@ -1825,15 +1879,19 @@ ice_ptp_gpio_enable_e810(struct ptp_clock_info *info,
clk_cfg.gpio_pin = chan;
}
+ clk_cfg.flags = rq->perout.flags;

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ice/ice_ptp.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/eq.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlxsw/core_linecards.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/renesas/rswitch.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/wangxun/libwx/wx_hw.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/wangxun/libwx/wx_lib.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/wangxun/libwx/wx_type.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/wangxun/ngbe/ngbe_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/wangxun/txgbe/txgbe_irq.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/wangxun/txgbe/txgbe_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ntb_netdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/aquantia/aquantia.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/intel/iwlwifi/mvm/rx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/microchip/wilc1000/hif.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/ti/wlcore/cmd.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/ti/wlcore/main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/ti/wlcore/tx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/ti/wlcore/wlcore_i.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mlx5/mlx5_ifc.h

View file

This diff is incomplete. Download the complete patch.

include/linux/phy.h

View file

This diff is incomplete. Download the complete patch.

include/net/bluetooth/hci.h

View file

This diff is incomplete. Download the complete patch.

include/net/bluetooth/hci_sync.h

View file

This diff is incomplete. Download the complete patch.

include/net/mac80211.h

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_conn.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_core.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_event.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_sync.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/iso.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/l2cap_core.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/l2cap_sock.c

View file

This diff is incomplete. Download the complete patch.

net/core/datagram.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/inet_diag.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_input.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_metrics.c

View file

This diff is incomplete. Download the complete patch.

net/mac80211/main.c

View file

This diff is incomplete. Download the complete patch.

net/mac80211/util.c

View file

This diff is incomplete. Download the complete patch.

net/mac802154/main.c

View file

This diff is incomplete. Download the complete patch.

net/mac802154/tx.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_tables_api.c

View file

This diff is incomplete. Download the complete patch.

net/unix/garbage.c

View file

This diff is incomplete. Download the complete patch.

net/wireless/nl80211.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/net/af_unix/scm_rights.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/net/msg_zerocopy.c

View file

This diff is incomplete. Download the complete patch.