Skip to content

Commit ed1f164

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in late fixes to prepare for the 6.9 net-next PR. Signed-off-by: Jakub Kicinski <[email protected]>
2 parents a318d3d + 84e9514 commit ed1f164

File tree

14 files changed

+86
-82
lines changed

14 files changed

+86
-82
lines changed

Documentation/netlink/specs/devlink.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ attribute-sets:
290290
enum: eswitch-mode
291291
-
292292
name: eswitch-inline-mode
293-
type: u16
293+
type: u8
294294
enum: eswitch-inline-mode
295295
-
296296
name: dpipe-tables

drivers/dpll/dpll_core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ static int dpll_xa_ref_pin_del(struct xarray *xa_pins, struct dpll_pin *pin,
131131
reg = dpll_pin_registration_find(ref, ops, priv);
132132
if (WARN_ON(!reg))
133133
return -EINVAL;
134+
list_del(&reg->list);
135+
kfree(reg);
134136
if (refcount_dec_and_test(&ref->refcount)) {
135-
list_del(&reg->list);
136-
kfree(reg);
137137
xa_erase(xa_pins, i);
138138
WARN_ON(!list_empty(&ref->registration_list));
139139
kfree(ref);
@@ -211,9 +211,9 @@ dpll_xa_ref_dpll_del(struct xarray *xa_dplls, struct dpll_device *dpll,
211211
reg = dpll_pin_registration_find(ref, ops, priv);
212212
if (WARN_ON(!reg))
213213
return;
214+
list_del(&reg->list);
215+
kfree(reg);
214216
if (refcount_dec_and_test(&ref->refcount)) {
215-
list_del(&reg->list);
216-
kfree(reg);
217217
xa_erase(xa_dplls, i);
218218
WARN_ON(!list_empty(&ref->registration_list));
219219
kfree(ref);

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,6 +2259,8 @@ static int ksz_pirq_setup(struct ksz_device *dev, u8 p)
22592259
return ksz_irq_common_setup(dev, pirq);
22602260
}
22612261

2262+
static int ksz_parse_drive_strength(struct ksz_device *dev);
2263+
22622264
static int ksz_setup(struct dsa_switch *ds)
22632265
{
22642266
struct ksz_device *dev = ds->priv;
@@ -2280,6 +2282,10 @@ static int ksz_setup(struct dsa_switch *ds)
22802282
return ret;
22812283
}
22822284

2285+
ret = ksz_parse_drive_strength(dev);
2286+
if (ret)
2287+
return ret;
2288+
22832289
/* set broadcast storm protection 10% rate */
22842290
regmap_update_bits(ksz_regmap_16(dev), regs[S_BROADCAST_CTRL],
22852291
BROADCAST_STORM_RATE,
@@ -4328,10 +4334,6 @@ int ksz_switch_register(struct ksz_device *dev)
43284334
for (port_num = 0; port_num < dev->info->port_cnt; ++port_num)
43294335
dev->ports[port_num].interface = PHY_INTERFACE_MODE_NA;
43304336
if (dev->dev->of_node) {
4331-
ret = ksz_parse_drive_strength(dev);
4332-
if (ret)
4333-
return ret;
4334-
43354337
ret = of_get_phy_mode(dev->dev->of_node, &interface);
43364338
if (ret == 0)
43374339
dev->compat_interface = interface;

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

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6678,6 +6678,7 @@ static void ice_update_vsi_ring_stats(struct ice_vsi *vsi)
66786678
{
66796679
struct rtnl_link_stats64 *net_stats, *stats_prev;
66806680
struct rtnl_link_stats64 *vsi_stats;
6681+
struct ice_pf *pf = vsi->back;
66816682
u64 pkts, bytes;
66826683
int i;
66836684

@@ -6723,21 +6724,18 @@ static void ice_update_vsi_ring_stats(struct ice_vsi *vsi)
67236724
net_stats = &vsi->net_stats;
67246725
stats_prev = &vsi->net_stats_prev;
67256726

6726-
/* clear prev counters after reset */
6727-
if (vsi_stats->tx_packets < stats_prev->tx_packets ||
6728-
vsi_stats->rx_packets < stats_prev->rx_packets) {
6729-
stats_prev->tx_packets = 0;
6730-
stats_prev->tx_bytes = 0;
6731-
stats_prev->rx_packets = 0;
6732-
stats_prev->rx_bytes = 0;
6727+
/* Update netdev counters, but keep in mind that values could start at
6728+
* random value after PF reset. And as we increase the reported stat by
6729+
* diff of Prev-Cur, we need to be sure that Prev is valid. If it's not,
6730+
* let's skip this round.
6731+
*/
6732+
if (likely(pf->stat_prev_loaded)) {
6733+
net_stats->tx_packets += vsi_stats->tx_packets - stats_prev->tx_packets;
6734+
net_stats->tx_bytes += vsi_stats->tx_bytes - stats_prev->tx_bytes;
6735+
net_stats->rx_packets += vsi_stats->rx_packets - stats_prev->rx_packets;
6736+
net_stats->rx_bytes += vsi_stats->rx_bytes - stats_prev->rx_bytes;
67336737
}
67346738

6735-
/* update netdev counters */
6736-
net_stats->tx_packets += vsi_stats->tx_packets - stats_prev->tx_packets;
6737-
net_stats->tx_bytes += vsi_stats->tx_bytes - stats_prev->tx_bytes;
6738-
net_stats->rx_packets += vsi_stats->rx_packets - stats_prev->rx_packets;
6739-
net_stats->rx_bytes += vsi_stats->rx_bytes - stats_prev->rx_bytes;
6740-
67416739
stats_prev->tx_packets = vsi_stats->tx_packets;
67426740
stats_prev->tx_bytes = vsi_stats->tx_bytes;
67436741
stats_prev->rx_packets = vsi_stats->rx_packets;

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6985,44 +6985,31 @@ static void igb_extts(struct igb_adapter *adapter, int tsintr_tt)
69856985
static void igb_tsync_interrupt(struct igb_adapter *adapter)
69866986
{
69876987
struct e1000_hw *hw = &adapter->hw;
6988-
u32 ack = 0, tsicr = rd32(E1000_TSICR);
6988+
u32 tsicr = rd32(E1000_TSICR);
69896989
struct ptp_clock_event event;
69906990

69916991
if (tsicr & TSINTR_SYS_WRAP) {
69926992
event.type = PTP_CLOCK_PPS;
69936993
if (adapter->ptp_caps.pps)
69946994
ptp_clock_event(adapter->ptp_clock, &event);
6995-
ack |= TSINTR_SYS_WRAP;
69966995
}
69976996

69986997
if (tsicr & E1000_TSICR_TXTS) {
69996998
/* retrieve hardware timestamp */
70006999
schedule_work(&adapter->ptp_tx_work);
7001-
ack |= E1000_TSICR_TXTS;
70027000
}
70037001

7004-
if (tsicr & TSINTR_TT0) {
7002+
if (tsicr & TSINTR_TT0)
70057003
igb_perout(adapter, 0);
7006-
ack |= TSINTR_TT0;
7007-
}
70087004

7009-
if (tsicr & TSINTR_TT1) {
7005+
if (tsicr & TSINTR_TT1)
70107006
igb_perout(adapter, 1);
7011-
ack |= TSINTR_TT1;
7012-
}
70137007

7014-
if (tsicr & TSINTR_AUTT0) {
7008+
if (tsicr & TSINTR_AUTT0)
70157009
igb_extts(adapter, 0);
7016-
ack |= TSINTR_AUTT0;
7017-
}
70187010

7019-
if (tsicr & TSINTR_AUTT1) {
7011+
if (tsicr & TSINTR_AUTT1)
70207012
igb_extts(adapter, 1);
7021-
ack |= TSINTR_AUTT1;
7022-
}
7023-
7024-
/* acknowledge the interrupts */
7025-
wr32(E1000_TSICR, ack);
70267013
}
70277014

70287015
static irqreturn_t igb_msix_other(int irq, void *data)

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5303,25 +5303,22 @@ igc_features_check(struct sk_buff *skb, struct net_device *dev,
53035303

53045304
static void igc_tsync_interrupt(struct igc_adapter *adapter)
53055305
{
5306-
u32 ack, tsauxc, sec, nsec, tsicr;
53075306
struct igc_hw *hw = &adapter->hw;
5307+
u32 tsauxc, sec, nsec, tsicr;
53085308
struct ptp_clock_event event;
53095309
struct timespec64 ts;
53105310

53115311
tsicr = rd32(IGC_TSICR);
5312-
ack = 0;
53135312

53145313
if (tsicr & IGC_TSICR_SYS_WRAP) {
53155314
event.type = PTP_CLOCK_PPS;
53165315
if (adapter->ptp_caps.pps)
53175316
ptp_clock_event(adapter->ptp_clock, &event);
5318-
ack |= IGC_TSICR_SYS_WRAP;
53195317
}
53205318

53215319
if (tsicr & IGC_TSICR_TXTS) {
53225320
/* retrieve hardware timestamp */
53235321
igc_ptp_tx_tstamp_event(adapter);
5324-
ack |= IGC_TSICR_TXTS;
53255322
}
53265323

53275324
if (tsicr & IGC_TSICR_TT0) {
@@ -5335,7 +5332,6 @@ static void igc_tsync_interrupt(struct igc_adapter *adapter)
53355332
wr32(IGC_TSAUXC, tsauxc);
53365333
adapter->perout[0].start = ts;
53375334
spin_unlock(&adapter->tmreg_lock);
5338-
ack |= IGC_TSICR_TT0;
53395335
}
53405336

53415337
if (tsicr & IGC_TSICR_TT1) {
@@ -5349,7 +5345,6 @@ static void igc_tsync_interrupt(struct igc_adapter *adapter)
53495345
wr32(IGC_TSAUXC, tsauxc);
53505346
adapter->perout[1].start = ts;
53515347
spin_unlock(&adapter->tmreg_lock);
5352-
ack |= IGC_TSICR_TT1;
53535348
}
53545349

53555350
if (tsicr & IGC_TSICR_AUTT0) {
@@ -5359,7 +5354,6 @@ static void igc_tsync_interrupt(struct igc_adapter *adapter)
53595354
event.index = 0;
53605355
event.timestamp = sec * NSEC_PER_SEC + nsec;
53615356
ptp_clock_event(adapter->ptp_clock, &event);
5362-
ack |= IGC_TSICR_AUTT0;
53635357
}
53645358

53655359
if (tsicr & IGC_TSICR_AUTT1) {
@@ -5369,11 +5363,7 @@ static void igc_tsync_interrupt(struct igc_adapter *adapter)
53695363
event.index = 1;
53705364
event.timestamp = sec * NSEC_PER_SEC + nsec;
53715365
ptp_clock_event(adapter->ptp_clock, &event);
5372-
ack |= IGC_TSICR_AUTT1;
53735366
}
5374-
5375-
/* acknowledge the interrupts */
5376-
wr32(IGC_TSICR, ack);
53775367
}
53785368

53795369
/**

drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,8 +1235,8 @@ static int rvu_af_dl_dwrr_mtu_get(struct devlink *devlink, u32 id,
12351235
enum rvu_af_dl_param_id {
12361236
RVU_AF_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX,
12371237
RVU_AF_DEVLINK_PARAM_ID_DWRR_MTU,
1238-
RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE,
12391238
RVU_AF_DEVLINK_PARAM_ID_NPC_MCAM_ZONE_PERCENT,
1239+
RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE,
12401240
RVU_AF_DEVLINK_PARAM_ID_NIX_MAXLF,
12411241
};
12421242

@@ -1434,15 +1434,6 @@ static const struct devlink_param rvu_af_dl_params[] = {
14341434
BIT(DEVLINK_PARAM_CMODE_RUNTIME),
14351435
rvu_af_dl_dwrr_mtu_get, rvu_af_dl_dwrr_mtu_set,
14361436
rvu_af_dl_dwrr_mtu_validate),
1437-
};
1438-
1439-
static const struct devlink_param rvu_af_dl_param_exact_match[] = {
1440-
DEVLINK_PARAM_DRIVER(RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE,
1441-
"npc_exact_feature_disable", DEVLINK_PARAM_TYPE_STRING,
1442-
BIT(DEVLINK_PARAM_CMODE_RUNTIME),
1443-
rvu_af_npc_exact_feature_get,
1444-
rvu_af_npc_exact_feature_disable,
1445-
rvu_af_npc_exact_feature_validate),
14461437
DEVLINK_PARAM_DRIVER(RVU_AF_DEVLINK_PARAM_ID_NPC_MCAM_ZONE_PERCENT,
14471438
"npc_mcam_high_zone_percent", DEVLINK_PARAM_TYPE_U8,
14481439
BIT(DEVLINK_PARAM_CMODE_RUNTIME),
@@ -1457,6 +1448,15 @@ static const struct devlink_param rvu_af_dl_param_exact_match[] = {
14571448
rvu_af_dl_nix_maxlf_validate),
14581449
};
14591450

1451+
static const struct devlink_param rvu_af_dl_param_exact_match[] = {
1452+
DEVLINK_PARAM_DRIVER(RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE,
1453+
"npc_exact_feature_disable", DEVLINK_PARAM_TYPE_STRING,
1454+
BIT(DEVLINK_PARAM_CMODE_RUNTIME),
1455+
rvu_af_npc_exact_feature_get,
1456+
rvu_af_npc_exact_feature_disable,
1457+
rvu_af_npc_exact_feature_validate),
1458+
};
1459+
14601460
/* Devlink switch mode */
14611461
static int rvu_devlink_eswitch_mode_get(struct devlink *devlink, u16 *mode)
14621462
{

drivers/net/ethernet/netronome/nfp/flower/lag_conf.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,11 @@ static void nfp_fl_lag_do_work(struct work_struct *work)
337337

338338
acti_netdevs = kmalloc_array(entry->slave_cnt,
339339
sizeof(*acti_netdevs), GFP_KERNEL);
340+
if (!acti_netdevs) {
341+
schedule_delayed_work(&lag->work,
342+
NFP_FL_LAG_DELAY);
343+
continue;
344+
}
340345

341346
/* Include sanity check in the loop. It may be that a bond has
342347
* changed between processing the last notification and the

drivers/net/phy/dp83822.c

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static int dp83822_config_init(struct phy_device *phydev)
402402
{
403403
struct dp83822_private *dp83822 = phydev->priv;
404404
struct device *dev = &phydev->mdio.dev;
405-
int rgmii_delay;
405+
int rgmii_delay = 0;
406406
s32 rx_int_delay;
407407
s32 tx_int_delay;
408408
int err = 0;
@@ -412,30 +412,33 @@ static int dp83822_config_init(struct phy_device *phydev)
412412
rx_int_delay = phy_get_internal_delay(phydev, dev, NULL, 0,
413413
true);
414414

415-
if (rx_int_delay <= 0)
416-
rgmii_delay = 0;
417-
else
418-
rgmii_delay = DP83822_RX_CLK_SHIFT;
415+
/* Set DP83822_RX_CLK_SHIFT to enable rx clk internal delay */
416+
if (rx_int_delay > 0)
417+
rgmii_delay |= DP83822_RX_CLK_SHIFT;
419418

420419
tx_int_delay = phy_get_internal_delay(phydev, dev, NULL, 0,
421420
false);
421+
422+
/* Set DP83822_TX_CLK_SHIFT to disable tx clk internal delay */
422423
if (tx_int_delay <= 0)
423-
rgmii_delay &= ~DP83822_TX_CLK_SHIFT;
424-
else
425424
rgmii_delay |= DP83822_TX_CLK_SHIFT;
426425

427-
if (rgmii_delay) {
428-
err = phy_set_bits_mmd(phydev, DP83822_DEVADDR,
429-
MII_DP83822_RCSR, rgmii_delay);
430-
if (err)
431-
return err;
432-
}
426+
err = phy_modify_mmd(phydev, DP83822_DEVADDR, MII_DP83822_RCSR,
427+
DP83822_RX_CLK_SHIFT | DP83822_TX_CLK_SHIFT, rgmii_delay);
428+
if (err)
429+
return err;
430+
431+
err = phy_set_bits_mmd(phydev, DP83822_DEVADDR,
432+
MII_DP83822_RCSR, DP83822_RGMII_MODE_EN);
433433

434-
phy_set_bits_mmd(phydev, DP83822_DEVADDR,
435-
MII_DP83822_RCSR, DP83822_RGMII_MODE_EN);
434+
if (err)
435+
return err;
436436
} else {
437-
phy_clear_bits_mmd(phydev, DP83822_DEVADDR,
438-
MII_DP83822_RCSR, DP83822_RGMII_MODE_EN);
437+
err = phy_clear_bits_mmd(phydev, DP83822_DEVADDR,
438+
MII_DP83822_RCSR, DP83822_RGMII_MODE_EN);
439+
440+
if (err)
441+
return err;
439442
}
440443

441444
if (dp83822->fx_enabled) {

drivers/net/phy/phy_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3128,7 +3128,7 @@ s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
31283128
if (delay < 0)
31293129
return delay;
31303130

3131-
if (delay && size == 0)
3131+
if (size == 0)
31323132
return delay;
31333133

31343134
if (delay < delay_values[0] || delay > delay_values[size - 1]) {

0 commit comments

Comments
 (0)