Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28619527 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from David Miller:

 1) Must perform TXQ teardown before unregistering interfaces in
    mac80211, from Toke Høiland-Jørgensen.

 2) Don't allow creating mac80211_hwsim with less than one channel, from
    Johannes Berg.

 3) Division by zero in cfg80211, fix from Johannes Berg.

 4) Fix endian issue in tipc, from Haiqing Bai.

 5) BPF sockmap use-after-free fixes from Daniel Borkmann.

 6) Spectre-v1 in mac80211_hwsim, from Jinbum Park.

 7) Missing rhashtable_walk_exit() in tipc, from Cong Wang.

 8) Revert kvzalloc() conversion of AF_PACKET, it breaks mmap() when
    kvzalloc() tries to use kmalloc() pages. From Eric Dumazet.

 9) Fix deadlock in hv_netvsc, from Dexuan Cui.

10) Do not restart timewait timer on RST, from Florian Westphal.

11) Fix double lwstate refcount grab in ipv6, from Alexey Kodanev.

12) Unsolicit report count handling is off-by-one, fix from Hangbin Liu.

13) Sleep-in-atomic in cadence driver, from Jia-Ju Bai.

14) Respect ttl-inherit in ip6 tunnel driver, from Hangbin Liu.

15) Use-after-free in act_ife, fix from Cong Wang.

16) Missing hold to meta module in act_ife, from Vlad Buslov.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (91 commits)
  net: phy: sfp: Handle unimplemented hwmon limits and alarms
  net: sched: action_ife: take reference to meta module
  act_ife: fix a potential use-after-free
  net/mlx5: Fix SQ offset in QPs with small RQ
  tipc: correct spelling errors for tipc_topsrv_queue_evt() comments
  tipc: correct spelling errors for struct tipc_bc_base's comment
  bnxt_en: Do not adjust max_cp_rings by the ones used by RDMA.
  bnxt_en: Clean up unused functions.
  bnxt_en: Fix firmware signaled resource change logic in open.
  sctp: not traverse asoc trans list if non-ipv6 trans exists for ipv6_flowlabel
  sctp: fix invalid reference to the index variable of the iterator
  net/ibm/emac: wrong emac_calc_base call was used by typo
  net: sched: null actions array pointer before releasing action
  vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition
  r8169: add support for NCube 8168 network card
  ip6_tunnel: respect ttl inherit for ip6tnl
  mac80211: shorten the IBSS debug messages
  mac80211: don't Tx a deauth frame if the AP forbade Tx
  mac80211: Fix station bandwidth setting after channel switch
  mac80211: fix a race between restart and CSA flows
  ...
parents 60c1f892 a33710bd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -19,6 +19,10 @@ Required properties:
- slaves		: Specifies number for slaves
- active_slave		: Specifies the slave to use for time stamping,
			  ethtool and SIOCGMIIPHY
- cpsw-phy-sel		: Specifies the phandle to the CPSW phy mode selection
			  device. See also cpsw-phy-sel.txt for it's binding.
			  Note that in legacy cases cpsw-phy-sel may be
			  a child device instead of a phandle.

Optional properties:
- ti,hwmods		: Must be "cpgmac0"
@@ -75,6 +79,7 @@ Examples:
		cpts_clock_mult = <0x80000000>;
		cpts_clock_shift = <29>;
		syscon = <&cm>;
		cpsw-phy-sel = <&phy_sel>;
		cpsw_emac0: slave@0 {
			phy_id = <&davinci_mdio>, <0>;
			phy-mode = "rgmii-txid";
@@ -103,6 +108,7 @@ Examples:
		cpts_clock_mult = <0x80000000>;
		cpts_clock_shift = <29>;
		syscon = <&cm>;
		cpsw-phy-sel = <&phy_sel>;
		cpsw_emac0: slave@0 {
			phy_id = <&davinci_mdio>, <0>;
			phy-mode = "rgmii-txid";
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ Required properties:
	      "renesas,ether-r8a7794"  if the device is a part of R8A7794 SoC.
	      "renesas,gether-r8a77980" if the device is a part of R8A77980 SoC.
	      "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC.
	      "renesas,ether-r7s9210" if the device is a part of R7S9210 SoC.
	      "renesas,rcar-gen1-ether" for a generic R-Car Gen1 device.
	      "renesas,rcar-gen2-ether" for a generic R-Car Gen2 or RZ/G1
	                                device.
+15 −7
Original line number Diff line number Diff line
@@ -5913,12 +5913,12 @@ unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp)
	return bp->hw_resc.max_cp_rings;
}

void bnxt_set_max_func_cp_rings(struct bnxt *bp, unsigned int max)
unsigned int bnxt_get_max_func_cp_rings_for_en(struct bnxt *bp)
{
	bp->hw_resc.max_cp_rings = max;
	return bp->hw_resc.max_cp_rings - bnxt_get_ulp_msix_num(bp);
}

unsigned int bnxt_get_max_func_irqs(struct bnxt *bp)
static unsigned int bnxt_get_max_func_irqs(struct bnxt *bp)
{
	struct bnxt_hw_resc *hw_resc = &bp->hw_resc;

@@ -6684,6 +6684,8 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
		hw_resc->resv_rx_rings = 0;
		hw_resc->resv_hw_ring_grps = 0;
		hw_resc->resv_vnics = 0;
		bp->tx_nr_rings = 0;
		bp->rx_nr_rings = 0;
	}
	return rc;
}
@@ -8629,7 +8631,8 @@ static void _bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx,

	*max_tx = hw_resc->max_tx_rings;
	*max_rx = hw_resc->max_rx_rings;
	*max_cp = min_t(int, hw_resc->max_irqs, hw_resc->max_cp_rings);
	*max_cp = min_t(int, bnxt_get_max_func_cp_rings_for_en(bp),
			hw_resc->max_irqs);
	*max_cp = min_t(int, *max_cp, hw_resc->max_stat_ctxs);
	max_ring_grps = hw_resc->max_hw_ring_grps;
	if (BNXT_CHIP_TYPE_NITRO_A0(bp) && BNXT_PF(bp)) {
@@ -8769,20 +8772,25 @@ static int bnxt_init_dflt_ring_mode(struct bnxt *bp)
	if (bp->tx_nr_rings)
		return 0;

	bnxt_ulp_irq_stop(bp);
	bnxt_clear_int_mode(bp);
	rc = bnxt_set_dflt_rings(bp, true);
	if (rc) {
		netdev_err(bp->dev, "Not enough rings available.\n");
		return rc;
		goto init_dflt_ring_err;
	}
	rc = bnxt_init_int_mode(bp);
	if (rc)
		return rc;
		goto init_dflt_ring_err;

	bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
	if (bnxt_rfs_supported(bp) && bnxt_rfs_capable(bp)) {
		bp->flags |= BNXT_FLAG_RFS;
		bp->dev->features |= NETIF_F_NTUPLE;
	}
	return 0;
init_dflt_ring_err:
	bnxt_ulp_irq_restart(bp, rc);
	return rc;
}

int bnxt_restore_pf_fw_resources(struct bnxt *bp)
+1 −2
Original line number Diff line number Diff line
@@ -1481,8 +1481,7 @@ int bnxt_hwrm_set_coal(struct bnxt *);
unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp);
void bnxt_set_max_func_stat_ctxs(struct bnxt *bp, unsigned int max);
unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp);
void bnxt_set_max_func_cp_rings(struct bnxt *bp, unsigned int max);
unsigned int bnxt_get_max_func_irqs(struct bnxt *bp);
unsigned int bnxt_get_max_func_cp_rings_for_en(struct bnxt *bp);
int bnxt_get_avail_msix(struct bnxt *bp, int num);
int bnxt_reserve_rings(struct bnxt *bp);
void bnxt_tx_disable(struct bnxt *bp);
+4 −3
Original line number Diff line number Diff line
@@ -451,7 +451,7 @@ static int bnxt_hwrm_func_vf_resc_cfg(struct bnxt *bp, int num_vfs)

	bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_RESOURCE_CFG, -1, -1);

	vf_cp_rings = hw_resc->max_cp_rings - bp->cp_nr_rings;
	vf_cp_rings = bnxt_get_max_func_cp_rings_for_en(bp) - bp->cp_nr_rings;
	vf_stat_ctx = hw_resc->max_stat_ctxs - bp->num_stat_ctxs;
	if (bp->flags & BNXT_FLAG_AGG_RINGS)
		vf_rx_rings = hw_resc->max_rx_rings - bp->rx_nr_rings * 2;
@@ -549,7 +549,8 @@ static int bnxt_hwrm_func_cfg(struct bnxt *bp, int num_vfs)
	max_stat_ctxs = hw_resc->max_stat_ctxs;

	/* Remaining rings are distributed equally amongs VF's for now */
	vf_cp_rings = (hw_resc->max_cp_rings - bp->cp_nr_rings) / num_vfs;
	vf_cp_rings = (bnxt_get_max_func_cp_rings_for_en(bp) -
		       bp->cp_nr_rings) / num_vfs;
	vf_stat_ctx = (max_stat_ctxs - bp->num_stat_ctxs) / num_vfs;
	if (bp->flags & BNXT_FLAG_AGG_RINGS)
		vf_rx_rings = (hw_resc->max_rx_rings - bp->rx_nr_rings * 2) /
@@ -643,7 +644,7 @@ static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs)
	 */
	vfs_supported = *num_vfs;

	avail_cp = hw_resc->max_cp_rings - bp->cp_nr_rings;
	avail_cp = bnxt_get_max_func_cp_rings_for_en(bp) - bp->cp_nr_rings;
	avail_stat = hw_resc->max_stat_ctxs - bp->num_stat_ctxs;
	avail_cp = min_t(int, avail_cp, avail_stat);

Loading