mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2026-09-25 14:56 Mark Brown
  0 siblings, 0 replies; 50+ messages in thread
From: Mark Brown @ 2026-09-25 14:56 UTC (permalink / raw)
  To: Greg KH
  Cc: Greg Kroah-Hartman, Linux Kernel Mailing List,
	Linux Next Mailing List, Viken Dadhaniya

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

Hi all,

Today's linux-next merge of the tty tree got conflicts in:

  include/linux/soc/qcom/geni-se.h
  drivers/tty/serial/qcom_geni_serial.c

between commits:

  1cd9b1be5a9c5 ("soc: qcom: geni-se: Correct QUP Core ICC vote constants")
  63ef71d1474b5 ("tty: serial: qcom_geni_serial: Keep console RX functional after deep idle")

from the tty.current tree and commits:

  b815e9b19ea5c ("soc: qcom: geni-se: Correct QUP Core ICC vote constants")
  d147a15be6840 ("tty: serial: qcom_geni_serial: Keep console RX functional after deep idle")

from the tty tree.

I fixed it up (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.

diff --combined drivers/tty/serial/qcom_geni_serial.c
index a851b8f0ef047,3502a3b6675e8..0000000000000
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@@ -20,7 -20,6 +20,6 @@@
  #include <linux/module.h>
  #include <linux/of.h>
  #include <linux/panic_notifier.h>
- #include <linux/pm_domain.h>
  #include <linux/pm_opp.h>
  #include <linux/platform_device.h>
  #include <linux/pm_runtime.h>
@@@ -171,6 -170,7 +170,6 @@@ static void qcom_geni_serial_cancel_tx_
  static int qcom_geni_serial_port_setup(struct uart_port *uport);
  static void qcom_geni_serial_start_tx_fifo(struct uart_port *uport);
  static void qcom_geni_serial_resume_tx(struct uart_port *uport);
 -static void qcom_geni_serial_poll_rx_fifo_locked(struct uart_port *uport);
  
  static inline struct qcom_geni_serial_port *to_dev_port(struct uart_port *uport)
  {
@@@ -288,6 -288,10 +287,10 @@@ static struct qcom_geni_serial_port *ge
  	} else {
  		int max_alias_num = of_alias_get_highest_id("serial");
  
+ 		port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL);
+ 		if (!port)
+ 			return ERR_PTR(-ENOMEM);
+ 
  		if (line < 0 || line >= nr_ports)
  			line = ida_alloc_range(&port_ida, max_alias_num + 1,
  					       nr_ports - 1, GFP_KERNEL);
@@@ -298,10 -302,6 +301,6 @@@
  		if (line < 0)
  			return ERR_PTR(-ENXIO);
  
- 		port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL);
- 		if (!port)
- 			return ERR_PTR(-ENOMEM);
- 
  		port->uport.iotype = UPIO_MEM;
  		port->uport.ops = &qcom_geni_uart_pops;
  		port->uport.flags = UPF_BOOT_AUTOCONF;
@@@ -466,102 -466,6 +465,102 @@@ static int qcom_geni_serial_poll_init(s
  #endif
  
  #ifdef CONFIG_SERIAL_QCOM_GENI_CONSOLE
 +static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
 +{
 +	u32 i;
 +	unsigned char buf[sizeof(u32)];
 +	struct tty_port *tport;
 +	struct qcom_geni_serial_port *port = to_dev_port(uport);
 +
 +	tport = &uport->state->port;
 +	for (i = 0; i < bytes; ) {
 +		int c;
 +		int chunk = min_t(int, bytes - i, BYTES_PER_FIFO_WORD);
 +
 +		ioread32_rep(uport->membase + SE_GENI_RX_FIFOn, buf, 1);
 +		i += chunk;
 +		if (drop)
 +			continue;
 +
 +		for (c = 0; c < chunk; c++) {
 +			int sysrq;
 +
 +			uport->icount.rx++;
 +			if (port->brk && buf[c] == 0) {
 +				port->brk = false;
 +				if (uart_handle_break(uport))
 +					continue;
 +			}
 +
 +			sysrq = uart_prepare_sysrq_char(uport, buf[c]);
 +
 +			if (!sysrq)
 +				tty_insert_flip_char(tport, buf[c], TTY_NORMAL);
 +		}
 +	}
 +	if (!drop)
 +		tty_flip_buffer_push(tport);
 +}
 +#else
 +static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
 +{
 +
 +}
 +#endif
 +
 +static void qcom_geni_serial_handle_rx_fifo(struct uart_port *uport, bool drop)
 +{
 +	u32 status;
 +	u32 word_cnt;
 +	u32 last_word_byte_cnt;
 +	u32 last_word_partial;
 +	u32 total_bytes;
 +
 +	status = readl(uport->membase +	SE_GENI_RX_FIFO_STATUS);
 +	word_cnt = status & RX_FIFO_WC_MSK;
 +	last_word_partial = status & RX_LAST;
 +	last_word_byte_cnt = (status & RX_LAST_BYTE_VALID_MSK) >>
 +						RX_LAST_BYTE_VALID_SHFT;
 +
 +	if (!word_cnt)
 +		return;
 +	total_bytes = BYTES_PER_FIFO_WORD * (word_cnt - 1);
 +	if (last_word_partial && last_word_byte_cnt)
 +		total_bytes += last_word_byte_cnt;
 +	else
 +		total_bytes += BYTES_PER_FIFO_WORD;
 +	handle_rx_console(uport, total_bytes, drop);
 +}
 +
 +#ifdef CONFIG_SERIAL_QCOM_GENI_CONSOLE
 +/* Caller holds the UART port lock. */
 +static void qcom_geni_serial_poll_rx_fifo_locked(struct uart_port *uport)
 +{
 +	struct qcom_geni_serial_port *port = to_dev_port(uport);
 +	struct tty_port *tport = &uport->state->port;
 +	u32 s_irq_status;
 +	bool drop_rx = false;
 +
 +	s_irq_status = readl(uport->membase + SE_GENI_S_IRQ_STATUS);
 +	writel(s_irq_status, uport->membase + SE_GENI_S_IRQ_CLEAR);
 +
 +	if (s_irq_status & S_RX_FIFO_WR_ERR_EN) {
 +		uport->icount.overrun++;
 +		tty_insert_flip_char(tport, 0, TTY_OVERRUN);
 +	}
 +
 +	if (s_irq_status & (S_GP_IRQ_0_EN | S_GP_IRQ_1_EN)) {
 +		if (s_irq_status & S_GP_IRQ_0_EN)
 +			uport->icount.parity++;
 +		drop_rx = true;
 +	} else if (s_irq_status & (S_GP_IRQ_2_EN | S_GP_IRQ_3_EN)) {
 +		uport->icount.brk++;
 +		port->brk = true;
 +	}
 +
 +	qcom_geni_serial_handle_rx_fifo(uport, drop_rx);
 +}
 +
  static void qcom_geni_serial_drain_fifo(struct uart_port *uport)
  {
  	struct qcom_geni_serial_port *port = to_dev_port(uport);
@@@ -771,6 -675,47 +770,6 @@@ static void qcom_geni_serial_console_de
  #endif
  }
  
 -static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
 -{
 -	u32 i;
 -	unsigned char buf[sizeof(u32)];
 -	struct tty_port *tport;
 -	struct qcom_geni_serial_port *port = to_dev_port(uport);
 -
 -	tport = &uport->state->port;
 -	for (i = 0; i < bytes; ) {
 -		int c;
 -		int chunk = min_t(int, bytes - i, BYTES_PER_FIFO_WORD);
 -
 -		ioread32_rep(uport->membase + SE_GENI_RX_FIFOn, buf, 1);
 -		i += chunk;
 -		if (drop)
 -			continue;
 -
 -		for (c = 0; c < chunk; c++) {
 -			int sysrq;
 -
 -			uport->icount.rx++;
 -			if (port->brk && buf[c] == 0) {
 -				port->brk = false;
 -				if (uart_handle_break(uport))
 -					continue;
 -			}
 -
 -			sysrq = uart_prepare_sysrq_char(uport, buf[c]);
 -
 -			if (!sysrq)
 -				tty_insert_flip_char(tport, buf[c], TTY_NORMAL);
 -		}
 -	}
 -	if (!drop)
 -		tty_flip_buffer_push(tport);
 -}
 -#else
 -static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
 -{
 -
 -}
  #endif /* CONFIG_SERIAL_QCOM_GENI_CONSOLE */
  
  static void handle_rx_uart(struct uart_port *uport, u32 bytes)
@@@ -944,6 -889,58 +943,6 @@@ static void qcom_geni_serial_cancel_tx_
  	port->tx_queued = 0;
  }
  
 -static void qcom_geni_serial_handle_rx_fifo(struct uart_port *uport, bool drop)
 -{
 -	u32 status;
 -	u32 word_cnt;
 -	u32 last_word_byte_cnt;
 -	u32 last_word_partial;
 -	u32 total_bytes;
 -
 -	status = readl(uport->membase +	SE_GENI_RX_FIFO_STATUS);
 -	word_cnt = status & RX_FIFO_WC_MSK;
 -	last_word_partial = status & RX_LAST;
 -	last_word_byte_cnt = (status & RX_LAST_BYTE_VALID_MSK) >>
 -						RX_LAST_BYTE_VALID_SHFT;
 -
 -	if (!word_cnt)
 -		return;
 -	total_bytes = BYTES_PER_FIFO_WORD * (word_cnt - 1);
 -	if (last_word_partial && last_word_byte_cnt)
 -		total_bytes += last_word_byte_cnt;
 -	else
 -		total_bytes += BYTES_PER_FIFO_WORD;
 -	handle_rx_console(uport, total_bytes, drop);
 -}
 -
 -/* Caller holds the UART port lock. */
 -static void qcom_geni_serial_poll_rx_fifo_locked(struct uart_port *uport)
 -{
 -	struct qcom_geni_serial_port *port = to_dev_port(uport);
 -	struct tty_port *tport = &uport->state->port;
 -	u32 s_irq_status;
 -	bool drop_rx = false;
 -
 -	s_irq_status = readl(uport->membase + SE_GENI_S_IRQ_STATUS);
 -	writel(s_irq_status, uport->membase + SE_GENI_S_IRQ_CLEAR);
 -
 -	if (s_irq_status & S_RX_FIFO_WR_ERR_EN) {
 -		uport->icount.overrun++;
 -		tty_insert_flip_char(tport, 0, TTY_OVERRUN);
 -	}
 -
 -	if (s_irq_status & (S_GP_IRQ_0_EN | S_GP_IRQ_1_EN)) {
 -		if (s_irq_status & S_GP_IRQ_0_EN)
 -			uport->icount.parity++;
 -		drop_rx = true;
 -	} else if (s_irq_status & (S_GP_IRQ_2_EN | S_GP_IRQ_3_EN)) {
 -		uport->icount.brk++;
 -		port->brk = true;
 -	}
 -
 -	qcom_geni_serial_handle_rx_fifo(uport, drop_rx);
 -}
 -
  static void qcom_geni_serial_stop_rx_fifo(struct uart_port *uport)
  {
  	u32 irq_en;
@@@ -1293,7 -1290,6 +1292,6 @@@ out_unlock
  static int setup_fifos(struct qcom_geni_serial_port *port)
  {
  	struct uart_port *uport;
- 	u32 old_rx_fifo_depth = port->rx_fifo_depth;
  
  	uport = &port->uport;
  	port->tx_fifo_depth = geni_se_get_tx_fifo_depth(&port->se);
@@@ -1302,19 -1298,6 +1300,6 @@@
  	uport->fifosize =
  		(port->tx_fifo_depth * port->tx_fifo_width) / BITS_PER_BYTE;
  
- 	if (port->rx_buf && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) {
- 		/*
- 		 * Use krealloc rather than krealloc_array because rx_buf is
- 		 * accessed as 1 byte entries as well as 4 byte entries so it's
- 		 * not necessarily an array.
- 		 */
- 		port->rx_buf = devm_krealloc(uport->dev, port->rx_buf,
- 					     port->rx_fifo_depth * sizeof(u32),
- 					     GFP_KERNEL);
- 		if (!port->rx_buf)
- 			return -ENOMEM;
- 	}
- 
  	return 0;
  }
  
@@@ -1484,7 -1467,7 +1469,7 @@@ static int geni_serial_set_rate(struct 
  	 * Bump up BW vote on CPU and CORE path as driver supports FIFO mode
  	 * only.
  	 */
- 	avg_bw_core = baud > 115200 ? CORE_2X_50_MHZ : CORE_2X_19_2_MHZ;
+ 	avg_bw_core = (baud > 115200) ? CORE_2X_50_MHZ : CORE_2X_19_2_MHZ;
  	port->se.icc_paths[GENI_TO_CORE].avg_bw = Bps_to_icc(avg_bw_core);
  	port->se.icc_paths[CPU_TO_GENI].avg_bw = Bps_to_icc(baud);
  	geni_icc_set_bw(&port->se);
@@@ -1626,37 -1609,16 +1611,37 @@@ static int qcom_geni_console_setup(stru
  	if (unlikely(!uport->membase))
  		return -ENXIO;
  
 +	ret = pm_runtime_resume_and_get(uport->dev);
 +	if (ret < 0)
 +		return ret;
 +
  	if (!port->setup) {
  		ret = qcom_geni_serial_port_setup(uport);
 -		if (ret)
 +		if (ret) {
 +			pm_runtime_put_sync(uport->dev);
  			return ret;
 +		}
  	}
  
  	if (options)
  		uart_parse_options(options, &baud, &parity, &bits, &flow);
  
 -	return uart_set_options(uport, co, baud, parity, bits, flow);
 +	ret = uart_set_options(uport, co, baud, parity, bits, flow);
 +	if (ret)
 +		pm_runtime_put_sync(uport->dev);
 +
 +	return ret;
 +}
 +
 +static int qcom_geni_console_exit(struct console *co)
 +{
 +	struct qcom_geni_serial_port *port;
 +
 +	port = get_port_from_line(co->index, true, NULL);
 +	if (IS_ERR(port))
 +		return PTR_ERR(port);
 +
 +	return pm_runtime_put_sync(port->uport.dev);
  }
  
  static void qcom_geni_serial_earlycon_write(struct console *con,
@@@ -1773,7 -1735,6 +1758,7 @@@ static struct console cons_ops = 
  	.device_unlock = qcom_geni_serial_console_device_unlock,
  	.device = uart_console_device,
  	.setup = qcom_geni_console_setup,
 +	.exit = qcom_geni_console_exit,
  	.flags = CON_PRINTBUFFER | CON_NBCON,
  	.index = -1,
  	.data = &qcom_geni_console_driver,
@@@ -1920,7 -1881,7 +1905,7 @@@ static int qcom_geni_serial_probe(struc
  
  	ret = port->dev_data->resources_init(&port->se);
  	if (ret)
- 		return ret;
+ 		goto error;
  
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  	if (!res) {
@@@ -1970,8 -1931,13 +1955,13 @@@
  	uport->irq = irq;
  	uport->has_sysrq = IS_ENABLED(CONFIG_SERIAL_QCOM_GENI_CONSOLE);
  
- 	if (!data->console)
+ 	if (!data->console) {
  		port->wakeup_irq = platform_get_irq_optional(pdev, 1);
+ 		if (port->wakeup_irq < 0 && port->wakeup_irq != -ENXIO) {
+ 			ret = port->wakeup_irq;
+ 			goto error;
+ 		}
+ 	}
  
  	if (of_property_read_bool(pdev->dev.of_node, "rx-tx-swap"))
  		port->rx_tx_swap = true;
@@@ -2002,7 -1968,6 +1992,6 @@@
  						port->wakeup_irq);
  		if (ret) {
  			device_init_wakeup(&pdev->dev, false);
- 			ida_free(&port_ida, uport->line);
  			goto error;
  		}
  	}
@@@ -2026,12 -1991,13 +2015,13 @@@
  	return 0;
  
  error:
+ 	if (!data->console)
+ 		ida_free(&port_ida, uport->line);
  	if (port->rx_dma_addr) {
  		dma_unmap_single(pdev->dev.parent, port->rx_dma_addr,
  				 DMA_RX_BUF_SIZE, DMA_FROM_DEVICE);
  		port->rx_dma_addr = 0;
  	}
- 	dev_pm_domain_detach_list(port->se.pd_list);
  	return ret;
  }
  
@@@ -2047,7 -2013,8 +2037,8 @@@ static void qcom_geni_serial_remove(str
  	irq_work_sync(&port->tx_kick);
  	dev_pm_clear_wake_irq(&pdev->dev);
  	device_init_wakeup(&pdev->dev, false);
- 	ida_free(&port_ida, uport->line);
+ 	if (!port->dev_data->console)
+ 		ida_free(&port_ida, uport->line);
  	uart_remove_one_port(drv, &port->uport);
  
  	if (port->rx_dma_addr) {
@@@ -2055,8 -2022,6 +2046,6 @@@
  				 DMA_RX_BUF_SIZE, DMA_FROM_DEVICE);
  		port->rx_dma_addr = 0;
  	}
- 
- 	dev_pm_domain_detach_list(port->se.pd_list);
  }
  
  static int __maybe_unused qcom_geni_serial_runtime_suspend(struct device *dev)
@@@ -2122,11 -2087,9 +2111,11 @@@ static int qcom_geni_serial_resume(stru
  	struct uart_port *uport = &port->uport;
  	struct qcom_geni_private_data *private_data = uport->private_data;
  
 -	ret = pm_runtime_force_resume(dev);
 -	if (ret)
 -		return ret;
 +	if (console_suspend_enabled || !uart_console(uport)) {
 +		ret = pm_runtime_force_resume(dev);
 +		if (ret)
 +			return ret;
 +	}
  
  	ret = uart_resume_port(private_data->drv, uport);
  	if (uart_console(uport)) {
diff --combined include/linux/soc/qcom/geni-se.h
index 5f18d281e6a42,2243005f5e2ee..0000000000000
--- a/include/linux/soc/qcom/geni-se.h
+++ b/include/linux/soc/qcom/geni-se.h
@@@ -347,12 -347,18 +347,18 @@@ struct geni_se 
  #define QUP_SE_VERSION_2_5                  0x20050000
  
  /*
-  * QUP Core 2X clock votes used by GENI clients through the "qup-core" ICC
-  * path. Values are in Bps and must be converted with Bps_to_icc() before
-  * setting avg_bw.
+  * ICC bandwidth values in Bps for the GENI_TO_CORE ("qup-core") path.
+  * Convert them with Bps_to_icc() before setting avg_bw. The QUP ICC provider
+  * maps each threshold to the Core 2X rate named by the macro suffix.
+  *
+  * These values are core clock votes, not GENI transfer bandwidths.
   */
  #define CORE_2X_19_2_MHZ		9600000
  #define CORE_2X_50_MHZ			25000000
+ #define CORE_2X_100_MHZ			50000000
+ #define CORE_2X_150_MHZ			75000000
+ #define CORE_2X_200_MHZ			100000000
+ #define CORE_2X_236_MHZ			118000000
  
  #define GENI_DEFAULT_BW			Bps_to_icc(1000)
  

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2025-11-27  1:09 Stephen Rothwell
  2025-11-27  6:52 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2025-11-27  1:09 UTC (permalink / raw)
  To: Greg KH
  Cc: Greg Kroah-Hartman, Ilpo Järvinen, Jiri Slaby (SUSE),
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  drivers/tty/serial/8250/8250_rsa.c

between commit:

  2bf95a9bcb50 ("serial: 8250: Fix 8250_rsa symbol loop")

from the tty.current tree and commit:

  37d55c92e9db ("serial: drop SERIAL_8250_DEPRECATED_OPTIONS")

from the tty tree.

I fixed it up (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/tty/serial/8250/8250_rsa.c
index 1f182f165525,3b9c00515407..000000000000
--- a/drivers/tty/serial/8250/8250_rsa.c
+++ b/drivers/tty/serial/8250/8250_rsa.c
@@@ -209,27 -200,4 +209,3 @@@ void rsa_reset(struct uart_8250_port *u
  
  	serial_out(up, UART_RSA_FRR, 0);
  }
- 
- #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS
- #ifndef MODULE
- /*
-  * Keep the old "8250" name working as well for the module options so we don't
-  * break people. We need to keep the names identical and the convenient macros
-  * will happily refuse to let us do that by failing the build with redefinition
-  * errors of global variables.  So we stick them inside a dummy function to
-  * avoid those conflicts.  The options still get parsed, and the redefined
-  * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive.
-  *
-  * This is hacky. I'm sorry.
-  */
- static void __used rsa8250_options(void)
- {
- #undef MODULE_PARAM_PREFIX
- #define MODULE_PARAM_PREFIX "8250_core."
- 
- 	__module_param_call(MODULE_PARAM_PREFIX, probe_rsa,
- 		&param_array_ops, .arr = &__param_arr_probe_rsa,
- 		0444, -1, 0);
- }
- #endif
- #endif
 -EXPORT_SYMBOL_FOR_MODULES(rsa_reset, "8250_base");

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2024-07-09  5:37 Stephen Rothwell
  2024-07-09 11:04 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2024-07-09  5:37 UTC (permalink / raw)
  To: Greg KH
  Cc: Greg Kroah-Hartman, Linux Kernel Mailing List,
	Linux Next Mailing List, Rasmus Villemoes, Stefan Eichenberger

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

Hi all,

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

  drivers/tty/serial/imx.c

between commit:

  9706fc87b4cf ("serial: imx: only set receiver level if it is zero")

from the tty.current tree and commit:

  3093f180bc6e ("serial: imx: stop casting struct uart_port to struct imx_port")

from the tty tree.

I fixed it up (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/tty/serial/imx.c
index ff32cd2d2863,d96f0524f7fb..000000000000
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@@ -1549,10 -1553,9 +1554,10 @@@ static int imx_uart_startup(struct uart
  
  static void imx_uart_shutdown(struct uart_port *port)
  {
- 	struct imx_port *sport = (struct imx_port *)port;
+ 	struct imx_port *sport = to_imx_port(port);
  	unsigned long flags;
  	u32 ucr1, ucr2, ucr4, uts;
 +	int loops;
  
  	if (sport->dma_is_enabled) {
  		dmaengine_terminate_sync(sport->dma_chan_tx);
@@@ -1984,8 -1937,8 +1989,8 @@@ static void imx_uart_poll_put_char(stru
  static int imx_uart_rs485_config(struct uart_port *port, struct ktermios *termios,
  				 struct serial_rs485 *rs485conf)
  {
- 	struct imx_port *sport = (struct imx_port *)port;
+ 	struct imx_port *sport = to_imx_port(port);
 -	u32 ucr2;
 +	u32 ucr2, ufcr;
  
  	if (rs485conf->flags & SER_RS485_ENABLED) {
  		/* Enable receiver if low-active RTS signal is requested */

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2024-04-19  4:19 Stephen Rothwell
  2024-04-19  6:09 ` Greg KH
  2024-04-23 11:24 ` Greg KH
  0 siblings, 2 replies; 50+ messages in thread
From: Stephen Rothwell @ 2024-04-19  4:19 UTC (permalink / raw)
  To: Greg KH
  Cc: Andy Shevchenko, Greg Kroah-Hartman, Jiri Slaby (SUSE),
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  drivers/tty/serial/serial_core.c

between commit:

  9cf7ea2eeb74 ("serial: core: Clearing the circular buffer before NULLifying it")

from the tty.current tree and commits:

  1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo")
  abcd8632f26b ("serial: core: Extract uart_alloc_xmit_buf() and uart_free_xmit_buf()")

from the tty tree.

I fixed it up (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/tty/serial/serial_core.c
index c476d884356d,b9d631037ff6..000000000000
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@@ -285,6 -273,53 +273,54 @@@ static int uart_alloc_xmit_buf(struct t
  		free_page(page);
  	}
  
+ 	return 0;
+ }
+ 
+ static void uart_free_xmit_buf(struct tty_port *port)
+ {
+ 	struct uart_state *state = container_of(port, struct uart_state, port);
+ 	struct uart_port *uport;
+ 	unsigned long flags;
+ 	char *xmit_buf;
+ 
+ 	/*
+ 	 * Do not free() the transmit buffer page under the port lock since
+ 	 * this can create various circular locking scenarios. For instance,
+ 	 * console driver may need to allocate/free a debug object, which
+ 	 * can end up in printk() recursion.
+ 	 */
+ 	uport = uart_port_lock(state, flags);
++	kfifo_reset(&state->port.xmit_fifo);
+ 	xmit_buf = port->xmit_buf;
+ 	port->xmit_buf = NULL;
+ 	INIT_KFIFO(port->xmit_fifo);
+ 	uart_port_unlock(uport, flags);
+ 
+ 	free_page((unsigned long)xmit_buf);
+ }
+ 
+ /*
+  * Startup the port.  This will be called once per open.  All calls
+  * will be serialised by the per-port mutex.
+  */
+ static int uart_port_startup(struct tty_struct *tty, struct uart_state *state,
+ 			     bool init_hw)
+ {
+ 	struct uart_port *uport = uart_port_check(state);
+ 	int retval;
+ 
+ 	if (uport->type == PORT_UNKNOWN)
+ 		return 1;
+ 
+ 	/*
+ 	 * Make sure the device is in D0 state.
+ 	 */
+ 	uart_change_pm(state, UART_PM_STATE_ON);
+ 
+ 	retval = uart_alloc_xmit_buf(&state->port);
+ 	if (retval)
+ 		return retval;
+ 
  	retval = uport->ops->startup(uport);
  	if (retval == 0) {
  		if (uart_console(uport) && uport->cons->cflag) {

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2024-04-11  3:57 Stephen Rothwell
  2024-04-11  4:17 ` Stephen Rothwell
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2024-04-11  3:57 UTC (permalink / raw)
  To: Greg KH
  Cc: Andy Shevchenko, Greg Kroah-Hartman, Jiri Slaby (SUSE),
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  drivers/tty/serial/serial_core.c

between commit:

  9cf7ea2eeb74 ("serial: core: Clearing the circular buffer before NULLifying it")

from the tty.current tree and commit:

  1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo")

from the tty tree.

I fixed it up (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/tty/serial/serial_core.c
index 2247efe97250,a78ded8c60b5..000000000000
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@@ -1788,9 -1773,9 +1773,10 @@@ static void uart_tty_port_shutdown(stru
  	 * Free the transmit buffer.
  	 */
  	uart_port_lock_irq(uport);
 +	uart_circ_clear(&state->xmit);
- 	buf = state->xmit.buf;
- 	state->xmit.buf = NULL;
+ 	buf = port->xmit_buf;
+ 	port->xmit_buf = NULL;
+ 	INIT_KFIFO(port->xmit_fifo);
  	uart_port_unlock_irq(uport);
  
  	free_page((unsigned long)buf);

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2023-10-04  1:55 Stephen Rothwell
  2023-10-04  2:14 ` Stephen Rothwell
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2023-10-04  1:55 UTC (permalink / raw)
  To: Greg KH
  Cc: Greg Kroah-Hartman, John Ogness, Linux Kernel Mailing List,
	Linux Next Mailing List, Lukas Wunner, Thomas Gleixner

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

Hi all,

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

  drivers/tty/serial/serial_core.c

between commit:

  8679328eb859 ("serial: Reduce spinlocked portion of uart_rs485_config()")

from the tty.current tree and commit:

  559c7ff4e324 ("serial: core: Use port lock wrappers")

from the tty tree.

I fixed it up (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/tty/serial/serial_core.c
index ca26a8aef2cb,b32bbd7aa3d3..000000000000
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@@ -1413,9 -1409,7 +1413,9 @@@ static int uart_rs485_config(struct uar
  	uart_sanitize_serial_rs485(port, rs485);
  	uart_set_rs485_termination(port, rs485);
  
- 	spin_lock_irqsave(&port->lock, flags);
++	uart_port_lock_irqsave(port, flags);
  	ret = port->rs485_config(port, NULL, rs485);
- 	spin_unlock_irqrestore(&port->lock, flags);
++	uart_port_unlock_irqrestore(port, flags);
  	if (ret)
  		memset(rs485, 0, sizeof(*rs485));
  
@@@ -2480,12 -2474,13 +2480,12 @@@ int uart_resume_port(struct uart_drive
  			if (ret == 0) {
  				if (tty)
  					uart_change_line_settings(tty, state, NULL);
 +				uart_rs485_config(uport);
- 				spin_lock_irq(&uport->lock);
+ 				uart_port_lock_irq(uport);
  				if (!(uport->rs485.flags & SER_RS485_ENABLED))
  					ops->set_mctrl(uport, uport->mctrl);
 -				else
 -					uart_rs485_config(uport);
  				ops->start_tx(uport);
- 				spin_unlock_irq(&uport->lock);
+ 				uart_port_unlock_irq(uport);
  				tty_port_set_initialized(port, true);
  			} else {
  				/*
@@@ -2592,10 -2587,10 +2592,10 @@@ uart_configure_port(struct uart_driver 
  		port->mctrl &= TIOCM_DTR;
  		if (!(port->rs485.flags & SER_RS485_ENABLED))
  			port->ops->set_mctrl(port, port->mctrl);
- 		spin_unlock_irqrestore(&port->lock, flags);
 -		else
 -			uart_rs485_config(port);
+ 		uart_port_unlock_irqrestore(port, flags);
  
 +		uart_rs485_config(port);
 +
  		/*
  		 * If this driver supports console, and it hasn't been
  		 * successfully registered yet, try to re-register it.

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2020-09-17  6:09 Stephen Rothwell
  2020-09-17  6:34 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2020-09-17  6:09 UTC (permalink / raw)
  To: Greg KH
  Cc: Tobias Diedrich, Du Huanpeng, Linux Next Mailing List,
	Linux Kernel Mailing List

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

Hi all,

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

  drivers/tty/serial/8250/8250_pci.c

between commit:

  3c5a87be170a ("serial: 8250_pci: Add Realtek 816a and 816b")

from the tty.current tree and commit:

  04b6ff5f25de ("serial: 8250_pci: Add WCH384_8S 8 port serial device")

from the tty tree.

I fixed it up (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/tty/serial/8250/8250_pci.c
index 55bb7b897d97,85810b8b9d20..000000000000
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@@ -5566,17 -5618,10 +5618,21 @@@ static const struct pci_device_id seria
  		PCI_ANY_ID, PCI_ANY_ID,
  		0, 0, pbn_wch384_4 },
  
+ 	{	PCIE_VENDOR_ID_WCH, PCIE_DEVICE_ID_WCH_CH384_8S,
+ 		PCI_ANY_ID, PCI_ANY_ID,
+ 		0, 0, pbn_wch384_8 },
+ 
 +	/*
 +	 * Realtek RealManage
 +	 */
 +	{	PCI_VENDOR_ID_REALTEK, 0x816a,
 +		PCI_ANY_ID, PCI_ANY_ID,
 +		0, 0, pbn_b0_1_115200 },
 +
 +	{	PCI_VENDOR_ID_REALTEK, 0x816b,
 +		PCI_ANY_ID, PCI_ANY_ID,
 +		0, 0, pbn_b0_1_115200 },
 +
  	/* Fintek PCI serial cards */
  	{ PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 },
  	{ PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 },

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2019-12-18  0:49 Stephen Rothwell
  2019-12-18  7:05 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2019-12-18  0:49 UTC (permalink / raw)
  To: Greg KH; +Cc: Linux Next Mailing List, Linux Kernel Mailing List, David Engraf

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

Hi all,

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

  drivers/tty/serial/atmel_serial.c

between commit:

  cb47b9f8630a ("tty/serial: atmel: fix out of range clock divider handling")

from the tty.current tree and commit:

  751d0017334d ("tty/serial: atmel: fix out of range clock divider handling")

from the tty tree.

These are 2 version of the same change, I guess.

I fixed it up (I just used the tty tree 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] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2017-08-02  4:26 Stephen Rothwell
  2017-08-04  1:02 ` Greg KH
  2017-08-14 22:17 ` Greg KH
  0 siblings, 2 replies; 50+ messages in thread
From: Stephen Rothwell @ 2017-08-02  4:26 UTC (permalink / raw)
  To: Greg KH
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Sean Young,
	Andy Shevchenko

Hi Greg,

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

  drivers/tty/serial/8250/8250_core.c

between commit:

  9527b82ae3af ("Revert "serial: Delete dead code for CIR serial ports"")

from the tty.current tree and commit:

  c7ac15ce8924 ("serial: core: move UPF_NO_TXEN_TEST to quirks and rename")

from the tty tree.

I fixed it up (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/tty/serial/8250/8250_core.c
index 1aab3010fbfa,3db9d6e19660..000000000000
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@@ -1043,24 -1043,14 +1043,25 @@@ int serial8250_register_8250_port(struc
  		if (up->dl_write)
  			uart->dl_write = up->dl_write;
  
 -		if (serial8250_isa_config != NULL)
 -			serial8250_isa_config(0, &uart->port,
 -					&uart->capabilities);
 +		if (uart->port.type != PORT_8250_CIR) {
 +			if (serial8250_isa_config != NULL)
 +				serial8250_isa_config(0, &uart->port,
 +						&uart->capabilities);
 +
++			serial8250_apply_quirks(uart);
 +			ret = uart_add_one_port(&serial8250_reg,
 +						&uart->port);
 +			if (ret == 0)
 +				ret = uart->port.line;
 +		} else {
 +			dev_info(uart->port.dev,
 +				"skipping CIR port at 0x%lx / 0x%llx, IRQ %d\n",
 +				uart->port.iobase,
 +				(unsigned long long)uart->port.mapbase,
 +				uart->port.irq);
  
 -		serial8250_apply_quirks(uart);
 -		ret = uart_add_one_port(&serial8250_reg, &uart->port);
 -		if (ret == 0)
 -			ret = uart->port.line;
 +			ret = 0;
 +		}
  	}
  	mutex_unlock(&serial_mutex);
  

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2017-03-20  2:28 Stephen Rothwell
  2017-03-20  9:21 ` Dmitry Vyukov
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2017-03-20  2:28 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-next, linux-kernel, Peter Hurley, Michael Neuling, Dmitry Vyukov

Hi Greg,

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

  drivers/tty/tty_ldisc.c

between commit:

  5362544bebe8 ("tty: don't panic on OOM in tty_set_ldisc()")

from the tty.current tree and commit:

  71472fa9c52b ("tty: Fix ldisc crash on reopened tty")

from the tty tree.

I fixed it up (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/tty/tty_ldisc.c
index b0500a0a87b8,4ee7742dced3..000000000000
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@@ -621,14 -669,17 +621,15 @@@ int tty_ldisc_reinit(struct tty_struct 
  		tty_ldisc_put(tty->ldisc);
  	}
  
- 	/* switch the line discipline */
- 	tty->ldisc = ld;
  	tty_set_termios_ldisc(tty, disc);
- 	retval = tty_ldisc_open(tty, tty->ldisc);
+ 	retval = tty_ldisc_open(tty, ld);
  	if (retval) {
- 		tty_ldisc_put(tty->ldisc);
- 		tty->ldisc = NULL;
 -		if (!WARN_ON(disc == N_TTY)) {
 -			tty_ldisc_put(ld);
 -			ld = NULL;
 -		}
++		tty_ldisc_put(ld);
++		ld = NULL;
  	}
+ 
+ 	/* switch the line discipline */
+ 	smp_store_release(&tty->ldisc, ld);
  	return retval;
  }
  

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2016-02-08  2:16 Stephen Rothwell
  2016-02-08  2:21 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2016-02-08  2:16 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Peter Hurley

Hi Greg,

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

  drivers/tty/tty_io.c

between commit:

  e9036d066236 ("tty: Drop krefs for interrupted tty lock")

from the tty.current tree and commit:

  d6203d0c7b73 ("tty: Refactor tty_open()")

from the tty tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/tty/tty_io.c
index a7eacef1bd22,8d26ed79bb4c..000000000000
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@@ -2004,6 -2009,69 +2009,68 @@@ static struct tty_driver *tty_lookup_dr
  }
  
  /**
+  *	tty_open_by_driver	-	open a tty device
+  *	@device: dev_t of device to open
+  *	@inode: inode of device file
+  *	@filp: file pointer to tty
+  *
+  *	Performs the driver lookup, checks for a reopen, or otherwise
+  *	performs the first-time tty initialization.
+  *
+  *	Returns the locked initialized or re-opened &tty_struct
+  *
+  *	Claims the global tty_mutex to serialize:
+  *	  - concurrent first-time tty initialization
+  *	  - concurrent tty driver removal w/ lookup
+  *	  - concurrent tty removal from driver table
+  */
+ static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
+ 					     struct file *filp)
+ {
+ 	struct tty_struct *tty;
+ 	struct tty_driver *driver = NULL;
+ 	int index = -1;
+ 	int retval;
+ 
+ 	mutex_lock(&tty_mutex);
+ 	driver = tty_lookup_driver(device, filp, &index);
+ 	if (IS_ERR(driver)) {
+ 		mutex_unlock(&tty_mutex);
+ 		return ERR_CAST(driver);
+ 	}
+ 
+ 	/* check whether we're reopening an existing tty */
+ 	tty = tty_driver_lookup_tty(driver, inode, index);
+ 	if (IS_ERR(tty)) {
+ 		mutex_unlock(&tty_mutex);
+ 		goto out;
+ 	}
+ 
+ 	if (tty) {
+ 		mutex_unlock(&tty_mutex);
+ 		retval = tty_lock_interruptible(tty);
++		tty_kref_put(tty);  /* drop kref from tty_driver_lookup_tty() */
+ 		if (retval) {
+ 			if (retval == -EINTR)
+ 				retval = -ERESTARTSYS;
+ 			tty = ERR_PTR(retval);
+ 			goto out;
+ 		}
 -		/* safe to drop the kref from tty_driver_lookup_tty() */
 -		tty_kref_put(tty);
+ 		retval = tty_reopen(tty);
+ 		if (retval < 0) {
+ 			tty_unlock(tty);
+ 			tty = ERR_PTR(retval);
+ 		}
+ 	} else { /* Returns with the tty_lock held for now */
+ 		tty = tty_init_dev(driver, index);
+ 		mutex_unlock(&tty_mutex);
+ 	}
+ out:
+ 	tty_driver_kref_put(driver);
+ 	return tty;
+ }
+ 
+ /**
   *	tty_open		-	open a tty device
   *	@inode: inode of device file
   *	@filp: file pointer to tty

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2015-05-25  8:19 Stephen Rothwell
  2015-05-25 16:28 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2015-05-25  8:19 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Dave Martin, Jakub Kicinski

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

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/tty/serial/amba-pl011.c between commit 43dd1f9a5b05
("serial/amba-pl011: Unconditionally poll for FIFO space before each TX
char") from the tty.current tree and commit 1e84d22322ce
("serial/amba-pl011: Refactor and simplify TX FIFO handling") from the
tty tree.

I fixed it up (I just used the version from the tty tree) and can carry
the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2014-11-26  7:12 Stephen Rothwell
  2014-11-26 19:51 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2014-11-26  7:12 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Jingchang Lu

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

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/tty/serial/of_serial.c between commit a5e9ab291c60 ("Revert
"serial: of-serial: add PM suspend/resume support"") from the
tty.current tree and commit 513e43858102 ("serial: of-serial: fix up PM
ops on no_console_suspend and port type") from the tty tree.

I fixed it up (I assumed the tty tree version is correct and used that)
and can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/tty/serial/of_serial.c
index f2fde9c21e9b,fd00e2521584..000000000000
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@@ -269,7 -342,9 +342,8 @@@ static struct of_device_id of_platform_
  static struct platform_driver of_platform_serial_driver = {
  	.driver = {
  		.name = "of_serial",
 -		.owner = THIS_MODULE,
  		.of_match_table = of_platform_serial_table,
+ 		.pm = &of_serial_pm_ops,
  	},
  	.probe = of_platform_serial_probe,
  	.remove = of_platform_serial_remove,

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2014-11-10  4:49 Stephen Rothwell
  2014-11-10  5:08 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2014-11-10  4:49 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Matthias Brugger, Eddie Huang

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

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/tty/serial/8250/8250_mtk.c between commit cd92208f6996 ("tty:
serial: 8250_mtk: Fix quot calculation") from the tty.current tree and
commit 2a768264eef0 ("tty: serial: Fix mediatek UART driver setting
baudrate issue") from the tty tree.

I fixed it up (I just used the version from the tty tree) and can carry
the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2013-01-17  2:07 Stephen Rothwell
  2013-01-18  1:27 ` Greg KH
  0 siblings, 1 reply; 50+ messages in thread
From: Stephen Rothwell @ 2013-01-17  2:07 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Maxime Ripard, Heikki Krogerus

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

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/tty/serial/8250/8250_dw.c between commit 68e56cb3a068 ("tty:
8250_dw: Fix inverted arguments to serial_out in IRQ handler") from the
tty.current tree and commit 30046df26187 ("serial: 8250_dw: Set FIFO size
dynamically") from the tty tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/tty/serial/8250/8250_dw.c
index 096d2ef,117bb8b..0000000
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@@ -78,8 -104,8 +104,8 @@@ static int dw8250_handle_irq(struct uar
  		return 1;
  	} else if ((iir & UART_IIR_BUSY) == UART_IIR_BUSY) {
  		/* Clear the USR and write the LCR again. */
- 		(void)p->serial_in(p, UART_USR);
+ 		(void)p->serial_in(p, DW_UART_USR);
 -		p->serial_out(p, d->last_lcr, UART_LCR);
 +		p->serial_out(p, UART_LCR, d->last_lcr);
  
  		return 1;
  	}

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2012-04-19  4:59 Stephen Rothwell
  2012-04-19 20:07 ` Greg KH
  2012-04-23 16:40 ` Greg KH
  0 siblings, 2 replies; 50+ messages in thread
From: Stephen Rothwell @ 2012-04-19  4:59 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Tomoya MORINAGA

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

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/tty/serial/pch_uart.c between commit af6d17cdc8c8 ("pch_uart: Fix
dma channel unallocated issue") from the tty.current tree and commit
44db113212d8 ("pch_uart: Delete unused structure member") from the tty
tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/tty/serial/pch_uart.c
index c2816f4,a5e6343..0000000
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@@ -1447,11 -1455,8 +1455,10 @@@ static int pch_uart_verify_port(struct 
  			__func__);
  		return -EOPNOTSUPP;
  #endif
- 		priv->use_dma_flag = 1;
 -		priv->use_dma = 1;
  		dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n");
 +		if (!priv->use_dma)
 +			pch_request_dma(port);
 +		priv->use_dma = 1;
  	}
  
  	return 0;

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread
* linux-next: manual merge of the tty tree with the tty.current tree
@ 2011-11-18  3:30 Stephen Rothwell
  2011-11-18  8:41 ` Jiri Slaby
                   ` (2 more replies)
  0 siblings, 3 replies; 50+ messages in thread
From: Stephen Rothwell @ 2011-11-18  3:30 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Jiri Slaby, Dave Young

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

Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/tty/tty_ldisc.c between commits df92d0561de3 ("TTY: ldisc, allow
waiting for ldisc arbitrarily long") and 0c73c08ec73d ("TTY: ldisc, wait
for ldisc infinitely in hangup") from the tty.current tree and commits
66ef27c3fd0e ("tty_ldisc: remove unnecessary negative return check for
wait_event_timeout") and 8b3ffa173ffa ("TTY: ldisc, remove some unneeded
includes") from the tty tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/tty/tty_ldisc.c
index 8e0924f,174db3b..0000000
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@@ -24,19 -16,8 +16,9 @@@
  #include <linux/device.h>
  #include <linux/wait.h>
  #include <linux/bitops.h>
- #include <linux/delay.h>
  #include <linux/seq_file.h>
- 
  #include <linux/uaccess.h>
- #include <asm/system.h>
- 
- #include <linux/kbd_kern.h>
- #include <linux/vt_kern.h>
- #include <linux/selection.h>
- 
- #include <linux/kmod.h>
- #include <linux/nsproxy.h>
 +#include <linux/ratelimit.h>
  
  /*
   *	This guards the refcounted line discipline lists. The lock
@@@ -553,13 -533,11 +535,11 @@@ static void tty_ldisc_flush_works(struc
   *	Wait for the line discipline to become idle. The discipline must
   *	have been halted for this to guarantee it remains idle.
   */
 -static int tty_ldisc_wait_idle(struct tty_struct *tty)
 +static int tty_ldisc_wait_idle(struct tty_struct *tty, long timeout)
  {
 -	int ret;
 +	long ret;
  	ret = wait_event_timeout(tty_ldisc_idle,
 -			atomic_read(&tty->ldisc->users) == 1, 5 * HZ);
 +			atomic_read(&tty->ldisc->users) == 1, timeout);
- 	if (ret < 0)
- 		return ret;
  	return ret > 0 ? 0 : -EBUSY;
  }
  

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2026-09-25 14:56 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 14:56 linux-next: manual merge of the tty tree with the tty.current tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2025-11-27  1:09 Stephen Rothwell
2025-11-27  6:52 ` Greg KH
2024-07-09  5:37 Stephen Rothwell
2024-07-09 11:04 ` Greg KH
2024-04-19  4:19 Stephen Rothwell
2024-04-19  6:09 ` Greg KH
2024-04-23 11:24 ` Greg KH
2024-04-11  3:57 Stephen Rothwell
2024-04-11  4:17 ` Stephen Rothwell
2024-04-11  4:38   ` Greg KH
2024-04-11 10:40   ` Andy Shevchenko
2023-10-04  1:55 Stephen Rothwell
2023-10-04  2:14 ` Stephen Rothwell
2023-10-04  6:38   ` Greg KH
2023-10-16  8:20     ` Greg KH
2020-09-17  6:09 Stephen Rothwell
2020-09-17  6:34 ` Greg KH
2019-12-18  0:49 Stephen Rothwell
2019-12-18  7:05 ` Greg KH
2017-08-02  4:26 Stephen Rothwell
2017-08-04  1:02 ` Greg KH
2017-08-14 22:17 ` Greg KH
2017-03-20  2:28 Stephen Rothwell
2017-03-20  9:21 ` Dmitry Vyukov
2017-03-20  9:26   ` Dmitry Vyukov
2017-03-29  5:51     ` Greg KH
2017-03-30  3:46     ` Michael Neuling
2017-03-30 12:17       ` Dmitry Vyukov
2016-02-08  2:16 Stephen Rothwell
2016-02-08  2:21 ` Greg KH
2016-02-08  2:53   ` Peter Hurley
2016-04-01  0:23   ` Peter Hurley
2016-04-01  3:49     ` Greg KH
2015-05-25  8:19 Stephen Rothwell
2015-05-25 16:28 ` Greg KH
2015-05-26 11:08   ` Dave Martin
2014-11-26  7:12 Stephen Rothwell
2014-11-26 19:51 ` Greg KH
2014-11-10  4:49 Stephen Rothwell
2014-11-10  5:08 ` Greg KH
2013-01-17  2:07 Stephen Rothwell
2013-01-18  1:27 ` Greg KH
2012-04-19  4:59 Stephen Rothwell
2012-04-19 20:07 ` Greg KH
2012-04-23 16:40 ` Greg KH
2011-11-18  3:30 Stephen Rothwell
2011-11-18  8:41 ` Jiri Slaby
2011-11-18 16:18 ` Greg KH
2011-11-27  4:08 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®