Commit 511cce16 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents da9eede6 3b04cba7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19961,7 +19961,7 @@ S: Supported
F:	drivers/net/team/
F:	include/linux/if_team.h
F:	include/uapi/linux/if_team.h
F:	tools/testing/selftests/net/team/
F:	tools/testing/selftests/drivers/net/team/
TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT
M:	"Savoir-faire Linux Inc." <kernel@savoirfairelinux.com>
+15 −2
Original line number Diff line number Diff line
@@ -235,9 +235,22 @@ static inline u8 c_can_get_tx_tail(const struct c_can_tx_ring *ring)
	return ring->tail & (ring->obj_num - 1);
}

static inline u8 c_can_get_tx_free(const struct c_can_tx_ring *ring)
static inline u8 c_can_get_tx_free(const struct c_can_priv *priv,
				   const struct c_can_tx_ring *ring)
{
	u8 head = c_can_get_tx_head(ring);
	u8 tail = c_can_get_tx_tail(ring);

	if (priv->type == BOSCH_D_CAN)
		return ring->obj_num - (ring->head - ring->tail);

	/* This is not a FIFO. C/D_CAN sends out the buffers
	 * prioritized. The lowest buffer number wins.
	 */
	if (head < tail)
		return 0;

	return ring->obj_num - head;
}

#endif /* C_CAN_H */
+5 −6
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ static void c_can_setup_receive_object(struct net_device *dev, int iface,
static bool c_can_tx_busy(const struct c_can_priv *priv,
			  const struct c_can_tx_ring *tx_ring)
{
	if (c_can_get_tx_free(tx_ring) > 0)
	if (c_can_get_tx_free(priv, tx_ring) > 0)
		return false;

	netif_stop_queue(priv->dev);
@@ -437,7 +437,7 @@ static bool c_can_tx_busy(const struct c_can_priv *priv,
	/* Memory barrier before checking tx_free (head and tail) */
	smp_mb();

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

	idx = c_can_get_tx_head(tx_ring);
	tx_ring->head++;
	if (c_can_get_tx_free(tx_ring) == 0)
	if (c_can_get_tx_free(priv, tx_ring) == 0)
		netif_stop_queue(dev);

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

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

	tail = c_can_get_tx_tail(tx_ring);

	if (tail == 0) {
	if (priv->type == BOSCH_D_CAN && tail == 0) {
		u8 head = c_can_get_tx_head(tx_ring);

		/* Start transmission for all cached messages */
+13 −6
Original line number Diff line number Diff line
@@ -506,14 +506,19 @@ static bool mt7531_dual_sgmii_supported(struct mt7530_priv *priv)
static int
mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
{
	struct mt7530_priv *priv = ds->priv;
	return 0;
}

static void
mt7531_pll_setup(struct mt7530_priv *priv)
{
	u32 top_sig;
	u32 hwstrap;
	u32 xtal;
	u32 val;

	if (mt7531_dual_sgmii_supported(priv))
		return 0;
		return;

	val = mt7530_read(priv, MT7531_CREV);
	top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR);
@@ -592,8 +597,6 @@ mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
	val |= EN_COREPLL;
	mt7530_write(priv, MT7531_PLLGP_EN, val);
	usleep_range(25, 35);

	return 0;
}

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

	/* all MACs must be forced link-down before sw reset */
	for (i = 0; i < MT7530_NUM_PORTS; i++)
		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);

	/* Reset the switch through internal reset */
	mt7530_write(priv, MT7530_SYS_CTRL,
		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
		     SYS_CTRL_REG_RST);

	mt7531_pll_setup(priv);

	if (mt7531_dual_sgmii_supported(priv)) {
		priv->p5_intf_sel = P5_INTF_SEL_GMAC5_SGMII;

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

		mt7531_pad_setup(ds, interface);

		priv->p6_interface = interface;
		break;
	default:
+4 −0
Original line number Diff line number Diff line
@@ -5109,6 +5109,7 @@ static int __maybe_unused macb_suspend(struct device *dev)
	if (!(bp->wol & MACB_WOL_ENABLED)) {
		rtnl_lock();
		phylink_stop(bp->phylink);
		phy_exit(bp->sgmii_phy);
		rtnl_unlock();
		spin_lock_irqsave(&bp->lock, flags);
		macb_reset_hw(bp);
@@ -5198,6 +5199,9 @@ static int __maybe_unused macb_resume(struct device *dev)
	macb_set_rx_mode(netdev);
	macb_restore_features(bp);
	rtnl_lock();
	if (!device_may_wakeup(&bp->dev->dev))
		phy_init(bp->sgmii_phy);

	phylink_start(bp->phylink);
	rtnl_unlock();

Loading