Commit 601e6bcc authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from David Miller:
 "Several bug fixes, many are quick merge-window regression cures:

   - When NLM_F_EXCL is not set, allow same fib rule insertion. From
     Hangbin Liu.

   - Several cures in sja1105 DSA driver (while loop exit condition fix,
     return of negative u8, etc.) from Vladimir Oltean.

   - Handle tx/rx delays in realtek PHY driver properly, from Serge
     Semin.

   - Double free in cls_matchall, from Pieter Jansen van Vuuren.

   - Disable SIOCSHWTSTAMP in macvlan/vlan containers, from Hangbin Liu.

   - Endainness fixes in aqc111, from Oliver Neukum.

   - Handle errors in packet_init properly, from Haibing Yue.

   - Various W=1 warning fixes in kTLS, from Jakub Kicinski"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits)
  nfp: add missing kdoc
  net/tls: handle errors from padding_length()
  net/tls: remove set but not used variables
  docs/btf: fix the missing section marks
  nfp: bpf: fix static check error through tightening shift amount adjustment
  selftests: bpf: initialize bpf_object pointers where needed
  packet: Fix error path in packet_init
  net/tcp: use deferred jump label for TCP acked data hook
  net: aquantia: fix undefined devm_hwmon_device_register_with_info reference
  aqc111: fix double endianness swap on BE
  aqc111: fix writing to the phy on BE
  aqc111: fix endianness issue in aqc111_change_mtu
  vlan: disable SIOCSHWTSTAMP in container
  macvlan: disable SIOCSHWTSTAMP in container
  tipc: fix hanging clients using poll with EPOLLOUT flag
  tuntap: synchronize through tfiles array instead of tun->numqueues
  tuntap: fix dividing by zero in ebpf queue selection
  dwmac4_prog_mtl_tx_algorithms() missing write operation
  ptp_qoriq: fix NULL access if ptp dt node missing
  net/sched: avoid double free on matchall reoffload
  ...
parents 9b6c9e96 6c9f0544
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -578,6 +578,7 @@ For line_info, the line number and column number are defined as below:
    #define BPF_LINE_INFO_LINE_COL(line_col)        ((line_col) & 0x3ff)

3.4 BPF_{PROG,MAP}_GET_NEXT_ID
==============================

In kernel, every loaded program, map or btf has a unique id. The id won't
change during the lifetime of a program, map, or btf.
@@ -587,6 +588,7 @@ each command, to user space, for bpf program or maps, respectively, so an
inspection tool can inspect all programs and maps.

3.5 BPF_{PROG,MAP}_GET_FD_BY_ID
===============================

An introspection tool cannot use id to get details about program or maps.
A file descriptor needs to be obtained first for reference-counting purpose.
+4 −4
Original line number Diff line number Diff line
@@ -1235,7 +1235,7 @@ static void gswip_port_fast_age(struct dsa_switch *ds, int port)

		err = gswip_pce_table_entry_read(priv, &mac_bridge);
		if (err) {
			dev_err(priv->dev, "failed to read mac brigde: %d\n",
			dev_err(priv->dev, "failed to read mac bridge: %d\n",
				err);
			return;
		}
@@ -1252,7 +1252,7 @@ static void gswip_port_fast_age(struct dsa_switch *ds, int port)
		mac_bridge.valid = false;
		err = gswip_pce_table_entry_write(priv, &mac_bridge);
		if (err) {
			dev_err(priv->dev, "failed to write mac brigde: %d\n",
			dev_err(priv->dev, "failed to write mac bridge: %d\n",
				err);
			return;
		}
@@ -1328,7 +1328,7 @@ static int gswip_port_fdb(struct dsa_switch *ds, int port,

	err = gswip_pce_table_entry_write(priv, &mac_bridge);
	if (err)
		dev_err(priv->dev, "failed to write mac brigde: %d\n", err);
		dev_err(priv->dev, "failed to write mac bridge: %d\n", err);

	return err;
}
@@ -1360,7 +1360,7 @@ static int gswip_port_fdb_dump(struct dsa_switch *ds, int port,

		err = gswip_pce_table_entry_read(priv, &mac_bridge);
		if (err) {
			dev_err(priv->dev, "failed to write mac brigde: %d\n",
			dev_err(priv->dev, "failed to write mac bridge: %d\n",
				err);
			return err;
		}
+5 −1
Original line number Diff line number Diff line
@@ -1070,7 +1070,11 @@ static u8 sja1105_stp_state_get(struct sja1105_private *priv, int port)
		return BR_STATE_LEARNING;
	if (mac[port].ingress && mac[port].egress && mac[port].dyn_learn)
		return BR_STATE_FORWARDING;
	return -EINVAL;
	/* This is really an error condition if the MAC was in none of the STP
	 * states above. But treating the port as disabled does nothing, which
	 * is adequate, and it also resets the MAC to a known state later on.
	 */
	return BR_STATE_DISABLED;
}

/* For situations where we need to change a setting at runtime that is only
+6 −5
Original line number Diff line number Diff line
@@ -466,14 +466,15 @@ int sja1105_static_config_upload(struct sja1105_private *priv)
				"invalid, retrying...\n");
			continue;
		}
	} while (--retries && (status.crcchkl == 1 || status.crcchkg == 1 ||
		 status.configs == 0 || status.ids == 1));
		/* Success! */
		break;
	} while (--retries);

	if (!retries) {
		rc = -EIO;
		dev_err(dev, "Failed to upload config to device, giving up\n");
		goto out;
	} else if (retries != RETRIES - 1) {
	} else if (retries != RETRIES) {
		dev_info(dev, "Succeeded after %d tried\n", RETRIES - retries);
	}

@@ -483,7 +484,7 @@ out:
	return rc;
}

struct sja1105_regs sja1105et_regs = {
static struct sja1105_regs sja1105et_regs = {
	.device_id = 0x0,
	.prod_id = 0x100BC3,
	.status = 0x1,
@@ -508,7 +509,7 @@ struct sja1105_regs sja1105et_regs = {
	.rmii_ext_tx_clk = {0x100018, 0x10001F, 0x100026, 0x10002D, 0x100034},
};

struct sja1105_regs sja1105pqrs_regs = {
static struct sja1105_regs sja1105pqrs_regs = {
	.device_id = 0x0,
	.prod_id = 0x100BC3,
	.status = 0x1,
+5 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@

#include "aq_drvinfo.h"

#if IS_REACHABLE(CONFIG_HWMON)
static int aq_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
			 u32 attr, int channel, long *value)
{
@@ -123,3 +124,7 @@ int aq_drvinfo_init(struct net_device *ndev)

	return err;
}

#else
int aq_drvinfo_init(struct net_device *ndev) { return 0; }
#endif
Loading