public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the ttydev tree with the usb.current tree
@ 2009-07-09  3:04 Stephen Rothwell
  2009-07-09 23:19 ` Greg KH
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2009-07-09  3:04 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-next, linux-kernel, Jason Wessel, Greg KH

Hi Alan,

Today's linux-next merge of the ttydev tree got conflicts in
drivers/usb/serial/generic.c and include/linux/usb/serial.h between commit
d8298d029cdd5d944c3d8369d2862de94d12ae4b ("USB: serial: regression fix to
move sysrq from hot path") from the usb.current tree and commit
cf8456fe1aaed1776bf4c26c18adef76e472b9fa ("tty-usb-fix-perf-regression")
from the ttydev tree.  Also between commit
a2170a444ef9a89a7ec9acc72d79e5db433effc4 ("USB: serial: optimize sysrq
function calls") from the usb.current tree and commit
bfce6b042a47c9cdd55c7cd231e58710ec1fa4e1 ("tty-usb-fix-kref-leak") from
the ttydev tree.

The first two commits above seem to be trying to do the same thing (or
similar) so I have used the ttydev version for now.

I fixed them up (see below) and can carry the fixes as necessary.

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

diff --cc drivers/usb/serial/generic.c
index 48f6743,21dd6e7..0000000
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
diff --cc include/linux/usb/serial.h
index 4601e0d,0ec50ba..0000000
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@@ -325,34 -330,6 +325,35 @@@ extern struct usb_serial_driver usb_ser
  extern struct bus_type usb_serial_bus_type;
  extern struct tty_driver *usb_serial_tty_driver;
  
- static inline int usb_serial_handle_sysrq_char(struct usb_serial_port *port,
++static inline int usb_serial_handle_sysrq_char(struct tty_struct *tty,
++					       struct usb_serial_port *port,
 +					       unsigned int ch)
 +{
 +#ifdef CONFIG_MAGIC_SYSRQ
 +	if (port->sysrq && port->console) {
 +		if (ch && time_before(jiffies, port->sysrq)) {
- 			handle_sysrq(ch, tty_port_tty_get(&port->port));
++			handle_sysrq(ch, tty);
 +			port->sysrq = 0;
 +			return 1;
 +		}
 +		port->sysrq = 0;
 +	}
 +#endif /* CONFIG_MAGIC_SYSRQ */
 +	return 0;
 +}
 +
 +static inline int usb_serial_handle_break(struct usb_serial_port *port)
 +{
 +#ifdef CONFIG_MAGIC_SYSRQ
 +	if (!port->sysrq) {
 +		port->sysrq = jiffies + HZ*5;
 +		return 1;
 +	}
 +	port->sysrq = 0;
 +#endif /* CONFIG_MAGIC_SYSRQ */
 +	return 0;
 +}
 +
  static inline void usb_serial_debug_data(int debug,
  					 struct device *dev,
  					 const char *function, int size,

^ permalink raw reply	[flat|nested] 14+ messages in thread
* linux-next: manual merge of the ttydev tree with the usb.current tree
@ 2009-07-28  4:01 Stephen Rothwell
  2009-07-28 10:26 ` Alan Cox
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2009-07-28  4:01 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-next, linux-kernel, Oliver Neukum, Greg KH

Hi Alan,

Today's linux-next merge of the ttydev tree got a conflict in
drivers/usb/serial/usb-serial.c between commit
a00b8d98aca97bfb6fa983f41dae25b424058592 ("USB: fix usage count in usb
serial generic open regarding autoresume") from the usb.current tree and
commit 73fed8403623653560cc2f35c9b62891adaf6b4b
("tty-usb-error-unlock-fix") from the ttydev tree.

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

diff --cc drivers/usb/serial/usb-serial.c
index 06579a8,99188c9..0000000
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@@ -220,8 -224,8 +222,8 @@@ static int serial_open (struct tty_stru
  	tty_port_tty_set(&port->port, tty);
  
  	/* If the console is attached, the device is already open */
 -	if (port->port.count == 1 && !port->console) {
 +	if (!port->port.count && !port->console) {
- 
+ 		first = 1;
  		/* lock this module before we call it
  		 * this may fail, which means we must bail out,
  		 * safe because we are called with BKL held */
@@@ -246,8 -248,7 +248,9 @@@
  		if (retval)
  			goto bailout_interface_put;
  		mutex_unlock(&serial->disc_mutex);
+ 		set_bit(ASYNCB_INITIALIZED, &port->port.flags);
 +	} else {
 +		++port->port.count;
  	}
  	mutex_unlock(&port->mutex);
  	/* Now do the correct tty layer semantics */

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

end of thread, other threads:[~2009-07-28 19:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09  3:04 linux-next: manual merge of the ttydev tree with the usb.current tree Stephen Rothwell
2009-07-09 23:19 ` Greg KH
2009-07-10  0:06   ` Stephen Rothwell
2009-07-10  0:13     ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2009-07-28  4:01 Stephen Rothwell
2009-07-28 10:26 ` Alan Cox
2009-07-28 12:10   ` Oliver Neukum
2009-07-28 12:29     ` Alan Cox
2009-07-28 12:35       ` Stephen Rothwell
2009-07-28 13:17         ` Alan Cox
2009-07-28 16:32           ` Greg KH
2009-07-28 16:34             ` Greg KH
2009-07-28 19:21               ` Oliver Neukum
2009-07-28 19:24                 ` Alan Cox

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