Commit 8faabc04 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from Paolo Abeni:
 "Including fixes from can and netfilter.

  Current release - regressions:

   - rtnetlink: try the outer netns attribute in rtnl_get_peer_net()

   - rust: net::phy fix module autoloading

  Current release - new code bugs:

   - phy: avoid undefined behavior in *_led_polarity_set()

   - eth: octeontx2-pf: fix netdev memory leak in rvu_rep_create()

  Previous releases - regressions:

   - smc: check sndbuf_space again after NOSPACE flag is set in smc_poll

   - ipvs: fix clamp() of ip_vs_conn_tab on small memory systems

   - dsa: restore dsa_software_vlan_untag() ability to operate on
     VLAN-untagged traffic

   - eth:
       - tun: fix tun_napi_alloc_frags()
       - ionic: no double destroy workqueue
       - idpf: trigger SW interrupt when exiting wb_on_itr mode
       - rswitch: rework ts tags management
       - team: fix feature exposure when no ports are present

  Previous releases - always broken:

   - core: fix repeated netlink messages in queue dump

   - mdiobus: fix an OF node reference leak

   - smc: check iparea_offset and ipv6_prefixes_cnt when receiving
     proposal msg

   - can: fix missed interrupts with m_can_pci

   - eth: oa_tc6: fix infinite loop error when tx credits becomes 0"

* tag 'net-6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (45 commits)
  net: mctp: handle skb cleanup on sock_queue failures
  net: mdiobus: fix an OF node reference leak
  octeontx2-pf: fix error handling of devlink port in rvu_rep_create()
  octeontx2-pf: fix netdev memory leak in rvu_rep_create()
  psample: adjust size if rate_as_probability is set
  netdev-genl: avoid empty messages in queue dump
  net: dsa: restore dsa_software_vlan_untag() ability to operate on VLAN-untagged traffic
  selftests: openvswitch: fix tcpdump execution
  net: usb: qmi_wwan: add Quectel RG255C
  net: phy: avoid undefined behavior in *_led_polarity_set()
  netfilter: ipset: Fix for recursive locking warning
  ipvs: Fix clamp() of ip_vs_conn_tab on small memory systems
  can: m_can: fix missed interrupts with m_can_pci
  can: m_can: set init flag earlier in probe
  rtnetlink: Try the outer netns attribute in rtnl_get_peer_net().
  net: netdevsim: fix nsim_pp_hold_write()
  idpf: trigger SW interrupt when exiting wb_on_itr mode
  idpf: add support for SW triggered interrupts
  qed: fix possible uninit pointer read in qed_mcp_nvm_info_populate()
  net: ethernet: bgmac-platform: fix an OF node reference leak
  ...
parents baaa2567 ce1219c3
Loading
Loading
Loading
Loading
+26 −10
Original line number Diff line number Diff line
@@ -1220,20 +1220,32 @@ static void m_can_coalescing_update(struct m_can_classdev *cdev, u32 ir)
static int m_can_interrupt_handler(struct m_can_classdev *cdev)
{
	struct net_device *dev = cdev->net;
	u32 ir;
	u32 ir = 0, ir_read;
	int ret;

	if (pm_runtime_suspended(cdev->dev))
		return IRQ_NONE;

	ir = m_can_read(cdev, M_CAN_IR);
	m_can_coalescing_update(cdev, ir);
	if (!ir)
		return IRQ_NONE;
	/* The m_can controller signals its interrupt status as a level, but
	 * depending in the integration the CPU may interpret the signal as
	 * edge-triggered (for example with m_can_pci). For these
	 * edge-triggered integrations, we must observe that IR is 0 at least
	 * once to be sure that the next interrupt will generate an edge.
	 */
	while ((ir_read = m_can_read(cdev, M_CAN_IR)) != 0) {
		ir |= ir_read;

		/* ACK all irqs */
		m_can_write(cdev, M_CAN_IR, ir);

		if (!cdev->irq_edge_triggered)
			break;
	}

	m_can_coalescing_update(cdev, ir);
	if (!ir)
		return IRQ_NONE;

	if (cdev->ops->clear_interrupts)
		cdev->ops->clear_interrupts(cdev);

@@ -1695,6 +1707,14 @@ static int m_can_dev_setup(struct m_can_classdev *cdev)
		return -EINVAL;
	}

	/* Write the INIT bit, in case no hardware reset has happened before
	 * the probe (for example, it was observed that the Intel Elkhart Lake
	 * SoCs do not properly reset the CAN controllers on reboot)
	 */
	err = m_can_cccr_update_bits(cdev, CCCR_INIT, CCCR_INIT);
	if (err)
		return err;

	if (!cdev->is_peripheral)
		netif_napi_add(dev, &cdev->napi, m_can_poll);

@@ -1746,11 +1766,7 @@ static int m_can_dev_setup(struct m_can_classdev *cdev)
		return -EINVAL;
	}

	/* Forcing standby mode should be redundant, as the chip should be in
	 * standby after a reset. Write the INIT bit anyways, should the chip
	 * be configured by previous stage.
	 */
	return m_can_cccr_update_bits(cdev, CCCR_INIT, CCCR_INIT);
	return 0;
}

static void m_can_stop(struct net_device *dev)
+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ struct m_can_classdev {
	int pm_clock_support;
	int pm_wake_source;
	int is_peripheral;
	bool irq_edge_triggered;

	// Cached M_CAN_IE register content
	u32 active_interrupts;
+1 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
	mcan_class->pm_clock_support = 1;
	mcan_class->pm_wake_source = 0;
	mcan_class->can.clock.freq = id->driver_data;
	mcan_class->irq_edge_triggered = true;
	mcan_class->ops = &m_can_pci_ops;

	pci_set_drvdata(pci, mcan_class);
+4 −1
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@ static int platform_phy_connect(struct bgmac *bgmac)
static int bgmac_probe(struct platform_device *pdev)
{
	struct device_node *np = pdev->dev.of_node;
	struct device_node *phy_node;
	struct bgmac *bgmac;
	struct resource *regs;
	int ret;
@@ -236,7 +237,9 @@ static int bgmac_probe(struct platform_device *pdev)
	bgmac->cco_ctl_maskset = platform_bgmac_cco_ctl_maskset;
	bgmac->get_bus_clock = platform_bgmac_get_bus_clock;
	bgmac->cmn_maskset32 = platform_bgmac_cmn_maskset32;
	if (of_parse_phandle(np, "phy-handle", 0)) {
	phy_node = of_parse_phandle(np, "phy-handle", 0);
	if (phy_node) {
		of_node_put(phy_node);
		bgmac->phy_connect = platform_phy_connect;
	} else {
		bgmac->phy_connect = bgmac_phy_connect_direct;
+3 −2
Original line number Diff line number Diff line
@@ -346,8 +346,9 @@ static struct sk_buff *copy_gl_to_skb_pkt(const struct pkt_gl *gl,
	 * driver. Once driver synthesizes cpl_pass_accept_req the skb will go
	 * through the regular cpl_pass_accept_req processing in TOM.
	 */
	skb = alloc_skb(gl->tot_len + sizeof(struct cpl_pass_accept_req)
			- pktshift, GFP_ATOMIC);
	skb = alloc_skb(size_add(gl->tot_len,
				 sizeof(struct cpl_pass_accept_req)) -
			pktshift, GFP_ATOMIC);
	if (unlikely(!skb))
		return NULL;
	__skb_put(skb, gl->tot_len + sizeof(struct cpl_pass_accept_req)
Loading