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

  A few more fixes for the locking changes trickling in. Nothing too
  alarming, I suspect those will continue for another release. Other
  than that things are slowing down nicely.

  Current release - fix to a fix:

   - Bluetooth: hci_event: use key encryption size when its known

   - tools: ynl-gen: allow multi-attr without nested-attributes again

  Current release - regressions:

   - locking fixes:
      - lock lower level devices when updating features
      - eth: bnxt_en: bring back rtnl_lock() in the bnxt_open() path
      - devmem: fix panic when Netlink socket closes after module unload

  Current release - new code bugs:

   - eth: txgbe: fixes for FW communication on new AML devices

  Previous releases - always broken:

   - sched: flush gso_skb list too during ->change(), avoid potential
     null-deref on reconfig

   - wifi: mt76: disable NAPI on driver removal

   - hv_netvsc: fix error 'nvsp_rndis_pkt_complete error status: 2'"

* tag 'net-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (44 commits)
  net: devmem: fix kernel panic when netlink socket close after module unload
  tsnep: fix timestamping with a stacked DSA driver
  net/tls: fix kernel panic when alloc_page failed
  bnxt_en: bring back rtnl_lock() in the bnxt_open() path
  mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices
  wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request
  octeontx2-pf: Do not reallocate all ntuple filters
  wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
  wifi: mt76: disable napi on driver removal
  Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer()
  hv_netvsc: Remove rmsg_pgcnt
  hv_netvsc: Preserve contiguous PFN grouping in the page buffer array
  hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages
  Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges
  octeontx2-af: Fix CGX Receive counters
  net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
  net: libwx: Fix FW mailbox unknown command
  net: libwx: Fix FW mailbox reply timeout
  net: txgbe: Fix to calculate EEPROM checksum for AML devices
  octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy
  ...
parents 088d1324 0afc44d8
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2017,7 +2017,8 @@ attribute-sets:
    attributes:
      -
        name: act
        type: nest
        type: indexed-array
        sub-type: nest
        nested-attributes: tc-act-attrs
      -
        name: police
@@ -2250,7 +2251,8 @@ attribute-sets:
    attributes:
      -
        name: act
        type: nest
        type: indexed-array
        sub-type: nest
        nested-attributes: tc-act-attrs
      -
        name: police
@@ -2745,7 +2747,7 @@ attribute-sets:
        type: u16
        byte-order: big-endian
      -
        name: key-l2-tpv3-sid
        name: key-l2tpv3-sid
        type: u32
        byte-order: big-endian
      -
@@ -3504,7 +3506,7 @@ attribute-sets:
        name: rate64
        type: u64
      -
        name: prate4
        name: prate64
        type: u64
      -
        name: burst
+3 −5
Original line number Diff line number Diff line
@@ -811,11 +811,9 @@ Documentation/devicetree/bindings/ptp/timestamper.txt for more details.
3.2.4 Other caveats for MAC drivers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Stacked PHCs, especially DSA (but not only) - since that doesn't require any
modification to MAC drivers, so it is more difficult to ensure correctness of
all possible code paths - is that they uncover bugs which were impossible to
trigger before the existence of stacked PTP clocks.  One example has to do with
this line of code, already presented earlier::
The use of stacked PHCs may uncover MAC driver bugs which were impossible to
trigger without them. One example has to do with this line of code, already
presented earlier::

      skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;

+3 −62
Original line number Diff line number Diff line
@@ -1077,68 +1077,10 @@ int vmbus_sendpacket(struct vmbus_channel *channel, void *buffer,
EXPORT_SYMBOL(vmbus_sendpacket);

/*
 * vmbus_sendpacket_pagebuffer - Send a range of single-page buffer
 * packets using a GPADL Direct packet type. This interface allows you
 * to control notifying the host. This will be useful for sending
 * batched data. Also the sender can control the send flags
 * explicitly.
 */
int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
				struct hv_page_buffer pagebuffers[],
				u32 pagecount, void *buffer, u32 bufferlen,
				u64 requestid)
{
	int i;
	struct vmbus_channel_packet_page_buffer desc;
	u32 descsize;
	u32 packetlen;
	u32 packetlen_aligned;
	struct kvec bufferlist[3];
	u64 aligned_data = 0;

	if (pagecount > MAX_PAGE_BUFFER_COUNT)
		return -EINVAL;

	/*
	 * Adjust the size down since vmbus_channel_packet_page_buffer is the
	 * largest size we support
	 */
	descsize = sizeof(struct vmbus_channel_packet_page_buffer) -
			  ((MAX_PAGE_BUFFER_COUNT - pagecount) *
			  sizeof(struct hv_page_buffer));
	packetlen = descsize + bufferlen;
	packetlen_aligned = ALIGN(packetlen, sizeof(u64));

	/* Setup the descriptor */
	desc.type = VM_PKT_DATA_USING_GPA_DIRECT;
	desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
	desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */
	desc.length8 = (u16)(packetlen_aligned >> 3);
	desc.transactionid = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
	desc.reserved = 0;
	desc.rangecount = pagecount;

	for (i = 0; i < pagecount; i++) {
		desc.range[i].len = pagebuffers[i].len;
		desc.range[i].offset = pagebuffers[i].offset;
		desc.range[i].pfn	 = pagebuffers[i].pfn;
	}

	bufferlist[0].iov_base = &desc;
	bufferlist[0].iov_len = descsize;
	bufferlist[1].iov_base = buffer;
	bufferlist[1].iov_len = bufferlen;
	bufferlist[2].iov_base = &aligned_data;
	bufferlist[2].iov_len = (packetlen_aligned - packetlen);

	return hv_ringbuffer_write(channel, bufferlist, 3, requestid, NULL);
}
EXPORT_SYMBOL_GPL(vmbus_sendpacket_pagebuffer);

/*
 * vmbus_sendpacket_multipagebuffer - Send a multi-page buffer packet
 * vmbus_sendpacket_mpb_desc - Send one or more multi-page buffer packets
 * using a GPADL Direct packet type.
 * The buffer includes the vmbus descriptor.
 * The desc argument must include space for the VMBus descriptor. The
 * rangecount field must already be set.
 */
int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
			      struct vmbus_packet_mpb_array *desc,
@@ -1160,7 +1102,6 @@ int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
	desc->length8 = (u16)(packetlen_aligned >> 3);
	desc->transactionid = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
	desc->reserved = 0;
	desc->rangecount = 1;

	bufferlist[0].iov_base = desc;
	bufferlist[0].iov_len = desc_size;
+33 −0
Original line number Diff line number Diff line
@@ -326,6 +326,26 @@ static void b53_get_vlan_entry(struct b53_device *dev, u16 vid,
	}
}

static void b53_set_eap_mode(struct b53_device *dev, int port, int mode)
{
	u64 eap_conf;

	if (is5325(dev) || is5365(dev) || dev->chip_id == BCM5389_DEVICE_ID)
		return;

	b53_read64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), &eap_conf);

	if (is63xx(dev)) {
		eap_conf &= ~EAP_MODE_MASK_63XX;
		eap_conf |= (u64)mode << EAP_MODE_SHIFT_63XX;
	} else {
		eap_conf &= ~EAP_MODE_MASK;
		eap_conf |= (u64)mode << EAP_MODE_SHIFT;
	}

	b53_write64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), eap_conf);
}

static void b53_set_forwarding(struct b53_device *dev, int enable)
{
	u8 mgmt;
@@ -586,6 +606,13 @@ int b53_setup_port(struct dsa_switch *ds, int port)
	b53_port_set_mcast_flood(dev, port, true);
	b53_port_set_learning(dev, port, false);

	/* Force all traffic to go to the CPU port to prevent the ASIC from
	 * trying to forward to bridged ports on matching FDB entries, then
	 * dropping frames because it isn't allowed to forward there.
	 */
	if (dsa_is_user_port(ds, port))
		b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);

	return 0;
}
EXPORT_SYMBOL(b53_setup_port);
@@ -2042,6 +2069,9 @@ int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge,
		pvlan |= BIT(i);
	}

	/* Disable redirection of unknown SA to the CPU port */
	b53_set_eap_mode(dev, port, EAP_MODE_BASIC);

	/* Configure the local port VLAN control membership to include
	 * remote ports and update the local port bitmask
	 */
@@ -2077,6 +2107,9 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
			pvlan &= ~BIT(i);
	}

	/* Enable redirection of unknown SA to the CPU port */
	b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);

	b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan);
	dev->ports[port].vlan_ctl_mask = pvlan;

+14 −0
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@
/* Jumbo Frame Registers */
#define B53_JUMBO_PAGE			0x40

/* EAP Registers */
#define B53_EAP_PAGE			0x42

/* EEE Control Registers Page */
#define B53_EEE_PAGE			0x92

@@ -480,6 +483,17 @@
#define   JMS_MIN_SIZE			1518
#define   JMS_MAX_SIZE			9724

/*************************************************************************
 * EAP Page Registers
 *************************************************************************/
#define B53_PORT_EAP_CONF(i)		(0x20 + 8 * (i))
#define  EAP_MODE_SHIFT			51
#define  EAP_MODE_SHIFT_63XX		50
#define  EAP_MODE_MASK			(0x3ull << EAP_MODE_SHIFT)
#define  EAP_MODE_MASK_63XX		(0x3ull << EAP_MODE_SHIFT_63XX)
#define  EAP_MODE_BASIC			0
#define  EAP_MODE_SIMPLIFIED		3

/*************************************************************************
 * EEE Configuration Page Registers
 *************************************************************************/
Loading