Skip to content

Commit 511cce1

Browse files
committed
Merge tag 'net-6.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from wifi and can. Current release - regressions: - phy: don't WARN for PHY_UP state in mdio_bus_phy_resume() - wifi: fix locking in mac80211 mlme - eth: - revert "net: mvpp2: debugfs: fix memory leak when using debugfs_lookup()" - mlxbf_gige: fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe Previous releases - regressions: - wifi: fix regression with non-QoS drivers Previous releases - always broken: - mptcp: fix unreleased socket in accept queue - wifi: - don't start TX with fq->lock to fix deadlock - fix memory corruption in minstrel_ht_update_rates() - eth: - macb: fix ZynqMP SGMII non-wakeup source resume failure - mt7531: only do PLL once after the reset - usbnet: fix memory leak in usbnet_disconnect() Misc: - usb: qmi_wwan: add new usb-id for Dell branded EM7455" * tag 'net-6.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (30 commits) mptcp: fix unreleased socket in accept queue mptcp: factor out __mptcp_close() without socket lock net: ethernet: mtk_eth_soc: fix mask of RX_DMA_GET_SPORT{,_V2} net: mscc: ocelot: fix tagged VLAN refusal while under a VLAN-unaware bridge can: c_can: don't cache TX messages for C_CAN cores ice: xsk: drop power of 2 ring size restriction for AF_XDP ice: xsk: change batched Tx descriptor cleaning net: usb: qmi_wwan: Add new usb-id for Dell branded EM7455 selftests: Fix the if conditions of in test_extra_filter() net: phy: Don't WARN for PHY_UP state in mdio_bus_phy_resume() net: stmmac: power up/down serdes in stmmac_open/release wifi: mac80211: mlme: Fix double unlock on assoc success handling wifi: mac80211: mlme: Fix missing unlock on beacon RX wifi: mac80211: fix memory corruption in minstrel_ht_update_rates() wifi: mac80211: fix regression with non-QoS drivers wifi: mac80211: ensure vif queues are operational after start wifi: mac80211: don't start TX with fq->lock to fix deadlock wifi: cfg80211: fix MCS divisor value net: hippi: Add missing pci_disable_device() in rr_init_one() net/mlxbf_gige: Fix an IS_ERR() vs NULL bug in mlxbf_gige_mdio_probe ...
2 parents da9eede + 3b04cba commit 511cce1

File tree

32 files changed

+223
-191
lines changed

32 files changed

+223
-191
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19961,7 +19961,7 @@ S: Supported
1996119961
F: drivers/net/team/
1996219962
F: include/linux/if_team.h
1996319963
F: include/uapi/linux/if_team.h
19964-
F: tools/testing/selftests/net/team/
19964+
F: tools/testing/selftests/drivers/net/team/
1996519965

1996619966
TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT
1996719967
M: "Savoir-faire Linux Inc." <[email protected]>

drivers/net/can/c_can/c_can.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,22 @@ static inline u8 c_can_get_tx_tail(const struct c_can_tx_ring *ring)
235235
return ring->tail & (ring->obj_num - 1);
236236
}
237237

238-
static inline u8 c_can_get_tx_free(const struct c_can_tx_ring *ring)
238+
static inline u8 c_can_get_tx_free(const struct c_can_priv *priv,
239+
const struct c_can_tx_ring *ring)
239240
{
240-
return ring->obj_num - (ring->head - ring->tail);
241+
u8 head = c_can_get_tx_head(ring);
242+
u8 tail = c_can_get_tx_tail(ring);
243+
244+
if (priv->type == BOSCH_D_CAN)
245+
return ring->obj_num - (ring->head - ring->tail);
246+
247+
/* This is not a FIFO. C/D_CAN sends out the buffers
248+
* prioritized. The lowest buffer number wins.
249+
*/
250+
if (head < tail)
251+
return 0;
252+
253+
return ring->obj_num - head;
241254
}
242255

243256
#endif /* C_CAN_H */

drivers/net/can/c_can/c_can_main.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,15 +429,15 @@ static void c_can_setup_receive_object(struct net_device *dev, int iface,
429429
static bool c_can_tx_busy(const struct c_can_priv *priv,
430430
const struct c_can_tx_ring *tx_ring)
431431
{
432-
if (c_can_get_tx_free(tx_ring) > 0)
432+
if (c_can_get_tx_free(priv, tx_ring) > 0)
433433
return false;
434434

435435
netif_stop_queue(priv->dev);
436436

437437
/* Memory barrier before checking tx_free (head and tail) */
438438
smp_mb();
439439

440-
if (c_can_get_tx_free(tx_ring) == 0) {
440+
if (c_can_get_tx_free(priv, tx_ring) == 0) {
441441
netdev_dbg(priv->dev,
442442
"Stopping tx-queue (tx_head=0x%08x, tx_tail=0x%08x, len=%d).\n",
443443
tx_ring->head, tx_ring->tail,
@@ -465,7 +465,7 @@ static netdev_tx_t c_can_start_xmit(struct sk_buff *skb,
465465

466466
idx = c_can_get_tx_head(tx_ring);
467467
tx_ring->head++;
468-
if (c_can_get_tx_free(tx_ring) == 0)
468+
if (c_can_get_tx_free(priv, tx_ring) == 0)
469469
netif_stop_queue(dev);
470470

471471
if (idx < c_can_get_tx_tail(tx_ring))
@@ -748,7 +748,7 @@ static void c_can_do_tx(struct net_device *dev)
748748
return;
749749

750750
tx_ring->tail += pkts;
751-
if (c_can_get_tx_free(tx_ring)) {
751+
if (c_can_get_tx_free(priv, tx_ring)) {
752752
/* Make sure that anybody stopping the queue after
753753
* this sees the new tx_ring->tail.
754754
*/
@@ -760,8 +760,7 @@ static void c_can_do_tx(struct net_device *dev)
760760
stats->tx_packets += pkts;
761761

762762
tail = c_can_get_tx_tail(tx_ring);
763-
764-
if (tail == 0) {
763+
if (priv->type == BOSCH_D_CAN && tail == 0) {
765764
u8 head = c_can_get_tx_head(tx_ring);
766765

767766
/* Start transmission for all cached messages */

drivers/net/dsa/mt7530.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -506,14 +506,19 @@ static bool mt7531_dual_sgmii_supported(struct mt7530_priv *priv)
506506
static int
507507
mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
508508
{
509-
struct mt7530_priv *priv = ds->priv;
509+
return 0;
510+
}
511+
512+
static void
513+
mt7531_pll_setup(struct mt7530_priv *priv)
514+
{
510515
u32 top_sig;
511516
u32 hwstrap;
512517
u32 xtal;
513518
u32 val;
514519

515520
if (mt7531_dual_sgmii_supported(priv))
516-
return 0;
521+
return;
517522

518523
val = mt7530_read(priv, MT7531_CREV);
519524
top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR);
@@ -592,8 +597,6 @@ mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
592597
val |= EN_COREPLL;
593598
mt7530_write(priv, MT7531_PLLGP_EN, val);
594599
usleep_range(25, 35);
595-
596-
return 0;
597600
}
598601

599602
static void
@@ -2326,11 +2329,17 @@ mt7531_setup(struct dsa_switch *ds)
23262329
return -ENODEV;
23272330
}
23282331

2332+
/* all MACs must be forced link-down before sw reset */
2333+
for (i = 0; i < MT7530_NUM_PORTS; i++)
2334+
mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
2335+
23292336
/* Reset the switch through internal reset */
23302337
mt7530_write(priv, MT7530_SYS_CTRL,
23312338
SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
23322339
SYS_CTRL_REG_RST);
23332340

2341+
mt7531_pll_setup(priv);
2342+
23342343
if (mt7531_dual_sgmii_supported(priv)) {
23352344
priv->p5_intf_sel = P5_INTF_SEL_GMAC5_SGMII;
23362345

@@ -2887,8 +2896,6 @@ mt7531_cpu_port_config(struct dsa_switch *ds, int port)
28872896
case 6:
28882897
interface = PHY_INTERFACE_MODE_2500BASEX;
28892898

2890-
mt7531_pad_setup(ds, interface);
2891-
28922899
priv->p6_interface = interface;
28932900
break;
28942901
default:

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5109,6 +5109,7 @@ static int __maybe_unused macb_suspend(struct device *dev)
51095109
if (!(bp->wol & MACB_WOL_ENABLED)) {
51105110
rtnl_lock();
51115111
phylink_stop(bp->phylink);
5112+
phy_exit(bp->sgmii_phy);
51125113
rtnl_unlock();
51135114
spin_lock_irqsave(&bp->lock, flags);
51145115
macb_reset_hw(bp);
@@ -5198,6 +5199,9 @@ static int __maybe_unused macb_resume(struct device *dev)
51985199
macb_set_rx_mode(netdev);
51995200
macb_restore_features(bp);
52005201
rtnl_lock();
5202+
if (!device_may_wakeup(&bp->dev->dev))
5203+
phy_init(bp->sgmii_phy);
5204+
52015205
phylink_start(bp->phylink);
52025206
rtnl_unlock();
52035207

drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "cudbg_entity.h"
1515
#include "cudbg_lib.h"
1616
#include "cudbg_zlib.h"
17+
#include "cxgb4_tc_mqprio.h"
1718

1819
static const u32 t6_tp_pio_array[][IREG_NUM_ELEM] = {
1920
{0x7e40, 0x7e44, 0x020, 28}, /* t6_tp_pio_regs_20_to_3b */
@@ -3458,7 +3459,7 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,
34583459
for (i = 0; i < utxq->ntxq; i++)
34593460
QDESC_GET_TXQ(&utxq->uldtxq[i].q,
34603461
cudbg_uld_txq_to_qtype(j),
3461-
out_unlock);
3462+
out_unlock_uld);
34623463
}
34633464
}
34643465

@@ -3475,7 +3476,7 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,
34753476
for (i = 0; i < urxq->nrxq; i++)
34763477
QDESC_GET_RXQ(&urxq->uldrxq[i].rspq,
34773478
cudbg_uld_rxq_to_qtype(j),
3478-
out_unlock);
3479+
out_unlock_uld);
34793480
}
34803481

34813482
/* ULD FLQ */
@@ -3487,7 +3488,7 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,
34873488
for (i = 0; i < urxq->nrxq; i++)
34883489
QDESC_GET_FLQ(&urxq->uldrxq[i].fl,
34893490
cudbg_uld_flq_to_qtype(j),
3490-
out_unlock);
3491+
out_unlock_uld);
34913492
}
34923493

34933494
/* ULD CIQ */
@@ -3500,29 +3501,34 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,
35003501
for (i = 0; i < urxq->nciq; i++)
35013502
QDESC_GET_RXQ(&urxq->uldrxq[base + i].rspq,
35023503
cudbg_uld_ciq_to_qtype(j),
3503-
out_unlock);
3504+
out_unlock_uld);
35043505
}
35053506
}
3507+
mutex_unlock(&uld_mutex);
3508+
3509+
if (!padap->tc_mqprio)
3510+
goto out;
35063511

3512+
mutex_lock(&padap->tc_mqprio->mqprio_mutex);
35073513
/* ETHOFLD TXQ */
35083514
if (s->eohw_txq)
35093515
for (i = 0; i < s->eoqsets; i++)
35103516
QDESC_GET_TXQ(&s->eohw_txq[i].q,
3511-
CUDBG_QTYPE_ETHOFLD_TXQ, out);
3517+
CUDBG_QTYPE_ETHOFLD_TXQ, out_unlock_mqprio);
35123518

35133519
/* ETHOFLD RXQ and FLQ */
35143520
if (s->eohw_rxq) {
35153521
for (i = 0; i < s->eoqsets; i++)
35163522
QDESC_GET_RXQ(&s->eohw_rxq[i].rspq,
3517-
CUDBG_QTYPE_ETHOFLD_RXQ, out);
3523+
CUDBG_QTYPE_ETHOFLD_RXQ, out_unlock_mqprio);
35183524

35193525
for (i = 0; i < s->eoqsets; i++)
35203526
QDESC_GET_FLQ(&s->eohw_rxq[i].fl,
3521-
CUDBG_QTYPE_ETHOFLD_FLQ, out);
3527+
CUDBG_QTYPE_ETHOFLD_FLQ, out_unlock_mqprio);
35223528
}
35233529

3524-
out_unlock:
3525-
mutex_unlock(&uld_mutex);
3530+
out_unlock_mqprio:
3531+
mutex_unlock(&padap->tc_mqprio->mqprio_mutex);
35263532

35273533
out:
35283534
qdesc_info->qdesc_entry_size = sizeof(*qdesc_entry);
@@ -3559,6 +3565,10 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,
35593565
#undef QDESC_GET
35603566

35613567
return rc;
3568+
3569+
out_unlock_uld:
3570+
mutex_unlock(&uld_mutex);
3571+
goto out;
35623572
}
35633573

35643574
int cudbg_collect_flash(struct cudbg_init *pdbg_init,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ int ice_napi_poll(struct napi_struct *napi, int budget)
14671467
bool wd;
14681468

14691469
if (tx_ring->xsk_pool)
1470-
wd = ice_xmit_zc(tx_ring, ICE_DESC_UNUSED(tx_ring), budget);
1470+
wd = ice_xmit_zc(tx_ring);
14711471
else if (ice_ring_is_xdp(tx_ring))
14721472
wd = true;
14731473
else

0 commit comments

Comments
 (0)