Commit c2c2ccfd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from Jakub Kicinski:
  Including fixes from bluetooth and wireless.

  Current release - new code bugs:

   - ptp: expose raw cycles only for clocks with free-running counter

   - bonding: fix null-deref in actor_port_prio setting

   - mdio: ERR_PTR-check regmap pointer returned by
     device_node_to_regmap()

   - eth: libie: depend on DEBUG_FS when building LIBIE_FWLOG

  Previous releases - regressions:

   - virtio_net: fix perf regression due to bad alignment of
     virtio_net_hdr_v1_hash

   - Revert "wifi: ath10k: avoid unnecessary wait for service ready
     message" caused regressions for QCA988x and QCA9984

   - Revert "wifi: ath12k: Fix missing station power save configuration"
     caused regressions for WCN7850

   - eth: bnxt_en: shutdown FW DMA in bnxt_shutdown(), fix memory
     corruptions after kexec

  Previous releases - always broken:

   - virtio-net: fix received packet length check for big packets

   - sctp: fix races in socket diag handling

   - wifi: add an hrtimer-based delayed work item to avoid low
     granularity of timers set relatively far in the future, and use it
     where it matters (e.g. when performing AP-scheduled channel switch)

   - eth: mlx5e:
       - correctly propagate error in case of module EEPROM read failure
       - fix HW-GRO on systems with PAGE_SIZE == 64kB

   - dsa: b53: fixes for tagging, link configuration / RMII, FDB,
     multicast

   - phy: lan8842: implement latest errata"

* tag 'net-6.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (63 commits)
  selftests/vsock: avoid false-positives when checking dmesg
  net: bridge: fix MST static key usage
  net: bridge: fix use-after-free due to MST port state bypass
  lan966x: Fix sleeping in atomic context
  bonding: fix NULL pointer dereference in actor_port_prio setting
  net: dsa: microchip: Fix reserved multicast address table programming
  net: wan: framer: pef2256: Switch to devm_mfd_add_devices()
  net: libwx: fix device bus LAN ID
  net/mlx5e: SHAMPO, Fix header formulas for higher MTUs and 64K pages
  net/mlx5e: SHAMPO, Fix skb size check for 64K pages
  net/mlx5e: SHAMPO, Fix header mapping for 64K pages
  net: ti: icssg-prueth: Fix fdb hash size configuration
  net/mlx5e: Fix return value in case of module EEPROM read error
  net: gro_cells: Reduce lock scope in gro_cell_poll
  libie: depend on DEBUG_FS when building LIBIE_FWLOG
  wifi: mac80211_hwsim: Limit destroy_on_close radio removal to netgroup
  netpoll: Fix deadlock in memory allocation under spinlock
  net: ethernet: ti: netcp: Standardize knav_dma_open_channel to return NULL on error
  virtio-net: fix received length check in big packets
  bnxt_en: Fix warning in bnxt_dl_reload_down()
  ...
parents dc77806c 3534e03e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4818,6 +4818,7 @@ F: drivers/net/dsa/b53/*
F:	drivers/net/dsa/bcm_sf2*
F:	include/linux/dsa/brcm.h
F:	include/linux/platform_data/b53.h
F:	net/dsa/tag_brcm.c
BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
M:	Florian Fainelli <florian.fainelli@broadcom.com>
+3 −1
Original line number Diff line number Diff line
@@ -625,8 +625,10 @@ static int rtlbt_parse_firmware_v2(struct hci_dev *hdev,
		len += entry->len;
	}

	if (!len)
	if (!len) {
		kvfree(ptr);
		return -EPERM;
	}

	*_buf = ptr;
	return len;
+13 −5
Original line number Diff line number Diff line
@@ -1904,13 +1904,13 @@ setup_instance(struct hfcsusb *hw, struct device *parent)
	mISDN_freebchannel(&hw->bch[1]);
	mISDN_freebchannel(&hw->bch[0]);
	mISDN_freedchannel(&hw->dch);
	kfree(hw);
	return err;
}

static int
hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
	int err;
	struct hfcsusb			*hw;
	struct usb_device		*dev = interface_to_usbdev(intf);
	struct usb_host_interface	*iface = intf->cur_altsetting;
@@ -2101,20 +2101,28 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
	if (!hw->ctrl_urb) {
		pr_warn("%s: No memory for control urb\n",
			driver_info->vend_name);
		kfree(hw);
		return -ENOMEM;
		err = -ENOMEM;
		goto err_free_hw;
	}

	pr_info("%s: %s: detected \"%s\" (%s, if=%d alt=%d)\n",
		hw->name, __func__, driver_info->vend_name,
		conf_str[small_match], ifnum, alt_used);

	if (setup_instance(hw, dev->dev.parent))
		return -EIO;
	if (setup_instance(hw, dev->dev.parent)) {
		err = -EIO;
		goto err_free_urb;
	}

	hw->intf = intf;
	usb_set_intfdata(hw->intf, hw);
	return 0;

err_free_urb:
	usb_free_urb(hw->ctrl_urb);
err_free_hw:
	kfree(hw);
	return err;
}

/* function called when an active device is removed */
+1 −8
Original line number Diff line number Diff line
@@ -225,13 +225,6 @@ static const struct bond_opt_value bond_ad_actor_sys_prio_tbl[] = {
	{ NULL,      -1,    0},
};

static const struct bond_opt_value bond_actor_port_prio_tbl[] = {
	{ "minval",  0,     BOND_VALFLAG_MIN},
	{ "maxval",  65535, BOND_VALFLAG_MAX},
	{ "default", 255,   BOND_VALFLAG_DEFAULT},
	{ NULL,      -1,    0},
};

static const struct bond_opt_value bond_ad_user_port_key_tbl[] = {
	{ "minval",  0,     BOND_VALFLAG_MIN | BOND_VALFLAG_DEFAULT},
	{ "maxval",  1023,  BOND_VALFLAG_MAX},
@@ -497,7 +490,7 @@ static const struct bond_option bond_opts[BOND_OPT_LAST] = {
		.id = BOND_OPT_ACTOR_PORT_PRIO,
		.name = "actor_port_prio",
		.unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_8023AD)),
		.values = bond_actor_port_prio_tbl,
		.flags = BOND_OPTFLAG_RAWVAL,
		.set = bond_option_actor_port_prio_set,
	},
	[BOND_OPT_AD_ACTOR_SYSTEM] = {
+29 −7
Original line number Diff line number Diff line
@@ -371,11 +371,11 @@ static void b53_set_forwarding(struct b53_device *dev, int enable)
		 * frames should be flooded or not.
		 */
		b53_read8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, &mgmt);
		mgmt |= B53_UC_FWD_EN | B53_MC_FWD_EN | B53_IPMC_FWD_EN;
		mgmt |= B53_UC_FWD_EN | B53_MC_FWD_EN | B53_IP_MC;
		b53_write8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, mgmt);
	} else {
		b53_read8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, &mgmt);
		mgmt |= B53_IP_MCAST_25;
		mgmt |= B53_IP_MC;
		b53_write8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, mgmt);
	}
}
@@ -1372,6 +1372,10 @@ static void b53_force_port_config(struct b53_device *dev, int port,
	else
		reg &= ~PORT_OVERRIDE_FULL_DUPLEX;

	reg &= ~(0x3 << GMII_PO_SPEED_S);
	if (is5301x(dev) || is58xx(dev))
		reg &= ~PORT_OVERRIDE_SPEED_2000M;

	switch (speed) {
	case 2000:
		reg |= PORT_OVERRIDE_SPEED_2000M;
@@ -1390,6 +1394,11 @@ static void b53_force_port_config(struct b53_device *dev, int port,
		return;
	}

	if (is5325(dev))
		reg &= ~PORT_OVERRIDE_LP_FLOW_25;
	else
		reg &= ~(PORT_OVERRIDE_RX_FLOW | PORT_OVERRIDE_TX_FLOW);

	if (rx_pause) {
		if (is5325(dev))
			reg |= PORT_OVERRIDE_LP_FLOW_25;
@@ -1593,8 +1602,11 @@ static void b53_phylink_mac_link_down(struct phylink_config *config,
	struct b53_device *dev = dp->ds->priv;
	int port = dp->index;

	if (mode == MLO_AN_PHY)
	if (mode == MLO_AN_PHY) {
		if (is63xx(dev) && in_range(port, B53_63XX_RGMII0, 4))
			b53_force_link(dev, port, false);
		return;
	}

	if (mode == MLO_AN_FIXED) {
		b53_force_link(dev, port, false);
@@ -1622,6 +1634,13 @@ static void b53_phylink_mac_link_up(struct phylink_config *config,
	if (mode == MLO_AN_PHY) {
		/* Re-negotiate EEE if it was enabled already */
		p->eee_enabled = b53_eee_init(ds, port, phydev);

		if (is63xx(dev) && in_range(port, B53_63XX_RGMII0, 4)) {
			b53_force_port_config(dev, port, speed, duplex,
					      tx_pause, rx_pause);
			b53_force_link(dev, port, true);
		}

		return;
	}

@@ -2018,7 +2037,7 @@ static int b53_arl_search_wait(struct b53_device *dev)
	do {
		b53_read8(dev, B53_ARLIO_PAGE, offset, &reg);
		if (!(reg & ARL_SRCH_STDN))
			return 0;
			return -ENOENT;

		if (reg & ARL_SRCH_VLID)
			return 0;
@@ -2068,13 +2087,16 @@ static int b53_fdb_copy(int port, const struct b53_arl_entry *ent,
int b53_fdb_dump(struct dsa_switch *ds, int port,
		 dsa_fdb_dump_cb_t *cb, void *data)
{
	unsigned int count = 0, results_per_hit = 1;
	struct b53_device *priv = ds->priv;
	struct b53_arl_entry results[2];
	unsigned int count = 0;
	u8 offset;
	int ret;
	u8 reg;

	if (priv->num_arl_bins > 2)
		results_per_hit = 2;

	mutex_lock(&priv->arl_mutex);

	if (is5325(priv) || is5365(priv))
@@ -2096,7 +2118,7 @@ int b53_fdb_dump(struct dsa_switch *ds, int port,
		if (ret)
			break;

		if (priv->num_arl_bins > 2) {
		if (results_per_hit == 2) {
			b53_arl_search_rd(priv, 1, &results[1]);
			ret = b53_fdb_copy(port, &results[1], cb, data);
			if (ret)
@@ -2106,7 +2128,7 @@ int b53_fdb_dump(struct dsa_switch *ds, int port,
				break;
		}

	} while (count++ < b53_max_arl_entries(priv) / 2);
	} while (count++ < b53_max_arl_entries(priv) / results_per_hit);

	mutex_unlock(&priv->arl_mutex);

Loading