Skip to content

Commit b9c8fc2

Browse files
committed
Merge tag 'net-7.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from IPsec, Bluetooth and netfilter Current release - regressions: - wifi: fix dev_alloc_name() return value check - rds: fix recursive lock in rds_tcp_conn_slots_available Current release - new code bugs: - vsock: lock down child_ns_mode as write-once Previous releases - regressions: - core: - do not pass flow_id to set_rps_cpu() - consume xmit errors of GSO frames - netconsole: avoid OOB reads, msg is not nul-terminated - netfilter: h323: fix OOB read in decode_choice() - tcp: re-enable acceptance of FIN packets when RWIN is 0 - udplite: fix null-ptr-deref in __udp_enqueue_schedule_skb(). - wifi: brcmfmac: fix potential kernel oops when probe fails - phy: register phy led_triggers during probe to avoid AB-BA deadlock - eth: - bnxt_en: fix deleting of Ntuple filters - wan: farsync: fix use-after-free bugs caused by unfinished tasklets - xscale: check for PTP support properly Previous releases - always broken: - tcp: fix potential race in tcp_v6_syn_recv_sock() - kcm: fix zero-frag skb in frag_list on partial sendmsg error - xfrm: - fix race condition in espintcp_close() - always flush state and policy upon NETDEV_UNREGISTER event - bluetooth: - purge error queues in socket destructors - fix response to L2CAP_ECRED_CONN_REQ - eth: - mlx5: - fix circular locking dependency in dump - fix "scheduling while atomic" in IPsec MAC address query - gve: fix incorrect buffer cleanup for QPL - team: avoid NETDEV_CHANGEMTU event when unregistering slave - usb: validate USB endpoints" * tag 'net-7.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (72 commits) netfilter: nf_conntrack_h323: fix OOB read in decode_choice() dpaa2-switch: validate num_ifs to prevent out-of-bounds write net: consume xmit errors of GSO frames vsock: document write-once behavior of the child_ns_mode sysctl vsock: lock down child_ns_mode as write-once selftests/vsock: change tests to respect write-once child ns mode net/mlx5e: Fix "scheduling while atomic" in IPsec MAC address query net/mlx5: Fix missing devlink lock in SRIOV enable error path net/mlx5: E-switch, Clear legacy flag when moving to switchdev net/mlx5: LAG, disable MPESW in lag_disable_change() net/mlx5: DR, Fix circular locking dependency in dump selftests: team: Add a reference count leak test team: avoid NETDEV_CHANGEMTU event when unregistering slave net: mana: Fix double destroy_workqueue on service rescan PCI path MAINTAINERS: Update maintainer entry for QUALCOMM ETHQOS ETHERNET DRIVER dpll: zl3073x: Remove redundant cleanup in devm_dpll_init() selftests/net: packetdrill: Verify acceptance of FIN packets when RWIN is 0 tcp: re-enable acceptance of FIN packets when RWIN is 0 vsock: Use container_of() to get net namespace in sysctl handlers net: usb: kaweth: validate USB endpoints ...
2 parents f4d0ec0 + baed0d9 commit b9c8fc2

88 files changed

Lines changed: 826 additions & 331 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/admin-guide/sysctl/net.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,9 @@ Values:
594594
their sockets will only be able to connect within their own
595595
namespace.
596596

597+
The first write to ``child_ns_mode`` locks its value. Subsequent writes of the
598+
same value succeed, but writing a different value returns ``-EBUSY``.
599+
597600
Changing ``child_ns_mode`` only affects namespaces created after the change;
598601
it does not modify the current namespace or any existing children.
599602

MAINTAINERS

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,6 @@ F: include/trace/events/amdxdna.h
12921292
F: include/uapi/drm/amdxdna_accel.h
12931293

12941294
AMD XGBE DRIVER
1295-
M: "Shyam Sundar S K" <[email protected]>
12961295
M: Raju Rangoju <[email protected]>
12971296
12981297
S: Maintained
@@ -6219,14 +6218,13 @@ S: Supported
62196218
F: drivers/scsi/snic/
62206219

62216220
CISCO VIC ETHERNET NIC DRIVER
6222-
M: Christian Benvenuti <[email protected]>
62236221
M: Satish Kharat <[email protected]>
62246222
S: Maintained
62256223
F: drivers/net/ethernet/cisco/enic/
62266224

62276225
CISCO VIC LOW LATENCY NIC DRIVER
6228-
M: Christian Benvenuti <[email protected]>
62296226
M: Nelson Escobar <[email protected]>
6227+
M: Satish Kharat <[email protected]>
62306228
S: Supported
62316229
F: drivers/infiniband/hw/usnic/
62326230

@@ -14412,9 +14410,9 @@ LANTIQ PEF2256 DRIVER
1441214410
M: Herve Codina <[email protected]>
1441314411
S: Maintained
1441414412
F: Documentation/devicetree/bindings/net/lantiq,pef2256.yaml
14415-
F: drivers/net/wan/framer/pef2256/
14413+
F: drivers/net/wan/framer/
1441614414
F: drivers/pinctrl/pinctrl-pef2256.c
14417-
F: include/linux/framer/pef2256.h
14415+
F: include/linux/framer/
1441814416

1441914417
LASI 53c700 driver for PARISC
1442014418
M: "James E.J. Bottomley" <[email protected]>
@@ -21695,7 +21693,7 @@ S: Maintained
2169521693
F: drivers/net/ethernet/qualcomm/emac/
2169621694

2169721695
QUALCOMM ETHQOS ETHERNET DRIVER
21698-
M: Vinod Koul <[email protected]>
21696+
M: Mohd Ayaan Anwar <[email protected]>
2169921697
2170021698
2170121699
S: Maintained

drivers/bluetooth/hci_qca.c

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,19 +2046,23 @@ static int qca_setup(struct hci_uart *hu)
20462046
}
20472047

20482048
out:
2049-
if (ret && retries < MAX_INIT_RETRIES) {
2050-
bt_dev_warn(hdev, "Retry BT power ON:%d", retries);
2049+
if (ret) {
20512050
qca_power_shutdown(hu);
2052-
if (hu->serdev) {
2053-
serdev_device_close(hu->serdev);
2054-
ret = serdev_device_open(hu->serdev);
2055-
if (ret) {
2056-
bt_dev_err(hdev, "failed to open port");
2057-
return ret;
2051+
2052+
if (retries < MAX_INIT_RETRIES) {
2053+
bt_dev_warn(hdev, "Retry BT power ON:%d", retries);
2054+
if (hu->serdev) {
2055+
serdev_device_close(hu->serdev);
2056+
ret = serdev_device_open(hu->serdev);
2057+
if (ret) {
2058+
bt_dev_err(hdev, "failed to open port");
2059+
return ret;
2060+
}
20582061
}
2062+
retries++;
2063+
goto retry;
20592064
}
2060-
retries++;
2061-
goto retry;
2065+
return ret;
20622066
}
20632067

20642068
/* Setup bdaddr */

drivers/dpll/zl3073x/core.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -981,11 +981,7 @@ zl3073x_devm_dpll_init(struct zl3073x_dev *zldev, u8 num_dplls)
981981
}
982982

983983
/* Add devres action to release DPLL related resources */
984-
rc = devm_add_action_or_reset(zldev->dev, zl3073x_dev_dpll_fini, zldev);
985-
if (rc)
986-
goto error;
987-
988-
return 0;
984+
return devm_add_action_or_reset(zldev->dev, zl3073x_dev_dpll_fini, zldev);
989985

990986
error:
991987
zl3073x_dev_dpll_fini(zldev);
@@ -1026,6 +1022,7 @@ int zl3073x_dev_probe(struct zl3073x_dev *zldev,
10261022
"Unknown or non-match chip ID: 0x%0x\n",
10271023
id);
10281024
}
1025+
zldev->chip_id = id;
10291026

10301027
/* Read revision, firmware version and custom config version */
10311028
rc = zl3073x_read_u16(zldev, ZL_REG_REVISION, &revision);

drivers/dpll/zl3073x/core.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ struct zl3073x_dpll;
3535
* @dev: pointer to device
3636
* @regmap: regmap to access device registers
3737
* @multiop_lock: to serialize multiple register operations
38+
* @chip_id: chip ID read from hardware
3839
* @ref: array of input references' invariants
3940
* @out: array of outs' invariants
4041
* @synth: array of synths' invariants
@@ -48,6 +49,7 @@ struct zl3073x_dev {
4849
struct device *dev;
4950
struct regmap *regmap;
5051
struct mutex multiop_lock;
52+
u16 chip_id;
5153

5254
/* Invariants */
5355
struct zl3073x_ref ref[ZL3073X_NUM_REFS];
@@ -144,6 +146,32 @@ int zl3073x_write_hwreg_seq(struct zl3073x_dev *zldev,
144146

145147
int zl3073x_ref_phase_offsets_update(struct zl3073x_dev *zldev, int channel);
146148

149+
/**
150+
* zl3073x_dev_is_ref_phase_comp_32bit - check ref phase comp register size
151+
* @zldev: pointer to zl3073x device
152+
*
153+
* Some chip IDs have a 32-bit wide ref_phase_offset_comp register instead
154+
* of the default 48-bit.
155+
*
156+
* Return: true if the register is 32-bit, false if 48-bit
157+
*/
158+
static inline bool
159+
zl3073x_dev_is_ref_phase_comp_32bit(struct zl3073x_dev *zldev)
160+
{
161+
switch (zldev->chip_id) {
162+
case 0x0E30:
163+
case 0x0E93:
164+
case 0x0E94:
165+
case 0x0E95:
166+
case 0x0E96:
167+
case 0x0E97:
168+
case 0x1F60:
169+
return true;
170+
default:
171+
return false;
172+
}
173+
}
174+
147175
static inline bool
148176
zl3073x_is_n_pin(u8 id)
149177
{

drivers/dpll/zl3073x/dpll.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,11 @@ zl3073x_dpll_input_pin_phase_adjust_get(const struct dpll_pin *dpll_pin,
475475
ref_id = zl3073x_input_pin_ref_get(pin->id);
476476
ref = zl3073x_ref_state_get(zldev, ref_id);
477477

478-
/* Perform sign extension for 48bit signed value */
479-
phase_comp = sign_extend64(ref->phase_comp, 47);
478+
/* Perform sign extension based on register width */
479+
if (zl3073x_dev_is_ref_phase_comp_32bit(zldev))
480+
phase_comp = sign_extend64(ref->phase_comp, 31);
481+
else
482+
phase_comp = sign_extend64(ref->phase_comp, 47);
480483

481484
/* Reverse two's complement negation applied during set and convert
482485
* to 32bit signed int

drivers/dpll/zl3073x/ref.c

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,16 @@ int zl3073x_ref_state_fetch(struct zl3073x_dev *zldev, u8 index)
121121
return rc;
122122

123123
/* Read phase compensation register */
124-
rc = zl3073x_read_u48(zldev, ZL_REG_REF_PHASE_OFFSET_COMP,
125-
&ref->phase_comp);
124+
if (zl3073x_dev_is_ref_phase_comp_32bit(zldev)) {
125+
u32 val;
126+
127+
rc = zl3073x_read_u32(zldev, ZL_REG_REF_PHASE_OFFSET_COMP_32,
128+
&val);
129+
ref->phase_comp = val;
130+
} else {
131+
rc = zl3073x_read_u48(zldev, ZL_REG_REF_PHASE_OFFSET_COMP,
132+
&ref->phase_comp);
133+
}
126134
if (rc)
127135
return rc;
128136

@@ -179,9 +187,16 @@ int zl3073x_ref_state_set(struct zl3073x_dev *zldev, u8 index,
179187
if (!rc && dref->sync_ctrl != ref->sync_ctrl)
180188
rc = zl3073x_write_u8(zldev, ZL_REG_REF_SYNC_CTRL,
181189
ref->sync_ctrl);
182-
if (!rc && dref->phase_comp != ref->phase_comp)
183-
rc = zl3073x_write_u48(zldev, ZL_REG_REF_PHASE_OFFSET_COMP,
184-
ref->phase_comp);
190+
if (!rc && dref->phase_comp != ref->phase_comp) {
191+
if (zl3073x_dev_is_ref_phase_comp_32bit(zldev))
192+
rc = zl3073x_write_u32(zldev,
193+
ZL_REG_REF_PHASE_OFFSET_COMP_32,
194+
ref->phase_comp);
195+
else
196+
rc = zl3073x_write_u48(zldev,
197+
ZL_REG_REF_PHASE_OFFSET_COMP,
198+
ref->phase_comp);
199+
}
185200
if (rc)
186201
return rc;
187202

drivers/dpll/zl3073x/regs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
#define ZL_REF_CONFIG_DIFF_EN BIT(2)
195195

196196
#define ZL_REG_REF_PHASE_OFFSET_COMP ZL_REG(10, 0x28, 6)
197+
#define ZL_REG_REF_PHASE_OFFSET_COMP_32 ZL_REG(10, 0x28, 4)
197198

198199
#define ZL_REG_REF_SYNC_CTRL ZL_REG(10, 0x2e, 1)
199200
#define ZL_REF_SYNC_CTRL_MODE GENMASK(2, 0)

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2278,6 +2278,12 @@ int sja1105_static_config_reload(struct sja1105_private *priv,
22782278
* change it through the dynamic interface later.
22792279
*/
22802280
dsa_switch_for_each_available_port(dp, ds) {
2281+
/* May be called during unbind when we unoffload a VLAN-aware
2282+
* bridge from port 1 while port 0 was already torn down
2283+
*/
2284+
if (!dp->pl)
2285+
continue;
2286+
22812287
phylink_replay_link_begin(dp->pl);
22822288
mac[dp->index].speed = priv->info->port_speed[SJA1105_SPEED_AUTO];
22832289
}
@@ -2334,7 +2340,8 @@ int sja1105_static_config_reload(struct sja1105_private *priv,
23342340
}
23352341

23362342
dsa_switch_for_each_available_port(dp, ds)
2337-
phylink_replay_link_end(dp->pl);
2343+
if (dp->pl)
2344+
phylink_replay_link_end(dp->pl);
23382345

23392346
rc = sja1105_reload_cbs(priv);
23402347
if (rc < 0)

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6232,6 +6232,9 @@ int bnxt_hwrm_cfa_ntuple_filter_free(struct bnxt *bp,
62326232
int rc;
62336233

62346234
set_bit(BNXT_FLTR_FW_DELETED, &fltr->base.state);
6235+
if (!test_bit(BNXT_STATE_OPEN, &bp->state))
6236+
return 0;
6237+
62356238
rc = hwrm_req_init(bp, req, HWRM_CFA_NTUPLE_FILTER_FREE);
62366239
if (rc)
62376240
return rc;
@@ -10879,12 +10882,10 @@ void bnxt_del_one_rss_ctx(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx,
1087910882
struct bnxt_ntuple_filter *ntp_fltr;
1088010883
int i;
1088110884

10882-
if (netif_running(bp->dev)) {
10883-
bnxt_hwrm_vnic_free_one(bp, &rss_ctx->vnic);
10884-
for (i = 0; i < BNXT_MAX_CTX_PER_VNIC; i++) {
10885-
if (vnic->fw_rss_cos_lb_ctx[i] != INVALID_HW_RING_ID)
10886-
bnxt_hwrm_vnic_ctx_free_one(bp, vnic, i);
10887-
}
10885+
bnxt_hwrm_vnic_free_one(bp, &rss_ctx->vnic);
10886+
for (i = 0; i < BNXT_MAX_CTX_PER_VNIC; i++) {
10887+
if (vnic->fw_rss_cos_lb_ctx[i] != INVALID_HW_RING_ID)
10888+
bnxt_hwrm_vnic_ctx_free_one(bp, vnic, i);
1088810889
}
1088910890
if (!all)
1089010891
return;

0 commit comments

Comments
 (0)