Commit a4a35f6c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from Paolo Abeni:
 "Including fixes from wireless and netfilter

  Current release - regressions:

   - udp: fall back to software USO if IPv6 extension headers are
     present

   - wifi: iwlwifi: correctly lookup DMA address in SG table

  Current release - new code bugs:

   - eth: mlx5e: fix queue stats access to non-existing channels splat

  Previous releases - regressions:

   - eth: mlx5e: take state lock during tx timeout reporter

   - eth: mlxbf_gige: disable RX filters until RX path initialized

   - eth: igc: fix reset adapter logics when tx mode change

  Previous releases - always broken:

   - tcp: update window clamping condition

   - netfilter:
      - nf_queue: drop packets with cloned unconfirmed conntracks
      - nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests

   - vsock: fix recursive ->recvmsg calls

   - dsa: vsc73xx: fix MDIO bus access and PHY opera

   - eth: gtp: pull network headers in gtp_dev_xmit()

   - eth: igc: fix packet still tx after gate close by reducing i226 MAC
     retry buffer

   - eth: mana: fix RX buf alloc_size alignment and atomic op panic

   - eth: hns3: fix a deadlock problem when config TC during resetting"

* tag 'net-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (58 commits)
  net: hns3: use correct release function during uninitialization
  net: hns3: void array out of bound when loop tnl_num
  net: hns3: fix a deadlock problem when config TC during resetting
  net: hns3: use the user's cfg after reset
  net: hns3: fix wrong use of semaphore up
  selftests: net: lib: kill PIDs before del netns
  pse-core: Conditionally set current limit during PI regulator registration
  net: thunder_bgx: Fix netdev structure allocation
  net: ethtool: Allow write mechanism of LPL and both LPL and EPL
  vsock: fix recursive ->recvmsg calls
  selftest: af_unix: Fix kselftest compilation warnings
  netfilter: nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests
  netfilter: nf_tables: Introduce nf_tables_getobj_single
  netfilter: nf_tables: Audit log dump reset after the fact
  selftests: netfilter: add test for br_netfilter+conntrack+queue combination
  netfilter: nf_queue: drop packets with cloned unconfirmed conntracks
  netfilter: flowtable: initialise extack before use
  netfilter: nfnetlink: Initialise extack before use in ACKs
  netfilter: allow ipv6 fragments to arrive on different devices
  tcp: Update window clamping condition
  ...
parents 20573d8e 9c5af2d7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -38,6 +38,10 @@ properties:

  managed: true

  phys:
    description: A reference to the SerDes lane(s)
    maxItems: 1

required:
  - reg

+5 −4
Original line number Diff line number Diff line
@@ -1118,8 +1118,8 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
	rpp->len += skb->len;

	if (stat & SAR_RSQE_EPDU) {
		unsigned int len, truesize;
		unsigned char *l1l2;
		unsigned int len;

		l1l2 = (unsigned char *) ((unsigned long) skb->data + skb->len - 6);

@@ -1189,14 +1189,15 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
		ATM_SKB(skb)->vcc = vcc;
		__net_timestamp(skb);

		truesize = skb->truesize;
		vcc->push(vcc, skb);
		atomic_inc(&vcc->stats->rx);

		if (skb->truesize > SAR_FB_SIZE_3)
		if (truesize > SAR_FB_SIZE_3)
			add_rx_skb(card, 3, SAR_FB_SIZE_3, 1);
		else if (skb->truesize > SAR_FB_SIZE_2)
		else if (truesize > SAR_FB_SIZE_2)
			add_rx_skb(card, 2, SAR_FB_SIZE_2, 1);
		else if (skb->truesize > SAR_FB_SIZE_1)
		else if (truesize > SAR_FB_SIZE_1)
			add_rx_skb(card, 1, SAR_FB_SIZE_1, 1);
		else
			add_rx_skb(card, 0, SAR_FB_SIZE_0, 1);
+41 −13
Original line number Diff line number Diff line
@@ -40,6 +40,10 @@
#define VSC73XX_BLOCK_ARBITER	0x5 /* Only subblock 0 */
#define VSC73XX_BLOCK_SYSTEM	0x7 /* Only subblock 0 */

/* MII Block subblock */
#define VSC73XX_BLOCK_MII_INTERNAL	0x0 /* Internal MDIO subblock */
#define VSC73XX_BLOCK_MII_EXTERNAL	0x1 /* External MDIO subblock */

#define CPU_PORT	6 /* CPU port */

/* MAC Block registers */
@@ -225,6 +229,8 @@
#define VSC73XX_MII_CMD		0x1
#define VSC73XX_MII_DATA	0x2

#define VSC73XX_MII_STAT_BUSY	BIT(3)

/* Arbiter block 5 registers */
#define VSC73XX_ARBEMPTY		0x0c
#define VSC73XX_ARBDISC			0x0e
@@ -299,6 +305,7 @@
#define IS_739X(a) (IS_7395(a) || IS_7398(a))

#define VSC73XX_POLL_SLEEP_US		1000
#define VSC73XX_MDIO_POLL_SLEEP_US	5
#define VSC73XX_POLL_TIMEOUT_US		10000

struct vsc73xx_counter {
@@ -527,6 +534,22 @@ static int vsc73xx_detect(struct vsc73xx *vsc)
	return 0;
}

static int vsc73xx_mdio_busy_check(struct vsc73xx *vsc)
{
	int ret, err;
	u32 val;

	ret = read_poll_timeout(vsc73xx_read, err,
				err < 0 || !(val & VSC73XX_MII_STAT_BUSY),
				VSC73XX_MDIO_POLL_SLEEP_US,
				VSC73XX_POLL_TIMEOUT_US, false, vsc,
				VSC73XX_BLOCK_MII, VSC73XX_BLOCK_MII_INTERNAL,
				VSC73XX_MII_STAT, &val);
	if (ret)
		return ret;
	return err;
}

static int vsc73xx_phy_read(struct dsa_switch *ds, int phy, int regnum)
{
	struct vsc73xx *vsc = ds->priv;
@@ -534,12 +557,20 @@ static int vsc73xx_phy_read(struct dsa_switch *ds, int phy, int regnum)
	u32 val;
	int ret;

	ret = vsc73xx_mdio_busy_check(vsc);
	if (ret)
		return ret;

	/* Setting bit 26 means "read" */
	cmd = BIT(26) | (phy << 21) | (regnum << 16);
	ret = vsc73xx_write(vsc, VSC73XX_BLOCK_MII, 0, 1, cmd);
	if (ret)
		return ret;
	msleep(2);

	ret = vsc73xx_mdio_busy_check(vsc);
	if (ret)
		return ret;

	ret = vsc73xx_read(vsc, VSC73XX_BLOCK_MII, 0, 2, &val);
	if (ret)
		return ret;
@@ -563,18 +594,11 @@ static int vsc73xx_phy_write(struct dsa_switch *ds, int phy, int regnum,
	u32 cmd;
	int ret;

	/* It was found through tedious experiments that this router
	 * chip really hates to have it's PHYs reset. They
	 * never recover if that happens: autonegotiation stops
	 * working after a reset. Just filter out this command.
	 * (Resetting the whole chip is OK.)
	 */
	if (regnum == 0 && (val & BIT(15))) {
		dev_info(vsc->dev, "reset PHY - disallowed\n");
		return 0;
	}
	ret = vsc73xx_mdio_busy_check(vsc);
	if (ret)
		return ret;

	cmd = (phy << 21) | (regnum << 16);
	cmd = (phy << 21) | (regnum << 16) | val;
	ret = vsc73xx_write(vsc, VSC73XX_BLOCK_MII, 0, 1, cmd);
	if (ret)
		return ret;
@@ -957,6 +981,11 @@ static void vsc73xx_mac_link_up(struct phylink_config *config,

	if (duplex == DUPLEX_FULL)
		val |= VSC73XX_MAC_CFG_FDX;
	else
		/* In datasheet description ("Port Mode Procedure" in 5.6.2)
		 * this bit is configured only for half duplex.
		 */
		val |= VSC73XX_MAC_CFG_WEXC_DIS;

	/* This routine is described in the datasheet (below ARBDISC register
	 * description)
@@ -967,7 +996,6 @@ static void vsc73xx_mac_link_up(struct phylink_config *config,
	get_random_bytes(&seed, 1);
	val |= seed << VSC73XX_MAC_CFG_SEED_OFFSET;
	val |= VSC73XX_MAC_CFG_SEED_LOAD;
	val |= VSC73XX_MAC_CFG_WEXC_DIS;

	/* Those bits are responsible for MTU only. Kernel takes care about MTU,
	 * let's enable +8 bytes frame length unconditionally.
+2 −2
Original line number Diff line number Diff line
@@ -5250,8 +5250,8 @@ static int __maybe_unused macb_suspend(struct device *dev)
	if (bp->wol & MACB_WOL_ENABLED) {
		/* Check for IP address in WOL ARP mode */
		idev = __in_dev_get_rcu(bp->dev);
		if (idev && idev->ifa_list)
			ifa = rcu_access_pointer(idev->ifa_list);
		if (idev)
			ifa = rcu_dereference(idev->ifa_list);
		if ((bp->wolopts & WAKE_ARP) && !ifa) {
			netdev_err(netdev, "IP address not assigned as required by WoL walk ARP\n");
			return -EOPNOTSUPP;
+21 −9
Original line number Diff line number Diff line
@@ -1054,18 +1054,12 @@ static int phy_interface_mode(u8 lmac_type)

static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)
{
	struct lmac *lmac, **priv;
	struct lmac *lmac;
	u64 cfg;

	lmac = &bgx->lmac[lmacid];
	lmac->bgx = bgx;

	lmac->netdev = alloc_netdev_dummy(sizeof(struct lmac *));
	if (!lmac->netdev)
		return -ENOMEM;
	priv = netdev_priv(lmac->netdev);
	*priv = lmac;

	if ((lmac->lmac_type == BGX_MODE_SGMII) ||
	    (lmac->lmac_type == BGX_MODE_QSGMII) ||
	    (lmac->lmac_type == BGX_MODE_RGMII)) {
@@ -1191,7 +1185,6 @@ static void bgx_lmac_disable(struct bgx *bgx, u8 lmacid)
	    (lmac->lmac_type != BGX_MODE_10G_KR) && lmac->phydev)
		phy_disconnect(lmac->phydev);

	free_netdev(lmac->netdev);
	lmac->phydev = NULL;
}

@@ -1653,6 +1646,23 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

	bgx_get_qlm_mode(bgx);

	for (lmac = 0; lmac < bgx->lmac_count; lmac++) {
		struct lmac *lmacp, **priv;

		lmacp = &bgx->lmac[lmac];
		lmacp->netdev = alloc_netdev_dummy(sizeof(struct lmac *));

		if (!lmacp->netdev) {
			for (int i = 0; i < lmac; i++)
				free_netdev(bgx->lmac[i].netdev);
			err = -ENOMEM;
			goto err_enable;
		}

		priv = netdev_priv(lmacp->netdev);
		*priv = lmacp;
	}

	err = bgx_init_phy(bgx);
	if (err)
		goto err_enable;
@@ -1692,8 +1702,10 @@ static void bgx_remove(struct pci_dev *pdev)
	u8 lmac;

	/* Disable all LMACs */
	for (lmac = 0; lmac < bgx->lmac_count; lmac++)
	for (lmac = 0; lmac < bgx->lmac_count; lmac++) {
		bgx_lmac_disable(bgx, lmac);
		free_netdev(bgx->lmac[lmac].netdev);
	}

	pci_free_irq(pdev, GMPX_GMI_TX_INT, bgx);

Loading