linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the char-misc tree with the net-next tree
@ 2022-03-15  5:45 Stephen Rothwell
  2022-03-15  7:35 ` Greg KH
  2022-03-22  8:53 ` Geert Uytterhoeven
  0 siblings, 2 replies; 11+ messages in thread
From: Stephen Rothwell @ 2022-03-15  5:45 UTC (permalink / raw)
  To: Greg KH, Arnd Bergmann, David Miller, Networking
  Cc: Geert Uytterhoeven, Ioana Ciornei, Linux Kernel Mailing List,
	Linux Next Mailing List, Vinod Koul

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

Hi all,

Today's linux-next merge of the char-misc tree got a conflict in:

  drivers/phy/freescale/Kconfig

between commit:

  8f73b37cf3fb ("phy: add support for the Layerscape SerDes 28G")

from the net-next tree and commit:

  3d565bd6fbbb ("phy: freescale: i.MX8 PHYs should depend on ARCH_MXC && ARM64")

from the char-misc tree.

I fixed it up (I think, see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/phy/freescale/Kconfig
index 0e91cd99c36b,856cbec7057d..000000000000
--- a/drivers/phy/freescale/Kconfig
+++ b/drivers/phy/freescale/Kconfig
@@@ -23,12 -26,4 +26,14 @@@ config PHY_FSL_IMX8M_PCI
  	  Enable this to add support for the PCIE PHY as found on
  	  i.MX8M family of SOCs.
  
 +config PHY_FSL_LYNX_28G
 +	tristate "Freescale Layerscape Lynx 28G SerDes PHY support"
 +	depends on OF
 +	select GENERIC_PHY
 +	help
 +	  Enable this to add support for the Lynx SerDes 28G PHY as
 +	  found on NXP's Layerscape platforms such as LX2160A.
 +	  Used to change the protocol running on SerDes lanes at runtime.
 +	  Only useful for a restricted set of Ethernet protocols.
++
+ endif

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* linux-next: manual merge of the char-misc tree with the net-next tree
@ 2018-12-20  6:02 Stephen Rothwell
  2018-12-20  6:32 ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2018-12-20  6:02 UTC (permalink / raw)
  To: Greg KH, Arnd Bergmann, David Miller, Networking
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Dan Carpenter, YueHaibing

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Hi all,

Today's linux-next merge of the char-misc tree got a conflict in:

  drivers/ptp/ptp_clock.c

between commit:

  aea0a897af9e ("ptp: Fix pass zero to ERR_PTR() in ptp_clock_register")

from the net-next tree and commit:

  b9d93594c767 ("ptp: fix an IS_ERR() vs NULL check")

from the char-misc tree.

I fixed it up (I just used the latter version) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* linux-next: manual merge of the char-misc tree with the net-next tree
@ 2016-09-05  6:56 Stephen Rothwell
  2016-09-05 11:33 ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2016-09-05  6:56 UTC (permalink / raw)
  To: Greg KH, Arnd Bergmann, David Miller, Networking
  Cc: linux-next, linux-kernel, Stephen Hemminger, Vitaly Kuznetsov,
	K. Y. Srinivasan

Hi all,

Today's linux-next merge of the char-misc tree got a conflict in:

  include/linux/hyperv.h

between commit:

  30d1de08c87d ("hv_netvsc: make inline functions static")

from the net-next tree and commit:

  bb08d431a914 ("Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw()")

from the char-misc tree.

I fixed it up (the former moved the code modified by the latter, so the
below patch applies to the new location of the code) and can carry the
fix as necessary. This is now fixed as far as linux-next is concerned,
but any non trivial conflicts should be mentioned to your upstream
maintainer when your tree is submitted for merging.  You may also want
to consider cooperating with the maintainer of the conflicting tree to
minimise any particularly complex conflicts.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 5 Sep 2016 16:53:06 +1000
Subject: [PATCH] Drivers: hv: ring_buffer: merge fix up for "hv_netvsc: make
 inline functions static"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/hyperv/netvsc.c | 32 +++++++++++---------------------
 1 file changed, 11 insertions(+), 21 deletions(-)

diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 2a9ccc4d9e3c..026df6556068 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -42,31 +42,23 @@ static struct vmpacket_descriptor *
 get_next_pkt_raw(struct vmbus_channel *channel)
 {
 	struct hv_ring_buffer_info *ring_info = &channel->inbound;
-	u32 read_loc = ring_info->priv_read_index;
+	u32 priv_read_loc = ring_info->priv_read_index;
 	void *ring_buffer = hv_get_ring_buffer(ring_info);
-	struct vmpacket_descriptor *cur_desc;
-	u32 packetlen;
 	u32 dsize = ring_info->ring_datasize;
-	u32 delta = read_loc - ring_info->ring_buffer->read_index;
+	/*
+	 * delta is the difference between what is available to read and
+	 * what was already consumed in place. We commit read index after
+	 * the whole batch is processed.
+	 */
+	u32 delta = priv_read_loc >= ring_info->ring_buffer->read_index ?
+		priv_read_loc - ring_info->ring_buffer->read_index :
+		(dsize - ring_info->ring_buffer->read_index) + priv_read_loc;
 	u32 bytes_avail_toread = (hv_get_bytes_to_read(ring_info) - delta);
 
 	if (bytes_avail_toread < sizeof(struct vmpacket_descriptor))
 		return NULL;
 
-	if ((read_loc + sizeof(*cur_desc)) > dsize)
-		return NULL;
-
-	cur_desc = ring_buffer + read_loc;
-	packetlen = cur_desc->len8 << 3;
-
-	/*
-	 * If the packet under consideration is wrapping around,
-	 * return failure.
-	 */
-	if ((read_loc + packetlen + VMBUS_PKT_TRAILER) > (dsize - 1))
-		return NULL;
-
-	return cur_desc;
+	return ring_buffer + priv_read_loc;
 }
 
 /*
@@ -78,16 +70,14 @@ static void put_pkt_raw(struct vmbus_channel *channel,
 			struct vmpacket_descriptor *desc)
 {
 	struct hv_ring_buffer_info *ring_info = &channel->inbound;
-	u32 read_loc = ring_info->priv_read_index;
 	u32 packetlen = desc->len8 << 3;
 	u32 dsize = ring_info->ring_datasize;
 
-	BUG_ON((read_loc + packetlen + VMBUS_PKT_TRAILER) > dsize);
-
 	/*
 	 * Include the packet trailer.
 	 */
 	ring_info->priv_read_index += packetlen + VMBUS_PKT_TRAILER;
+	ring_info->priv_read_index %= dsize;
 }
 
 /*
-- 
2.8.1

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-03-22  8:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15  5:45 linux-next: manual merge of the char-misc tree with the net-next tree Stephen Rothwell
2022-03-15  7:35 ` Greg KH
2022-03-22  8:53 ` Geert Uytterhoeven
  -- strict thread matches above, loose matches on Subject: below --
2018-12-20  6:02 Stephen Rothwell
2018-12-20  6:32 ` Greg KH
2016-09-05  6:56 Stephen Rothwell
2016-09-05 11:33 ` Greg KH
2016-09-06  5:36   ` KY Srinivasan
2016-09-06 10:28     ` KY Srinivasan
     [not found]       ` <BLUPR0301MB209827200D789C51EC56DA41CCF90@BLUPR0301MB2098.namprd03.prod.outlook.com>
2016-09-07  6:47         ` Greg KH
     [not found]           ` <BY2PR0301MB2104C50A152139E94BC3E442CCF80@BY2PR0301MB2104.namprd03.prod.outlook.com>
2016-09-08 10:21             ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).