All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PATCH] TTY patches for 2.6.31-git
@ 2009-09-19 21:33 Greg KH
  2009-09-19 21:36 ` [PATCH 01/79] tty: gigaset: really fix chars_in_buffer Greg Kroah-Hartman
                   ` (79 more replies)
  0 siblings, 80 replies; 86+ messages in thread
From: Greg KH @ 2009-09-19 21:33 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here is the big tty tree merge for your 2.6.31-git tree.

It contains a lot of tty core changes, and a bunch of usb-serial
regression fixes, which depend on some tty changes, which is why they
are all in this tree.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/

All of these patches have been in the -next and -mm trees for quite a
while.

The full patches will be sent to the linux-kernel mailing list, if anyone
wants to see them.

thanks,

greg k-h

------------

 arch/mn10300/kernel/asm-offsets.c       |    6 +-
 drivers/char/cyclades.c                 | 2311 ++++++++-----------------------
 drivers/char/esp.c                      |    7 +-
 drivers/char/isicom.c                   |   57 +-
 drivers/char/mxser.c                    |   62 +-
 drivers/char/n_tty.c                    |   79 +-
 drivers/char/riscom8.c                  |  164 ++--
 drivers/char/tty_io.c                   |   22 +-
 drivers/char/tty_ioctl.c                |    4 +-
 drivers/char/tty_ldisc.c                |   82 +-
 drivers/char/tty_port.c                 |   31 +-
 drivers/char/vt.c                       |   14 +-
 drivers/char/vt_ioctl.c                 |  482 ++++++-
 drivers/isdn/gigaset/interface.c        |   19 +-
 drivers/net/slip.c                      |   96 +-
 drivers/serial/21285.c                  |    8 +-
 drivers/serial/8250.c                   |   28 +-
 drivers/serial/8250.h                   |    1 +
 drivers/serial/amba-pl010.c             |    6 +-
 drivers/serial/amba-pl011.c             |    6 +-
 drivers/serial/atmel_serial.c           |   14 +-
 drivers/serial/bfin_5xx.c               |   24 +-
 drivers/serial/bfin_sport_uart.c        |    6 +-
 drivers/serial/clps711x.c               |    4 +-
 drivers/serial/cpm_uart/cpm_uart_core.c |    2 +-
 drivers/serial/dz.c                     |    6 +-
 drivers/serial/icom.c                   |   20 +-
 drivers/serial/imx.c                    |   16 +-
 drivers/serial/ioc3_serial.c            |   54 +-
 drivers/serial/ioc4_serial.c            |   68 +-
 drivers/serial/ip22zilog.c              |   14 +-
 drivers/serial/jsm/jsm_neo.c            |    2 +-
 drivers/serial/jsm/jsm_tty.c            |   20 +-
 drivers/serial/m32r_sio.c               |    6 +-
 drivers/serial/max3100.c                |   16 +-
 drivers/serial/mcf.c                    |    4 +-
 drivers/serial/mpc52xx_uart.c           |    4 +-
 drivers/serial/mpsc.c                   |    4 +-
 drivers/serial/msm_serial.c             |    6 +-
 drivers/serial/mux.c                    |    4 +-
 drivers/serial/netx-serial.c            |    6 +-
 drivers/serial/nwpserial.c              |    4 +-
 drivers/serial/pmac_zilog.c             |   20 +-
 drivers/serial/pnx8xxx_uart.c           |    8 +-
 drivers/serial/pxa.c                    |    6 +-
 drivers/serial/sa1100.c                 |    8 +-
 drivers/serial/samsung.c                |    8 +-
 drivers/serial/sb1250-duart.c           |    6 +-
 drivers/serial/sc26xx.c                 |   10 +-
 drivers/serial/serial_core.c            |  876 ++++++------
 drivers/serial/serial_cs.c              |    1 +
 drivers/serial/serial_ks8695.c          |    6 +-
 drivers/serial/serial_lh7a40x.c         |    6 +-
 drivers/serial/serial_txx9.c            |    4 +-
 drivers/serial/sh-sci.c                 |   10 +-
 drivers/serial/sn_console.c             |   22 +-
 drivers/serial/sunhv.c                  |    8 +-
 drivers/serial/sunsab.c                 |   10 +-
 drivers/serial/sunsu.c                  |    6 +-
 drivers/serial/sunzilog.c               |   14 +-
 drivers/serial/timbuart.c               |   10 +-
 drivers/serial/uartlite.c               |   19 +-
 drivers/serial/ucc_uart.c               |    4 +-
 drivers/serial/vr41xx_siu.c             |    6 +-
 drivers/serial/zs.c                     |    6 +-
 drivers/usb/class/cdc-acm.c             |    5 +-
 drivers/usb/serial/ark3116.c            |   51 +-
 drivers/usb/serial/belkin_sa.c          |    4 +-
 drivers/usb/serial/ch341.c              |    5 +-
 drivers/usb/serial/console.c            |   32 +-
 drivers/usb/serial/cp210x.c             |   12 +-
 drivers/usb/serial/cyberjack.c          |    4 +-
 drivers/usb/serial/cypress_m8.c         |   18 +-
 drivers/usb/serial/digi_acceleport.c    |    6 +-
 drivers/usb/serial/empeg.c              |   18 +-
 drivers/usb/serial/ftdi_sio.c           |    6 +-
 drivers/usb/serial/garmin_gps.c         |    3 +-
 drivers/usb/serial/generic.c            |    3 +-
 drivers/usb/serial/io_edgeport.c        |    6 +-
 drivers/usb/serial/io_ti.c              |    3 +-
 drivers/usb/serial/ipaq.c               |    9 +-
 drivers/usb/serial/ipw.c                |    3 +-
 drivers/usb/serial/ir-usb.c             |    6 +-
 drivers/usb/serial/iuu_phoenix.c        |   34 +-
 drivers/usb/serial/keyspan.c            |    3 +-
 drivers/usb/serial/keyspan.h            |    3 +-
 drivers/usb/serial/keyspan_pda.c        |    2 +-
 drivers/usb/serial/kl5kusb105.c         |   10 +-
 drivers/usb/serial/kobil_sct.c          |   28 +-
 drivers/usb/serial/mct_u232.c           |   15 +-
 drivers/usb/serial/mos7720.c            |  123 ++-
 drivers/usb/serial/mos7840.c            |  118 +--
 drivers/usb/serial/navman.c             |    3 +-
 drivers/usb/serial/omninet.c            |    6 +-
 drivers/usb/serial/opticon.c            |    3 +-
 drivers/usb/serial/option.c             |    6 +-
 drivers/usb/serial/oti6858.c            |   27 +-
 drivers/usb/serial/pl2303.c             |    5 +-
 drivers/usb/serial/sierra.c             |    3 +-
 drivers/usb/serial/spcp8x5.c            |   26 +-
 drivers/usb/serial/symbolserial.c       |    3 +-
 drivers/usb/serial/ti_usb_3410_5052.c   |    6 +-
 drivers/usb/serial/usb-serial.c         |  385 +++---
 drivers/usb/serial/usb_debug.c          |    5 +-
 drivers/usb/serial/visor.c              |    6 +-
 drivers/usb/serial/whiteheat.c          |   11 +-
 include/linux/cyclades.h                |   11 +-
 include/linux/hayesesp.h                |    1 -
 include/linux/kfifo.h                   |    4 +-
 include/linux/serial.h                  |    2 +
 include/linux/serial_8250.h             |    1 +
 include/linux/serial_core.h             |   93 +-
 include/linux/tty.h                     |   19 +-
 include/linux/usb/serial.h              |   10 +-
 include/linux/vt.h                      |   32 +-
 include/linux/vt_kern.h                 |   16 +-
 kernel/kfifo.c                          |    2 +-
 kernel/power/console.c                  |   63 +-
 118 files changed, 2572 insertions(+), 3570 deletions(-)

---------------

Alan Cox (33):
      slip: Clean up create and destroy
      kfifo: Use "const" definitions
      tty: Fix a typo noted in passing
      mos7840: remove old dead modem logic
      tty: Add a full port_close function
      riscom8: split open and close methods up
      mxser: Split close ready for a standard tty_port_close method
      isicom: Split the close hardware bits out
      tty: riscom8 kref and tty_port_close
      cyclades: use the full port_close function
      tty: make the kref destructor occur asynchronously
      cdc_acm: Fix to use modern speed interfaces
      tty: USB hangup is racy
      tty: remove dtr/rts use from the driver open methods
      tty: USB can now use the shutdown method for kref based freeing of ports
      vt: add an event interface
      vt: remove power stuff from kernel/power
      vt: move kernel stuff out of vt.h
      vt: add an activate and lock
      tty: USB does not need the filp argument in the drivers
      isicom: split the open method for the isicom device
      serial: kill off uart_info
      serial: Fold closing_* fields into the tty_port ones
      serial: use tty_port pointers in the core code
      serial: move count into the tty_port version
      serial: move the flags into the tty_port field
      serial: kill off uif_t
      serial: replace the state mutex with the tty port mutex
      serial: move delta_msr_wait into the tty_port
      serial: move port users helper
      serial: kill USF_CLOSING_* definitions
      serial: introduce tty krefs
      tty: USB serial termios bits

Alan Stern (10):
      TTY: fix typos
      usb-serial: change referencing of port and serial structures
      usb-serial: put subroutines in logical order
      usb-serial: change logic of serial lookups
      usb-serial: acquire references when a new tty is installed
      usb-serial: fix termios initialization logic
      usb-serial: rename subroutines
      usb-serial: add missing tests and debug lines
      usb-serial: straighten out serial_open
      USB serial: update the console driver

Anton Vorontsov (1):
      8250: Now honours baud rate lower bounds

Arnd Bergmann (1):
      tty: handle VT specific compat ioctls in vt driver

Deepak Saxena (1):
      Set proper console speed on resume if console suspend is disabled

Jaswinder Singh Rajput (1):
      tty: includecheck fix: drivers/char, vt.c

Jiri Slaby (19):
      cyclades: add tty refcounting
      cyclades: remove block_til_ready
      cyclades: avoid addresses recomputation
      cyclades: switch to tty_port_hangup
      cyclades: close cleanup
      cyclades: overall cleanup
      cyclades: sleep instead busy-wait
      cyclades: use dtr_rts helpers
      cyclades: merge cy_startup tails
      cyclades: ioctls cleanup
      cyclades: tiocm cleanup
      cyclades: introduce cyy_readb/writeb
      cyclades: remove more duplicated code
      tty: Power: fix suspend vt regression
      tty: riscom8, fix shutdown declaration
      tty: riscom8, fix tty refcnt
      tty: USB: serial/mct_u232, fix tty refcnt
      tty: Char: mxser, add support for CP112UL
      tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl

Joe Peterson (2):
      n_tty: honor opost flag for echoes
      n_tty: move echoctl check and clean up logic

Kees Schoenmakers (2):
      MOS7720 has no tiocmget method
      tty: usb_serial_mos7720: Fix get_lsr_info

Linus Torvalds (2):
      tty-ldisc: make /proc/tty/ldiscs use ldisc_ops instead of ldiscs
      tty-ldisc: get rid of tty_ldisc_try_get() helper function

Marcin Slusarz (1):
      tty: vt: use printk_once

Mike Frysinger (1):
      serial: bfin_5xx: fix building as module when early printk is enabled

Peter Korsgaard (1):
      uartlite: support shared interrupt lines

Roel Kluin (1):
      tty: icom: bit and/or confusion?

Tilman Schmidt (1):
      tty: gigaset: really fix chars_in_buffer

Vikram Pandita (1):
      serial: 8250: add IRQ trigger support

Wolfram Sang (1):
      tty: serial/pcmcia: add ID for Advantech card


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

* [PATCH 01/79] tty: gigaset: really fix chars_in_buffer
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 02/79] serial: bfin_5xx: fix building as module when early printk is enabled Greg Kroah-Hartman
                   ` (78 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tilman Schmidt, David S. Miller, stable, Andrew Morton,
	Greg Kroah-Hartman

From: Tilman Schmidt <tilman@imap.cc>

The tty_operation chars_in_buffer() is not allowed to return a negative
value to signal an error.  Corrects the problem flagged by commit
23198fda7182969b619613a555f8645fdc3dc334, "tty: fix chars_in_buffers".

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/isdn/gigaset/interface.c |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
index 8ff7e35..f33ac27 100644
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -408,33 +408,28 @@ static int if_write_room(struct tty_struct *tty)
 	return retval;
 }
 
-/* FIXME: This function does not have error returns */
-
 static int if_chars_in_buffer(struct tty_struct *tty)
 {
 	struct cardstate *cs;
-	int retval = -ENODEV;
+	int retval = 0;
 
 	cs = (struct cardstate *) tty->driver_data;
 	if (!cs) {
 		pr_err("%s: no cardstate\n", __func__);
-		return -ENODEV;
+		return 0;
 	}
 
 	gig_dbg(DEBUG_IF, "%u: %s()", cs->minor_index, __func__);
 
-	if (mutex_lock_interruptible(&cs->mutex))
-		return -ERESTARTSYS; // FIXME -EINTR?
+	mutex_lock(&cs->mutex);
 
-	if (!cs->connected) {
+	if (!cs->connected)
 		gig_dbg(DEBUG_IF, "not connected");
-		retval = -ENODEV;
-	} else if (!cs->open_count)
+	else if (!cs->open_count)
 		dev_warn(cs->dev, "%s: device not opened\n", __func__);
-	else if (cs->mstate != MS_LOCKED) {
+	else if (cs->mstate != MS_LOCKED)
 		dev_warn(cs->dev, "can't write to unlocked device\n");
-		retval = -EBUSY;
-	} else
+	else
 		retval = cs->ops->chars_in_buffer(cs);
 
 	mutex_unlock(&cs->mutex);
-- 
1.6.4.2


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

* [PATCH 02/79] serial: bfin_5xx: fix building as module when early printk is enabled
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
  2009-09-19 21:36 ` [PATCH 01/79] tty: gigaset: really fix chars_in_buffer Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 03/79] tty: serial/pcmcia: add ID for Advantech card Greg Kroah-Hartman
                   ` (77 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mike Frysinger, Alan Cox, stable, Andrew Morton, Greg Kroah-Hartman

From: Mike Frysinger <vapier@gentoo.org>

Since early printk only makes sense/works when the serial driver is built
into the kernel, disable the option for this driver when it is going to be
built as a module.  Otherwise we get build failures due to the ifdef
handling.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/bfin_5xx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index b4a7650..4fff4e5 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -42,6 +42,10 @@
 # undef CONFIG_EARLY_PRINTK
 #endif
 
+#ifdef CONFIG_SERIAL_BFIN_MODULE
+# undef CONFIG_EARLY_PRINTK
+#endif
+
 /* UART name and device definitions */
 #define BFIN_SERIAL_NAME	"ttyBF"
 #define BFIN_SERIAL_MAJOR	204
-- 
1.6.4.2


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

* [PATCH 03/79] tty: serial/pcmcia: add ID for Advantech card
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
  2009-09-19 21:36 ` [PATCH 01/79] tty: gigaset: really fix chars_in_buffer Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 02/79] serial: bfin_5xx: fix building as module when early printk is enabled Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 04/79] tty-ldisc: make /proc/tty/ldiscs use ldisc_ops instead of ldiscs Greg Kroah-Hartman
                   ` (76 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, stable, Greg Kroah-Hartman

From: Wolfram Sang <w.sang@pengutronix.de>

Add ID as reported in:

http://lists.infradead.org/pipermail/linux-pcmcia/2009-May/006127.html

Reported-by: Kenneth Moorman <KMoorman@transy.edu>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/serial_cs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index ed4648b..a3bb490 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -884,6 +884,7 @@ static struct pcmcia_device_id serial_ids[] = {
 	PCMCIA_DEVICE_CIS_MANF_CARD(0x0192, 0xa555, "SW_555_SER.cis"),  /* Sierra Aircard 555 CDMA 1xrtt Modem -- pre update */
 	PCMCIA_DEVICE_CIS_MANF_CARD(0x013f, 0xa555, "SW_555_SER.cis"),  /* Sierra Aircard 555 CDMA 1xrtt Modem -- post update */
 	PCMCIA_DEVICE_CIS_PROD_ID12("MultiTech", "PCMCIA 56K DataFax", 0x842047ee, 0xc2efcf03, "cis/MT5634ZLX.cis"),
+	PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-2", 0x96913a85, 0x27ab5437, "COMpad2.cis"),
 	PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "COMpad4.cis"),
 	PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "COMpad2.cis"),
 	PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "cis/RS-COM-2P.cis"),
-- 
1.6.4.2


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

* [PATCH 04/79] tty-ldisc: make /proc/tty/ldiscs use ldisc_ops instead of ldiscs
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (2 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 03/79] tty: serial/pcmcia: add ID for Advantech card Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 05/79] tty-ldisc: get rid of tty_ldisc_try_get() helper function Greg Kroah-Hartman
                   ` (75 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds, Alan Cox, OGAWA Hirofumi, Greg Kroah-Hartman

From: Linus Torvalds <torvalds@linux-foundation.org>

The /proc/tty/ldiscs file is totally and utterly un-interested in the
"struct tty_ldisc" structures, and only cares about the underlying ldisc
operations.

So don't make it create a dummy 'struct ldisc' only to get a pointer to
the operations, and then destroy it.  Instead, we split up the function
'tty_ldisc_try_get()', and create a 'get_ldops()' helper that just looks
up the ldisc operations based on the ldisc number.

That makes the code simpler to read (smaller and more well-defined
helper functions), and allows the /proc functions to avoid creating that
useless dummy only to immediately free it again.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_ldisc.c |   65 +++++++++++++++++++++++++++------------------
 1 files changed, 39 insertions(+), 26 deletions(-)

diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
index e48af9f..cbfacc0 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -145,6 +145,34 @@ int tty_unregister_ldisc(int disc)
 }
 EXPORT_SYMBOL(tty_unregister_ldisc);
 
+static struct tty_ldisc_ops *get_ldops(int disc)
+{
+	unsigned long flags;
+	struct tty_ldisc_ops *ldops, *ret;
+
+	spin_lock_irqsave(&tty_ldisc_lock, flags);
+	ret = ERR_PTR(-EINVAL);
+	ldops = tty_ldiscs[disc];
+	if (ldops) {
+		ret = ERR_PTR(-EAGAIN);
+		if (try_module_get(ldops->owner)) {
+			ldops->refcount++;
+			ret = ldops;
+		}
+	}
+	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
+	return ret;
+}
+
+static void put_ldops(struct tty_ldisc_ops *ldops)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&tty_ldisc_lock, flags);
+	ldops->refcount--;
+	module_put(ldops->owner);
+	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
+}
 
 /**
  *	tty_ldisc_try_get	-	try and reference an ldisc
@@ -156,36 +184,21 @@ EXPORT_SYMBOL(tty_unregister_ldisc);
 
 static struct tty_ldisc *tty_ldisc_try_get(int disc)
 {
-	unsigned long flags;
 	struct tty_ldisc *ld;
 	struct tty_ldisc_ops *ldops;
-	int err = -EINVAL;
 
 	ld = kmalloc(sizeof(struct tty_ldisc), GFP_KERNEL);
 	if (ld == NULL)
 		return ERR_PTR(-ENOMEM);
 
-	spin_lock_irqsave(&tty_ldisc_lock, flags);
-	ld->ops = NULL;
-	ldops = tty_ldiscs[disc];
-	/* Check the entry is defined */
-	if (ldops) {
-		/* If the module is being unloaded we can't use it */
-		if (!try_module_get(ldops->owner))
-			err = -EAGAIN;
-		else {
-			/* lock it */
-			ldops->refcount++;
-			ld->ops = ldops;
-			atomic_set(&ld->users, 1);
-			err = 0;
-		}
-	}
-	spin_unlock_irqrestore(&tty_ldisc_lock, flags);
-	if (err) {
+	ldops = get_ldops(disc);
+	if (IS_ERR(ldops)) {
 		kfree(ld);
-		return ERR_PTR(err);
+		return ERR_CAST(ldops);
 	}
+
+	ld->ops = ldops;
+	atomic_set(&ld->users, 1);
 	return ld;
 }
 
@@ -234,13 +247,13 @@ static void tty_ldiscs_seq_stop(struct seq_file *m, void *v)
 static int tty_ldiscs_seq_show(struct seq_file *m, void *v)
 {
 	int i = *(loff_t *)v;
-	struct tty_ldisc *ld;
+	struct tty_ldisc_ops *ldops;
 
-	ld = tty_ldisc_try_get(i);
-	if (IS_ERR(ld))
+	ldops = get_ldops(i);
+	if (IS_ERR(ldops))
 		return 0;
-	seq_printf(m, "%-10s %2d\n", ld->ops->name ? ld->ops->name : "???", i);
-	put_ldisc(ld);
+	seq_printf(m, "%-10s %2d\n", ldops->name ? ldops->name : "???", i);
+	put_ldops(ldops);
 	return 0;
 }
 
-- 
1.6.4.2


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

* [PATCH 05/79] tty-ldisc: get rid of tty_ldisc_try_get() helper function
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (3 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 04/79] tty-ldisc: make /proc/tty/ldiscs use ldisc_ops instead of ldiscs Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 06/79] tty: includecheck fix: drivers/char, vt.c Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds, Alan Cox, OGAWA Hirofumi, Greg Kroah-Hartman

From: Linus Torvalds <torvalds@linux-foundation.org>

Now that the /proc/tty/ldiscs handling doesn't play games with 'struct
ldisc' any more, the only remaining user of 'tty_ldisc_try_get()' is
'tty_ldisc_get()' (note the lack of 'try').

And we're actually much better off folding the logic directly into that
file, since the 'try' part was always about trying to get the ldisc
operations, not the ldisc itself: and making that explicit inside of
'tty_ldisc_get()' clarifies the whole semantics.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_ldisc.c |   51 ++++++++++++++++++----------------------------
 1 files changed, 20 insertions(+), 31 deletions(-)

diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
index cbfacc0..aafdbae 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -175,34 +175,6 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
 }
 
 /**
- *	tty_ldisc_try_get	-	try and reference an ldisc
- *	@disc: ldisc number
- *
- *	Attempt to open and lock a line discipline into place. Return
- *	the line discipline refcounted or an error.
- */
-
-static struct tty_ldisc *tty_ldisc_try_get(int disc)
-{
-	struct tty_ldisc *ld;
-	struct tty_ldisc_ops *ldops;
-
-	ld = kmalloc(sizeof(struct tty_ldisc), GFP_KERNEL);
-	if (ld == NULL)
-		return ERR_PTR(-ENOMEM);
-
-	ldops = get_ldops(disc);
-	if (IS_ERR(ldops)) {
-		kfree(ld);
-		return ERR_CAST(ldops);
-	}
-
-	ld->ops = ldops;
-	atomic_set(&ld->users, 1);
-	return ld;
-}
-
-/**
  *	tty_ldisc_get		-	take a reference to an ldisc
  *	@disc: ldisc number
  *
@@ -218,14 +190,31 @@ static struct tty_ldisc *tty_ldisc_try_get(int disc)
 static struct tty_ldisc *tty_ldisc_get(int disc)
 {
 	struct tty_ldisc *ld;
+	struct tty_ldisc_ops *ldops;
 
 	if (disc < N_TTY || disc >= NR_LDISCS)
 		return ERR_PTR(-EINVAL);
-	ld = tty_ldisc_try_get(disc);
-	if (IS_ERR(ld)) {
+
+	/*
+	 * Get the ldisc ops - we may need to request them to be loaded
+	 * dynamically and try again.
+	 */
+	ldops = get_ldops(disc);
+	if (IS_ERR(ldops)) {
 		request_module("tty-ldisc-%d", disc);
-		ld = tty_ldisc_try_get(disc);
+		ldops = get_ldops(disc);
+		if (IS_ERR(ldops))
+			return ERR_CAST(ldops);
+	}
+
+	ld = kmalloc(sizeof(struct tty_ldisc), GFP_KERNEL);
+	if (ld == NULL) {
+		put_ldops(ldops);
+		return ERR_PTR(-ENOMEM);
 	}
+
+	ld->ops = ldops;
+	atomic_set(&ld->users, 1);
 	return ld;
 }
 
-- 
1.6.4.2


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

* [PATCH 06/79] tty: includecheck fix: drivers/char, vt.c
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (4 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 05/79] tty-ldisc: get rid of tty_ldisc_try_get() helper function Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 07/79] tty: icom: bit and/or confusion? Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jaswinder Singh Rajput, Jaswinder Singh Rajput, Greg Kroah-Hartman

From: Jaswinder Singh Rajput <jaswinder@kernel.org>

fix the following 'make includecheck' warning:

  drivers/char/vt.c: linux/device.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/vt.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 6aa88f5..e47a4c8 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2955,7 +2955,6 @@ int __init vty_init(const struct file_operations *console_fops)
 }
 
 #ifndef VT_SINGLE_DRIVER
-#include <linux/device.h>
 
 static struct class *vtconsole_class;
 
-- 
1.6.4.2


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

* [PATCH 07/79] tty: icom: bit and/or confusion?
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (5 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 06/79] tty: includecheck fix: drivers/char, vt.c Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 08/79] cyclades: add tty refcounting Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Roel Kluin, Greg Kroah-Hartman

From: Roel Kluin <roel.kluin@gmail.com>

Previously, if any bit other than CMD_SND_BREAK was set, CMD_SND_BREAK
was not unset.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/icom.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index cd1b6a4..060f4e3 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -617,7 +617,7 @@ static void shutdown(struct icom_port *icom_port)
 	 * disable break condition
 	 */
 	cmdReg = readb(&icom_port->dram->CmdReg);
-	if ((cmdReg | CMD_SND_BREAK) == CMD_SND_BREAK) {
+	if (cmdReg & CMD_SND_BREAK) {
 		writeb(cmdReg & ~CMD_SND_BREAK, &icom_port->dram->CmdReg);
 	}
 }
-- 
1.6.4.2


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

* [PATCH 08/79] cyclades: add tty refcounting
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (6 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 07/79] tty: icom: bit and/or confusion? Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 09/79] cyclades: remove block_til_ready Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

While this is not problem for Y card handlers (they are protected
by card_lock), Z handlers and other functions may dereference NULL
at any point after hangup/close. Even if (tty == NULL) was already
performed in the handler.

Note that it's not an issue for Y cards just for now. After
switching to tty_port_close_* et al. this will be a problem. So
add refcounting to them all.

Also proc .show doesn't take a tty reference and it should (along
with a ldisc one).

While at it and changing prototypes (adding tty param), prepend
cy_ to functions which don't have it yet.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |  172 +++++++++++++++++++++++++---------------------
 1 files changed, 93 insertions(+), 79 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 2dafc2d..e2f731b 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -850,7 +850,7 @@ MODULE_DEVICE_TABLE(pci, cy_pci_dev_id);
 #endif
 
 static void cy_start(struct tty_struct *);
-static void set_line_char(struct cyclades_port *);
+static void cy_set_line_char(struct cyclades_port *, struct tty_struct *);
 static int cyz_issue_cmd(struct cyclades_card *, __u32, __u8, __u32);
 #ifdef CONFIG_ISA
 static unsigned detect_isa_irq(void __iomem *);
@@ -1011,8 +1011,9 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 	save_car = readb(base_addr + (CyCAR << index));
 	cy_writeb(base_addr + (CyCAR << index), save_xir);
 
+	tty = tty_port_tty_get(&info->port);
 	/* if there is nowhere to put the data, discard it */
-	if (info->port.tty == NULL) {
+	if (tty == NULL) {
 		if ((readb(base_addr + (CyRIVR << index)) & CyIVRMask) ==
 				CyIVRRxEx) {	/* exception */
 			data = readb(base_addr + (CyRDSR << index));
@@ -1024,7 +1025,6 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 		goto end;
 	}
 	/* there is an open port for this data */
-	tty = info->port.tty;
 	if ((readb(base_addr + (CyRIVR << index)) & CyIVRMask) ==
 			CyIVRRxEx) {	/* exception */
 		data = readb(base_addr + (CyRDSR << index));
@@ -1041,6 +1041,7 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 
 		if (data & info->ignore_status_mask) {
 			info->icount.rx++;
+			tty_kref_put(tty);
 			return;
 		}
 		if (tty_buffer_request_room(tty, 1)) {
@@ -1121,6 +1122,7 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 		info->idle_stats.recv_idle = jiffies;
 	}
 	tty_schedule_flip(tty);
+	tty_kref_put(tty);
 end:
 	/* end of service */
 	cy_writeb(base_addr + (CyRIR << index), save_xir & 0x3f);
@@ -1131,6 +1133,7 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 		void __iomem *base_addr)
 {
 	struct cyclades_port *info;
+	struct tty_struct *tty;
 	int char_count, index = cinfo->bus_index;
 	u8 save_xir, channel, save_car, outch;
 
@@ -1154,7 +1157,8 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 		goto end;
 	}
 	info = &cinfo->ports[channel + chip * 4];
-	if (info->port.tty == NULL) {
+	tty = tty_port_tty_get(&info->port);
+	if (tty == NULL) {
 		cy_writeb(base_addr + (CySRER << index),
 			  readb(base_addr + (CySRER << index)) & ~CyTxRdy);
 		goto end;
@@ -1205,7 +1209,7 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 					~CyTxRdy);
 			goto done;
 		}
-		if (info->port.tty->stopped || info->port.tty->hw_stopped) {
+		if (tty->stopped || tty->hw_stopped) {
 			cy_writeb(base_addr + (CySRER << index),
 				readb(base_addr + (CySRER << index)) &
 					~CyTxRdy);
@@ -1241,7 +1245,8 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 	}
 
 done:
-	tty_wakeup(info->port.tty);
+	tty_wakeup(tty);
+	tty_kref_put(tty);
 end:
 	/* end of service */
 	cy_writeb(base_addr + (CyTIR << index), save_xir & 0x3f);
@@ -1252,6 +1257,7 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 		void __iomem *base_addr)
 {
 	struct cyclades_port *info;
+	struct tty_struct *tty;
 	int index = cinfo->bus_index;
 	u8 save_xir, channel, save_car, mdm_change, mdm_status;
 
@@ -1265,7 +1271,8 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 	mdm_change = readb(base_addr + (CyMISR << index));
 	mdm_status = readb(base_addr + (CyMSVR1 << index));
 
-	if (!info->port.tty)
+	tty = tty_port_tty_get(&info->port);
+	if (!tty)
 		goto end;
 
 	if (mdm_change & CyANY_DELTA) {
@@ -1284,27 +1291,27 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 
 	if ((mdm_change & CyDCD) && (info->port.flags & ASYNC_CHECK_CD)) {
 		if (!(mdm_status & CyDCD)) {
-			tty_hangup(info->port.tty);
+			tty_hangup(tty);
 			info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
 		}
 		wake_up_interruptible(&info->port.open_wait);
 	}
 	if ((mdm_change & CyCTS) && (info->port.flags & ASYNC_CTS_FLOW)) {
-		if (info->port.tty->hw_stopped) {
+		if (tty->hw_stopped) {
 			if (mdm_status & CyCTS) {
 				/* cy_start isn't used
 				   because... !!! */
-				info->port.tty->hw_stopped = 0;
+				tty->hw_stopped = 0;
 				cy_writeb(base_addr + (CySRER << index),
 					readb(base_addr + (CySRER << index)) |
 						CyTxRdy);
-				tty_wakeup(info->port.tty);
+				tty_wakeup(tty);
 			}
 		} else {
 			if (!(mdm_status & CyCTS)) {
 				/* cy_stop isn't used
 				   because ... !!! */
-				info->port.tty->hw_stopped = 1;
+				tty->hw_stopped = 1;
 				cy_writeb(base_addr + (CySRER << index),
 					readb(base_addr + (CySRER << index)) &
 						~CyTxRdy);
@@ -1315,6 +1322,7 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 	}
 	if (mdm_change & CyRI) {
 	}*/
+	tty_kref_put(tty);
 end:
 	/* end of service */
 	cy_writeb(base_addr + (CyMIR << index), save_xir & 0x3f);
@@ -1449,11 +1457,10 @@ cyz_issue_cmd(struct cyclades_card *cinfo,
 	return 0;
 }				/* cyz_issue_cmd */
 
-static void cyz_handle_rx(struct cyclades_port *info,
+static void cyz_handle_rx(struct cyclades_port *info, struct tty_struct *tty,
 		struct BUF_CTRL __iomem *buf_ctrl)
 {
 	struct cyclades_card *cinfo = info->card;
-	struct tty_struct *tty = info->port.tty;
 	unsigned int char_count;
 	int len;
 #ifdef BLOCKMOVE
@@ -1542,11 +1549,10 @@ static void cyz_handle_rx(struct cyclades_port *info,
 	}
 }
 
-static void cyz_handle_tx(struct cyclades_port *info,
+static void cyz_handle_tx(struct cyclades_port *info, struct tty_struct *tty,
 		struct BUF_CTRL __iomem *buf_ctrl)
 {
 	struct cyclades_card *cinfo = info->card;
-	struct tty_struct *tty = info->port.tty;
 	u8 data;
 	unsigned int char_count;
 #ifdef BLOCKMOVE
@@ -1642,7 +1648,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 		special_count = 0;
 		delta_count = 0;
 		info = &cinfo->ports[channel];
-		tty = info->port.tty;
+		tty = tty_port_tty_get(&info->port);
 		if (tty == NULL)
 			continue;
 
@@ -1674,7 +1680,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 						C_RS_DCD) {
 					wake_up_interruptible(&info->port.open_wait);
 				} else {
-					tty_hangup(info->port.tty);
+					tty_hangup(tty);
 					wake_up_interruptible(&info->port.open_wait);
 					info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
 				}
@@ -1706,7 +1712,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 			printk(KERN_DEBUG "cyz_interrupt: rcvd intr, card %d, "
 					"port %ld\n", info->card, channel);
 #endif
-			cyz_handle_rx(info, buf_ctrl);
+			cyz_handle_rx(info, tty, buf_ctrl);
 			break;
 		case C_CM_TXBEMPTY:
 		case C_CM_TXLOWWM:
@@ -1716,7 +1722,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 			printk(KERN_DEBUG "cyz_interrupt: xmit intr, card %d, "
 					"port %ld\n", info->card, channel);
 #endif
-			cyz_handle_tx(info, buf_ctrl);
+			cyz_handle_tx(info, tty, buf_ctrl);
 			break;
 #endif				/* CONFIG_CYZ_INTR */
 		case C_CM_FATAL:
@@ -1729,6 +1735,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 			wake_up_interruptible(&info->delta_msr_wait);
 		if (special_count)
 			tty_schedule_flip(tty);
+		tty_kref_put(tty);
 	}
 }
 
@@ -1774,7 +1781,6 @@ static void cyz_poll(unsigned long arg)
 {
 	struct cyclades_card *cinfo;
 	struct cyclades_port *info;
-	struct tty_struct *tty;
 	struct FIRM_ID __iomem *firm_id;
 	struct ZFW_CTRL __iomem *zfw_ctrl;
 	struct BUF_CTRL __iomem *buf_ctrl;
@@ -1802,13 +1808,19 @@ static void cyz_poll(unsigned long arg)
 		cyz_handle_cmd(cinfo);
 
 		for (port = 0; port < cinfo->nports; port++) {
+			struct tty_struct *tty;
+
 			info = &cinfo->ports[port];
-			tty = info->port.tty;
 			buf_ctrl = &(zfw_ctrl->buf_ctrl[port]);
 
+			tty = tty_port_tty_get(&info->port);
+			/* OK to pass NULL to the handle functions below.
+			   They need to drop the data in that case. */
+
 			if (!info->throttle)
-				cyz_handle_rx(info, buf_ctrl);
-			cyz_handle_tx(info, buf_ctrl);
+				cyz_handle_rx(info, tty, buf_ctrl);
+			cyz_handle_tx(info, tty, buf_ctrl);
+			tty_kref_put(tty);
 		}
 		/* poll every 'cyz_polling_cycle' period */
 		expires = jiffies + cyz_polling_cycle;
@@ -1824,7 +1836,7 @@ static void cyz_poll(unsigned long arg)
 /* This is called whenever a port becomes active;
    interrupts are enabled and DTR & RTS are turned on.
  */
-static int startup(struct cyclades_port *info)
+static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 {
 	struct cyclades_card *card;
 	unsigned long flags;
@@ -1848,8 +1860,7 @@ static int startup(struct cyclades_port *info)
 	}
 
 	if (!info->type) {
-		if (info->port.tty)
-			set_bit(TTY_IO_ERROR, &info->port.tty->flags);
+		set_bit(TTY_IO_ERROR, &tty->flags);
 		free_page(page);
 		goto errout;
 	}
@@ -1861,7 +1872,7 @@ static int startup(struct cyclades_port *info)
 
 	spin_unlock_irqrestore(&card->card_lock, flags);
 
-	set_line_char(info);
+	cy_set_line_char(info, tty);
 
 	if (!cy_is_Z(card)) {
 		chip = channel >> 2;
@@ -1900,8 +1911,7 @@ static int startup(struct cyclades_port *info)
 			readb(base_addr + (CySRER << index)) | CyRxData);
 		info->port.flags |= ASYNC_INITIALIZED;
 
-		if (info->port.tty)
-			clear_bit(TTY_IO_ERROR, &info->port.tty->flags);
+		clear_bit(TTY_IO_ERROR, &tty->flags);
 		info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
 		info->breakon = info->breakoff = 0;
 		memset((char *)&info->idle_stats, 0, sizeof(info->idle_stats));
@@ -1984,8 +1994,7 @@ static int startup(struct cyclades_port *info)
 		/* enable send, recv, modem !!! */
 
 		info->port.flags |= ASYNC_INITIALIZED;
-		if (info->port.tty)
-			clear_bit(TTY_IO_ERROR, &info->port.tty->flags);
+		clear_bit(TTY_IO_ERROR, &tty->flags);
 		info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
 		info->breakon = info->breakoff = 0;
 		memset((char *)&info->idle_stats, 0, sizeof(info->idle_stats));
@@ -2047,7 +2056,7 @@ static void start_xmit(struct cyclades_port *info)
  * This routine shuts down a serial port; interrupts are disabled,
  * and DTR is dropped if the hangup on close termio flag is on.
  */
-static void shutdown(struct cyclades_port *info)
+static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 {
 	struct cyclades_card *card;
 	unsigned long flags;
@@ -2083,7 +2092,7 @@ static void shutdown(struct cyclades_port *info)
 			free_page((unsigned long)temp);
 		}
 		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		if (!info->port.tty || (info->port.tty->termios->c_cflag & HUPCL)) {
+		if (tty->termios->c_cflag & HUPCL) {
 			cy_writeb(base_addr + (CyMSVR1 << index), ~CyRTS);
 			cy_writeb(base_addr + (CyMSVR2 << index), ~CyDTR);
 #ifdef CY_DEBUG_DTR
@@ -2097,8 +2106,7 @@ static void shutdown(struct cyclades_port *info)
 		/* it may be appropriate to clear _XMIT at
 		   some later date (after testing)!!! */
 
-		if (info->port.tty)
-			set_bit(TTY_IO_ERROR, &info->port.tty->flags);
+		set_bit(TTY_IO_ERROR, &tty->flags);
 		info->port.flags &= ~ASYNC_INITIALIZED;
 		spin_unlock_irqrestore(&card->card_lock, flags);
 	} else {
@@ -2132,7 +2140,7 @@ static void shutdown(struct cyclades_port *info)
 			free_page((unsigned long)temp);
 		}
 
-		if (!info->port.tty || (info->port.tty->termios->c_cflag & HUPCL)) {
+		if (tty->termios->c_cflag & HUPCL) {
 			cy_writel(&ch_ctrl[channel].rs_control,
 				(__u32)(readl(&ch_ctrl[channel].rs_control) &
 					~(C_RS_RTS | C_RS_DTR)));
@@ -2147,8 +2155,7 @@ static void shutdown(struct cyclades_port *info)
 #endif
 		}
 
-		if (info->port.tty)
-			set_bit(TTY_IO_ERROR, &info->port.tty->flags);
+		set_bit(TTY_IO_ERROR, &tty->flags);
 		info->port.flags &= ~ASYNC_INITIALIZED;
 
 		spin_unlock_irqrestore(&card->card_lock, flags);
@@ -2436,7 +2443,6 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
 	printk(KERN_DEBUG "cyc:cy_open ttyC%d\n", info->line);
 #endif
 	tty->driver_data = info;
-	info->port.tty = tty;
 	if (serial_paranoia_check(info, tty->name, "cy_open"))
 		return -ENODEV;
 
@@ -2462,7 +2468,7 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
 	/*
 	 * Start up serial port
 	 */
-	retval = startup(info);
+	retval = cy_startup(info, tty);
 	if (retval)
 		return retval;
 
@@ -2476,6 +2482,7 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
 	}
 
 	info->throttle = 0;
+	tty_port_tty_set(&info->port, tty);
 
 #ifdef CY_DEBUG_OPEN
 	printk(KERN_DEBUG "cyc:cy_open done\n");
@@ -2705,13 +2712,13 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 	}
 
 	spin_unlock_irqrestore(&card->card_lock, flags);
-	shutdown(info);
+	cy_shutdown(info, tty);
 	cy_flush_buffer(tty);
 	tty_ldisc_flush(tty);
 	spin_lock_irqsave(&card->card_lock, flags);
 
 	tty->closing = 0;
-	info->port.tty = NULL;
+	tty_port_tty_set(&info->port, NULL);
 	if (info->port.blocked_open) {
 		spin_unlock_irqrestore(&card->card_lock, flags);
 		if (info->port.close_delay) {
@@ -2957,7 +2964,7 @@ static void cyy_baud_calc(struct cyclades_port *info, __u32 baud)
  * This routine finds or computes the various line characteristics.
  * It used to be called config_setup
  */
-static void set_line_char(struct cyclades_port *info)
+static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 {
 	struct cyclades_card *card;
 	unsigned long flags;
@@ -2967,28 +2974,26 @@ static void set_line_char(struct cyclades_port *info)
 	int baud, baud_rate = 0;
 	int i;
 
-	if (!info->port.tty || !info->port.tty->termios)
+	if (!tty->termios) /* XXX can this happen at all? */
 		return;
 
 	if (info->line == -1)
 		return;
 
-	cflag = info->port.tty->termios->c_cflag;
-	iflag = info->port.tty->termios->c_iflag;
+	cflag = tty->termios->c_cflag;
+	iflag = tty->termios->c_iflag;
 
 	/*
 	 * Set up the tty->alt_speed kludge
 	 */
-	if (info->port.tty) {
-		if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
-			info->port.tty->alt_speed = 57600;
-		if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
-			info->port.tty->alt_speed = 115200;
-		if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
-			info->port.tty->alt_speed = 230400;
-		if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
-			info->port.tty->alt_speed = 460800;
-	}
+	if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
+		tty->alt_speed = 57600;
+	if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
+		tty->alt_speed = 115200;
+	if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
+		tty->alt_speed = 230400;
+	if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
+		tty->alt_speed = 460800;
 
 	card = info->card;
 	channel = info->line - card->first_line;
@@ -2998,7 +3003,7 @@ static void set_line_char(struct cyclades_port *info)
 		index = card->bus_index;
 
 		/* baud rate */
-		baud = tty_get_baud_rate(info->port.tty);
+		baud = tty_get_baud_rate(tty);
 		if (baud == 38400 && (info->port.flags & ASYNC_SPD_MASK) ==
 				ASYNC_SPD_CUST) {
 			if (info->custom_divisor)
@@ -3123,9 +3128,8 @@ static void set_line_char(struct cyclades_port *info)
 
 		/* set line characteristics  according configuration */
 
-		cy_writeb(base_addr + (CySCHR1 << index),
-			  START_CHAR(info->port.tty));
-		cy_writeb(base_addr + (CySCHR2 << index), STOP_CHAR(info->port.tty));
+		cy_writeb(base_addr + (CySCHR1 << index), START_CHAR(tty));
+		cy_writeb(base_addr + (CySCHR2 << index), STOP_CHAR(tty));
 		cy_writeb(base_addr + (CyCOR1 << index), info->cor1);
 		cy_writeb(base_addr + (CyCOR2 << index), info->cor2);
 		cy_writeb(base_addr + (CyCOR3 << index), info->cor3);
@@ -3141,7 +3145,7 @@ static void set_line_char(struct cyclades_port *info)
 			(info->default_timeout ? info->default_timeout : 0x02));
 		/* 10ms rx timeout */
 
-		if (C_CLOCAL(info->port.tty)) {
+		if (C_CLOCAL(tty)) {
 			/* without modem intr */
 			cy_writeb(base_addr + (CySRER << index),
 				readb(base_addr + (CySRER << index)) | CyMdmCh);
@@ -3204,8 +3208,7 @@ static void set_line_char(struct cyclades_port *info)
 #endif
 		}
 
-		if (info->port.tty)
-			clear_bit(TTY_IO_ERROR, &info->port.tty->flags);
+		clear_bit(TTY_IO_ERROR, &tty->flags);
 		spin_unlock_irqrestore(&card->card_lock, flags);
 
 	} else {
@@ -3224,7 +3227,7 @@ static void set_line_char(struct cyclades_port *info)
 		ch_ctrl = &(zfw_ctrl->ch_ctrl[channel]);
 
 		/* baud rate */
-		baud = tty_get_baud_rate(info->port.tty);
+		baud = tty_get_baud_rate(tty);
 		if (baud == 38400 && (info->port.flags & ASYNC_SPD_MASK) ==
 				ASYNC_SPD_CUST) {
 			if (info->custom_divisor)
@@ -3335,8 +3338,7 @@ static void set_line_char(struct cyclades_port *info)
 				"was %x\n", info->line, retval);
 		}
 
-		if (info->port.tty)
-			clear_bit(TTY_IO_ERROR, &info->port.tty->flags);
+		clear_bit(TTY_IO_ERROR, &tty->flags);
 	}
 }				/* set_line_char */
 
@@ -3365,7 +3367,7 @@ get_serial_info(struct cyclades_port *info,
 }				/* get_serial_info */
 
 static int
-set_serial_info(struct cyclades_port *info,
+cy_set_serial_info(struct cyclades_port *info, struct tty_struct *tty,
 		struct serial_struct __user *new_info)
 {
 	struct serial_struct new_serial;
@@ -3403,10 +3405,10 @@ set_serial_info(struct cyclades_port *info,
 
 check_and_exit:
 	if (info->port.flags & ASYNC_INITIALIZED) {
-		set_line_char(info);
+		cy_set_line_char(info, tty);
 		return 0;
 	} else {
-		return startup(info);
+		return cy_startup(info, tty);
 	}
 }				/* set_serial_info */
 
@@ -3955,7 +3957,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 		ret_val = get_serial_info(info, argp);
 		break;
 	case TIOCSSERIAL:
-		ret_val = set_serial_info(info, argp);
+		ret_val = cy_set_serial_info(info, tty, argp);
 		break;
 	case TIOCSERGETLSR:	/* Get line status register */
 		ret_val = get_lsr_info(info, argp);
@@ -4055,7 +4057,7 @@ static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 	printk(KERN_DEBUG "cyc:cy_set_termios ttyC%d\n", info->line);
 #endif
 
-	set_line_char(info);
+	cy_set_line_char(info, tty);
 
 	if ((old_termios->c_cflag & CRTSCTS) &&
 			!(tty->termios->c_cflag & CRTSCTS)) {
@@ -4299,13 +4301,13 @@ static void cy_hangup(struct tty_struct *tty)
 		return;
 
 	cy_flush_buffer(tty);
-	shutdown(info);
+	cy_shutdown(info, tty);
 	info->port.count = 0;
 #ifdef CY_DEBUG_COUNT
 	printk(KERN_DEBUG "cyc:cy_hangup (%d): setting count to 0\n",
 		current->pid);
 #endif
-	info->port.tty = NULL;
+	tty_port_tty_set(&info->port, NULL);
 	info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
 	wake_up_interruptible(&info->port.open_wait);
 }				/* cy_hangup */
@@ -5191,18 +5193,30 @@ static int cyclades_proc_show(struct seq_file *m, void *v)
 		for (j = 0; j < cy_card[i].nports; j++) {
 			info = &cy_card[i].ports[j];
 
-			if (info->port.count)
+			if (info->port.count) {
+				/* XXX is the ldisc num worth this? */
+				struct tty_struct *tty;
+				struct tty_ldisc *ld;
+				int num = 0;
+				tty = tty_port_tty_get(&info->port);
+				if (tty) {
+					ld = tty_ldisc_ref(tty);
+					if (ld) {
+						num = ld->ops->num;
+						tty_ldisc_deref(ld);
+					}
+					tty_kref_put(tty);
+				}
 				seq_printf(m, "%3d %8lu %10lu %8lu "
-					"%10lu %8lu %9lu %6ld\n", info->line,
+					"%10lu %8lu %9lu %6d\n", info->line,
 					(cur_jifs - info->idle_stats.in_use) /
 					HZ, info->idle_stats.xmit_bytes,
 					(cur_jifs - info->idle_stats.xmit_idle)/
 					HZ, info->idle_stats.recv_bytes,
 					(cur_jifs - info->idle_stats.recv_idle)/
 					HZ, info->idle_stats.overruns,
-					/* FIXME: double check locking */
-					(long)info->port.tty->ldisc->ops->num);
-			else
+					num);
+			} else
 				seq_printf(m, "%3d %8lu %10lu %8lu "
 					"%10lu %8lu %9lu %6ld\n",
 					info->line, 0L, 0L, 0L, 0L, 0L, 0L, 0L);
-- 
1.6.4.2


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

* [PATCH 09/79] cyclades: remove block_til_ready
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (7 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 08/79] cyclades: add tty refcounting Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 10/79] cyclades: avoid addresses recomputation Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Use a tty_port common instead. This saves lots of .text and makes the
code a lot more readable.

This involves separation of a dtr_rts handling, next patches will use
that to not duplicate the code all over the place.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |  302 +++++++++++++++++------------------------------
 1 files changed, 108 insertions(+), 194 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index e2f731b..9e0cd70 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -2172,199 +2172,6 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
  * ------------------------------------------------------------
  */
 
-static int
-block_til_ready(struct tty_struct *tty, struct file *filp,
-		struct cyclades_port *info)
-{
-	DECLARE_WAITQUEUE(wait, current);
-	struct cyclades_card *cinfo;
-	unsigned long flags;
-	int chip, channel, index;
-	int retval;
-	void __iomem *base_addr;
-
-	cinfo = info->card;
-	channel = info->line - cinfo->first_line;
-
-	/*
-	 * If the device is in the middle of being closed, then block
-	 * until it's done, and then try again.
-	 */
-	if (tty_hung_up_p(filp) || (info->port.flags & ASYNC_CLOSING)) {
-		wait_event_interruptible(info->port.close_wait,
-				!(info->port.flags & ASYNC_CLOSING));
-		return (info->port.flags & ASYNC_HUP_NOTIFY) ? -EAGAIN: -ERESTARTSYS;
-	}
-
-	/*
-	 * If non-blocking mode is set, then make the check up front
-	 * and then exit.
-	 */
-	if ((filp->f_flags & O_NONBLOCK) ||
-					(tty->flags & (1 << TTY_IO_ERROR))) {
-		info->port.flags |= ASYNC_NORMAL_ACTIVE;
-		return 0;
-	}
-
-	/*
-	 * Block waiting for the carrier detect and the line to become
-	 * free (i.e., not in use by the callout).  While we are in
-	 * this loop, info->port.count is dropped by one, so that
-	 * cy_close() knows when to free things.  We restore it upon
-	 * exit, either normal or abnormal.
-	 */
-	retval = 0;
-	add_wait_queue(&info->port.open_wait, &wait);
-#ifdef CY_DEBUG_OPEN
-	printk(KERN_DEBUG "cyc block_til_ready before block: ttyC%d, "
-		"count = %d\n", info->line, info->port.count);
-#endif
-	spin_lock_irqsave(&cinfo->card_lock, flags);
-	if (!tty_hung_up_p(filp))
-		info->port.count--;
-	spin_unlock_irqrestore(&cinfo->card_lock, flags);
-#ifdef CY_DEBUG_COUNT
-	printk(KERN_DEBUG "cyc block_til_ready: (%d): decrementing count to "
-		"%d\n", current->pid, info->port.count);
-#endif
-	info->port.blocked_open++;
-
-	if (!cy_is_Z(cinfo)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = cinfo->bus_index;
-		base_addr = cinfo->base_addr + (cy_chip_offset[chip] << index);
-
-		while (1) {
-			spin_lock_irqsave(&cinfo->card_lock, flags);
-			if ((tty->termios->c_cflag & CBAUD)) {
-				cy_writeb(base_addr + (CyCAR << index),
-					  (u_char) channel);
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  CyRTS);
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  CyDTR);
-#ifdef CY_DEBUG_DTR
-				printk(KERN_DEBUG "cyc:block_til_ready raising "
-					"DTR\n");
-				printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-					readb(base_addr + (CyMSVR1 << index)),
-					readb(base_addr + (CyMSVR2 << index)));
-#endif
-			}
-			spin_unlock_irqrestore(&cinfo->card_lock, flags);
-
-			set_current_state(TASK_INTERRUPTIBLE);
-			if (tty_hung_up_p(filp) ||
-					!(info->port.flags & ASYNC_INITIALIZED)) {
-				retval = ((info->port.flags & ASYNC_HUP_NOTIFY) ?
-					  -EAGAIN : -ERESTARTSYS);
-				break;
-			}
-
-			spin_lock_irqsave(&cinfo->card_lock, flags);
-			cy_writeb(base_addr + (CyCAR << index),
-				  (u_char) channel);
-			if (!(info->port.flags & ASYNC_CLOSING) && (C_CLOCAL(tty) ||
-					(readb(base_addr +
-						(CyMSVR1 << index)) & CyDCD))) {
-				spin_unlock_irqrestore(&cinfo->card_lock, flags);
-				break;
-			}
-			spin_unlock_irqrestore(&cinfo->card_lock, flags);
-
-			if (signal_pending(current)) {
-				retval = -ERESTARTSYS;
-				break;
-			}
-#ifdef CY_DEBUG_OPEN
-			printk(KERN_DEBUG "cyc block_til_ready blocking: "
-				"ttyC%d, count = %d\n",
-				info->line, info->port.count);
-#endif
-			schedule();
-		}
-	} else {
-		struct FIRM_ID __iomem *firm_id;
-		struct ZFW_CTRL __iomem *zfw_ctrl;
-		struct BOARD_CTRL __iomem *board_ctrl;
-		struct CH_CTRL __iomem *ch_ctrl;
-
-		base_addr = cinfo->base_addr;
-		firm_id = base_addr + ID_ADDRESS;
-		if (!cyz_is_loaded(cinfo)) {
-			__set_current_state(TASK_RUNNING);
-			remove_wait_queue(&info->port.open_wait, &wait);
-			return -EINVAL;
-		}
-
-		zfw_ctrl = base_addr + (readl(&firm_id->zfwctrl_addr)
-								& 0xfffff);
-		board_ctrl = &zfw_ctrl->board_ctrl;
-		ch_ctrl = zfw_ctrl->ch_ctrl;
-
-		while (1) {
-			if ((tty->termios->c_cflag & CBAUD)) {
-				cy_writel(&ch_ctrl[channel].rs_control,
-					readl(&ch_ctrl[channel].rs_control) |
-					C_RS_RTS | C_RS_DTR);
-				retval = cyz_issue_cmd(cinfo,
-					channel, C_CM_IOCTLM, 0L);
-				if (retval != 0) {
-					printk(KERN_ERR "cyc:block_til_ready "
-						"retval on ttyC%d was %x\n",
-						info->line, retval);
-				}
-#ifdef CY_DEBUG_DTR
-				printk(KERN_DEBUG "cyc:block_til_ready raising "
-					"Z DTR\n");
-#endif
-			}
-
-			set_current_state(TASK_INTERRUPTIBLE);
-			if (tty_hung_up_p(filp) ||
-					!(info->port.flags & ASYNC_INITIALIZED)) {
-				retval = ((info->port.flags & ASYNC_HUP_NOTIFY) ?
-					  -EAGAIN : -ERESTARTSYS);
-				break;
-			}
-			if (!(info->port.flags & ASYNC_CLOSING) && (C_CLOCAL(tty) ||
-					(readl(&ch_ctrl[channel].rs_status) &
-						C_RS_DCD))) {
-				break;
-			}
-			if (signal_pending(current)) {
-				retval = -ERESTARTSYS;
-				break;
-			}
-#ifdef CY_DEBUG_OPEN
-			printk(KERN_DEBUG "cyc block_til_ready blocking: "
-				"ttyC%d, count = %d\n",
-				info->line, info->port.count);
-#endif
-			schedule();
-		}
-	}
-	__set_current_state(TASK_RUNNING);
-	remove_wait_queue(&info->port.open_wait, &wait);
-	if (!tty_hung_up_p(filp)) {
-		info->port.count++;
-#ifdef CY_DEBUG_COUNT
-		printk(KERN_DEBUG "cyc:block_til_ready (%d): incrementing "
-			"count to %d\n", current->pid, info->port.count);
-#endif
-	}
-	info->port.blocked_open--;
-#ifdef CY_DEBUG_OPEN
-	printk(KERN_DEBUG "cyc:block_til_ready after blocking: ttyC%d, "
-		"count = %d\n", info->line, info->port.count);
-#endif
-	if (retval)
-		return retval;
-	info->port.flags |= ASYNC_NORMAL_ACTIVE;
-	return 0;
-}				/* block_til_ready */
-
 /*
  * This routine is called whenever a serial port is opened.  It
  * performs the serial-specific initialization for the tty structure.
@@ -2472,7 +2279,7 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
 	if (retval)
 		return retval;
 
-	retval = block_til_ready(tty, filp, info);
+	retval = tty_port_block_til_ready(&info->port, tty, filp);
 	if (retval) {
 #ifdef CY_DEBUG_OPEN
 		printk(KERN_DEBUG "cyc:cy_open returning after block_til_ready "
@@ -4312,6 +4119,111 @@ static void cy_hangup(struct tty_struct *tty)
 	wake_up_interruptible(&info->port.open_wait);
 }				/* cy_hangup */
 
+static int cyy_carrier_raised(struct tty_port *port)
+{
+	struct cyclades_port *info = container_of(port, struct cyclades_port,
+			port);
+	struct cyclades_card *cinfo = info->card;
+	void __iomem *base = cinfo->base_addr;
+	unsigned long flags;
+	int channel = info->line - cinfo->first_line;
+	int chip = channel >> 2, index = cinfo->bus_index;
+	u32 cd;
+
+	channel &= 0x03;
+	base += cy_chip_offset[chip] << index;
+
+	spin_lock_irqsave(&cinfo->card_lock, flags);
+	cy_writeb(base + (CyCAR << index), (u8)channel);
+	cd = readb(base + (CyMSVR1 << index)) & CyDCD;
+	spin_unlock_irqrestore(&cinfo->card_lock, flags);
+
+	return cd;
+}
+
+static void cyy_dtr_rts(struct tty_port *port, int raise)
+{
+	struct cyclades_port *info = container_of(port, struct cyclades_port,
+			port);
+	struct cyclades_card *cinfo = info->card;
+	void __iomem *base = cinfo->base_addr;
+	unsigned long flags;
+	int channel = info->line - cinfo->first_line;
+	int chip = channel >> 2, index = cinfo->bus_index;
+
+	channel &= 0x03;
+	base += cy_chip_offset[chip] << index;
+
+	spin_lock_irqsave(&cinfo->card_lock, flags);
+	cy_writeb(base + (CyCAR << index), (u8)channel);
+	cy_writeb(base + (CyMSVR1 << index), raise ? CyRTS : ~CyRTS);
+	cy_writeb(base + (CyMSVR2 << index), raise ? CyDTR : ~CyDTR);
+#ifdef CY_DEBUG_DTR
+	printk(KERN_DEBUG "%s: raising DTR\n", __func__);
+	printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
+			readb(base + (CyMSVR1 << index)),
+			readb(base + (CyMSVR2 << index)));
+#endif
+	spin_unlock_irqrestore(&cinfo->card_lock, flags);
+}
+
+static int cyz_carrier_raised(struct tty_port *port)
+{
+	struct cyclades_port *info = container_of(port, struct cyclades_port,
+			port);
+	struct cyclades_card *cinfo = info->card;
+	void __iomem *base = cinfo->base_addr;
+	struct FIRM_ID __iomem *firm_id = base + ID_ADDRESS;
+	struct ZFW_CTRL __iomem *zfw_ctrl;
+	struct CH_CTRL __iomem *ch_ctrl;
+	int channel = info->line - cinfo->first_line;
+
+	zfw_ctrl = base + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
+	ch_ctrl = zfw_ctrl->ch_ctrl;
+
+	return readl(&ch_ctrl[channel].rs_status) & C_RS_DCD;
+}
+
+static void cyz_dtr_rts(struct tty_port *port, int raise)
+{
+	struct cyclades_port *info = container_of(port, struct cyclades_port,
+			port);
+	struct cyclades_card *cinfo = info->card;
+	void __iomem *base = cinfo->base_addr;
+	struct FIRM_ID __iomem *firm_id = base + ID_ADDRESS;
+	struct ZFW_CTRL __iomem *zfw_ctrl;
+	struct CH_CTRL __iomem *ch_ctrl;
+	int ret, channel = info->line - cinfo->first_line;
+	u32 rs;
+
+	zfw_ctrl = base + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
+	ch_ctrl = zfw_ctrl->ch_ctrl;
+
+	rs = readl(&ch_ctrl[channel].rs_control);
+	if (raise)
+		rs |= C_RS_RTS | C_RS_DTR;
+	else
+		rs &= ~(C_RS_RTS | C_RS_DTR);
+	cy_writel(&ch_ctrl[channel].rs_control, rs);
+	ret = cyz_issue_cmd(cinfo, channel, C_CM_IOCTLM, 0L);
+	if (ret != 0)
+		printk(KERN_ERR "%s: retval on ttyC%d was %x\n",
+				__func__, info->line, ret);
+#ifdef CY_DEBUG_DTR
+	printk(KERN_DEBUG "%s: raising Z DTR\n", __func__);
+#endif
+}
+
+static const struct tty_port_operations cyy_port_ops = {
+	.carrier_raised = cyy_carrier_raised,
+	.dtr_rts = cyy_dtr_rts,
+};
+
+static const struct tty_port_operations cyz_port_ops = {
+	.carrier_raised = cyz_carrier_raised,
+	.dtr_rts = cyz_dtr_rts,
+};
+
 /*
  * ---------------------------------------------------------------------
  * cy_init() and friends
@@ -4351,6 +4263,7 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
 		init_waitqueue_head(&info->delta_msr_wait);
 
 		if (cy_is_Z(cinfo)) {
+			info->port.ops = &cyz_port_ops;
 			info->type = PORT_STARTECH;
 			if (cinfo->hw_ver == ZO_V1)
 				info->xmit_fifo_size = CYZ_FIFO_SIZE;
@@ -4362,6 +4275,7 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
 #endif
 		} else {
 			int index = cinfo->bus_index;
+			info->port.ops = &cyy_port_ops;
 			info->type = PORT_CIRRUS;
 			info->xmit_fifo_size = CyMAX_CHAR_FIFO;
 			info->cor1 = CyPARITY_NONE | Cy_1_STOP | Cy_8_BITS;
-- 
1.6.4.2


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

* [PATCH 10/79] cyclades: avoid addresses recomputation
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (8 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 09/79] cyclades: remove block_til_ready Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 11/79] cyclades: switch to tty_port_hangup Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Don't fetch firmware address and recompute channel control on each
port access. Precompute the values on init and use them later all
the time.

The same for board control.

This simplify code and improves readability.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c  |  241 ++++++++++++++--------------------------------
 include/linux/cyclades.h |   10 ++
 2 files changed, 81 insertions(+), 170 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 9e0cd70..7a7092a 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -814,7 +814,7 @@ static char rflow_thr[] = {	/* rflow threshold */
 /*  The Cyclom-Ye has placed the sequential chips in non-sequential
  *  address order.  This look-up table overcomes that problem.
  */
-static int cy_chip_offset[] = { 0x0000,
+static const unsigned int cy_chip_offset[] = { 0x0000,
 	0x0400,
 	0x0800,
 	0x0C00,
@@ -1406,15 +1406,9 @@ static int
 cyz_fetch_msg(struct cyclades_card *cinfo,
 		__u32 *channel, __u8 *cmd, __u32 *param)
 {
-	struct FIRM_ID __iomem *firm_id;
-	struct ZFW_CTRL __iomem *zfw_ctrl;
-	struct BOARD_CTRL __iomem *board_ctrl;
+	struct BOARD_CTRL __iomem *board_ctrl = cinfo->board_ctrl;
 	unsigned long loc_doorbell;
 
-	firm_id = cinfo->base_addr + ID_ADDRESS;
-	zfw_ctrl = cinfo->base_addr + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
-	board_ctrl = &zfw_ctrl->board_ctrl;
-
 	loc_doorbell = readl(&cinfo->ctl_addr.p9060->loc_doorbell);
 	if (loc_doorbell) {
 		*cmd = (char)(0xff & loc_doorbell);
@@ -1430,19 +1424,13 @@ static int
 cyz_issue_cmd(struct cyclades_card *cinfo,
 		__u32 channel, __u8 cmd, __u32 param)
 {
-	struct FIRM_ID __iomem *firm_id;
-	struct ZFW_CTRL __iomem *zfw_ctrl;
-	struct BOARD_CTRL __iomem *board_ctrl;
+	struct BOARD_CTRL __iomem *board_ctrl = cinfo->board_ctrl;
 	__u32 __iomem *pci_doorbell;
 	unsigned int index;
 
-	firm_id = cinfo->base_addr + ID_ADDRESS;
 	if (!cyz_is_loaded(cinfo))
 		return -1;
 
-	zfw_ctrl = cinfo->base_addr + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
-	board_ctrl = &zfw_ctrl->board_ctrl;
-
 	index = 0;
 	pci_doorbell = &cinfo->ctl_addr.p9060->pci_doorbell;
 	while ((readl(pci_doorbell) & 0xff) != 0) {
@@ -1457,9 +1445,9 @@ cyz_issue_cmd(struct cyclades_card *cinfo,
 	return 0;
 }				/* cyz_issue_cmd */
 
-static void cyz_handle_rx(struct cyclades_port *info, struct tty_struct *tty,
-		struct BUF_CTRL __iomem *buf_ctrl)
+static void cyz_handle_rx(struct cyclades_port *info, struct tty_struct *tty)
 {
+	struct BUF_CTRL __iomem *buf_ctrl = info->u.cyz.buf_ctrl;
 	struct cyclades_card *cinfo = info->card;
 	unsigned int char_count;
 	int len;
@@ -1549,9 +1537,9 @@ static void cyz_handle_rx(struct cyclades_port *info, struct tty_struct *tty,
 	}
 }
 
-static void cyz_handle_tx(struct cyclades_port *info, struct tty_struct *tty,
-		struct BUF_CTRL __iomem *buf_ctrl)
+static void cyz_handle_tx(struct cyclades_port *info, struct tty_struct *tty)
 {
+	struct BUF_CTRL __iomem *buf_ctrl = info->u.cyz.buf_ctrl;
 	struct cyclades_card *cinfo = info->card;
 	u8 data;
 	unsigned int char_count;
@@ -1627,21 +1615,14 @@ ztxdone:
 
 static void cyz_handle_cmd(struct cyclades_card *cinfo)
 {
+	struct BOARD_CTRL __iomem *board_ctrl = cinfo->board_ctrl;
 	struct tty_struct *tty;
 	struct cyclades_port *info;
-	static struct FIRM_ID __iomem *firm_id;
-	static struct ZFW_CTRL __iomem *zfw_ctrl;
-	static struct BOARD_CTRL __iomem *board_ctrl;
-	static struct CH_CTRL __iomem *ch_ctrl;
-	static struct BUF_CTRL __iomem *buf_ctrl;
 	__u32 channel, param, fw_ver;
 	__u8 cmd;
 	int special_count;
 	int delta_count;
 
-	firm_id = cinfo->base_addr + ID_ADDRESS;
-	zfw_ctrl = cinfo->base_addr + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
-	board_ctrl = &zfw_ctrl->board_ctrl;
 	fw_ver = readl(&board_ctrl->fw_version);
 
 	while (cyz_fetch_msg(cinfo, &channel, &cmd, &param) == 1) {
@@ -1652,9 +1633,6 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 		if (tty == NULL)
 			continue;
 
-		ch_ctrl = &(zfw_ctrl->ch_ctrl[channel]);
-		buf_ctrl = &(zfw_ctrl->buf_ctrl[channel]);
-
 		switch (cmd) {
 		case C_CM_PR_ERROR:
 			tty_insert_flip_char(tty, 0, TTY_PARITY);
@@ -1675,9 +1653,9 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 			info->icount.dcd++;
 			delta_count++;
 			if (info->port.flags & ASYNC_CHECK_CD) {
-				if ((fw_ver > 241 ? ((u_long) param) :
-						readl(&ch_ctrl->rs_status)) &
-						C_RS_DCD) {
+				u32 dcd = fw_ver > 241 ? param :
+					readl(&info->u.cyz.ch_ctrl->rs_status);
+				if (dcd & C_RS_DCD) {
 					wake_up_interruptible(&info->port.open_wait);
 				} else {
 					tty_hangup(tty);
@@ -1712,7 +1690,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 			printk(KERN_DEBUG "cyz_interrupt: rcvd intr, card %d, "
 					"port %ld\n", info->card, channel);
 #endif
-			cyz_handle_rx(info, tty, buf_ctrl);
+			cyz_handle_rx(info, tty);
 			break;
 		case C_CM_TXBEMPTY:
 		case C_CM_TXLOWWM:
@@ -1722,7 +1700,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 			printk(KERN_DEBUG "cyz_interrupt: xmit intr, card %d, "
 					"port %ld\n", info->card, channel);
 #endif
-			cyz_handle_tx(info, tty, buf_ctrl);
+			cyz_handle_tx(info, tty);
 			break;
 #endif				/* CONFIG_CYZ_INTR */
 		case C_CM_FATAL:
@@ -1781,9 +1759,6 @@ static void cyz_poll(unsigned long arg)
 {
 	struct cyclades_card *cinfo;
 	struct cyclades_port *info;
-	struct FIRM_ID __iomem *firm_id;
-	struct ZFW_CTRL __iomem *zfw_ctrl;
-	struct BUF_CTRL __iomem *buf_ctrl;
 	unsigned long expires = jiffies + HZ;
 	unsigned int port, card;
 
@@ -1795,10 +1770,6 @@ static void cyz_poll(unsigned long arg)
 		if (!cyz_is_loaded(cinfo))
 			continue;
 
-		firm_id = cinfo->base_addr + ID_ADDRESS;
-		zfw_ctrl = cinfo->base_addr +
-				(readl(&firm_id->zfwctrl_addr) & 0xfffff);
-
 	/* Skip first polling cycle to avoid racing conditions with the FW */
 		if (!cinfo->intr_enabled) {
 			cinfo->intr_enabled = 1;
@@ -1811,15 +1782,13 @@ static void cyz_poll(unsigned long arg)
 			struct tty_struct *tty;
 
 			info = &cinfo->ports[port];
-			buf_ctrl = &(zfw_ctrl->buf_ctrl[port]);
-
 			tty = tty_port_tty_get(&info->port);
 			/* OK to pass NULL to the handle functions below.
 			   They need to drop the data in that case. */
 
 			if (!info->throttle)
-				cyz_handle_rx(info, tty, buf_ctrl);
-			cyz_handle_tx(info, tty, buf_ctrl);
+				cyz_handle_rx(info, tty);
+			cyz_handle_tx(info, tty);
 			tty_kref_put(tty);
 		}
 		/* poll every 'cyz_polling_cycle' period */
@@ -1922,45 +1891,34 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 		spin_unlock_irqrestore(&card->card_lock, flags);
 
 	} else {
-		struct FIRM_ID __iomem *firm_id;
-		struct ZFW_CTRL __iomem *zfw_ctrl;
-		struct BOARD_CTRL __iomem *board_ctrl;
-		struct CH_CTRL __iomem *ch_ctrl;
-
-		base_addr = card->base_addr;
+		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
 
-		firm_id = base_addr + ID_ADDRESS;
 		if (!cyz_is_loaded(card))
 			return -ENODEV;
 
-		zfw_ctrl = card->base_addr +
-				(readl(&firm_id->zfwctrl_addr) & 0xfffff);
-		board_ctrl = &zfw_ctrl->board_ctrl;
-		ch_ctrl = zfw_ctrl->ch_ctrl;
-
 #ifdef CY_DEBUG_OPEN
 		printk(KERN_DEBUG "cyc startup Z card %d, channel %d, "
-			"base_addr %p\n", card, channel, base_addr);
+			"base_addr %p\n", card, channel, card->base_addr);
 #endif
 		spin_lock_irqsave(&card->card_lock, flags);
 
-		cy_writel(&ch_ctrl[channel].op_mode, C_CH_ENABLE);
+		cy_writel(&ch_ctrl->op_mode, C_CH_ENABLE);
 #ifdef Z_WAKE
 #ifdef CONFIG_CYZ_INTR
-		cy_writel(&ch_ctrl[channel].intr_enable,
+		cy_writel(&ch_ctrl->intr_enable,
 			  C_IN_TXBEMPTY | C_IN_TXLOWWM | C_IN_RXHIWM |
 			  C_IN_RXNNDT | C_IN_IOCTLW | C_IN_MDCD);
 #else
-		cy_writel(&ch_ctrl[channel].intr_enable,
+		cy_writel(&ch_ctrl->intr_enable,
 			  C_IN_IOCTLW | C_IN_MDCD);
 #endif				/* CONFIG_CYZ_INTR */
 #else
 #ifdef CONFIG_CYZ_INTR
-		cy_writel(&ch_ctrl[channel].intr_enable,
+		cy_writel(&ch_ctrl->intr_enable,
 			  C_IN_TXBEMPTY | C_IN_TXLOWWM | C_IN_RXHIWM |
 			  C_IN_RXNNDT | C_IN_MDCD);
 #else
-		cy_writel(&ch_ctrl[channel].intr_enable, C_IN_MDCD);
+		cy_writel(&ch_ctrl->intr_enable, C_IN_MDCD);
 #endif				/* CONFIG_CYZ_INTR */
 #endif				/* Z_WAKE */
 
@@ -1979,9 +1937,8 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 
 		/* set timeout !!! */
 		/* set RTS and DTR !!! */
-		cy_writel(&ch_ctrl[channel].rs_control,
-			readl(&ch_ctrl[channel].rs_control) | C_RS_RTS |
-			C_RS_DTR);
+		cy_writel(&ch_ctrl->rs_control, readl(&ch_ctrl->rs_control) |
+				C_RS_RTS | C_RS_DTR);
 		retval = cyz_issue_cmd(card, channel, C_CM_IOCTLM, 0L);
 		if (retval != 0) {
 			printk(KERN_ERR "cyc:startup(3) retval on ttyC%d was "
@@ -2110,27 +2067,17 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 		info->port.flags &= ~ASYNC_INITIALIZED;
 		spin_unlock_irqrestore(&card->card_lock, flags);
 	} else {
-		struct FIRM_ID __iomem *firm_id;
-		struct ZFW_CTRL __iomem *zfw_ctrl;
-		struct BOARD_CTRL __iomem *board_ctrl;
-		struct CH_CTRL __iomem *ch_ctrl;
+		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
 		int retval;
 
-		base_addr = card->base_addr;
 #ifdef CY_DEBUG_OPEN
 		printk(KERN_DEBUG "cyc shutdown Z card %d, channel %d, "
-			"base_addr %p\n", card, channel, base_addr);
+			"base_addr %p\n", card, channel, card->base_addr);
 #endif
 
-		firm_id = base_addr + ID_ADDRESS;
 		if (!cyz_is_loaded(card))
 			return;
 
-		zfw_ctrl = card->base_addr +
-				(readl(&firm_id->zfwctrl_addr) & 0xfffff);
-		board_ctrl = &zfw_ctrl->board_ctrl;
-		ch_ctrl = zfw_ctrl->ch_ctrl;
-
 		spin_lock_irqsave(&card->card_lock, flags);
 
 		if (info->port.xmit_buf) {
@@ -2141,9 +2088,9 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 		}
 
 		if (tty->termios->c_cflag & HUPCL) {
-			cy_writel(&ch_ctrl[channel].rs_control,
-				(__u32)(readl(&ch_ctrl[channel].rs_control) &
-					~(C_RS_RTS | C_RS_DTR)));
+			cy_writel(&ch_ctrl->rs_control,
+				readl(&ch_ctrl->rs_control) &
+					~(C_RS_RTS | C_RS_DTR));
 			retval = cyz_issue_cmd(info->card, channel,
 					C_CM_IOCTLM, 0L);
 			if (retval != 0) {
@@ -2497,15 +2444,11 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 #ifdef Z_WAKE
 		/* Waiting for on-board buffers to be empty before closing
 		   the port */
-		void __iomem *base_addr = card->base_addr;
-		struct FIRM_ID __iomem *firm_id = base_addr + ID_ADDRESS;
-		struct ZFW_CTRL __iomem *zfw_ctrl =
-		    base_addr + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
-		struct CH_CTRL __iomem *ch_ctrl = zfw_ctrl->ch_ctrl;
+		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
 		int channel = info->line - card->first_line;
 		int retval;
 
-		if (readl(&ch_ctrl[channel].flow_status) != C_FS_TXIDLE) {
+		if (readl(&ch_ctrl->flow_status) != C_FS_TXIDLE) {
 			retval = cyz_issue_cmd(card, channel, C_CM_IOCTLW, 0L);
 			if (retval != 0) {
 				printk(KERN_DEBUG "cyc:cy_close retval on "
@@ -2685,18 +2628,13 @@ static int cy_write_room(struct tty_struct *tty)
 
 static int cy_chars_in_buffer(struct tty_struct *tty)
 {
-	struct cyclades_card *card;
 	struct cyclades_port *info = tty->driver_data;
-	int channel;
 
 	if (serial_paranoia_check(info, tty->name, "cy_chars_in_buffer"))
 		return 0;
 
-	card = info->card;
-	channel = (info->line) - (card->first_line);
-
 #ifdef Z_EXT_CHARS_IN_BUFFER
-	if (!cy_is_Z(card)) {
+	if (!cy_is_Z(info->card)) {
 #endif				/* Z_EXT_CHARS_IN_BUFFER */
 #ifdef CY_DEBUG_IO
 		printk(KERN_DEBUG "cyc:cy_chars_in_buffer ttyC%d %d\n",
@@ -2705,20 +2643,11 @@ static int cy_chars_in_buffer(struct tty_struct *tty)
 		return info->xmit_cnt;
 #ifdef Z_EXT_CHARS_IN_BUFFER
 	} else {
-		static struct FIRM_ID *firm_id;
-		static struct ZFW_CTRL *zfw_ctrl;
-		static struct CH_CTRL *ch_ctrl;
-		static struct BUF_CTRL *buf_ctrl;
+		struct BUF_CTRL __iomem *buf_ctrl = info->u.cyz.buf_ctrl;
 		int char_count;
 		__u32 tx_put, tx_get, tx_bufsize;
 
 		lock_kernel();
-		firm_id = card->base_addr + ID_ADDRESS;
-		zfw_ctrl = card->base_addr +
-			(readl(&firm_id->zfwctrl_addr) & 0xfffff);
-		ch_ctrl = &(zfw_ctrl->ch_ctrl[channel]);
-		buf_ctrl = &(zfw_ctrl->buf_ctrl[channel]);
-
 		tx_get = readl(&buf_ctrl->tx_get);
 		tx_put = readl(&buf_ctrl->tx_put);
 		tx_bufsize = readl(&buf_ctrl->tx_bufsize);
@@ -3019,20 +2948,13 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 		spin_unlock_irqrestore(&card->card_lock, flags);
 
 	} else {
-		struct FIRM_ID __iomem *firm_id;
-		struct ZFW_CTRL __iomem *zfw_ctrl;
-		struct CH_CTRL __iomem *ch_ctrl;
+		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
 		__u32 sw_flow;
 		int retval;
 
-		firm_id = card->base_addr + ID_ADDRESS;
 		if (!cyz_is_loaded(card))
 			return;
 
-		zfw_ctrl = card->base_addr +
-			(readl(&firm_id->zfwctrl_addr) & 0xfffff);
-		ch_ctrl = &(zfw_ctrl->ch_ctrl[channel]);
-
 		/* baud rate */
 		baud = tty_get_baud_rate(tty);
 		if (baud == 38400 && (info->port.flags & ASYNC_SPD_MASK) ==
@@ -3268,10 +3190,6 @@ static int cy_tiocmget(struct tty_struct *tty, struct file *file)
 	unsigned char status;
 	unsigned long lstatus;
 	unsigned int result;
-	struct FIRM_ID __iomem *firm_id;
-	struct ZFW_CTRL __iomem *zfw_ctrl;
-	struct BOARD_CTRL __iomem *board_ctrl;
-	struct CH_CTRL __iomem *ch_ctrl;
 
 	if (serial_paranoia_check(info, tty->name, __func__))
 		return -ENODEV;
@@ -3304,14 +3222,8 @@ static int cy_tiocmget(struct tty_struct *tty, struct file *file)
 			((status & CyDSR) ? TIOCM_DSR : 0) |
 			((status & CyCTS) ? TIOCM_CTS : 0);
 	} else {
-		base_addr = card->base_addr;
-		firm_id = card->base_addr + ID_ADDRESS;
 		if (cyz_is_loaded(card)) {
-			zfw_ctrl = card->base_addr +
-				(readl(&firm_id->zfwctrl_addr) & 0xfffff);
-			board_ctrl = &zfw_ctrl->board_ctrl;
-			ch_ctrl = zfw_ctrl->ch_ctrl;
-			lstatus = readl(&ch_ctrl[channel].rs_status);
+			lstatus = readl(&info->u.cyz.ch_ctrl->rs_status);
 			result = ((lstatus & C_RS_RTS) ? TIOCM_RTS : 0) |
 				((lstatus & C_RS_DTR) ? TIOCM_DTR : 0) |
 				((lstatus & C_RS_DCD) ? TIOCM_CAR : 0) |
@@ -3336,12 +3248,7 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
 	struct cyclades_port *info = tty->driver_data;
 	struct cyclades_card *card;
 	int chip, channel, index;
-	void __iomem *base_addr;
 	unsigned long flags;
-	struct FIRM_ID __iomem *firm_id;
-	struct ZFW_CTRL __iomem *zfw_ctrl;
-	struct BOARD_CTRL __iomem *board_ctrl;
-	struct CH_CTRL __iomem *ch_ctrl;
 	int retval;
 
 	if (serial_paranoia_check(info, tty->name, __func__))
@@ -3350,6 +3257,7 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
 	card = info->card;
 	channel = (info->line) - (card->first_line);
 	if (!cy_is_Z(card)) {
+		void __iomem *base_addr;
 		chip = channel >> 2;
 		channel &= 0x03;
 		index = card->bus_index;
@@ -3421,34 +3329,26 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
 			spin_unlock_irqrestore(&card->card_lock, flags);
 		}
 	} else {
-		base_addr = card->base_addr;
-
-		firm_id = card->base_addr + ID_ADDRESS;
 		if (cyz_is_loaded(card)) {
-			zfw_ctrl = card->base_addr +
-				(readl(&firm_id->zfwctrl_addr) & 0xfffff);
-			board_ctrl = &zfw_ctrl->board_ctrl;
-			ch_ctrl = zfw_ctrl->ch_ctrl;
+			struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
 
 			if (set & TIOCM_RTS) {
 				spin_lock_irqsave(&card->card_lock, flags);
-				cy_writel(&ch_ctrl[channel].rs_control,
-					readl(&ch_ctrl[channel].rs_control) |
-					C_RS_RTS);
+				cy_writel(&ch_ctrl->rs_control,
+					readl(&ch_ctrl->rs_control) | C_RS_RTS);
 				spin_unlock_irqrestore(&card->card_lock, flags);
 			}
 			if (clear & TIOCM_RTS) {
 				spin_lock_irqsave(&card->card_lock, flags);
-				cy_writel(&ch_ctrl[channel].rs_control,
-					readl(&ch_ctrl[channel].rs_control) &
+				cy_writel(&ch_ctrl->rs_control,
+					readl(&ch_ctrl->rs_control) &
 					~C_RS_RTS);
 				spin_unlock_irqrestore(&card->card_lock, flags);
 			}
 			if (set & TIOCM_DTR) {
 				spin_lock_irqsave(&card->card_lock, flags);
-				cy_writel(&ch_ctrl[channel].rs_control,
-					readl(&ch_ctrl[channel].rs_control) |
-					C_RS_DTR);
+				cy_writel(&ch_ctrl->rs_control,
+					readl(&ch_ctrl->rs_control) | C_RS_DTR);
 #ifdef CY_DEBUG_DTR
 				printk(KERN_DEBUG "cyc:set_modem_info raising "
 					"Z DTR\n");
@@ -3457,8 +3357,8 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
 			}
 			if (clear & TIOCM_DTR) {
 				spin_lock_irqsave(&card->card_lock, flags);
-				cy_writel(&ch_ctrl[channel].rs_control,
-					readl(&ch_ctrl[channel].rs_control) &
+				cy_writel(&ch_ctrl->rs_control,
+					readl(&ch_ctrl->rs_control) &
 					~C_RS_DTR);
 #ifdef CY_DEBUG_DTR
 				printk(KERN_DEBUG "cyc:set_modem_info clearing "
@@ -4171,17 +4071,8 @@ static int cyz_carrier_raised(struct tty_port *port)
 {
 	struct cyclades_port *info = container_of(port, struct cyclades_port,
 			port);
-	struct cyclades_card *cinfo = info->card;
-	void __iomem *base = cinfo->base_addr;
-	struct FIRM_ID __iomem *firm_id = base + ID_ADDRESS;
-	struct ZFW_CTRL __iomem *zfw_ctrl;
-	struct CH_CTRL __iomem *ch_ctrl;
-	int channel = info->line - cinfo->first_line;
 
-	zfw_ctrl = base + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
-	ch_ctrl = zfw_ctrl->ch_ctrl;
-
-	return readl(&ch_ctrl[channel].rs_status) & C_RS_DCD;
+	return readl(&info->u.cyz.ch_ctrl->rs_status) & C_RS_DCD;
 }
 
 static void cyz_dtr_rts(struct tty_port *port, int raise)
@@ -4189,22 +4080,16 @@ static void cyz_dtr_rts(struct tty_port *port, int raise)
 	struct cyclades_port *info = container_of(port, struct cyclades_port,
 			port);
 	struct cyclades_card *cinfo = info->card;
-	void __iomem *base = cinfo->base_addr;
-	struct FIRM_ID __iomem *firm_id = base + ID_ADDRESS;
-	struct ZFW_CTRL __iomem *zfw_ctrl;
-	struct CH_CTRL __iomem *ch_ctrl;
+	struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
 	int ret, channel = info->line - cinfo->first_line;
 	u32 rs;
 
-	zfw_ctrl = base + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
-	ch_ctrl = zfw_ctrl->ch_ctrl;
-
-	rs = readl(&ch_ctrl[channel].rs_control);
+	rs = readl(&ch_ctrl->rs_control);
 	if (raise)
 		rs |= C_RS_RTS | C_RS_DTR;
 	else
 		rs &= ~(C_RS_RTS | C_RS_DTR);
-	cy_writel(&ch_ctrl[channel].rs_control, rs);
+	cy_writel(&ch_ctrl->rs_control, rs);
 	ret = cyz_issue_cmd(cinfo, channel, C_CM_IOCTLM, 0L);
 	if (ret != 0)
 		printk(KERN_ERR "%s: retval on ttyC%d was %x\n",
@@ -4235,8 +4120,7 @@ static const struct tty_port_operations cyz_port_ops = {
 static int __devinit cy_init_card(struct cyclades_card *cinfo)
 {
 	struct cyclades_port *info;
-	unsigned int port;
-	unsigned short chip_number;
+	unsigned int channel, port;
 
 	spin_lock_init(&cinfo->card_lock);
 	cinfo->intr_enabled = 0;
@@ -4248,9 +4132,9 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
 		return -ENOMEM;
 	}
 
-	for (port = cinfo->first_line; port < cinfo->first_line + cinfo->nports;
-			port++) {
-		info = &cinfo->ports[port - cinfo->first_line];
+	for (channel = 0, port = cinfo->first_line; channel < cinfo->nports;
+			channel++, port++) {
+		info = &cinfo->ports[channel];
 		tty_port_init(&info->port);
 		info->magic = CYCLADES_MAGIC;
 		info->card = cinfo;
@@ -4263,8 +4147,17 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
 		init_waitqueue_head(&info->delta_msr_wait);
 
 		if (cy_is_Z(cinfo)) {
+			struct FIRM_ID *firm_id = cinfo->base_addr + ID_ADDRESS;
+			struct ZFW_CTRL *zfw_ctrl;
+
 			info->port.ops = &cyz_port_ops;
 			info->type = PORT_STARTECH;
+
+			zfw_ctrl = cinfo->base_addr +
+				(readl(&firm_id->zfwctrl_addr) & 0xfffff);
+			info->u.cyz.ch_ctrl = &zfw_ctrl->ch_ctrl[channel];
+			info->u.cyz.buf_ctrl = &zfw_ctrl->buf_ctrl[channel];
+
 			if (cinfo->hw_ver == ZO_V1)
 				info->xmit_fifo_size = CYZ_FIFO_SIZE;
 			else
@@ -4274,7 +4167,9 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
 				cyz_rx_restart, (unsigned long)info);
 #endif
 		} else {
+			unsigned short chip_number;
 			int index = cinfo->bus_index;
+
 			info->port.ops = &cyy_port_ops;
 			info->type = PORT_CIRRUS;
 			info->xmit_fifo_size = CyMAX_CHAR_FIFO;
@@ -4282,7 +4177,7 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
 			info->cor2 = CyETC;
 			info->cor3 = 0x08;	/* _very_ small rcv threshold */
 
-			chip_number = (port - cinfo->first_line) / 4;
+			chip_number = channel / CyPORTS_PER_CHIP;
 			info->chip_rev = readb(cinfo->base_addr +
 				      (cy_chip_offset[chip_number] << index) +
 				      (CyGFRCR << index));
@@ -4976,8 +4871,14 @@ static int __devinit cy_pci_probe(struct pci_dev *pdev,
 		}
 		cy_card[card_no].num_chips = nchan / CyPORTS_PER_CHIP;
 	} else {
+		struct FIRM_ID __iomem *firm_id = addr2 + ID_ADDRESS;
+		struct ZFW_CTRL __iomem *zfw_ctrl;
+
+		zfw_ctrl = addr2 + (readl(&firm_id->zfwctrl_addr) & 0xfffff);
+
 		cy_card[card_no].hw_ver = mailbox;
 		cy_card[card_no].num_chips = (unsigned int)-1;
+		cy_card[card_no].board_ctrl = &zfw_ctrl->board_ctrl;
 #ifdef CONFIG_CYZ_INTR
 		/* allocate IRQ only if board has an IRQ */
 		if (irq != 0 && irq != 255) {
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index 1fbdea4..1eb87a6 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -499,6 +499,7 @@ struct cyclades_card {
 		void __iomem *p9050;
 		struct RUNTIME_9060 __iomem *p9060;
 	} ctl_addr;
+	struct BOARD_CTRL __iomem *board_ctrl;	/* cyz specific */
 	int irq;
 	unsigned int num_chips;	/* 0 if card absent, -1 if Z/PCI, else Y */
 	unsigned int first_line;	/* minor number of first channel on card */
@@ -541,6 +542,15 @@ struct cyclades_port {
 	int                     magic;
 	struct tty_port		port;
 	struct cyclades_card	*card;
+	union {
+		struct {
+			int filler;
+		} cyy;
+		struct {
+			struct CH_CTRL __iomem	*ch_ctrl;
+			struct BUF_CTRL __iomem	*buf_ctrl;
+		} cyz;
+	} u;
 	int			line;
 	int			flags; 		/* defined in tty.h */
 	int                     type;		/* UART type */
-- 
1.6.4.2


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

* [PATCH 11/79] cyclades: switch to tty_port_hangup
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (9 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 10/79] cyclades: avoid addresses recomputation Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 12/79] cyclades: close cleanup Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Do not duplicate common tty_port_hangup code. Use it instead.

Also do not unset ASYNC_NORMAL_ACTIVE and wake up from the
tty_hangup() caller. It makes no sense since we don't check that
flag in sleepers. tty_port_hangup() performed later will do the
right job.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |   23 ++++++-----------------
 1 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 7a7092a..226175d 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -1290,11 +1290,10 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 	}
 
 	if ((mdm_change & CyDCD) && (info->port.flags & ASYNC_CHECK_CD)) {
-		if (!(mdm_status & CyDCD)) {
+		if (mdm_status & CyDCD)
+			wake_up_interruptible(&info->port.open_wait);
+		else
 			tty_hangup(tty);
-			info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
-		}
-		wake_up_interruptible(&info->port.open_wait);
 	}
 	if ((mdm_change & CyCTS) && (info->port.flags & ASYNC_CTS_FLOW)) {
 		if (tty->hw_stopped) {
@@ -1655,13 +1654,10 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 			if (info->port.flags & ASYNC_CHECK_CD) {
 				u32 dcd = fw_ver > 241 ? param :
 					readl(&info->u.cyz.ch_ctrl->rs_status);
-				if (dcd & C_RS_DCD) {
+				if (dcd & C_RS_DCD)
 					wake_up_interruptible(&info->port.open_wait);
-				} else {
+				else
 					tty_hangup(tty);
-					wake_up_interruptible(&info->port.open_wait);
-					info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
-				}
 			}
 			break;
 		case C_CM_MCTS:
@@ -4009,14 +4005,7 @@ static void cy_hangup(struct tty_struct *tty)
 
 	cy_flush_buffer(tty);
 	cy_shutdown(info, tty);
-	info->port.count = 0;
-#ifdef CY_DEBUG_COUNT
-	printk(KERN_DEBUG "cyc:cy_hangup (%d): setting count to 0\n",
-		current->pid);
-#endif
-	tty_port_tty_set(&info->port, NULL);
-	info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
-	wake_up_interruptible(&info->port.open_wait);
+	tty_port_hangup(&info->port);
 }				/* cy_hangup */
 
 static int cyy_carrier_raised(struct tty_port *port)
-- 
1.6.4.2


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

* [PATCH 12/79] cyclades: close cleanup
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (10 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 11/79] cyclades: switch to tty_port_hangup Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 13/79] cyclades: overall cleanup Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Use new tty helpers for close, which allows much code removal.

The only real change is locking. card_lock for protecting was
used inappropriately (just to have a critical section, no matter
which lock is used), so the change to port->lock is fine.

Remove also useless debug printks while being there.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |   70 +---------------------------------------------
 1 files changed, 2 insertions(+), 68 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 226175d..87a40bc 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -2361,61 +2361,13 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 	struct cyclades_card *card;
 	unsigned long flags;
 
-#ifdef CY_DEBUG_OTHER
-	printk(KERN_DEBUG "cyc:cy_close ttyC%d\n", info->line);
-#endif
-
 	if (!info || serial_paranoia_check(info, tty->name, "cy_close"))
 		return;
 
 	card = info->card;
 
-	spin_lock_irqsave(&card->card_lock, flags);
-	/* If the TTY is being hung up, nothing to do */
-	if (tty_hung_up_p(filp)) {
-		spin_unlock_irqrestore(&card->card_lock, flags);
+	if (!tty_port_close_start(&info->port, tty, filp))
 		return;
-	}
-#ifdef CY_DEBUG_OPEN
-	printk(KERN_DEBUG "cyc:cy_close ttyC%d, count = %d\n", info->line,
-		info->port.count);
-#endif
-	if ((tty->count == 1) && (info->port.count != 1)) {
-		/*
-		 * Uh, oh.  tty->count is 1, which means that the tty
-		 * structure will be freed.  Info->count should always
-		 * be one in these conditions.  If it's greater than
-		 * one, we've got real problems, since it means the
-		 * serial port won't be shutdown.
-		 */
-		printk(KERN_ERR "cyc:cy_close: bad serial port count; "
-			"tty->count is 1, info->port.count is %d\n", info->port.count);
-		info->port.count = 1;
-	}
-#ifdef CY_DEBUG_COUNT
-	printk(KERN_DEBUG  "cyc:cy_close at (%d): decrementing count to %d\n",
-		current->pid, info->port.count - 1);
-#endif
-	if (--info->port.count < 0) {
-#ifdef CY_DEBUG_COUNT
-		printk(KERN_DEBUG "cyc:cyc_close setting count to 0\n");
-#endif
-		info->port.count = 0;
-	}
-	if (info->port.count) {
-		spin_unlock_irqrestore(&card->card_lock, flags);
-		return;
-	}
-	info->port.flags |= ASYNC_CLOSING;
-
-	/*
-	 * Now we wait for the transmit buffer to clear; and we notify
-	 * the line discipline to only process XON/XOFF characters.
-	 */
-	tty->closing = 1;
-	spin_unlock_irqrestore(&card->card_lock, flags);
-	if (info->port.closing_wait != CY_CLOSING_WAIT_NONE)
-		tty_wait_until_sent(tty, info->port.closing_wait);
 
 	spin_lock_irqsave(&card->card_lock, flags);
 
@@ -2460,28 +2412,10 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 	spin_unlock_irqrestore(&card->card_lock, flags);
 	cy_shutdown(info, tty);
 	cy_flush_buffer(tty);
-	tty_ldisc_flush(tty);
-	spin_lock_irqsave(&card->card_lock, flags);
 
-	tty->closing = 0;
 	tty_port_tty_set(&info->port, NULL);
-	if (info->port.blocked_open) {
-		spin_unlock_irqrestore(&card->card_lock, flags);
-		if (info->port.close_delay) {
-			msleep_interruptible(jiffies_to_msecs
-						(info->port.close_delay));
-		}
-		wake_up_interruptible(&info->port.open_wait);
-		spin_lock_irqsave(&card->card_lock, flags);
-	}
-	info->port.flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
-	wake_up_interruptible(&info->port.close_wait);
 
-#ifdef CY_DEBUG_OTHER
-	printk(KERN_DEBUG "cyc:cy_close done\n");
-#endif
-
-	spin_unlock_irqrestore(&card->card_lock, flags);
+	tty_port_close_end(&info->port, tty);
 }				/* cy_close */
 
 /* This routine gets called when tty_write has put something into
-- 
1.6.4.2


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

* [PATCH 13/79] cyclades: overall cleanup
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (11 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 12/79] cyclades: close cleanup Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 14/79] cyclades: sleep instead busy-wait Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 30626 bytes --]

From: Jiri Slaby <jirislaby@gmail.com>

- remove changelog from the file. we don't care about ancient
  history
- update copyright year
- update version
- constify some stuff
- empty lines removal
- unused variables and macros removal
- remove some asm/ includes, they are sucked by linux/ variants

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |  598 +----------------------------------------------
 1 files changed, 12 insertions(+), 586 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 87a40bc..3884ea4 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -11,7 +11,7 @@
  * Initially written by Randolph Bentson <bentson@grieg.seaslug.org>.
  * Modified and maintained by Marcio Saito <marcio@cyclades.com>.
  *
- * Copyright (C) 2007 Jiri Slaby <jirislaby@gmail.com>
+ * Copyright (C) 2007-2009 Jiri Slaby <jirislaby@gmail.com>
  *
  * Much of the design and some of the code came from serial.c
  * which was copyright (C) 1991, 1992  Linus Torvalds.  It was
@@ -19,577 +19,9 @@
  * and then fixed as suggested by Michael K. Johnson 12/12/92.
  * Converted to pci probing and cleaned up by Jiri Slaby.
  *
- * This version supports shared IRQ's (only for PCI boards).
- *
- * Prevent users from opening non-existing Z ports.
- *
- * Revision 2.3.2.8   2000/07/06 18:14:16 ivan
- * Fixed the PCI detection function to work properly on Alpha systems.
- * Implemented support for TIOCSERGETLSR ioctl.
- * Implemented full support for non-standard baud rates.
- *
- * Revision 2.3.2.7   2000/06/01 18:26:34 ivan
- * Request PLX I/O region, although driver doesn't use it, to avoid
- * problems with other drivers accessing it.
- * Removed count for on-board buffer characters in cy_chars_in_buffer
- * (Cyclades-Z only).
- *
- * Revision 2.3.2.6   2000/05/05 13:56:05 ivan
- * Driver now reports physical instead of virtual memory addresses.
- * Masks were added to some Cyclades-Z read accesses.
- * Implemented workaround for PLX9050 bug that would cause a system lockup
- * in certain systems, depending on the MMIO addresses allocated to the
- * board.
- * Changed the Tx interrupt programming in the CD1400 chips to boost up
- * performance (Cyclom-Y only).
- * Code is now compliant with the new module interface (module_[init|exit]).
- * Make use of the PCI helper functions to access PCI resources.
- * Did some code "housekeeping".
- *
- * Revision 2.3.2.5   2000/01/19 14:35:33 ivan
- * Fixed bug in cy_set_termios on CRTSCTS flag turnoff.
- *
- * Revision 2.3.2.4   2000/01/17 09:19:40 ivan
- * Fixed SMP locking in Cyclom-Y interrupt handler.
- *
- * Revision 2.3.2.3   1999/12/28 12:11:39 ivan
- * Added a new cyclades_card field called nports to allow the driver to
- * know the exact number of ports found by the Z firmware after its load;
- * RX buffer contention prevention logic on interrupt op mode revisited
- * (Cyclades-Z only);
- * Revisited printk's for Z debug;
- * Driver now makes sure that the constant SERIAL_XMIT_SIZE is defined;
- *
- * Revision 2.3.2.2   1999/10/01 11:27:43 ivan
- * Fixed bug in cyz_poll that would make all ports but port 0
- * unable to transmit/receive data (Cyclades-Z only);
- * Implemented logic to prevent the RX buffer from being stuck with data
- * due to a driver / firmware race condition in interrupt op mode
- * (Cyclades-Z only);
- * Fixed bug in block_til_ready logic that would lead to a system crash;
- * Revisited cy_close spinlock usage;
- *
- * Revision 2.3.2.1   1999/09/28 11:01:22 ivan
- * Revisited CONFIG_PCI conditional compilation for PCI board support;
- * Implemented TIOCGICOUNT and TIOCMIWAIT ioctl support;
- * _Major_ cleanup on the Cyclades-Z interrupt support code / logic;
- * Removed CTS handling from the driver -- this is now completely handled
- * by the firmware (Cyclades-Z only);
- * Flush RX on-board buffers on a port open (Cyclades-Z only);
- * Fixed handling of ASYNC_SPD_* TTY flags;
- * Module unload now unmaps all memory area allocated by ioremap;
- *
- * Revision 2.3.1.1   1999/07/15 16:45:53 ivan
- * Removed CY_PROC conditional compilation;
- * Implemented SMP-awareness for the driver;
- * Implemented a new ISA IRQ autoprobe that uses the irq_probe_[on|off]
- * functions;
- * The driver now accepts memory addresses (maddr=0xMMMMM) and IRQs
- * (irq=NN) as parameters (only for ISA boards);
- * Fixed bug in set_line_char that would prevent the Cyclades-Z
- * ports from being configured at speeds above 115.2Kbps;
- * Fixed bug in cy_set_termios that would prevent XON/XOFF flow control
- * switching from working properly;
- * The driver now only prints IRQ info for the Cyclades-Z if it's
- * configured to work in interrupt mode;
- *
- * Revision 2.2.2.3   1999/06/28 11:13:29 ivan
- * Added support for interrupt mode operation for the Z cards;
- * Removed the driver inactivity control for the Z;
- * Added a missing MOD_DEC_USE_COUNT in the cy_open function for when
- * the Z firmware is not loaded yet;
- * Replaced the "manual" Z Tx flush buffer by a call to a FW command of
- * same functionality;
- * Implemented workaround for IRQ setting loss on the PCI configuration
- * registers after a PCI bridge EEPROM reload (affects PLX9060 only);
- *
- * Revision 2.2.2.2  1999/05/14 17:18:15 ivan
- * /proc entry location changed to /proc/tty/driver/cyclades;
- * Added support to shared IRQ's (only for PCI boards);
- * Added support for Cobalt Qube2 systems;
- * IRQ [de]allocation scheme revisited;
- * BREAK implementation changed in order to make use of the 'break_ctl'
- * TTY facility;
- * Fixed typo in TTY structure field 'driver_name';
- * Included a PCI bridge reset and EEPROM reload in the board
- * initialization code (for both Y and Z series).
- *
- * Revision 2.2.2.1  1999/04/08 16:17:43 ivan
- * Fixed a bug in cy_wait_until_sent that was preventing the port to be
- * closed properly after a SIGINT;
- * Module usage counter scheme revisited;
- * Added support to the upcoming Y PCI boards (i.e., support to additional
- * PCI Device ID's).
- *
- * Revision 2.2.1.10 1999/01/20 16:14:29 ivan
- * Removed all unnecessary page-alignement operations in ioremap calls
- * (ioremap is currently safe for these operations).
- *
- * Revision 2.2.1.9  1998/12/30 18:18:30 ivan
- * Changed access to PLX PCI bridge registers from I/O to MMIO, in
- * order to make PLX9050-based boards work with certain motherboards.
- *
- * Revision 2.2.1.8  1998/11/13 12:46:20 ivan
- * cy_close function now resets (correctly) the tty->closing flag;
- * JIFFIES_DIFF macro fixed.
- *
- * Revision 2.2.1.7  1998/09/03 12:07:28 ivan
- * Fixed bug in cy_close function, which was not informing HW of
- * which port should have the reception disabled before doing so;
- * fixed Cyclom-8YoP hardware detection bug.
- *
- * Revision 2.2.1.6  1998/08/20 17:15:39 ivan
- * Fixed bug in cy_close function, which causes malfunction
- * of one of the first 4 ports when a higher port is closed
- * (Cyclom-Y only).
- *
- * Revision 2.2.1.5  1998/08/10 18:10:28 ivan
- * Fixed Cyclom-4Yo hardware detection bug.
- *
- * Revision 2.2.1.4  1998/08/04 11:02:50 ivan
- * /proc/cyclades implementation with great collaboration of
- * Marc Lewis <marc@blarg.net>;
- * cyy_interrupt was changed to avoid occurrence of kernel oopses
- * during PPP operation.
- *
- * Revision 2.2.1.3  1998/06/01 12:09:10 ivan
- * General code review in order to comply with 2.1 kernel standards;
- * data loss prevention for slow devices revisited (cy_wait_until_sent
- * was created);
- * removed conditional compilation for new/old PCI structure support
- * (now the driver only supports the new PCI structure).
- *
- * Revision 2.2.1.1  1998/03/19 16:43:12 ivan
- * added conditional compilation for new/old PCI structure support;
- * removed kernel series (2.0.x / 2.1.x) conditional compilation.
- *
- * Revision 2.1.1.3  1998/03/16 18:01:12 ivan
- * cleaned up the data loss fix;
- * fixed XON/XOFF handling once more (Cyclades-Z);
- * general review of the driver routines;
- * introduction of a mechanism to prevent data loss with slow
- * printers, by forcing a delay before closing the port.
- *
- * Revision 2.1.1.2  1998/02/17 16:50:00 ivan
- * fixed detection/handling of new CD1400 in Ye boards;
- * fixed XON/XOFF handling (Cyclades-Z);
- * fixed data loss caused by a premature port close;
- * introduction of a flag that holds the CD1400 version ID per port
- * (used by the CYGETCD1400VER new ioctl).
- *
- * Revision 2.1.1.1  1997/12/03 17:31:19 ivan
- * Code review for the module cleanup routine;
- * fixed RTS and DTR status report for new CD1400's in get_modem_info;
- * includes anonymous changes regarding signal_pending.
- *
- * Revision 2.1  1997/11/01 17:42:41 ivan
- * Changes in the driver to support Alpha systems (except 8Zo V_1);
- * BREAK fix for the Cyclades-Z boards;
- * driver inactivity control by FW implemented;
- * introduction of flag that allows driver to take advantage of
- * a special CD1400 feature related to HW flow control;
- * added support for the CD1400  rev. J (Cyclom-Y boards);
- * introduction of ioctls to:
- *  - control the rtsdtr_inv flag (Cyclom-Y);
- *  - control the rflow flag (Cyclom-Y);
- *  - adjust the polling interval (Cyclades-Z);
- *
- * Revision 1.36.4.33  1997/06/27 19:00:00  ivan
- * Fixes related to kernel version conditional
- * compilation.
- *
- * Revision 1.36.4.32  1997/06/14 19:30:00  ivan
- * Compatibility issues between kernels 2.0.x and
- * 2.1.x (mainly related to clear_bit function).
- *
- * Revision 1.36.4.31  1997/06/03 15:30:00  ivan
- * Changes to define the memory window according to the
- * board type.
- *
- * Revision 1.36.4.30  1997/05/16 15:30:00  daniel
- * Changes to support new cycladesZ boards.
- *
- * Revision 1.36.4.29  1997/05/12 11:30:00  daniel
- * Merge of Bentson's and Daniel's version 1.36.4.28.
- * Corrects bug in cy_detect_pci: check if there are more
- * ports than the number of static structs allocated.
- * Warning message during initialization if this driver is
- * used with the new generation of cycladesZ boards.  Those
- * will be supported only in next release of the driver.
- * Corrects bug in cy_detect_pci and cy_detect_isa that
- * returned wrong number of VALID boards, when a cyclomY
- * was found with no serial modules connected.
- * Changes to use current (2.1.x) kernel subroutine names
- * and created macros for compilation with 2.0.x kernel,
- * instead of the other way around.
- *
- * Revision 1.36.4.28  1997/05/?? ??:00:00  bentson
- * Change queue_task_irq_off to queue_task_irq.
- * The inline function queue_task_irq_off (tqueue.h)
- * was removed from latest releases of 2.1.x kernel.
- * Use of macro __init to mark the initialization
- * routines, so memory can be reused.
- * Also incorporate implementation of critical region
- * in function cleanup_module() created by anonymous
- * linuxer.
- *
- * Revision 1.36.4.28  1997/04/25 16:00:00  daniel
- * Change to support new firmware that solves DCD problem:
- * application could fail to receive SIGHUP signal when DCD
- * varying too fast.
- *
- * Revision 1.36.4.27  1997/03/26 10:30:00  daniel
- * Changed for support linux versions 2.1.X.
- * Backward compatible with linux versions 2.0.X.
- * Corrected illegal use of filler field in
- * CH_CTRL struct.
- * Deleted some debug messages.
- *
- * Revision 1.36.4.26  1997/02/27 12:00:00  daniel
- * Included check for NULL tty pointer in cyz_poll.
- *
- * Revision 1.36.4.25  1997/02/26 16:28:30  bentson
- * Bill Foster at Blarg! Online services noticed that
- * some of the switch elements of -Z modem control
- * lacked a closing "break;"
- *
- * Revision 1.36.4.24  1997/02/24 11:00:00  daniel
- * Changed low water threshold for buffer xmit_buf
- *
- * Revision 1.36.4.23  1996/12/02 21:50:16  bentson
- * Marcio provided fix to modem status fetch for -Z
- *
- * Revision 1.36.4.22  1996/10/28 22:41:17  bentson
- * improve mapping of -Z control page (thanks to Steve
- * Price <stevep@fa.tdktca.com> for help on this)
- *
- * Revision 1.36.4.21  1996/09/10 17:00:10  bentson
- * shift from CPU-bound to memcopy in cyz_polling operation
- *
- * Revision 1.36.4.20  1996/09/09 18:30:32  Bentson
- * Added support to set and report higher speeds.
- *
- * Revision 1.36.4.19c  1996/08/09 10:00:00  Marcio Saito
- * Some fixes in the HW flow control for the BETA release.
- * Don't try to register the IRQ.
- *
- * Revision 1.36.4.19  1996/08/08 16:23:18  Bentson
- * make sure "cyc" appears in all kernel messages; all soft interrupts
- * handled by same routine; recognize out-of-band reception; comment
- * out some diagnostic messages; leave RTS/CTS flow control to hardware;
- * fix race condition in -Z buffer management; only -Y needs to explicitly
- * flush chars; tidy up some startup messages;
- *
- * Revision 1.36.4.18  1996/07/25 18:57:31  bentson
- * shift MOD_INC_USE_COUNT location to match
- * serial.c; purge some diagnostic messages;
- *
- * Revision 1.36.4.17  1996/07/25 18:01:08  bentson
- * enable modem status messages and fetch & process them; note
- * time of last activity type for each port; set_line_char now
- * supports more than line 0 and treats 0 baud correctly;
- * get_modem_info senses rs_status;
- *
- * Revision 1.36.4.16  1996/07/20 08:43:15  bentson
- * barely works--now's time to turn on
- * more features 'til it breaks
- *
- * Revision 1.36.4.15  1996/07/19 22:30:06  bentson
- * check more -Z board status; shorten boot message
- *
- * Revision 1.36.4.14  1996/07/19 22:20:37  bentson
- * fix reference to ch_ctrl in startup; verify return
- * values from cyz_issue_cmd and cyz_update_channel;
- * more stuff to get modem control correct;
- *
- * Revision 1.36.4.13  1996/07/11 19:53:33  bentson
- * more -Z stuff folded in; re-order changes to put -Z stuff
- * after -Y stuff (to make changes clearer)
- *
- * Revision 1.36.4.12  1996/07/11 15:40:55  bentson
- * Add code to poll Cyclades-Z.  Add code to get & set RS-232 control.
- * Add code to send break.  Clear firmware ID word at startup (so
- * that other code won't talk to inactive board).
- *
- * Revision 1.36.4.11  1996/07/09 05:28:29  bentson
- * add code for -Z in set_line_char
- *
- * Revision 1.36.4.10  1996/07/08 19:28:37  bentson
- * fold more -Z stuff (or in some cases, error messages)
- * into driver; add text to "don't know what to do" messages.
- *
- * Revision 1.36.4.9  1996/07/08 18:38:38  bentson
- * moved compile-time flags near top of file; cosmetic changes
- * to narrow text (to allow 2-up printing); changed many declarations
- * to "static" to limit external symbols; shuffled code order to
- * coalesce -Y and -Z specific code, also to put internal functions
- * in order of tty_driver structure; added code to recognize -Z
- * ports (and for moment, do nothing or report error); add cy_startup
- * to parse boot command line for extra base addresses for ISA probes;
- *
- * Revision 1.36.4.8  1996/06/25 17:40:19  bentson
- * reorder some code, fix types of some vars (int vs. long),
- * add cy_setup to support user declared ISA addresses
- *
- * Revision 1.36.4.7  1996/06/21 23:06:18  bentson
- * dump ioctl based firmware load (it's now a user level
- * program); ensure uninitialzed ports cannot be used
- *
- * Revision 1.36.4.6  1996/06/20 23:17:19  bentson
- * rename vars and restructure some code
- *
- * Revision 1.36.4.5  1996/06/14 15:09:44  bentson
- * get right status back after boot load
- *
- * Revision 1.36.4.4  1996/06/13 19:51:44  bentson
- * successfully loads firmware
- *
- * Revision 1.36.4.3  1996/06/13 06:08:33  bentson
- * add more of the code for the boot/load ioctls
- *
- * Revision 1.36.4.2  1996/06/11 21:00:51  bentson
- * start to add Z functionality--starting with ioctl
- * for loading firmware
- *
- * Revision 1.36.4.1  1996/06/10 18:03:02  bentson
- * added code to recognize Z/PCI card at initialization; report
- * presence, but card is not initialized (because firmware needs
- * to be loaded)
- *
- * Revision 1.36.3.8  1996/06/07 16:29:00  bentson
- * starting minor number at zero; added missing verify_area
- * as noted by Heiko Eißfeldt <heiko@colossus.escape.de>
- *
- * Revision 1.36.3.7  1996/04/19 21:06:18  bentson
- * remove unneeded boot message & fix CLOCAL hardware flow
- * control (Miquel van Smoorenburg <miquels@Q.cistron.nl>);
- * remove unused diagnostic statements; minor 0 is first;
- *
- * Revision 1.36.3.6  1996/03/13 13:21:17  marcio
- * The kernel function vremap (available only in later 1.3.xx kernels)
- * allows the access to memory addresses above the RAM. This revision
- * of the driver supports PCI boards below 1Mb (device id 0x100) and
- * above 1Mb (device id 0x101).
- *
- * Revision 1.36.3.5  1996/03/07 15:20:17  bentson
- * Some global changes to interrupt handling spilled into
- * this driver--mostly unused arguments in system function
- * calls.  Also added change by Marcio Saito which should
- * reduce lost interrupts at startup by fast processors.
- *
- * Revision 1.36.3.4  1995/11/13  20:45:10  bentson
- * Changes by Corey Minyard <minyard@wf-rch.cirr.com> distributed
- * in 1.3.41 kernel to remove a possible race condition, extend
- * some error messages, and let the driver run as a loadable module
- * Change by Alan Wendt <alan@ez0.ezlink.com> to remove a
- * possible race condition.
- * Change by Marcio Saito <marcio@cyclades.com> to fix PCI addressing.
- *
- * Revision 1.36.3.3  1995/11/13  19:44:48  bentson
- * Changes by Linus Torvalds in 1.3.33 kernel distribution
- * required due to reordering of driver initialization.
- * Drivers are now initialized *after* memory management.
- *
- * Revision 1.36.3.2  1995/09/08  22:07:14  bentson
- * remove printk from ISR; fix typo
- *
- * Revision 1.36.3.1  1995/09/01  12:00:42  marcio
- * Minor fixes in the PCI board support. PCI function calls in
- * conditional compilation (CONFIG_PCI). Thanks to Jim Duncan
- * <duncan@okay.com>. "bad serial count" message removed.
- *
- * Revision 1.36.3  1995/08/22  09:19:42  marcio
- * Cyclom-Y/PCI support added. Changes in the cy_init routine and
- * board initialization. Changes in the boot messages. The driver
- * supports up to 4 boards and 64 ports by default.
- *
- * Revision 1.36.1.4  1995/03/29  06:14:14  bentson
- * disambiguate between Cyclom-16Y and Cyclom-32Ye;
- *
- * Revision 1.36.1.3  1995/03/23  22:15:35  bentson
- * add missing break in modem control block in ioctl switch statement
- * (discovered by Michael Edward Chastain <mec@jobe.shell.portal.com>);
- *
- * Revision 1.36.1.2  1995/03/22  19:16:22  bentson
- * make sure CTS flow control is set as soon as possible (thanks
- * to note from David Lambert <lambert@chesapeake.rps.slb.com>);
- *
- * Revision 1.36.1.1  1995/03/13  15:44:43  bentson
- * initialize defaults for receive threshold and stale data timeout;
- * cosmetic changes;
- *
- * Revision 1.36  1995/03/10  23:33:53  bentson
- * added support of chips 4-7 in 32 port Cyclom-Ye;
- * fix cy_interrupt pointer dereference problem
- * (Joe Portman <baron@aa.net>);
- * give better error response if open is attempted on non-existent port
- * (Zachariah Vaum <jchryslr@netcom.com>);
- * correct command timeout (Kenneth Lerman <lerman@@seltd.newnet.com>);
- * conditional compilation for -16Y on systems with fast, noisy bus;
- * comment out diagnostic print function;
- * cleaned up table of base addresses;
- * set receiver time-out period register to correct value,
- * set receive threshold to better default values,
- * set chip timer to more accurate 200 Hz ticking,
- * add code to monitor and modify receive parameters
- * (Rik Faith <faith@cs.unc.edu> Nick Simicich
- * <njs@scifi.emi.net>);
- *
- * Revision 1.35  1994/12/16  13:54:18  steffen
- * additional patch by Marcio Saito for board detection
- * Accidently left out in 1.34
- *
- * Revision 1.34  1994/12/10  12:37:12  steffen
- * This is the corrected version as suggested by Marcio Saito
- *
- * Revision 1.33  1994/12/01  22:41:18  bentson
- * add hooks to support more high speeds directly; add tytso
- * patch regarding CLOCAL wakeups
- *
- * Revision 1.32  1994/11/23  19:50:04  bentson
- * allow direct kernel control of higher signalling rates;
- * look for cards at additional locations
- *
- * Revision 1.31  1994/11/16  04:33:28  bentson
- * ANOTHER fix from Corey Minyard, minyard@wf-rch.cirr.com--
- * a problem in chars_in_buffer has been resolved by some
- * small changes;  this should yield smoother output
- *
- * Revision 1.30  1994/11/16  04:28:05  bentson
- * Fix from Corey Minyard, Internet: minyard@metronet.com,
- * UUCP: minyard@wf-rch.cirr.com, WORK: minyardbnr.ca, to
- * cy_hangup that appears to clear up much (all?) of the
- * DTR glitches; also he's added/cleaned-up diagnostic messages
- *
- * Revision 1.29  1994/11/16  04:16:07  bentson
- * add change proposed by Ralph Sims, ralphs@halcyon.com, to
- * operate higher speeds in same way as other serial ports;
- * add more serial ports (for up to two 16-port muxes).
- *
- * Revision 1.28  1994/11/04  00:13:16  root
- * turn off diagnostic messages
- *
- * Revision 1.27  1994/11/03  23:46:37  root
- * bunch of changes to bring driver into greater conformance
- * with the serial.c driver (looking for missed fixes)
- *
- * Revision 1.26  1994/11/03  22:40:36  root
- * automatic interrupt probing fixed.
- *
- * Revision 1.25  1994/11/03  20:17:02  root
- * start to implement auto-irq
- *
- * Revision 1.24  1994/11/03  18:01:55  root
- * still working on modem signals--trying not to drop DTR
- * during the getty/login processes
- *
- * Revision 1.23  1994/11/03  17:51:36  root
- * extend baud rate support; set receive threshold as function
- * of baud rate; fix some problems with RTS/CTS;
- *
- * Revision 1.22  1994/11/02  18:05:35  root
- * changed arguments to udelay to type long to get
- * delays to be of correct duration
- *
- * Revision 1.21  1994/11/02  17:37:30  root
- * employ udelay (after calibrating loops_per_second earlier
- * in init/main.c) instead of using home-grown delay routines
- *
- * Revision 1.20  1994/11/02  03:11:38  root
- * cy_chars_in_buffer forces a return value of 0 to let
- * login work (don't know why it does); some functions
- * that were returning EFAULT, now executes the code;
- * more work on deciding when to disable xmit interrupts;
- *
- * Revision 1.19  1994/11/01  20:10:14  root
- * define routine to start transmission interrupts (by enabling
- * transmit interrupts); directly enable/disable modem interrupts;
- *
- * Revision 1.18  1994/11/01  18:40:45  bentson
- * Don't always enable transmit interrupts in startup; interrupt on
- * TxMpty instead of TxRdy to help characters get out before shutdown;
- * restructure xmit interrupt to check for chars first and quit if
- * none are ready to go; modem status (MXVRx) is upright, _not_ inverted
- * (to my view);
- *
- * Revision 1.17  1994/10/30  04:39:45  bentson
- * rename serial_driver and callout_driver to cy_serial_driver and
- * cy_callout_driver to avoid linkage interference; initialize
- * info->type to PORT_CIRRUS; ruggedize paranoia test; elide ->port
- * from cyclades_port structure; add paranoia check to cy_close;
- *
- * Revision 1.16  1994/10/30  01:14:33  bentson
- * change major numbers; add some _early_ return statements;
- *
- * Revision 1.15  1994/10/29  06:43:15  bentson
- * final tidying up for clean compile;  enable some error reporting
- *
- * Revision 1.14  1994/10/28  20:30:22  Bentson
- * lots of changes to drag the driver towards the new tty_io
- * structures and operation.  not expected to work, but may
- * compile cleanly.
- *
- * Revision 1.13  1994/07/21  23:08:57  Bentson
- * add some diagnostic cruft; support 24 lines (for testing
- * both -8Y and -16Y cards; be more thorough in servicing all
- * chips during interrupt; add "volatile" a few places to
- * circumvent compiler optimizations; fix base & offset
- * computations in block_til_ready (was causing chip 0 to
- * stop operation)
- *
- * Revision 1.12  1994/07/19  16:42:11  Bentson
- * add some hackery for kernel version 1.1.8; expand
- * error messages; refine timing for delay loops and
- * declare loop params volatile
- *
- * Revision 1.11  1994/06/11  21:53:10  bentson
- * get use of save_car right in transmit interrupt service
- *
- * Revision 1.10.1.1  1994/06/11  21:31:18  bentson
- * add some diagnostic printing; try to fix save_car stuff
- *
- * Revision 1.10  1994/06/11  20:36:08  bentson
- * clean up compiler warnings
- *
- * Revision 1.9  1994/06/11  19:42:46  bentson
- * added a bunch of code to support modem signalling
- *
- * Revision 1.8  1994/06/11  17:57:07  bentson
- * recognize break & parity error
- *
- * Revision 1.7  1994/06/05  05:51:34  bentson
- * Reorder baud table to be monotonic; add cli to CP; discard
- * incoming characters and status if the line isn't open; start to
- * fold code into cy_throttle; start to port get_serial_info,
- * set_serial_info, get_modem_info, set_modem_info, and send_break
- * from serial.c; expand cy_ioctl; relocate and expand config_setup;
- * get flow control characters from tty struct; invalidate ports w/o
- * hardware;
- *
- * Revision 1.6  1994/05/31  18:42:21  bentson
- * add a loop-breaker in the interrupt service routine;
- * note when port is initialized so that it can be shut
- * down under the right conditions; receive works without
- * any obvious errors
- *
- * Revision 1.5  1994/05/30  00:55:02  bentson
- * transmit works without obvious errors
- *
- * Revision 1.4  1994/05/27  18:46:27  bentson
- * incorporated more code from lib_y.c; can now print short
- * strings under interrupt control to port zero; seems to
- * select ports/channels/lines correctly
- *
- * Revision 1.3  1994/05/25  22:12:44  bentson
- * shifting from multi-port on a card to proper multiplexor
- * data structures;  added skeletons of most routines
- *
- * Revision 1.2  1994/05/19  13:21:43  bentson
- * start to crib from other sources
- *
  */
 
-#define CY_VERSION	"2.5"
+#define CY_VERSION	"2.6"
 
 /* If you need to install more boards than NR_CARDS, change the constant
    in the definition below. No other change is necessary to support up to
@@ -648,9 +80,7 @@
 #include <linux/firmware.h>
 #include <linux/device.h>
 
-#include <asm/system.h>
 #include <linux/io.h>
-#include <asm/irq.h>
 #include <linux/uaccess.h>
 
 #include <linux/kernel.h>
@@ -666,7 +96,6 @@ static void cy_send_xchar(struct tty_struct *tty, char ch);
 #ifndef SERIAL_XMIT_SIZE
 #define	SERIAL_XMIT_SIZE	(min(PAGE_SIZE, 4096))
 #endif
-#define WAKEUP_CHARS		256
 
 #define STD_COM_FLAGS (0)
 
@@ -756,25 +185,25 @@ static int cy_next_channel;	/* next minor available */
  *                                               HI            VHI
  *     20
  */
-static int baud_table[] = {
+static const int baud_table[] = {
 	0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
 	1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200, 150000,
 	230400, 0
 };
 
-static char baud_co_25[] = {	/* 25 MHz clock option table */
+static const char baud_co_25[] = {	/* 25 MHz clock option table */
 	/* value =>    00    01   02    03    04 */
 	/* divide by    8    32   128   512  2048 */
 	0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x02,
 	0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static char baud_bpr_25[] = {	/* 25 MHz baud rate period table */
+static const char baud_bpr_25[] = {	/* 25 MHz baud rate period table */
 	0x00, 0xf5, 0xa3, 0x6f, 0x5c, 0x51, 0xf5, 0xa3, 0x51, 0xa3,
 	0x6d, 0x51, 0xa3, 0x51, 0xa3, 0x51, 0x36, 0x29, 0x1b, 0x15
 };
 
-static char baud_co_60[] = {	/* 60 MHz clock option table (CD1400 J) */
+static const char baud_co_60[] = {	/* 60 MHz clock option table (CD1400 J) */
 	/* value =>    00    01   02    03    04 */
 	/* divide by    8    32   128   512  2048 */
 	0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03,
@@ -782,13 +211,13 @@ static char baud_co_60[] = {	/* 60 MHz clock option table (CD1400 J) */
 	0x00
 };
 
-static char baud_bpr_60[] = {	/* 60 MHz baud rate period table (CD1400 J) */
+static const char baud_bpr_60[] = {	/* 60 MHz baud rate period table (CD1400 J) */
 	0x00, 0x82, 0x21, 0xff, 0xdb, 0xc3, 0x92, 0x62, 0xc3, 0x62,
 	0x41, 0xc3, 0x62, 0xc3, 0x62, 0xc3, 0x82, 0x62, 0x41, 0x32,
 	0x21
 };
 
-static char baud_cor3[] = {	/* receive threshold */
+static const char baud_cor3[] = {	/* receive threshold */
 	0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
 	0x0a, 0x0a, 0x0a, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08, 0x07,
 	0x07
@@ -805,7 +234,7 @@ static char baud_cor3[] = {	/* receive threshold */
  * cables.
  */
 
-static char rflow_thr[] = {	/* rflow threshold */
+static const char rflow_thr[] = {	/* rflow threshold */
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
 	0x0a
@@ -827,7 +256,7 @@ static const unsigned int cy_chip_offset[] = { 0x0000,
 /* PCI related definitions */
 
 #ifdef CONFIG_PCI
-static struct pci_device_id cy_pci_dev_id[] __devinitdata = {
+static const struct pci_device_id cy_pci_dev_id[] = {
 	/* PCI < 1Mb */
 	{ PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Y_Lo) },
 	/* PCI > 1Mb */
@@ -893,7 +322,7 @@ static inline bool cyz_is_loaded(struct cyclades_card *card)
 }
 
 static inline int serial_paranoia_check(struct cyclades_port *info,
-		char *name, const char *routine)
+		const char *name, const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
 	if (!info) {
@@ -909,7 +338,7 @@ static inline int serial_paranoia_check(struct cyclades_port *info,
 	}
 #endif
 	return 0;
-}				/* serial_paranoia_check */
+}
 
 /***********************************************************/
 /********* Start of block of Cyclom-Y specific code ********/
@@ -3030,11 +2459,9 @@ cy_set_serial_info(struct cyclades_port *info, struct tty_struct *tty,
 		struct serial_struct __user *new_info)
 {
 	struct serial_struct new_serial;
-	struct cyclades_port old_info;
 
 	if (copy_from_user(&new_serial, new_info, sizeof(new_serial)))
 		return -EFAULT;
-	old_info = *info;
 
 	if (!capable(CAP_SYS_ADMIN)) {
 		if (new_serial.close_delay != info->port.close_delay ||
@@ -3376,7 +2803,6 @@ static int cy_break(struct tty_struct *tty, int break_state)
 static int get_mon_info(struct cyclades_port *info,
 				struct cyclades_monitor __user *mon)
 {
-
 	if (copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor)))
 		return -EFAULT;
 	info->mon.int_count = 0;
-- 
1.6.4.2


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

* [PATCH 14/79] cyclades: sleep instead busy-wait
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (12 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 13/79] cyclades: overall cleanup Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 15/79] cyclades: use dtr_rts helpers Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Avoid long busy loops (5 ms) which may be replaced by sleeps.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 3884ea4..b6d40ad 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -389,7 +389,7 @@ static unsigned detect_isa_irq(void __iomem *address)
 
 	irqs = probe_irq_on();
 	/* Wait ... */
-	udelay(5000L);
+	msleep(5);
 
 	/* Enable the Tx interrupts on the CD1400 */
 	local_irq_save(flags);
@@ -402,7 +402,7 @@ static unsigned detect_isa_irq(void __iomem *address)
 	local_irq_restore(flags);
 
 	/* Wait ... */
-	udelay(5000L);
+	msleep(5);
 
 	/* Check which interrupt is in use */
 	irq = probe_irq_off(irqs);
-- 
1.6.4.2


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

* [PATCH 15/79] cyclades: use dtr_rts helpers
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (13 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 14/79] cyclades: sleep instead busy-wait Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 16/79] cyclades: merge cy_startup tails Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

For Z cards, use tty helpers for dtr_rts.

If we did the same for Y cards, it will cause a deadlock, because
cyy_dtr_rts takes a lock which we already hold.

Instead, we introduce a Y helper expecting card lock to be held.
It may then be called with set/clear masks from other places.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |  280 +++++++++++++---------------------------------
 1 files changed, 79 insertions(+), 201 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index b6d40ad..7462795 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -825,6 +825,66 @@ static irqreturn_t cyy_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }				/* cyy_interrupt */
 
+static void cyy_change_rts_dtr(struct cyclades_port *info, unsigned int set,
+		unsigned int clear)
+{
+	struct cyclades_card *card = info->card;
+	void __iomem *base_addr;
+	int chip, channel, index;
+
+	channel = info->line - card->first_line;
+	chip = channel >> 2;
+	channel &= 0x03;
+	index = card->bus_index;
+	base_addr = card->base_addr + (cy_chip_offset[chip] << index);
+
+	if (set & TIOCM_RTS) {
+		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
+		if (info->rtsdtr_inv) {
+			cy_writeb(base_addr + (CyMSVR2 << index), CyDTR);
+		} else {
+			cy_writeb(base_addr + (CyMSVR1 << index), CyRTS);
+		}
+	}
+	if (clear & TIOCM_RTS) {
+		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
+		if (info->rtsdtr_inv) {
+			cy_writeb(base_addr + (CyMSVR2 << index), ~CyDTR);
+		} else {
+			cy_writeb(base_addr + (CyMSVR1 << index), ~CyRTS);
+		}
+	}
+	if (set & TIOCM_DTR) {
+		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
+		if (info->rtsdtr_inv) {
+			cy_writeb(base_addr + (CyMSVR1 << index), CyRTS);
+		} else {
+			cy_writeb(base_addr + (CyMSVR2 << index), CyDTR);
+		}
+#ifdef CY_DEBUG_DTR
+		printk(KERN_DEBUG "cyc:set_modem_info raising DTR\n");
+		printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
+			readb(base_addr + (CyMSVR1 << index)),
+			readb(base_addr + (CyMSVR2 << index)));
+#endif
+	}
+	if (clear & TIOCM_DTR) {
+		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
+		if (info->rtsdtr_inv) {
+			cy_writeb(base_addr + (CyMSVR1 << index), ~CyRTS);
+		} else {
+			cy_writeb(base_addr + (CyMSVR2 << index), ~CyDTR);
+		}
+
+#ifdef CY_DEBUG_DTR
+		printk(KERN_DEBUG "cyc:set_modem_info dropping DTR\n");
+		printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
+			readb(base_addr + (CyMSVR1 << index)),
+			readb(base_addr + (CyMSVR2 << index)));
+#endif
+	}
+}
+
 /***********************************************************/
 /********* End of block of Cyclom-Y specific code **********/
 /******** Start of block of Cyclades-Z specific code *******/
@@ -1290,16 +1350,7 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 		cyy_issue_cmd(base_addr, CyCHAN_CTL | CyENB_RCVR | CyENB_XMTR,
 				index);
 
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		cy_writeb(base_addr + (CyMSVR1 << index), CyRTS);
-		cy_writeb(base_addr + (CyMSVR2 << index), CyDTR);
-
-#ifdef CY_DEBUG_DTR
-		printk(KERN_DEBUG "cyc:startup raising DTR\n");
-		printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-			readb(base_addr + (CyMSVR1 << index)),
-			readb(base_addr + (CyMSVR2 << index)));
-#endif
+		cyy_change_rts_dtr(info, TIOCM_RTS | TIOCM_DTR, 0);
 
 		cy_writeb(base_addr + (CySRER << index),
 			readb(base_addr + (CySRER << index)) | CyRxData);
@@ -1362,16 +1413,7 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 
 		/* set timeout !!! */
 		/* set RTS and DTR !!! */
-		cy_writel(&ch_ctrl->rs_control, readl(&ch_ctrl->rs_control) |
-				C_RS_RTS | C_RS_DTR);
-		retval = cyz_issue_cmd(card, channel, C_CM_IOCTLM, 0L);
-		if (retval != 0) {
-			printk(KERN_ERR "cyc:startup(3) retval on ttyC%d was "
-				"%x\n", info->line, retval);
-		}
-#ifdef CY_DEBUG_DTR
-		printk(KERN_DEBUG "cyc:startup raising Z DTR\n");
-#endif
+		tty_port_raise_dtr_rts(&info->port);
 
 		/* enable send, recv, modem !!! */
 
@@ -1473,17 +1515,9 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 			info->port.xmit_buf = NULL;
 			free_page((unsigned long)temp);
 		}
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		if (tty->termios->c_cflag & HUPCL) {
-			cy_writeb(base_addr + (CyMSVR1 << index), ~CyRTS);
-			cy_writeb(base_addr + (CyMSVR2 << index), ~CyDTR);
-#ifdef CY_DEBUG_DTR
-			printk(KERN_DEBUG "cyc shutdown dropping DTR\n");
-			printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-				readb(base_addr + (CyMSVR1 << index)),
-				readb(base_addr + (CyMSVR2 << index)));
-#endif
-		}
+		if (tty->termios->c_cflag & HUPCL)
+			cyy_change_rts_dtr(info, 0, TIOCM_RTS | TIOCM_DTR);
+
 		cyy_issue_cmd(base_addr, CyCHAN_CTL | CyDIS_RCVR, index);
 		/* it may be appropriate to clear _XMIT at
 		   some later date (after testing)!!! */
@@ -1492,9 +1526,6 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 		info->port.flags &= ~ASYNC_INITIALIZED;
 		spin_unlock_irqrestore(&card->card_lock, flags);
 	} else {
-		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
-		int retval;
-
 #ifdef CY_DEBUG_OPEN
 		printk(KERN_DEBUG "cyc shutdown Z card %d, channel %d, "
 			"base_addr %p\n", card, channel, card->base_addr);
@@ -1512,20 +1543,8 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 			free_page((unsigned long)temp);
 		}
 
-		if (tty->termios->c_cflag & HUPCL) {
-			cy_writel(&ch_ctrl->rs_control,
-				readl(&ch_ctrl->rs_control) &
-					~(C_RS_RTS | C_RS_DTR));
-			retval = cyz_issue_cmd(info->card, channel,
-					C_CM_IOCTLM, 0L);
-			if (retval != 0) {
-				printk(KERN_ERR"cyc:shutdown retval on ttyC%d "
-					"was %x\n", info->line, retval);
-			}
-#ifdef CY_DEBUG_DTR
-			printk(KERN_DEBUG "cyc:shutdown dropping Z DTR\n");
-#endif
-		}
+		if (tty->termios->c_cflag & HUPCL)
+			tty_port_lower_dtr_rts(&info->port);
 
 		set_bit(TTY_IO_ERROR, &tty->flags);
 		info->port.flags &= ~ASYNC_INITIALIZED;
@@ -2273,35 +2292,10 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 				  CyDSR | CyCTS | CyRI | CyDCD);
 		}
 
-		if (i == 0) {	/* baud rate is zero, turn off line */
-			if (info->rtsdtr_inv) {
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  ~CyRTS);
-			} else {
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  ~CyDTR);
-			}
-#ifdef CY_DEBUG_DTR
-			printk(KERN_DEBUG "cyc:set_line_char dropping DTR\n");
-			printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-				readb(base_addr + (CyMSVR1 << index)),
-				readb(base_addr + (CyMSVR2 << index)));
-#endif
-		} else {
-			if (info->rtsdtr_inv) {
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  CyRTS);
-			} else {
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  CyDTR);
-			}
-#ifdef CY_DEBUG_DTR
-			printk(KERN_DEBUG "cyc:set_line_char raising DTR\n");
-			printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-				readb(base_addr + (CyMSVR1 << index)),
-				readb(base_addr + (CyMSVR2 << index)));
-#endif
-		}
+		if (i == 0)	/* baud rate is zero, turn off line */
+			cyy_change_rts_dtr(info, 0, TIOCM_DTR);
+		else
+			cyy_change_rts_dtr(info, TIOCM_DTR, 0);
 
 		clear_bit(TTY_IO_ERROR, &tty->flags);
 		spin_unlock_irqrestore(&card->card_lock, flags);
@@ -2604,9 +2598,8 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
 {
 	struct cyclades_port *info = tty->driver_data;
 	struct cyclades_card *card;
-	int chip, channel, index;
 	unsigned long flags;
-	int retval;
+	int channel, retval;
 
 	if (serial_paranoia_check(info, tty->name, __func__))
 		return -ENODEV;
@@ -2614,77 +2607,9 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
 	card = info->card;
 	channel = (info->line) - (card->first_line);
 	if (!cy_is_Z(card)) {
-		void __iomem *base_addr;
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
-
-		if (set & TIOCM_RTS) {
-			spin_lock_irqsave(&card->card_lock, flags);
-			cy_writeb(base_addr + (CyCAR << index),
-				  (u_char) channel);
-			if (info->rtsdtr_inv) {
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  CyDTR);
-			} else {
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  CyRTS);
-			}
-			spin_unlock_irqrestore(&card->card_lock, flags);
-		}
-		if (clear & TIOCM_RTS) {
-			spin_lock_irqsave(&card->card_lock, flags);
-			cy_writeb(base_addr + (CyCAR << index),
-				  (u_char) channel);
-			if (info->rtsdtr_inv) {
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  ~CyDTR);
-			} else {
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  ~CyRTS);
-			}
-			spin_unlock_irqrestore(&card->card_lock, flags);
-		}
-		if (set & TIOCM_DTR) {
-			spin_lock_irqsave(&card->card_lock, flags);
-			cy_writeb(base_addr + (CyCAR << index),
-				  (u_char) channel);
-			if (info->rtsdtr_inv) {
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  CyRTS);
-			} else {
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  CyDTR);
-			}
-#ifdef CY_DEBUG_DTR
-			printk(KERN_DEBUG "cyc:set_modem_info raising DTR\n");
-			printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-				readb(base_addr + (CyMSVR1 << index)),
-				readb(base_addr + (CyMSVR2 << index)));
-#endif
-			spin_unlock_irqrestore(&card->card_lock, flags);
-		}
-		if (clear & TIOCM_DTR) {
-			spin_lock_irqsave(&card->card_lock, flags);
-			cy_writeb(base_addr + (CyCAR << index),
-				  (u_char) channel);
-			if (info->rtsdtr_inv) {
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  ~CyRTS);
-			} else {
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  ~CyDTR);
-			}
-
-#ifdef CY_DEBUG_DTR
-			printk(KERN_DEBUG "cyc:set_modem_info dropping DTR\n");
-			printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-				readb(base_addr + (CyMSVR1 << index)),
-				readb(base_addr + (CyMSVR2 << index)));
-#endif
-			spin_unlock_irqrestore(&card->card_lock, flags);
-		}
+		spin_lock_irqsave(&card->card_lock, flags);
+		cyy_change_rts_dtr(info, set, clear);
+		spin_unlock_irqrestore(&card->card_lock, flags);
 	} else {
 		if (cyz_is_loaded(card)) {
 			struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
@@ -3177,8 +3102,6 @@ static void cy_throttle(struct tty_struct *tty)
 	struct cyclades_port *info = tty->driver_data;
 	struct cyclades_card *card;
 	unsigned long flags;
-	void __iomem *base_addr;
-	int chip, channel, index;
 
 #ifdef CY_DEBUG_THROTTLE
 	char buf[64];
@@ -3200,24 +3123,9 @@ static void cy_throttle(struct tty_struct *tty)
 	}
 
 	if (tty->termios->c_cflag & CRTSCTS) {
-		channel = info->line - card->first_line;
 		if (!cy_is_Z(card)) {
-			chip = channel >> 2;
-			channel &= 0x03;
-			index = card->bus_index;
-			base_addr = card->base_addr +
-				(cy_chip_offset[chip] << index);
-
 			spin_lock_irqsave(&card->card_lock, flags);
-			cy_writeb(base_addr + (CyCAR << index),
-				  (u_char) channel);
-			if (info->rtsdtr_inv) {
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  ~CyDTR);
-			} else {
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  ~CyRTS);
-			}
+			cyy_change_rts_dtr(info, 0, TIOCM_RTS);
 			spin_unlock_irqrestore(&card->card_lock, flags);
 		} else {
 			info->throttle = 1;
@@ -3235,8 +3143,6 @@ static void cy_unthrottle(struct tty_struct *tty)
 	struct cyclades_port *info = tty->driver_data;
 	struct cyclades_card *card;
 	unsigned long flags;
-	void __iomem *base_addr;
-	int chip, channel, index;
 
 #ifdef CY_DEBUG_THROTTLE
 	char buf[64];
@@ -3257,24 +3163,9 @@ static void cy_unthrottle(struct tty_struct *tty)
 
 	if (tty->termios->c_cflag & CRTSCTS) {
 		card = info->card;
-		channel = info->line - card->first_line;
 		if (!cy_is_Z(card)) {
-			chip = channel >> 2;
-			channel &= 0x03;
-			index = card->bus_index;
-			base_addr = card->base_addr +
-				(cy_chip_offset[chip] << index);
-
 			spin_lock_irqsave(&card->card_lock, flags);
-			cy_writeb(base_addr + (CyCAR << index),
-				  (u_char) channel);
-			if (info->rtsdtr_inv) {
-				cy_writeb(base_addr + (CyMSVR2 << index),
-					  CyDTR);
-			} else {
-				cy_writeb(base_addr + (CyMSVR1 << index),
-					  CyRTS);
-			}
+			cyy_change_rts_dtr(info, TIOCM_RTS, 0);
 			spin_unlock_irqrestore(&card->card_lock, flags);
 		} else {
 			info->throttle = 0;
@@ -3395,24 +3286,11 @@ static void cyy_dtr_rts(struct tty_port *port, int raise)
 	struct cyclades_port *info = container_of(port, struct cyclades_port,
 			port);
 	struct cyclades_card *cinfo = info->card;
-	void __iomem *base = cinfo->base_addr;
 	unsigned long flags;
-	int channel = info->line - cinfo->first_line;
-	int chip = channel >> 2, index = cinfo->bus_index;
-
-	channel &= 0x03;
-	base += cy_chip_offset[chip] << index;
 
 	spin_lock_irqsave(&cinfo->card_lock, flags);
-	cy_writeb(base + (CyCAR << index), (u8)channel);
-	cy_writeb(base + (CyMSVR1 << index), raise ? CyRTS : ~CyRTS);
-	cy_writeb(base + (CyMSVR2 << index), raise ? CyDTR : ~CyDTR);
-#ifdef CY_DEBUG_DTR
-	printk(KERN_DEBUG "%s: raising DTR\n", __func__);
-	printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-			readb(base + (CyMSVR1 << index)),
-			readb(base + (CyMSVR2 << index)));
-#endif
+	cyy_change_rts_dtr(info, raise ? TIOCM_RTS | TIOCM_DTR : 0,
+			raise ? 0 : TIOCM_RTS | TIOCM_DTR);
 	spin_unlock_irqrestore(&cinfo->card_lock, flags);
 }
 
-- 
1.6.4.2


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

* [PATCH 16/79] cyclades: merge cy_startup tails
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (14 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 15/79] cyclades: use dtr_rts helpers Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 17/79] cyclades: ioctls cleanup Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

There is a duplicated code for Y and Z in cy_startup, merge the paths.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |   45 ++++++++++++++++-----------------------------
 1 files changed, 16 insertions(+), 29 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 7462795..47cd7b8 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -1296,7 +1296,7 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 	unsigned long flags;
 	int retval = 0;
 	void __iomem *base_addr;
-	int chip, channel, index;
+	int channel;
 	unsigned long page;
 
 	card = info->card;
@@ -1308,14 +1308,11 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 
 	spin_lock_irqsave(&card->card_lock, flags);
 
-	if (info->port.flags & ASYNC_INITIALIZED) {
-		free_page(page);
+	if (info->port.flags & ASYNC_INITIALIZED)
 		goto errout;
-	}
 
 	if (!info->type) {
 		set_bit(TTY_IO_ERROR, &tty->flags);
-		free_page(page);
 		goto errout;
 	}
 
@@ -1329,9 +1326,9 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 	cy_set_line_char(info, tty);
 
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
+		int chip = channel >> 2;
+		int index = card->bus_index;
 		channel &= 0x03;
-		index = card->bus_index;
 		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
 
 #ifdef CY_DEBUG_OPEN
@@ -1354,18 +1351,6 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 
 		cy_writeb(base_addr + (CySRER << index),
 			readb(base_addr + (CySRER << index)) | CyRxData);
-		info->port.flags |= ASYNC_INITIALIZED;
-
-		clear_bit(TTY_IO_ERROR, &tty->flags);
-		info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
-		info->breakon = info->breakoff = 0;
-		memset((char *)&info->idle_stats, 0, sizeof(info->idle_stats));
-		info->idle_stats.in_use =
-		info->idle_stats.recv_idle =
-		info->idle_stats.xmit_idle = jiffies;
-
-		spin_unlock_irqrestore(&card->card_lock, flags);
-
 	} else {
 		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
 
@@ -1416,18 +1401,19 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 		tty_port_raise_dtr_rts(&info->port);
 
 		/* enable send, recv, modem !!! */
+	}
 
-		info->port.flags |= ASYNC_INITIALIZED;
-		clear_bit(TTY_IO_ERROR, &tty->flags);
-		info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
-		info->breakon = info->breakoff = 0;
-		memset((char *)&info->idle_stats, 0, sizeof(info->idle_stats));
-		info->idle_stats.in_use =
-		info->idle_stats.recv_idle =
-		info->idle_stats.xmit_idle = jiffies;
+	info->port.flags |= ASYNC_INITIALIZED;
 
-		spin_unlock_irqrestore(&card->card_lock, flags);
-	}
+	clear_bit(TTY_IO_ERROR, &tty->flags);
+	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
+	info->breakon = info->breakoff = 0;
+	memset((char *)&info->idle_stats, 0, sizeof(info->idle_stats));
+	info->idle_stats.in_use =
+	info->idle_stats.recv_idle =
+	info->idle_stats.xmit_idle = jiffies;
+
+	spin_unlock_irqrestore(&card->card_lock, flags);
 
 #ifdef CY_DEBUG_OPEN
 	printk(KERN_DEBUG "cyc startup done\n");
@@ -1436,6 +1422,7 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 
 errout:
 	spin_unlock_irqrestore(&card->card_lock, flags);
+	free_page(page);
 	return retval;
 }				/* startup */
 
-- 
1.6.4.2


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

* [PATCH 17/79] cyclades: ioctls cleanup
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (15 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 16/79] cyclades: merge cy_startup tails Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 18/79] cyclades: tiocm cleanup Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

- add a cy_ prefix to functions with changed prototypes
- cy_get_serial_info: initialize serial_struct by initializer,
  save a memset
- inline simple functions (get_mon_info, {s,g}et_default_threshold,
  {s,g}et_default_timeout) directly in the ioctl handler
- add a cy_cflags_changed helper to not copy its code by
  wait_event_interruptible
- remove some ret_val = 0 assignments, it's preset to 0
- TIOCGICOUNT: don't do many put_user's, do one copy_to_user

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |  179 ++++++++++++++++++-----------------------------
 1 files changed, 67 insertions(+), 112 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 47cd7b8..e1637ad 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -2411,29 +2411,25 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 	}
 }				/* set_line_char */
 
-static int
-get_serial_info(struct cyclades_port *info,
+static int cy_get_serial_info(struct cyclades_port *info,
 		struct serial_struct __user *retinfo)
 {
-	struct serial_struct tmp;
 	struct cyclades_card *cinfo = info->card;
-
-	if (!retinfo)
-		return -EFAULT;
-	memset(&tmp, 0, sizeof(tmp));
-	tmp.type = info->type;
-	tmp.line = info->line;
-	tmp.port = (info->card - cy_card) * 0x100 + info->line -
-		cinfo->first_line;
-	tmp.irq = cinfo->irq;
-	tmp.flags = info->port.flags;
-	tmp.close_delay = info->port.close_delay;
-	tmp.closing_wait = info->port.closing_wait;
-	tmp.baud_base = info->baud;
-	tmp.custom_divisor = info->custom_divisor;
-	tmp.hub6 = 0;		/*!!! */
+	struct serial_struct tmp = {
+		.type = info->type,
+		.line = info->line,
+		.port = (info->card - cy_card) * 0x100 + info->line -
+			cinfo->first_line,
+		.irq = cinfo->irq,
+		.flags = info->port.flags,
+		.close_delay = info->port.close_delay,
+		.closing_wait = info->port.closing_wait,
+		.baud_base = info->baud,
+		.custom_divisor = info->custom_divisor,
+		.hub6 = 0,		/*!!! */
+	};
 	return copy_to_user(retinfo, &tmp, sizeof(*retinfo)) ? -EFAULT : 0;
-}				/* get_serial_info */
+}
 
 static int
 cy_set_serial_info(struct cyclades_port *info, struct tty_struct *tty,
@@ -2712,18 +2708,6 @@ static int cy_break(struct tty_struct *tty, int break_state)
 	return retval;
 }				/* cy_break */
 
-static int get_mon_info(struct cyclades_port *info,
-				struct cyclades_monitor __user *mon)
-{
-	if (copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor)))
-		return -EFAULT;
-	info->mon.int_count = 0;
-	info->mon.char_count = 0;
-	info->mon.char_max = 0;
-	info->mon.char_last = 0;
-	return 0;
-}				/* get_mon_info */
-
 static int set_threshold(struct cyclades_port *info, unsigned long value)
 {
 	struct cyclades_card *card;
@@ -2773,19 +2757,6 @@ static int get_threshold(struct cyclades_port *info,
 	return 0;
 }				/* get_threshold */
 
-static int set_default_threshold(struct cyclades_port *info,
-							unsigned long value)
-{
-	info->default_threshold = value & 0x0f;
-	return 0;
-}				/* set_default_threshold */
-
-static int get_default_threshold(struct cyclades_port *info,
-						unsigned long __user *value)
-{
-	return put_user(info->default_threshold, value);
-}				/* get_default_threshold */
-
 static int set_timeout(struct cyclades_port *info, unsigned long value)
 {
 	struct cyclades_card *card;
@@ -2830,17 +2801,26 @@ static int get_timeout(struct cyclades_port *info,
 	return 0;
 }				/* get_timeout */
 
-static int set_default_timeout(struct cyclades_port *info, unsigned long value)
+static int cy_cflags_changed(struct cyclades_port *info, unsigned long arg,
+		struct cyclades_icount *cprev)
 {
-	info->default_timeout = value & 0xff;
-	return 0;
-}				/* set_default_timeout */
+	struct cyclades_icount cnow;
+	unsigned long flags;
+	int ret;
 
-static int get_default_timeout(struct cyclades_port *info,
-					unsigned long __user *value)
-{
-	return put_user(info->default_timeout, value);
-}				/* get_default_timeout */
+	spin_lock_irqsave(&info->card->card_lock, flags);
+	cnow = info->icount;	/* atomic copy */
+	spin_unlock_irqrestore(&info->card->card_lock, flags);
+
+	ret =	((arg & TIOCM_RNG) && (cnow.rng != cprev->rng)) ||
+		((arg & TIOCM_DSR) && (cnow.dsr != cprev->dsr)) ||
+		((arg & TIOCM_CD)  && (cnow.dcd != cprev->dcd)) ||
+		((arg & TIOCM_CTS) && (cnow.cts != cprev->cts));
+
+	*cprev = cnow;
+
+	return ret;
+}
 
 /*
  * This routine allows the tty driver to implement device-
@@ -2852,8 +2832,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 	 unsigned int cmd, unsigned long arg)
 {
 	struct cyclades_port *info = tty->driver_data;
-	struct cyclades_icount cprev, cnow;	/* kernel counter temps */
-	struct serial_icounter_struct __user *p_cuser;	/* user space */
+	struct cyclades_icount cnow;	/* kernel counter temps */
 	int ret_val = 0;
 	unsigned long flags;
 	void __user *argp = (void __user *)arg;
@@ -2869,7 +2848,11 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 
 	switch (cmd) {
 	case CYGETMON:
-		ret_val = get_mon_info(info, argp);
+		if (copy_to_user(argp, &info->mon, sizeof(info->mon))) {
+			ret_val = -EFAULT;
+			break;
+		}
+		memset(&info->mon, 0, sizeof(info->mon));
 		break;
 	case CYGETTHRESH:
 		ret_val = get_threshold(info, argp);
@@ -2878,10 +2861,11 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 		ret_val = set_threshold(info, arg);
 		break;
 	case CYGETDEFTHRESH:
-		ret_val = get_default_threshold(info, argp);
+		ret_val = put_user(info->default_threshold,
+				(unsigned long __user *)argp);
 		break;
 	case CYSETDEFTHRESH:
-		ret_val = set_default_threshold(info, arg);
+		info->default_threshold = arg & 0x0f;
 		break;
 	case CYGETTIMEOUT:
 		ret_val = get_timeout(info, argp);
@@ -2890,21 +2874,20 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 		ret_val = set_timeout(info, arg);
 		break;
 	case CYGETDEFTIMEOUT:
-		ret_val = get_default_timeout(info, argp);
+		ret_val = put_user(info->default_timeout,
+				(unsigned long __user *)argp);
 		break;
 	case CYSETDEFTIMEOUT:
-		ret_val = set_default_timeout(info, arg);
+		info->default_timeout = arg & 0xff;
 		break;
 	case CYSETRFLOW:
 		info->rflow = (int)arg;
-		ret_val = 0;
 		break;
 	case CYGETRFLOW:
 		ret_val = info->rflow;
 		break;
 	case CYSETRTSDTR_INV:
 		info->rtsdtr_inv = (int)arg;
-		ret_val = 0;
 		break;
 	case CYGETRTSDTR_INV:
 		ret_val = info->rtsdtr_inv;
@@ -2915,7 +2898,6 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 #ifndef CONFIG_CYZ_INTR
 	case CYZSETPOLLCYCLE:
 		cyz_polling_cycle = (arg * HZ) / 1000;
-		ret_val = 0;
 		break;
 	case CYZGETPOLLCYCLE:
 		ret_val = (cyz_polling_cycle * 1000) / HZ;
@@ -2923,13 +2905,12 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 #endif				/* CONFIG_CYZ_INTR */
 	case CYSETWAIT:
 		info->port.closing_wait = (unsigned short)arg * HZ / 100;
-		ret_val = 0;
 		break;
 	case CYGETWAIT:
 		ret_val = info->port.closing_wait / (HZ / 100);
 		break;
 	case TIOCGSERIAL:
-		ret_val = get_serial_info(info, argp);
+		ret_val = cy_get_serial_info(info, argp);
 		break;
 	case TIOCSSERIAL:
 		ret_val = cy_set_serial_info(info, tty, argp);
@@ -2948,17 +2929,8 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 		/* note the counters on entry */
 		cnow = info->icount;
 		spin_unlock_irqrestore(&info->card->card_lock, flags);
-		ret_val = wait_event_interruptible(info->delta_msr_wait, ({
-			cprev = cnow;
-			spin_lock_irqsave(&info->card->card_lock, flags);
-			cnow = info->icount;	/* atomic copy */
-			spin_unlock_irqrestore(&info->card->card_lock, flags);
-
-			((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
-			((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
-			((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
-			((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
-		}));
+		ret_val = wait_event_interruptible(info->delta_msr_wait,
+				cy_cflags_changed(info, arg, &cnow));
 		break;
 
 		/*
@@ -2967,46 +2939,29 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 		 * NB: both 1->0 and 0->1 transitions are counted except for
 		 *     RI where only 0->1 is counted.
 		 */
-	case TIOCGICOUNT:
+	case TIOCGICOUNT: {
+		struct serial_icounter_struct sic = { };
+
 		spin_lock_irqsave(&info->card->card_lock, flags);
 		cnow = info->icount;
 		spin_unlock_irqrestore(&info->card->card_lock, flags);
-		p_cuser = argp;
-		ret_val = put_user(cnow.cts, &p_cuser->cts);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.dsr, &p_cuser->dsr);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.rng, &p_cuser->rng);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.dcd, &p_cuser->dcd);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.rx, &p_cuser->rx);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.tx, &p_cuser->tx);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.frame, &p_cuser->frame);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.overrun, &p_cuser->overrun);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.parity, &p_cuser->parity);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.brk, &p_cuser->brk);
-		if (ret_val)
-			break;
-		ret_val = put_user(cnow.buf_overrun, &p_cuser->buf_overrun);
-		if (ret_val)
-			break;
-		ret_val = 0;
+
+		sic.cts = cnow.cts;
+		sic.dsr = cnow.dsr;
+		sic.rng = cnow.rng;
+		sic.dcd = cnow.dcd;
+		sic.rx = cnow.rx;
+		sic.tx = cnow.tx;
+		sic.frame = cnow.frame;
+		sic.overrun = cnow.overrun;
+		sic.parity = cnow.parity;
+		sic.brk = cnow.brk;
+		sic.buf_overrun = cnow.buf_overrun;
+
+		if (copy_to_user(argp, &sic, sizeof(sic)))
+			ret_val = -EFAULT;
 		break;
+	}
 	default:
 		ret_val = -ENOIOCTLCMD;
 	}
-- 
1.6.4.2


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

* [PATCH 18/79] cyclades: tiocm cleanup
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (16 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 17/79] cyclades: ioctls cleanup Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 19/79] cyclades: introduce cyy_readb/writeb Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

- save one indent level by inverting !fw_loaded condition
- read rs_status on Z and write it after we change all the flags,
  don't do that separately
- remove Y inverted rts/dtr branching, precompute registers and use
  them

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |  153 ++++++++++++++++++++---------------------------
 1 files changed, 66 insertions(+), 87 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index e1637ad..ed66c3a 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -831,6 +831,7 @@ static void cyy_change_rts_dtr(struct cyclades_port *info, unsigned int set,
 	struct cyclades_card *card = info->card;
 	void __iomem *base_addr;
 	int chip, channel, index;
+	u32 rts, dtr, msvrr, msvrd;
 
 	channel = info->line - card->first_line;
 	chip = channel >> 2;
@@ -838,29 +839,28 @@ static void cyy_change_rts_dtr(struct cyclades_port *info, unsigned int set,
 	index = card->bus_index;
 	base_addr = card->base_addr + (cy_chip_offset[chip] << index);
 
+	if (info->rtsdtr_inv) {
+		msvrr = CyMSVR2;
+		msvrd = CyMSVR1;
+		rts = CyDTR;
+		dtr = CyRTS;
+	} else {
+		msvrr = CyMSVR1;
+		msvrd = CyMSVR2;
+		rts = CyRTS;
+		dtr = CyDTR;
+	}
 	if (set & TIOCM_RTS) {
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		if (info->rtsdtr_inv) {
-			cy_writeb(base_addr + (CyMSVR2 << index), CyDTR);
-		} else {
-			cy_writeb(base_addr + (CyMSVR1 << index), CyRTS);
-		}
+		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
+		cy_writeb(base_addr + (msvrr << index), rts);
 	}
 	if (clear & TIOCM_RTS) {
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		if (info->rtsdtr_inv) {
-			cy_writeb(base_addr + (CyMSVR2 << index), ~CyDTR);
-		} else {
-			cy_writeb(base_addr + (CyMSVR1 << index), ~CyRTS);
-		}
+		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
+		cy_writeb(base_addr + (msvrr << index), ~rts);
 	}
 	if (set & TIOCM_DTR) {
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		if (info->rtsdtr_inv) {
-			cy_writeb(base_addr + (CyMSVR1 << index), CyRTS);
-		} else {
-			cy_writeb(base_addr + (CyMSVR2 << index), CyDTR);
-		}
+		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
+		cy_writeb(base_addr + (msvrd << index), dtr);
 #ifdef CY_DEBUG_DTR
 		printk(KERN_DEBUG "cyc:set_modem_info raising DTR\n");
 		printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
@@ -869,13 +869,8 @@ static void cyy_change_rts_dtr(struct cyclades_port *info, unsigned int set,
 #endif
 	}
 	if (clear & TIOCM_DTR) {
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		if (info->rtsdtr_inv) {
-			cy_writeb(base_addr + (CyMSVR1 << index), ~CyRTS);
-		} else {
-			cy_writeb(base_addr + (CyMSVR2 << index), ~CyDTR);
-		}
-
+		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
+		cy_writeb(base_addr + (msvrd << index), ~dtr);
 #ifdef CY_DEBUG_DTR
 		printk(KERN_DEBUG "cyc:set_modem_info dropping DTR\n");
 		printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
@@ -2518,28 +2513,27 @@ static int cy_tiocmget(struct tty_struct *tty, struct file *file)
 {
 	struct cyclades_port *info = tty->driver_data;
 	struct cyclades_card *card;
-	int chip, channel, index;
 	void __iomem *base_addr;
-	unsigned long flags;
-	unsigned char status;
-	unsigned long lstatus;
-	unsigned int result;
+	int result, channel;
 
 	if (serial_paranoia_check(info, tty->name, __func__))
 		return -ENODEV;
 
-	lock_kernel();
-
 	card = info->card;
 	channel = info->line - card->first_line;
+
+	lock_kernel();
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
+		unsigned long flags;
+		unsigned char status;
+		int chip = channel >> 2;
+		int index = card->bus_index;
+
 		channel &= 0x03;
-		index = card->bus_index;
 		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
 
 		spin_lock_irqsave(&card->card_lock, flags);
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
+		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
 		status = readb(base_addr + (CyMSVR1 << index));
 		status |= readb(base_addr + (CyMSVR2 << index));
 		spin_unlock_irqrestore(&card->card_lock, flags);
@@ -2556,21 +2550,22 @@ static int cy_tiocmget(struct tty_struct *tty, struct file *file)
 			((status & CyDSR) ? TIOCM_DSR : 0) |
 			((status & CyCTS) ? TIOCM_CTS : 0);
 	} else {
-		if (cyz_is_loaded(card)) {
-			lstatus = readl(&info->u.cyz.ch_ctrl->rs_status);
-			result = ((lstatus & C_RS_RTS) ? TIOCM_RTS : 0) |
-				((lstatus & C_RS_DTR) ? TIOCM_DTR : 0) |
-				((lstatus & C_RS_DCD) ? TIOCM_CAR : 0) |
-				((lstatus & C_RS_RI) ? TIOCM_RNG : 0) |
-				((lstatus & C_RS_DSR) ? TIOCM_DSR : 0) |
-				((lstatus & C_RS_CTS) ? TIOCM_CTS : 0);
-		} else {
-			result = 0;
-			unlock_kernel();
-			return -ENODEV;
+		u32 lstatus;
+
+		if (!cyz_is_loaded(card)) {
+			result = -ENODEV;
+			goto end;
 		}
 
+		lstatus = readl(&info->u.cyz.ch_ctrl->rs_status);
+		result = ((lstatus & C_RS_RTS) ? TIOCM_RTS : 0) |
+			((lstatus & C_RS_DTR) ? TIOCM_DTR : 0) |
+			((lstatus & C_RS_DCD) ? TIOCM_CAR : 0) |
+			((lstatus & C_RS_RI) ? TIOCM_RNG : 0) |
+			((lstatus & C_RS_DSR) ? TIOCM_DSR : 0) |
+			((lstatus & C_RS_CTS) ? TIOCM_CTS : 0);
 	}
+end:
 	unlock_kernel();
 	return result;
 }				/* cy_tiomget */
@@ -2582,68 +2577,52 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
 	struct cyclades_port *info = tty->driver_data;
 	struct cyclades_card *card;
 	unsigned long flags;
-	int channel, retval;
 
 	if (serial_paranoia_check(info, tty->name, __func__))
 		return -ENODEV;
 
 	card = info->card;
-	channel = (info->line) - (card->first_line);
 	if (!cy_is_Z(card)) {
 		spin_lock_irqsave(&card->card_lock, flags);
 		cyy_change_rts_dtr(info, set, clear);
 		spin_unlock_irqrestore(&card->card_lock, flags);
 	} else {
-		if (cyz_is_loaded(card)) {
-			struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
-
-			if (set & TIOCM_RTS) {
-				spin_lock_irqsave(&card->card_lock, flags);
-				cy_writel(&ch_ctrl->rs_control,
-					readl(&ch_ctrl->rs_control) | C_RS_RTS);
-				spin_unlock_irqrestore(&card->card_lock, flags);
-			}
-			if (clear & TIOCM_RTS) {
-				spin_lock_irqsave(&card->card_lock, flags);
-				cy_writel(&ch_ctrl->rs_control,
-					readl(&ch_ctrl->rs_control) &
-					~C_RS_RTS);
-				spin_unlock_irqrestore(&card->card_lock, flags);
-			}
-			if (set & TIOCM_DTR) {
-				spin_lock_irqsave(&card->card_lock, flags);
-				cy_writel(&ch_ctrl->rs_control,
-					readl(&ch_ctrl->rs_control) | C_RS_DTR);
+		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
+		int retval, channel = info->line - card->first_line;
+		u32 rs;
+
+		if (!cyz_is_loaded(card))
+			return -ENODEV;
+
+		spin_lock_irqsave(&card->card_lock, flags);
+		rs = readl(&ch_ctrl->rs_control);
+		if (set & TIOCM_RTS)
+			rs |= C_RS_RTS;
+		if (clear & TIOCM_RTS)
+			rs &= ~C_RS_RTS;
+		if (set & TIOCM_DTR) {
+			rs |= C_RS_DTR;
 #ifdef CY_DEBUG_DTR
-				printk(KERN_DEBUG "cyc:set_modem_info raising "
-					"Z DTR\n");
+			printk(KERN_DEBUG "cyc:set_modem_info raising Z DTR\n");
 #endif
-				spin_unlock_irqrestore(&card->card_lock, flags);
-			}
-			if (clear & TIOCM_DTR) {
-				spin_lock_irqsave(&card->card_lock, flags);
-				cy_writel(&ch_ctrl->rs_control,
-					readl(&ch_ctrl->rs_control) &
-					~C_RS_DTR);
+		}
+		if (clear & TIOCM_DTR) {
+			rs &= ~C_RS_DTR;
 #ifdef CY_DEBUG_DTR
-				printk(KERN_DEBUG "cyc:set_modem_info clearing "
-					"Z DTR\n");
+			printk(KERN_DEBUG "cyc:set_modem_info clearing "
+				"Z DTR\n");
 #endif
-				spin_unlock_irqrestore(&card->card_lock, flags);
-			}
-		} else {
-			return -ENODEV;
 		}
-		spin_lock_irqsave(&card->card_lock, flags);
+		cy_writel(&ch_ctrl->rs_control, rs);
 		retval = cyz_issue_cmd(card, channel, C_CM_IOCTLM, 0L);
+		spin_unlock_irqrestore(&card->card_lock, flags);
 		if (retval != 0) {
 			printk(KERN_ERR "cyc:set_modem_info retval on ttyC%d "
 				"was %x\n", info->line, retval);
 		}
-		spin_unlock_irqrestore(&card->card_lock, flags);
 	}
 	return 0;
-}				/* cy_tiocmset */
+}
 
 /*
  * cy_break() --- routine which turns the break handling on or off
-- 
1.6.4.2


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

* [PATCH 19/79] cyclades: introduce cyy_readb/writeb
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (17 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 18/79] cyclades: tiocm cleanup Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 20/79] cyclades: remove more duplicated code Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Add helpers for io operations, so that we can eliminate huge
amount of supporting code. It is now centralized in those
helpers and used values are precomputed in the init phase.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c  |  448 +++++++++++++++++-----------------------------
 include/linux/cyclades.h |    2 +-
 2 files changed, 165 insertions(+), 285 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index ed66c3a..cf2874a 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -90,7 +90,6 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 
-static void cy_throttle(struct tty_struct *tty);
 static void cy_send_xchar(struct tty_struct *tty, char ch);
 
 #ifndef SERIAL_XMIT_SIZE
@@ -298,6 +297,20 @@ static void cyz_rx_restart(unsigned long);
 static struct timer_list cyz_rx_full_timer[NR_PORTS];
 #endif				/* CONFIG_CYZ_INTR */
 
+static inline void cyy_writeb(struct cyclades_port *port, u32 reg, u8 val)
+{
+	struct cyclades_card *card = port->card;
+
+	cy_writeb(port->u.cyy.base_addr + (reg << card->bus_index), val);
+}
+
+static inline u8 cyy_readb(struct cyclades_port *port, u32 reg)
+{
+	struct cyclades_card *card = port->card;
+
+	return readb(port->u.cyy.base_addr + (reg << card->bus_index));
+}
+
 static inline bool cy_is_Z(struct cyclades_card *card)
 {
 	return card->num_chips == (unsigned int)-1;
@@ -350,13 +363,14 @@ static inline int serial_paranoia_check(struct cyclades_port *info,
 
    This function is only called from inside spinlock-protected code.
  */
-static int cyy_issue_cmd(void __iomem *base_addr, u_char cmd, int index)
+static int __cyy_issue_cmd(void __iomem *base_addr, u8 cmd, int index)
 {
+	void __iomem *ccr = base_addr + (CyCCR << index);
 	unsigned int i;
 
 	/* Check to see that the previous command has completed */
 	for (i = 0; i < 100; i++) {
-		if (readb(base_addr + (CyCCR << index)) == 0)
+		if (readb(ccr) == 0)
 			break;
 		udelay(10L);
 	}
@@ -366,10 +380,16 @@ static int cyy_issue_cmd(void __iomem *base_addr, u_char cmd, int index)
 		return -1;
 
 	/* Issue the new command */
-	cy_writeb(base_addr + (CyCCR << index), cmd);
+	cy_writeb(ccr, cmd);
 
 	return 0;
-}				/* cyy_issue_cmd */
+}
+
+static inline int cyy_issue_cmd(struct cyclades_port *port, u8 cmd)
+{
+	return __cyy_issue_cmd(port->u.cyy.base_addr, cmd,
+			port->card->bus_index);
+}
 
 #ifdef CONFIG_ISA
 /* ISA interrupt detection code */
@@ -394,7 +414,7 @@ static unsigned detect_isa_irq(void __iomem *address)
 	/* Enable the Tx interrupts on the CD1400 */
 	local_irq_save(flags);
 	cy_writeb(address + (CyCAR << index), 0);
-	cyy_issue_cmd(address, CyCHAN_CTL | CyENB_XMTR, index);
+	__cyy_issue_cmd(address, CyCHAN_CTL | CyENB_XMTR, index);
 
 	cy_writeb(address + (CyCAR << index), 0);
 	cy_writeb(address + (CySRER << index),
@@ -428,7 +448,7 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 	struct cyclades_port *info;
 	struct tty_struct *tty;
 	int len, index = cinfo->bus_index;
-	u8 save_xir, channel, save_car, data, char_count;
+	u8 ivr, save_xir, channel, save_car, data, char_count;
 
 #ifdef CY_DEBUG_INTERRUPTS
 	printk(KERN_DEBUG "cyy_interrupt: rcvd intr, chip %d\n", chip);
@@ -437,26 +457,25 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 	save_xir = readb(base_addr + (CyRIR << index));
 	channel = save_xir & CyIRChannel;
 	info = &cinfo->ports[channel + chip * 4];
-	save_car = readb(base_addr + (CyCAR << index));
-	cy_writeb(base_addr + (CyCAR << index), save_xir);
+	save_car = cyy_readb(info, CyCAR);
+	cyy_writeb(info, CyCAR, save_xir);
+	ivr = cyy_readb(info, CyRIVR) & CyIVRMask;
 
 	tty = tty_port_tty_get(&info->port);
 	/* if there is nowhere to put the data, discard it */
 	if (tty == NULL) {
-		if ((readb(base_addr + (CyRIVR << index)) & CyIVRMask) ==
-				CyIVRRxEx) {	/* exception */
-			data = readb(base_addr + (CyRDSR << index));
+		if (ivr == CyIVRRxEx) {	/* exception */
+			data = cyy_readb(info, CyRDSR);
 		} else {	/* normal character reception */
-			char_count = readb(base_addr + (CyRDCR << index));
+			char_count = cyy_readb(info, CyRDCR);
 			while (char_count--)
-				data = readb(base_addr + (CyRDSR << index));
+				data = cyy_readb(info, CyRDSR);
 		}
 		goto end;
 	}
 	/* there is an open port for this data */
-	if ((readb(base_addr + (CyRIVR << index)) & CyIVRMask) ==
-			CyIVRRxEx) {	/* exception */
-		data = readb(base_addr + (CyRDSR << index));
+	if (ivr == CyIVRRxEx) {	/* exception */
+		data = cyy_readb(info, CyRDSR);
 
 		/* For statistics only */
 		if (data & CyBREAK)
@@ -477,22 +496,22 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 			if (data & info->read_status_mask) {
 				if (data & CyBREAK) {
 					tty_insert_flip_char(tty,
-						readb(base_addr + (CyRDSR <<
-							index)), TTY_BREAK);
+						cyy_readb(info, CyRDSR),
+						TTY_BREAK);
 					info->icount.rx++;
 					if (info->port.flags & ASYNC_SAK)
 						do_SAK(tty);
 				} else if (data & CyFRAME) {
 					tty_insert_flip_char(tty,
-						readb(base_addr + (CyRDSR <<
-							index)), TTY_FRAME);
+						cyy_readb(info, CyRDSR),
+						TTY_FRAME);
 					info->icount.rx++;
 					info->idle_stats.frame_errs++;
 				} else if (data & CyPARITY) {
 					/* Pieces of seven... */
 					tty_insert_flip_char(tty,
-						readb(base_addr + (CyRDSR <<
-							index)), TTY_PARITY);
+						cyy_readb(info, CyRDSR),
+						TTY_PARITY);
 					info->icount.rx++;
 					info->idle_stats.parity_errs++;
 				} else if (data & CyOVERRUN) {
@@ -504,8 +523,8 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 					   the next incoming character.
 					 */
 					tty_insert_flip_char(tty,
-						readb(base_addr + (CyRDSR <<
-							index)), TTY_FRAME);
+						cyy_readb(info, CyRDSR),
+						TTY_FRAME);
 					info->icount.rx++;
 					info->idle_stats.overruns++;
 				/* These two conditions may imply */
@@ -529,7 +548,7 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 		}
 	} else {	/* normal character reception */
 		/* load # chars available from the chip */
-		char_count = readb(base_addr + (CyRDCR << index));
+		char_count = cyy_readb(info, CyRDCR);
 
 #ifdef CY_ENABLE_MONITORING
 		++info->mon.int_count;
@@ -540,7 +559,7 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 #endif
 		len = tty_buffer_request_room(tty, char_count);
 		while (len--) {
-			data = readb(base_addr + (CyRDSR << index));
+			data = cyy_readb(info, CyRDSR);
 			tty_insert_flip_char(tty, data, TTY_NORMAL);
 			info->idle_stats.recv_bytes++;
 			info->icount.rx++;
@@ -554,8 +573,8 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
 	tty_kref_put(tty);
 end:
 	/* end of service */
-	cy_writeb(base_addr + (CyRIR << index), save_xir & 0x3f);
-	cy_writeb(base_addr + (CyCAR << index), save_car);
+	cyy_writeb(info, CyRIR, save_xir & 0x3f);
+	cyy_writeb(info, CyCAR, save_car);
 }
 
 static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
@@ -588,8 +607,7 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 	info = &cinfo->ports[channel + chip * 4];
 	tty = tty_port_tty_get(&info->port);
 	if (tty == NULL) {
-		cy_writeb(base_addr + (CySRER << index),
-			  readb(base_addr + (CySRER << index)) & ~CyTxRdy);
+		cyy_writeb(info, CySRER, cyy_readb(info, CySRER) & ~CyTxRdy);
 		goto end;
 	}
 
@@ -598,7 +616,7 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 
 	if (info->x_char) {	/* send special char */
 		outch = info->x_char;
-		cy_writeb(base_addr + (CyTDR << index), outch);
+		cyy_writeb(info, CyTDR, outch);
 		char_count--;
 		info->icount.tx++;
 		info->x_char = 0;
@@ -606,14 +624,14 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 
 	if (info->breakon || info->breakoff) {
 		if (info->breakon) {
-			cy_writeb(base_addr + (CyTDR << index), 0);
-			cy_writeb(base_addr + (CyTDR << index), 0x81);
+			cyy_writeb(info, CyTDR, 0);
+			cyy_writeb(info, CyTDR, 0x81);
 			info->breakon = 0;
 			char_count -= 2;
 		}
 		if (info->breakoff) {
-			cy_writeb(base_addr + (CyTDR << index), 0);
-			cy_writeb(base_addr + (CyTDR << index), 0x83);
+			cyy_writeb(info, CyTDR, 0);
+			cyy_writeb(info, CyTDR, 0x83);
 			info->breakoff = 0;
 			char_count -= 2;
 		}
@@ -621,27 +639,23 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 
 	while (char_count-- > 0) {
 		if (!info->xmit_cnt) {
-			if (readb(base_addr + (CySRER << index)) & CyTxMpty) {
-				cy_writeb(base_addr + (CySRER << index),
-					readb(base_addr + (CySRER << index)) &
-						~CyTxMpty);
+			if (cyy_readb(info, CySRER) & CyTxMpty) {
+				cyy_writeb(info, CySRER,
+					cyy_readb(info, CySRER) & ~CyTxMpty);
 			} else {
-				cy_writeb(base_addr + (CySRER << index),
-					(readb(base_addr + (CySRER << index)) &
-						~CyTxRdy) | CyTxMpty);
+				cyy_writeb(info, CySRER, CyTxMpty |
+					(cyy_readb(info, CySRER) & ~CyTxRdy));
 			}
 			goto done;
 		}
 		if (info->port.xmit_buf == NULL) {
-			cy_writeb(base_addr + (CySRER << index),
-				readb(base_addr + (CySRER << index)) &
-					~CyTxRdy);
+			cyy_writeb(info, CySRER,
+				cyy_readb(info, CySRER) & ~CyTxRdy);
 			goto done;
 		}
 		if (tty->stopped || tty->hw_stopped) {
-			cy_writeb(base_addr + (CySRER << index),
-				readb(base_addr + (CySRER << index)) &
-					~CyTxRdy);
+			cyy_writeb(info, CySRER,
+				cyy_readb(info, CySRER) & ~CyTxRdy);
 			goto done;
 		}
 		/* Because the Embedded Transmit Commands have been enabled,
@@ -658,15 +672,15 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
 			info->xmit_cnt--;
 			info->xmit_tail = (info->xmit_tail + 1) &
 					(SERIAL_XMIT_SIZE - 1);
-			cy_writeb(base_addr + (CyTDR << index), outch);
+			cyy_writeb(info, CyTDR, outch);
 			info->icount.tx++;
 		} else {
 			if (char_count > 1) {
 				info->xmit_cnt--;
 				info->xmit_tail = (info->xmit_tail + 1) &
 					(SERIAL_XMIT_SIZE - 1);
-				cy_writeb(base_addr + (CyTDR << index), outch);
-				cy_writeb(base_addr + (CyTDR << index), 0);
+				cyy_writeb(info, CyTDR, outch);
+				cyy_writeb(info, CyTDR, 0);
 				info->icount.tx++;
 				char_count--;
 			}
@@ -678,8 +692,8 @@ done:
 	tty_kref_put(tty);
 end:
 	/* end of service */
-	cy_writeb(base_addr + (CyTIR << index), save_xir & 0x3f);
-	cy_writeb(base_addr + (CyCAR << index), save_car);
+	cyy_writeb(info, CyTIR, save_xir & 0x3f);
+	cyy_writeb(info, CyCAR, save_car);
 }
 
 static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
@@ -694,11 +708,11 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 	save_xir = readb(base_addr + (CyMIR << index));
 	channel = save_xir & CyIRChannel;
 	info = &cinfo->ports[channel + chip * 4];
-	save_car = readb(base_addr + (CyCAR << index));
-	cy_writeb(base_addr + (CyCAR << index), save_xir);
+	save_car = cyy_readb(info, CyCAR);
+	cyy_writeb(info, CyCAR, save_xir);
 
-	mdm_change = readb(base_addr + (CyMISR << index));
-	mdm_status = readb(base_addr + (CyMSVR1 << index));
+	mdm_change = cyy_readb(info, CyMISR);
+	mdm_status = cyy_readb(info, CyMSVR1);
 
 	tty = tty_port_tty_get(&info->port);
 	if (!tty)
@@ -730,9 +744,8 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 				/* cy_start isn't used
 				   because... !!! */
 				tty->hw_stopped = 0;
-				cy_writeb(base_addr + (CySRER << index),
-					readb(base_addr + (CySRER << index)) |
-						CyTxRdy);
+				cyy_writeb(info, CySRER,
+					cyy_readb(info, CySRER) | CyTxRdy);
 				tty_wakeup(tty);
 			}
 		} else {
@@ -740,9 +753,8 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 				/* cy_stop isn't used
 				   because ... !!! */
 				tty->hw_stopped = 1;
-				cy_writeb(base_addr + (CySRER << index),
-					readb(base_addr + (CySRER << index)) &
-						~CyTxRdy);
+				cyy_writeb(info, CySRER,
+					cyy_readb(info, CySRER) & ~CyTxRdy);
 			}
 		}
 	}
@@ -753,8 +765,8 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 	tty_kref_put(tty);
 end:
 	/* end of service */
-	cy_writeb(base_addr + (CyMIR << index), save_xir & 0x3f);
-	cy_writeb(base_addr + (CyCAR << index), save_car);
+	cyy_writeb(info, CyMIR, save_xir & 0x3f);
+	cyy_writeb(info, CyCAR, save_car);
 }
 
 /* The real interrupt service routine is called
@@ -829,15 +841,10 @@ static void cyy_change_rts_dtr(struct cyclades_port *info, unsigned int set,
 		unsigned int clear)
 {
 	struct cyclades_card *card = info->card;
-	void __iomem *base_addr;
-	int chip, channel, index;
+	int channel = info->line - card->first_line;
 	u32 rts, dtr, msvrr, msvrd;
 
-	channel = info->line - card->first_line;
-	chip = channel >> 2;
 	channel &= 0x03;
-	index = card->bus_index;
-	base_addr = card->base_addr + (cy_chip_offset[chip] << index);
 
 	if (info->rtsdtr_inv) {
 		msvrr = CyMSVR2;
@@ -851,31 +858,31 @@ static void cyy_change_rts_dtr(struct cyclades_port *info, unsigned int set,
 		dtr = CyDTR;
 	}
 	if (set & TIOCM_RTS) {
-		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
-		cy_writeb(base_addr + (msvrr << index), rts);
+		cyy_writeb(info, CyCAR, channel);
+		cyy_writeb(info, msvrr, rts);
 	}
 	if (clear & TIOCM_RTS) {
-		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
-		cy_writeb(base_addr + (msvrr << index), ~rts);
+		cyy_writeb(info, CyCAR, channel);
+		cyy_writeb(info, msvrr, ~rts);
 	}
 	if (set & TIOCM_DTR) {
-		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
-		cy_writeb(base_addr + (msvrd << index), dtr);
+		cyy_writeb(info, CyCAR, channel);
+		cyy_writeb(info, msvrd, dtr);
 #ifdef CY_DEBUG_DTR
 		printk(KERN_DEBUG "cyc:set_modem_info raising DTR\n");
 		printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-			readb(base_addr + (CyMSVR1 << index)),
-			readb(base_addr + (CyMSVR2 << index)));
+			cyy_readb(info, CyMSVR1),
+			cyy_readb(info, CyMSVR2));
 #endif
 	}
 	if (clear & TIOCM_DTR) {
-		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
-		cy_writeb(base_addr + (msvrd << index), ~dtr);
+		cyy_writeb(info, CyCAR, channel);
+		cyy_writeb(info, msvrd, ~dtr);
 #ifdef CY_DEBUG_DTR
 		printk(KERN_DEBUG "cyc:set_modem_info dropping DTR\n");
 		printk(KERN_DEBUG "     status: 0x%x, 0x%x\n",
-			readb(base_addr + (CyMSVR1 << index)),
-			readb(base_addr + (CyMSVR2 << index)));
+			cyy_readb(info, CyMSVR1),
+			cyy_readb(info, CyMSVR2));
 #endif
 	}
 }
@@ -1290,7 +1297,6 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 	struct cyclades_card *card;
 	unsigned long flags;
 	int retval = 0;
-	void __iomem *base_addr;
 	int channel;
 	unsigned long page;
 
@@ -1321,31 +1327,21 @@ static int cy_startup(struct cyclades_port *info, struct tty_struct *tty)
 	cy_set_line_char(info, tty);
 
 	if (!cy_is_Z(card)) {
-		int chip = channel >> 2;
-		int index = card->bus_index;
 		channel &= 0x03;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
 
-#ifdef CY_DEBUG_OPEN
-		printk(KERN_DEBUG "cyc startup card %d, chip %d, channel %d, "
-				"base_addr %p\n",
-				card, chip, channel, base_addr);
-#endif
 		spin_lock_irqsave(&card->card_lock, flags);
 
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
+		cyy_writeb(info, CyCAR, channel);
 
-		cy_writeb(base_addr + (CyRTPR << index),
+		cyy_writeb(info, CyRTPR,
 			(info->default_timeout ? info->default_timeout : 0x02));
 		/* 10ms rx timeout */
 
-		cyy_issue_cmd(base_addr, CyCHAN_CTL | CyENB_RCVR | CyENB_XMTR,
-				index);
+		cyy_issue_cmd(info, CyCHAN_CTL | CyENB_RCVR | CyENB_XMTR);
 
 		cyy_change_rts_dtr(info, TIOCM_RTS | TIOCM_DTR, 0);
 
-		cy_writeb(base_addr + (CySRER << index),
-			readb(base_addr + (CySRER << index)) | CyRxData);
+		cyy_writeb(info, CySRER, cyy_readb(info, CySRER) | CyRxData);
 	} else {
 		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
 
@@ -1423,23 +1419,14 @@ errout:
 
 static void start_xmit(struct cyclades_port *info)
 {
-	struct cyclades_card *card;
+	struct cyclades_card *card = info->card;
 	unsigned long flags;
-	void __iomem *base_addr;
-	int chip, channel, index;
+	int channel = info->line - card->first_line;
 
-	card = info->card;
-	channel = info->line - card->first_line;
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
-
 		spin_lock_irqsave(&card->card_lock, flags);
-		cy_writeb(base_addr + (CyCAR << index), channel);
-		cy_writeb(base_addr + (CySRER << index),
-			readb(base_addr + (CySRER << index)) | CyTxRdy);
+		cyy_writeb(info, CyCAR, channel & 0x03);
+		cyy_writeb(info, CySRER, cyy_readb(info, CySRER) | CyTxRdy);
 		spin_unlock_irqrestore(&card->card_lock, flags);
 	} else {
 #ifdef CONFIG_CYZ_INTR
@@ -1466,8 +1453,7 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 {
 	struct cyclades_card *card;
 	unsigned long flags;
-	void __iomem *base_addr;
-	int chip, channel, index;
+	int channel;
 
 	if (!(info->port.flags & ASYNC_INITIALIZED))
 		return;
@@ -1475,17 +1461,6 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 	card = info->card;
 	channel = info->line - card->first_line;
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
-
-#ifdef CY_DEBUG_OPEN
-		printk(KERN_DEBUG "cyc shutdown Y card %d, chip %d, "
-				"channel %d, base_addr %p\n",
-				card, chip, channel, base_addr);
-#endif
-
 		spin_lock_irqsave(&card->card_lock, flags);
 
 		/* Clear delta_msr_wait queue to avoid mem leaks. */
@@ -1500,7 +1475,7 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 		if (tty->termios->c_cflag & HUPCL)
 			cyy_change_rts_dtr(info, 0, TIOCM_RTS | TIOCM_DTR);
 
-		cyy_issue_cmd(base_addr, CyCHAN_CTL | CyDIS_RCVR, index);
+		cyy_issue_cmd(info, CyCHAN_CTL | CyDIS_RCVR);
 		/* it may be appropriate to clear _XMIT at
 		   some later date (after testing)!!! */
 
@@ -1677,8 +1652,6 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
 {
 	struct cyclades_card *card;
 	struct cyclades_port *info = tty->driver_data;
-	void __iomem *base_addr;
-	int chip, channel, index;
 	unsigned long orig_jiffies;
 	int char_time;
 
@@ -1722,13 +1695,8 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
 		timeout, char_time, jiffies);
 #endif
 	card = info->card;
-	channel = (info->line) - (card->first_line);
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
-		while (readb(base_addr + (CySRER << index)) & CyTxRdy) {
+		while (cyy_readb(info, CySRER) & CyTxRdy) {
 #ifdef CY_DEBUG_WAIT_UNTIL_SENT
 			printk(KERN_DEBUG "Not clean (jiff=%lu)...", jiffies);
 #endif
@@ -1790,6 +1758,7 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 	struct cyclades_port *info = tty->driver_data;
 	struct cyclades_card *card;
 	unsigned long flags;
+	int channel;
 
 	if (!info || serial_paranoia_check(info, tty->name, "cy_close"))
 		return;
@@ -1799,18 +1768,13 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 	if (!tty_port_close_start(&info->port, tty, filp))
 		return;
 
+	channel = info->line - card->first_line;
 	spin_lock_irqsave(&card->card_lock, flags);
 
 	if (!cy_is_Z(card)) {
-		int channel = info->line - card->first_line;
-		int index = card->bus_index;
-		void __iomem *base_addr = card->base_addr +
-			(cy_chip_offset[channel >> 2] << index);
 		/* Stop accepting input */
-		channel &= 0x03;
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		cy_writeb(base_addr + (CySRER << index),
-			  readb(base_addr + (CySRER << index)) & ~CyRxData);
+		cyy_writeb(info, CyCAR, channel & 0x03);
+		cyy_writeb(info, CySRER, cyy_readb(info, CySRER) & ~CyRxData);
 		if (info->port.flags & ASYNC_INITIALIZED) {
 			/* Waiting for on-board buffers to be empty before
 			   closing the port */
@@ -1823,7 +1787,6 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 		/* Waiting for on-board buffers to be empty before closing
 		   the port */
 		struct CH_CTRL __iomem *ch_ctrl = info->u.cyz.ch_ctrl;
-		int channel = info->line - card->first_line;
 		int retval;
 
 		if (readl(&ch_ctrl->flow_status) != C_FS_TXIDLE) {
@@ -2064,8 +2027,7 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 {
 	struct cyclades_card *card;
 	unsigned long flags;
-	void __iomem *base_addr;
-	int chip, channel, index;
+	int channel;
 	unsigned cflag, iflag;
 	int baud, baud_rate = 0;
 	int i;
@@ -2095,9 +2057,6 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 	channel = info->line - card->first_line;
 
 	if (!cy_is_Z(card)) {
-
-		index = card->bus_index;
-
 		/* baud rate */
 		baud = tty_get_baud_rate(tty);
 		if (baud == 38400 && (info->port.flags & ASYNC_SPD_MASK) ==
@@ -2208,70 +2167,67 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 	    cable.  Contact Marcio Saito for details.
 	 ***********************************************/
 
-		chip = channel >> 2;
 		channel &= 0x03;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
 
 		spin_lock_irqsave(&card->card_lock, flags);
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
+		cyy_writeb(info, CyCAR, channel);
 
 		/* tx and rx baud rate */
 
-		cy_writeb(base_addr + (CyTCOR << index), info->tco);
-		cy_writeb(base_addr + (CyTBPR << index), info->tbpr);
-		cy_writeb(base_addr + (CyRCOR << index), info->rco);
-		cy_writeb(base_addr + (CyRBPR << index), info->rbpr);
+		cyy_writeb(info, CyTCOR, info->tco);
+		cyy_writeb(info, CyTBPR, info->tbpr);
+		cyy_writeb(info, CyRCOR, info->rco);
+		cyy_writeb(info, CyRBPR, info->rbpr);
 
 		/* set line characteristics  according configuration */
 
-		cy_writeb(base_addr + (CySCHR1 << index), START_CHAR(tty));
-		cy_writeb(base_addr + (CySCHR2 << index), STOP_CHAR(tty));
-		cy_writeb(base_addr + (CyCOR1 << index), info->cor1);
-		cy_writeb(base_addr + (CyCOR2 << index), info->cor2);
-		cy_writeb(base_addr + (CyCOR3 << index), info->cor3);
-		cy_writeb(base_addr + (CyCOR4 << index), info->cor4);
-		cy_writeb(base_addr + (CyCOR5 << index), info->cor5);
+		cyy_writeb(info, CySCHR1, START_CHAR(tty));
+		cyy_writeb(info, CySCHR2, STOP_CHAR(tty));
+		cyy_writeb(info, CyCOR1, info->cor1);
+		cyy_writeb(info, CyCOR2, info->cor2);
+		cyy_writeb(info, CyCOR3, info->cor3);
+		cyy_writeb(info, CyCOR4, info->cor4);
+		cyy_writeb(info, CyCOR5, info->cor5);
 
-		cyy_issue_cmd(base_addr, CyCOR_CHANGE | CyCOR1ch | CyCOR2ch |
-				CyCOR3ch, index);
+		cyy_issue_cmd(info, CyCOR_CHANGE | CyCOR1ch | CyCOR2ch |
+				CyCOR3ch);
 
 		/* !!! Is this needed? */
-		cy_writeb(base_addr + (CyCAR << index), (u_char) channel);
-		cy_writeb(base_addr + (CyRTPR << index),
+		cyy_writeb(info, CyCAR, channel);
+		cyy_writeb(info, CyRTPR,
 			(info->default_timeout ? info->default_timeout : 0x02));
 		/* 10ms rx timeout */
 
 		if (C_CLOCAL(tty)) {
 			/* without modem intr */
-			cy_writeb(base_addr + (CySRER << index),
-				readb(base_addr + (CySRER << index)) | CyMdmCh);
+			cyy_writeb(info, CySRER,
+					cyy_readb(info, CySRER) | CyMdmCh);
 			/* act on 1->0 modem transitions */
 			if ((cflag & CRTSCTS) && info->rflow) {
-				cy_writeb(base_addr + (CyMCOR1 << index),
+				cyy_writeb(info, CyMCOR1,
 					  (CyCTS | rflow_thr[i]));
 			} else {
-				cy_writeb(base_addr + (CyMCOR1 << index),
+				cyy_writeb(info, CyMCOR1,
 					  CyCTS);
 			}
 			/* act on 0->1 modem transitions */
-			cy_writeb(base_addr + (CyMCOR2 << index), CyCTS);
+			cyy_writeb(info, CyMCOR2, CyCTS);
 		} else {
 			/* without modem intr */
-			cy_writeb(base_addr + (CySRER << index),
-				  readb(base_addr +
-					   (CySRER << index)) | CyMdmCh);
+			cyy_writeb(info, CySRER,
+					cyy_readb(info, CySRER) | CyMdmCh);
 			/* act on 1->0 modem transitions */
 			if ((cflag & CRTSCTS) && info->rflow) {
-				cy_writeb(base_addr + (CyMCOR1 << index),
+				cyy_writeb(info, CyMCOR1,
 					  (CyDSR | CyCTS | CyRI | CyDCD |
 					   rflow_thr[i]));
 			} else {
-				cy_writeb(base_addr + (CyMCOR1 << index),
-					  CyDSR | CyCTS | CyRI | CyDCD);
+				cyy_writeb(info, CyMCOR1,
+						CyDSR | CyCTS | CyRI | CyDCD);
 			}
 			/* act on 0->1 modem transitions */
-			cy_writeb(base_addr + (CyMCOR2 << index),
-				  CyDSR | CyCTS | CyRI | CyDCD);
+			cyy_writeb(info, CyMCOR2,
+					CyDSR | CyCTS | CyRI | CyDCD);
 		}
 
 		if (i == 0)	/* baud rate is zero, turn off line */
@@ -2482,24 +2438,14 @@ check_and_exit:
  */
 static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)
 {
-	struct cyclades_card *card;
-	int chip, channel, index;
-	unsigned char status;
+	struct cyclades_card *card = info->card;
 	unsigned int result;
 	unsigned long flags;
-	void __iomem *base_addr;
+	u8 status;
 
-	card = info->card;
-	channel = (info->line) - (card->first_line);
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
-
 		spin_lock_irqsave(&card->card_lock, flags);
-		status = readb(base_addr + (CySRER << index)) &
-				(CyTxRdy | CyTxMpty);
+		status = cyy_readb(info, CySRER) & (CyTxRdy | CyTxMpty);
 		spin_unlock_irqrestore(&card->card_lock, flags);
 		result = (status ? 0 : TIOCSER_TEMT);
 	} else {
@@ -2513,29 +2459,23 @@ static int cy_tiocmget(struct tty_struct *tty, struct file *file)
 {
 	struct cyclades_port *info = tty->driver_data;
 	struct cyclades_card *card;
-	void __iomem *base_addr;
-	int result, channel;
+	int result;
 
 	if (serial_paranoia_check(info, tty->name, __func__))
 		return -ENODEV;
 
 	card = info->card;
-	channel = info->line - card->first_line;
 
 	lock_kernel();
 	if (!cy_is_Z(card)) {
 		unsigned long flags;
-		unsigned char status;
-		int chip = channel >> 2;
-		int index = card->bus_index;
-
-		channel &= 0x03;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
+		int channel = info->line - card->first_line;
+		u8 status;
 
 		spin_lock_irqsave(&card->card_lock, flags);
-		cy_writeb(base_addr + (CyCAR << index), (u8)channel);
-		status = readb(base_addr + (CyMSVR1 << index));
-		status |= readb(base_addr + (CyMSVR2 << index));
+		cyy_writeb(info, CyCAR, channel & 0x03);
+		status = cyy_readb(info, CyMSVR1);
+		status |= cyy_readb(info, CyMSVR2);
 		spin_unlock_irqrestore(&card->card_lock, flags);
 
 		if (info->rtsdtr_inv) {
@@ -2689,26 +2629,16 @@ static int cy_break(struct tty_struct *tty, int break_state)
 
 static int set_threshold(struct cyclades_port *info, unsigned long value)
 {
-	struct cyclades_card *card;
-	void __iomem *base_addr;
-	int channel, chip, index;
+	struct cyclades_card *card = info->card;
 	unsigned long flags;
 
-	card = info->card;
-	channel = info->line - card->first_line;
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr =
-		    card->base_addr + (cy_chip_offset[chip] << index);
-
 		info->cor3 &= ~CyREC_FIFO;
 		info->cor3 |= value & CyREC_FIFO;
 
 		spin_lock_irqsave(&card->card_lock, flags);
-		cy_writeb(base_addr + (CyCOR3 << index), info->cor3);
-		cyy_issue_cmd(base_addr, CyCOR_CHANGE | CyCOR3ch, index);
+		cyy_writeb(info, CyCOR3, info->cor3);
+		cyy_issue_cmd(info, CyCOR_CHANGE | CyCOR3ch);
 		spin_unlock_irqrestore(&card->card_lock, flags);
 	}
 	return 0;
@@ -2717,20 +2647,10 @@ static int set_threshold(struct cyclades_port *info, unsigned long value)
 static int get_threshold(struct cyclades_port *info,
 						unsigned long __user *value)
 {
-	struct cyclades_card *card;
-	void __iomem *base_addr;
-	int channel, chip, index;
-	unsigned long tmp;
+	struct cyclades_card *card = info->card;
 
-	card = info->card;
-	channel = info->line - card->first_line;
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
-
-		tmp = readb(base_addr + (CyCOR3 << index)) & CyREC_FIFO;
+		u8 tmp = cyy_readb(info, CyCOR3) & CyREC_FIFO;
 		return put_user(tmp, value);
 	}
 	return 0;
@@ -2738,21 +2658,12 @@ static int get_threshold(struct cyclades_port *info,
 
 static int set_timeout(struct cyclades_port *info, unsigned long value)
 {
-	struct cyclades_card *card;
-	void __iomem *base_addr;
-	int channel, chip, index;
+	struct cyclades_card *card = info->card;
 	unsigned long flags;
 
-	card = info->card;
-	channel = info->line - card->first_line;
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
-
 		spin_lock_irqsave(&card->card_lock, flags);
-		cy_writeb(base_addr + (CyRTPR << index), value & 0xff);
+		cyy_writeb(info, CyRTPR, value & 0xff);
 		spin_unlock_irqrestore(&card->card_lock, flags);
 	}
 	return 0;
@@ -2761,20 +2672,10 @@ static int set_timeout(struct cyclades_port *info, unsigned long value)
 static int get_timeout(struct cyclades_port *info,
 						unsigned long __user *value)
 {
-	struct cyclades_card *card;
-	void __iomem *base_addr;
-	int channel, chip, index;
-	unsigned long tmp;
+	struct cyclades_card *card = info->card;
 
-	card = info->card;
-	channel = info->line - card->first_line;
 	if (!cy_is_Z(card)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		index = card->bus_index;
-		base_addr = card->base_addr + (cy_chip_offset[chip] << index);
-
-		tmp = readb(base_addr + (CyRTPR << index));
+		u8 tmp = cyy_readb(info, CyRTPR);
 		return put_user(tmp, value);
 	}
 	return 0;
@@ -3101,8 +3002,7 @@ static void cy_stop(struct tty_struct *tty)
 {
 	struct cyclades_card *cinfo;
 	struct cyclades_port *info = tty->driver_data;
-	void __iomem *base_addr;
-	int chip, channel, index;
+	int channel;
 	unsigned long flags;
 
 #ifdef CY_DEBUG_OTHER
@@ -3115,16 +3015,9 @@ static void cy_stop(struct tty_struct *tty)
 	cinfo = info->card;
 	channel = info->line - cinfo->first_line;
 	if (!cy_is_Z(cinfo)) {
-		index = cinfo->bus_index;
-		chip = channel >> 2;
-		channel &= 0x03;
-		base_addr = cinfo->base_addr + (cy_chip_offset[chip] << index);
-
 		spin_lock_irqsave(&cinfo->card_lock, flags);
-		cy_writeb(base_addr + (CyCAR << index),
-			(u_char)(channel & 0x0003)); /* index channel */
-		cy_writeb(base_addr + (CySRER << index),
-			  readb(base_addr + (CySRER << index)) & ~CyTxRdy);
+		cyy_writeb(info, CyCAR, channel & 0x03);
+		cyy_writeb(info, CySRER, cyy_readb(info, CySRER) & ~CyTxRdy);
 		spin_unlock_irqrestore(&cinfo->card_lock, flags);
 	}
 }				/* cy_stop */
@@ -3133,8 +3026,7 @@ static void cy_start(struct tty_struct *tty)
 {
 	struct cyclades_card *cinfo;
 	struct cyclades_port *info = tty->driver_data;
-	void __iomem *base_addr;
-	int chip, channel, index;
+	int channel;
 	unsigned long flags;
 
 #ifdef CY_DEBUG_OTHER
@@ -3146,17 +3038,10 @@ static void cy_start(struct tty_struct *tty)
 
 	cinfo = info->card;
 	channel = info->line - cinfo->first_line;
-	index = cinfo->bus_index;
 	if (!cy_is_Z(cinfo)) {
-		chip = channel >> 2;
-		channel &= 0x03;
-		base_addr = cinfo->base_addr + (cy_chip_offset[chip] << index);
-
 		spin_lock_irqsave(&cinfo->card_lock, flags);
-		cy_writeb(base_addr + (CyCAR << index),
-			(u_char) (channel & 0x0003));	/* index channel */
-		cy_writeb(base_addr + (CySRER << index),
-			  readb(base_addr + (CySRER << index)) | CyTxRdy);
+		cyy_writeb(info, CyCAR, channel & 0x03);
+		cyy_writeb(info, CySRER, cyy_readb(info, CySRER) | CyTxRdy);
 		spin_unlock_irqrestore(&cinfo->card_lock, flags);
 	}
 }				/* cy_start */
@@ -3185,18 +3070,13 @@ static int cyy_carrier_raised(struct tty_port *port)
 	struct cyclades_port *info = container_of(port, struct cyclades_port,
 			port);
 	struct cyclades_card *cinfo = info->card;
-	void __iomem *base = cinfo->base_addr;
 	unsigned long flags;
 	int channel = info->line - cinfo->first_line;
-	int chip = channel >> 2, index = cinfo->bus_index;
 	u32 cd;
 
-	channel &= 0x03;
-	base += cy_chip_offset[chip] << index;
-
 	spin_lock_irqsave(&cinfo->card_lock, flags);
-	cy_writeb(base + (CyCAR << index), (u8)channel);
-	cd = readb(base + (CyMSVR1 << index)) & CyDCD;
+	cyy_writeb(info, CyCAR, channel & 0x03);
+	cd = cyy_readb(info, CyMSVR1) & CyDCD;
 	spin_unlock_irqrestore(&cinfo->card_lock, flags);
 
 	return cd;
@@ -3326,9 +3206,9 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
 			info->cor3 = 0x08;	/* _very_ small rcv threshold */
 
 			chip_number = channel / CyPORTS_PER_CHIP;
-			info->chip_rev = readb(cinfo->base_addr +
-				      (cy_chip_offset[chip_number] << index) +
-				      (CyGFRCR << index));
+			info->u.cyy.base_addr = cinfo->base_addr +
+				(cy_chip_offset[chip_number] << index);
+			info->chip_rev = cyy_readb(info, CyGFRCR);
 
 			if (info->chip_rev >= CD1400_REV_J) {
 				/* It is a CD1400 rev. J or later */
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index 1eb87a6..bbebef7 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -544,7 +544,7 @@ struct cyclades_port {
 	struct cyclades_card	*card;
 	union {
 		struct {
-			int filler;
+			void __iomem *base_addr;
 		} cyy;
 		struct {
 			struct CH_CTRL __iomem	*ch_ctrl;
-- 
1.6.4.2


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

* [PATCH 20/79] cyclades: remove more duplicated code
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (18 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 19/79] cyclades: introduce cyy_readb/writeb Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 21/79] slip: Clean up create and destroy Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Remove duplicated code from cy_set_line_char. There were 2 if
branches with same contents except flags.

Branch only for the flags computation and use them in the only copy
of the code.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |   45 ++++++++++++++-------------------------------
 1 files changed, 14 insertions(+), 31 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index cf2874a..f518e0b 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -2057,6 +2057,8 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 	channel = info->line - card->first_line;
 
 	if (!cy_is_Z(card)) {
+		u32 cflags;
+
 		/* baud rate */
 		baud = tty_get_baud_rate(tty);
 		if (baud == 38400 && (info->port.flags & ASYNC_SPD_MASK) ==
@@ -2198,37 +2200,18 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
 			(info->default_timeout ? info->default_timeout : 0x02));
 		/* 10ms rx timeout */
 
-		if (C_CLOCAL(tty)) {
-			/* without modem intr */
-			cyy_writeb(info, CySRER,
-					cyy_readb(info, CySRER) | CyMdmCh);
-			/* act on 1->0 modem transitions */
-			if ((cflag & CRTSCTS) && info->rflow) {
-				cyy_writeb(info, CyMCOR1,
-					  (CyCTS | rflow_thr[i]));
-			} else {
-				cyy_writeb(info, CyMCOR1,
-					  CyCTS);
-			}
-			/* act on 0->1 modem transitions */
-			cyy_writeb(info, CyMCOR2, CyCTS);
-		} else {
-			/* without modem intr */
-			cyy_writeb(info, CySRER,
-					cyy_readb(info, CySRER) | CyMdmCh);
-			/* act on 1->0 modem transitions */
-			if ((cflag & CRTSCTS) && info->rflow) {
-				cyy_writeb(info, CyMCOR1,
-					  (CyDSR | CyCTS | CyRI | CyDCD |
-					   rflow_thr[i]));
-			} else {
-				cyy_writeb(info, CyMCOR1,
-						CyDSR | CyCTS | CyRI | CyDCD);
-			}
-			/* act on 0->1 modem transitions */
-			cyy_writeb(info, CyMCOR2,
-					CyDSR | CyCTS | CyRI | CyDCD);
-		}
+		cflags = CyCTS;
+		if (!C_CLOCAL(tty))
+			cflags |= CyDSR | CyRI | CyDCD;
+		/* without modem intr */
+		cyy_writeb(info, CySRER, cyy_readb(info, CySRER) | CyMdmCh);
+		/* act on 1->0 modem transitions */
+		if ((cflag & CRTSCTS) && info->rflow)
+			cyy_writeb(info, CyMCOR1, cflags | rflow_thr[i]);
+		else
+			cyy_writeb(info, CyMCOR1, cflags);
+		/* act on 0->1 modem transitions */
+		cyy_writeb(info, CyMCOR2, cflags);
 
 		if (i == 0)	/* baud rate is zero, turn off line */
 			cyy_change_rts_dtr(info, 0, TIOCM_DTR);
-- 
1.6.4.2


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

* [PATCH 21/79] slip: Clean up create and destroy
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (19 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 20/79] cyclades: remove more duplicated code Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 22/79] kfifo: Use "const" definitions Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

The network layer now has a destructor we can hook to clean up the slip
devices array. That needs us to initiate unregister events in the right
places which with the current tty layer we can do, and with network
refcounting is safe to do.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/net/slip.c |   96 ++++++++++++---------------------------------------
 1 files changed, 23 insertions(+), 73 deletions(-)

diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 26f6ee9..e17c535 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -616,6 +616,14 @@ static void sl_uninit(struct net_device *dev)
 	sl_free_bufs(sl);
 }
 
+/* Hook the destructor so we can free slip devices at the right point in time */
+static void sl_free_netdev(struct net_device *dev)
+{
+	int i = dev->base_addr;
+	free_netdev(dev);
+	slip_devs[i] = NULL;
+}
+
 static const struct net_device_ops sl_netdev_ops = {
 	.ndo_init		= sl_init,
 	.ndo_uninit	  	= sl_uninit,
@@ -634,7 +642,7 @@ static const struct net_device_ops sl_netdev_ops = {
 static void sl_setup(struct net_device *dev)
 {
 	dev->netdev_ops		= &sl_netdev_ops;
-	dev->destructor		= free_netdev;
+	dev->destructor		= sl_free_netdev;
 
 	dev->hard_header_len	= 0;
 	dev->addr_len		= 0;
@@ -712,8 +720,6 @@ static void sl_sync(void)
 static struct slip *sl_alloc(dev_t line)
 {
 	int i;
-	int sel = -1;
-	int score = -1;
 	struct net_device *dev = NULL;
 	struct slip       *sl;
 
@@ -724,55 +730,7 @@ static struct slip *sl_alloc(dev_t line)
 		dev = slip_devs[i];
 		if (dev == NULL)
 			break;
-
-		sl = netdev_priv(dev);
-		if (sl->leased) {
-			if (sl->line != line)
-				continue;
-			if (sl->tty)
-				return NULL;
-
-			/* Clear ESCAPE & ERROR flags */
-			sl->flags &= (1 << SLF_INUSE);
-			return sl;
-		}
-
-		if (sl->tty)
-			continue;
-
-		if (current->pid == sl->pid) {
-			if (sl->line == line && score < 3) {
-				sel = i;
-				score = 3;
-				continue;
-			}
-			if (score < 2) {
-				sel = i;
-				score = 2;
-			}
-			continue;
-		}
-		if (sl->line == line && score < 1) {
-			sel = i;
-			score = 1;
-			continue;
-		}
-		if (score < 0) {
-			sel = i;
-			score = 0;
-		}
-	}
-
-	if (sel >= 0) {
-		i = sel;
-		dev = slip_devs[i];
-		if (score > 1) {
-			sl = netdev_priv(dev);
-			sl->flags &= (1 << SLF_INUSE);
-			return sl;
-		}
 	}
-
 	/* Sorry, too many, all slots in use */
 	if (i >= slip_maxdev)
 		return NULL;
@@ -909,30 +867,13 @@ err_exit:
 }
 
 /*
-
-  FIXME: 1,2 are fixed 3 was never true anyway.
-
-   Let me to blame a bit.
-   1. TTY module calls this funstion on soft interrupt.
-   2. TTY module calls this function WITH MASKED INTERRUPTS!
-   3. TTY module does not notify us about line discipline
-      shutdown,
-
-   Seems, now it is clean. The solution is to consider netdevice and
-   line discipline sides as two independent threads.
-
-   By-product (not desired): sl? does not feel hangups and remains open.
-   It is supposed, that user level program (dip, diald, slattach...)
-   will catch SIGHUP and make the rest of work.
-
-   I see no way to make more with current tty code. --ANK
- */
-
-/*
  * Close down a SLIP channel.
  * This means flushing out any pending queues, and then returning. This
  * call is serialized against other ldisc functions.
+ *
+ * We also use this method fo a hangup event
  */
+
 static void slip_close(struct tty_struct *tty)
 {
 	struct slip *sl = tty->disc_data;
@@ -951,10 +892,16 @@ static void slip_close(struct tty_struct *tty)
 	del_timer_sync(&sl->keepalive_timer);
 	del_timer_sync(&sl->outfill_timer);
 #endif
-
-	/* Count references from TTY module */
+	/* Flush network side */
+	unregister_netdev(sl->dev);
+	/* This will complete via sl_free_netdev */
 }
 
+static int slip_hangup(struct tty_struct *tty)
+{
+	slip_close(tty);
+	return 0;
+}
  /************************************************************************
   *			STANDARD SLIP ENCAPSULATION		  	 *
   ************************************************************************/
@@ -1311,6 +1258,7 @@ static struct tty_ldisc_ops sl_ldisc = {
 	.name 		= "slip",
 	.open 		= slip_open,
 	.close	 	= slip_close,
+	.hangup	 	= slip_hangup,
 	.ioctl		= slip_ioctl,
 	.receive_buf	= slip_receive_buf,
 	.write_wakeup	= slip_write_wakeup,
@@ -1384,6 +1332,8 @@ static void __exit slip_exit(void)
 		}
 	} while (busy && time_before(jiffies, timeout));
 
+	/* FIXME: hangup is async so we should wait when doing this second
+	   phase */
 
 	for (i = 0; i < slip_maxdev; i++) {
 		dev = slip_devs[i];
-- 
1.6.4.2


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

* [PATCH 22/79] kfifo: Use "const" definitions
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (20 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 21/79] slip: Clean up create and destroy Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 23/79] MOS7720 has no tiocmget method Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Currently kfifo cannot be used by parts of the kernel that use "const"
properly as kfifo itself does not use const for passed data blocks which
are indeed const.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 include/linux/kfifo.h |    4 ++--
 kernel/kfifo.c        |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 29f62e1..ad6bdf5 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -38,7 +38,7 @@ extern struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask,
 				 spinlock_t *lock);
 extern void kfifo_free(struct kfifo *fifo);
 extern unsigned int __kfifo_put(struct kfifo *fifo,
-				unsigned char *buffer, unsigned int len);
+				const unsigned char *buffer, unsigned int len);
 extern unsigned int __kfifo_get(struct kfifo *fifo,
 				unsigned char *buffer, unsigned int len);
 
@@ -77,7 +77,7 @@ static inline void kfifo_reset(struct kfifo *fifo)
  * bytes copied.
  */
 static inline unsigned int kfifo_put(struct kfifo *fifo,
-				     unsigned char *buffer, unsigned int len)
+				const unsigned char *buffer, unsigned int len)
 {
 	unsigned long flags;
 	unsigned int ret;
diff --git a/kernel/kfifo.c b/kernel/kfifo.c
index 26539e3..3765ff3 100644
--- a/kernel/kfifo.c
+++ b/kernel/kfifo.c
@@ -117,7 +117,7 @@ EXPORT_SYMBOL(kfifo_free);
  * writer, you don't need extra locking to use these functions.
  */
 unsigned int __kfifo_put(struct kfifo *fifo,
-			 unsigned char *buffer, unsigned int len)
+			const unsigned char *buffer, unsigned int len)
 {
 	unsigned int l;
 
-- 
1.6.4.2


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

* [PATCH 23/79] MOS7720 has no tiocmget method
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (21 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 22/79] kfifo: Use "const" definitions Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 24/79] tty: usb_serial_mos7720: Fix get_lsr_info Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kees Schoenmakers, Alan Cox, Greg Kroah-Hartman

From: Kees Schoenmakers <k.schoenmakers@sigmae.nl>

Fix the tiocmget/mset handling on the mos7720 USB serial port.

[Minor space reformatting for coding style - Alan]

Signed-off-by: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/mos7720.c |  101 ++++++++++++++++++++++++++---------------
 1 files changed, 64 insertions(+), 37 deletions(-)

diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index ccd4dd3..759cdd5 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -85,7 +85,7 @@ static int debug;
 #define MOSCHIP_DEVICE_ID_7720		0x7720
 #define MOSCHIP_DEVICE_ID_7715		0x7715
 
-static struct usb_device_id moschip_port_id_table [] = {
+static struct usb_device_id moschip_port_id_table[] = {
 	{ USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7720) },
 	{ } /* terminating entry */
 };
@@ -1264,6 +1264,67 @@ static int get_lsr_info(struct tty_struct *tty,
 	return 0;
 }
 
+static int mos7720_tiocmget(struct tty_struct *tty, struct file *file)
+{
+	struct usb_serial_port *port = tty->driver_data;
+	struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
+	unsigned int result = 0;
+	unsigned int mcr ;
+	unsigned int msr ;
+
+	dbg("%s - port %d", __func__, port->number);
+
+	mcr = mos7720_port->shadowMCR;
+	msr = mos7720_port->shadowMSR;
+
+	result = ((mcr & UART_MCR_DTR)  ? TIOCM_DTR : 0)   /* 0x002 */
+	  | ((mcr & UART_MCR_RTS)   ? TIOCM_RTS : 0)   /* 0x004 */
+	  | ((msr & UART_MSR_CTS)   ? TIOCM_CTS : 0)   /* 0x020 */
+	  | ((msr & UART_MSR_DCD)   ? TIOCM_CAR : 0)   /* 0x040 */
+	  | ((msr & UART_MSR_RI)    ? TIOCM_RI :  0)   /* 0x080 */
+	  | ((msr & UART_MSR_DSR)   ? TIOCM_DSR : 0);  /* 0x100 */
+
+	dbg("%s -- %x", __func__, result);
+
+	return result;
+}
+
+static int mos7720_tiocmset(struct tty_struct *tty, struct file *file,
+					unsigned int set, unsigned int clear)
+{
+	struct usb_serial_port *port = tty->driver_data;
+	struct moschip_port *mos7720_port = usb_get_serial_port_data(port);
+	unsigned int mcr ;
+	unsigned char lmcr;
+
+	dbg("%s - port %d", __func__, port->number);
+	dbg("he was at tiocmget");
+
+	mcr = mos7720_port->shadowMCR;
+
+	if (set & TIOCM_RTS)
+		mcr |= UART_MCR_RTS;
+	if (set & TIOCM_DTR)
+		mcr |= UART_MCR_DTR;
+	if (set & TIOCM_LOOP)
+		mcr |= UART_MCR_LOOP;
+
+	if (clear & TIOCM_RTS)
+		mcr &= ~UART_MCR_RTS;
+	if (clear & TIOCM_DTR)
+		mcr &= ~UART_MCR_DTR;
+	if (clear & TIOCM_LOOP)
+		mcr &= ~UART_MCR_LOOP;
+
+	mos7720_port->shadowMCR = mcr;
+	lmcr = mos7720_port->shadowMCR;
+
+	send_mos_cmd(port->serial, MOS_WRITE,
+		port->number - port->serial->minor, UART_MCR, &lmcr);
+
+	return 0;
+}
+
 static int set_modem_info(struct moschip_port *mos7720_port, unsigned int cmd,
 			  unsigned int __user *value)
 {
@@ -1301,14 +1362,6 @@ static int set_modem_info(struct moschip_port *mos7720_port, unsigned int cmd,
 			mcr &= ~UART_MCR_LOOP;
 		break;
 
-	case TIOCMSET:
-		/* turn off the RTS and DTR and LOOPBACK
-		 * and then only turn on what was asked to */
-		mcr &=  ~(UART_MCR_RTS | UART_MCR_DTR | UART_MCR_LOOP);
-		mcr |= ((arg & TIOCM_RTS) ? UART_MCR_RTS : 0);
-		mcr |= ((arg & TIOCM_DTR) ? UART_MCR_DTR : 0);
-		mcr |= ((arg & TIOCM_LOOP) ? UART_MCR_LOOP : 0);
-		break;
 	}
 
 	mos7720_port->shadowMCR = mcr;
@@ -1320,28 +1373,6 @@ static int set_modem_info(struct moschip_port *mos7720_port, unsigned int cmd,
 	return 0;
 }
 
-static int get_modem_info(struct moschip_port *mos7720_port,
-			  unsigned int __user *value)
-{
-	unsigned int result = 0;
-	unsigned int msr = mos7720_port->shadowMSR;
-	unsigned int mcr = mos7720_port->shadowMCR;
-
-	result = ((mcr & UART_MCR_DTR)	? TIOCM_DTR: 0)	  /* 0x002 */
-		  | ((mcr & UART_MCR_RTS)	? TIOCM_RTS: 0)   /* 0x004 */
-		  | ((msr & UART_MSR_CTS)	? TIOCM_CTS: 0)   /* 0x020 */
-		  | ((msr & UART_MSR_DCD)	? TIOCM_CAR: 0)   /* 0x040 */
-		  | ((msr & UART_MSR_RI)	? TIOCM_RI:  0)   /* 0x080 */
-		  | ((msr & UART_MSR_DSR)	? TIOCM_DSR: 0);  /* 0x100 */
-
-
-	dbg("%s -- %x", __func__, result);
-
-	if (copy_to_user(value, &result, sizeof(int)))
-		return -EFAULT;
-	return 0;
-}
-
 static int get_serial_info(struct moschip_port *mos7720_port,
 			   struct serial_struct __user *retinfo)
 {
@@ -1392,17 +1423,11 @@ static int mos7720_ioctl(struct tty_struct *tty, struct file *file,
 	/* FIXME: These should be using the mode methods */
 	case TIOCMBIS:
 	case TIOCMBIC:
-	case TIOCMSET:
 		dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET",
 					__func__, port->number);
 		return set_modem_info(mos7720_port, cmd,
 				      (unsigned int __user *)arg);
 
-	case TIOCMGET:
-		dbg("%s (%d) TIOCMGET", __func__,  port->number);
-		return get_modem_info(mos7720_port,
-				      (unsigned int __user *)arg);
-
 	case TIOCGSERIAL:
 		dbg("%s (%d) TIOCGSERIAL", __func__,  port->number);
 		return get_serial_info(mos7720_port,
@@ -1557,6 +1582,8 @@ static struct usb_serial_driver moschip7720_2port_driver = {
 	.attach			= mos7720_startup,
 	.release		= mos7720_release,
 	.ioctl			= mos7720_ioctl,
+	.tiocmget		= mos7720_tiocmget,
+	.tiocmset		= mos7720_tiocmset,
 	.set_termios		= mos7720_set_termios,
 	.write			= mos7720_write,
 	.write_room		= mos7720_write_room,
-- 
1.6.4.2


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

* [PATCH 24/79] tty: usb_serial_mos7720: Fix get_lsr_info
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (22 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 23/79] MOS7720 has no tiocmget method Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2010-01-26 11:08   ` Kees Schoenmakers
  2010-01-26 11:09   ` Kees Schoenmakers
  2009-09-19 21:36 ` [PATCH 25/79] tty: Fix a typo noted in passing Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  79 siblings, 2 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kees Schoenmakers, Alan Cox, Greg Kroah-Hartman

From: Kees Schoenmakers <k.schoenmakers@sigmae.nl>

I made a correction for get_lsr_info, now it returns some meaningful
information. I tested it with two simultaneous simplex modem channels.

it is attached

Signed-off-by: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/mos7720.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 759cdd5..4342a8a 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -378,10 +378,14 @@ static int mos7720_open(struct tty_struct *tty,
 	 /* Initialize MCS7720 -- Write Init values to corresponding Registers
 	  *
 	  * Register Index
+	  * 0 : THR/RHR
 	  * 1 : IER
 	  * 2 : FCR
 	  * 3 : LCR
 	  * 4 : MCR
+	  * 5 : LSR
+	  * 6 : MSR
+	  * 7 : SPR
 	  *
 	  * 0x08 : SP1/2 Control Reg
 	  */
@@ -1250,15 +1254,22 @@ static void mos7720_set_termios(struct tty_struct *tty,
 static int get_lsr_info(struct tty_struct *tty,
 		struct moschip_port *mos7720_port, unsigned int __user *value)
 {
-	int count;
+	struct usb_serial_port *port = tty->driver_data;
 	unsigned int result = 0;
+	unsigned char data = 0;
+	int port_number = port->number - port->serial->minor;
+	int count;
 
 	count = mos7720_chars_in_buffer(tty);
 	if (count == 0) {
-		dbg("%s -- Empty", __func__);
-		result = TIOCSER_TEMT;
+		send_mos_cmd(port->serial, MOS_READ, port_number,
+							UART_LSR, &data);
+		if ((data & (UART_LSR_TEMT | UART_LSR_THRE))
+					== (UART_LSR_TEMT | UART_LSR_THRE)) {
+			dbg("%s -- Empty", __func__);
+			result = TIOCSER_TEMT;
+		}
 	}
-
 	if (copy_to_user(value, &result, sizeof(int)))
 		return -EFAULT;
 	return 0;
-- 
1.6.4.2


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

* [PATCH 25/79] tty: Fix a typo noted in passing
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (23 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 24/79] tty: usb_serial_mos7720: Fix get_lsr_info Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 26/79] mos7840: remove old dead modem logic Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_io.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index a3afa0c..9384480 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2085,7 +2085,7 @@ static int tioccons(struct file *file)
  *	the generic functionality existed. This piece of history is preserved
  *	in the expected tty API of posix OS's.
  *
- *	Locking: none, the open fle handle ensures it won't go away.
+ *	Locking: none, the open file handle ensures it won't go away.
  */
 
 static int fionbio(struct file *file, int __user *p)
-- 
1.6.4.2


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

* [PATCH 26/79] mos7840: remove old dead modem logic
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (24 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 25/79] tty: Fix a typo noted in passing Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 27/79] serial: 8250: add IRQ trigger support Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

The modem ioctls are not routed via the ioctl method so kill the old dead
code. The correct code is also already present and hooked in.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/mos7840.c |  115 ------------------------------------------
 1 files changed, 0 insertions(+), 115 deletions(-)

diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 270009a..b93f0f9 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -2134,106 +2134,6 @@ static int mos7840_get_lsr_info(struct tty_struct *tty,
 }
 
 /*****************************************************************************
- * mos7840_set_modem_info
- *      function to set modem info
- *****************************************************************************/
-
-/* FIXME: Should be using the model control hooks */
-
-static int mos7840_set_modem_info(struct moschip_port *mos7840_port,
-				  unsigned int cmd, unsigned int __user *value)
-{
-	unsigned int mcr;
-	unsigned int arg;
-	__u16 Data;
-	int status;
-	struct usb_serial_port *port;
-
-	if (mos7840_port == NULL)
-		return -1;
-
-	port = (struct usb_serial_port *)mos7840_port->port;
-	if (mos7840_port_paranoia_check(port, __func__)) {
-		dbg("%s", "Invalid port");
-		return -1;
-	}
-
-	mcr = mos7840_port->shadowMCR;
-
-	if (copy_from_user(&arg, value, sizeof(int)))
-		return -EFAULT;
-
-	switch (cmd) {
-	case TIOCMBIS:
-		if (arg & TIOCM_RTS)
-			mcr |= MCR_RTS;
-		if (arg & TIOCM_DTR)
-			mcr |= MCR_RTS;
-		if (arg & TIOCM_LOOP)
-			mcr |= MCR_LOOPBACK;
-		break;
-
-	case TIOCMBIC:
-		if (arg & TIOCM_RTS)
-			mcr &= ~MCR_RTS;
-		if (arg & TIOCM_DTR)
-			mcr &= ~MCR_RTS;
-		if (arg & TIOCM_LOOP)
-			mcr &= ~MCR_LOOPBACK;
-		break;
-
-	case TIOCMSET:
-		/* turn off the RTS and DTR and LOOPBACK
-		 * and then only turn on what was asked to */
-		mcr &= ~(MCR_RTS | MCR_DTR | MCR_LOOPBACK);
-		mcr |= ((arg & TIOCM_RTS) ? MCR_RTS : 0);
-		mcr |= ((arg & TIOCM_DTR) ? MCR_DTR : 0);
-		mcr |= ((arg & TIOCM_LOOP) ? MCR_LOOPBACK : 0);
-		break;
-	}
-
-	lock_kernel();
-	mos7840_port->shadowMCR = mcr;
-
-	Data = mos7840_port->shadowMCR;
-	status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
-	unlock_kernel();
-	if (status < 0) {
-		dbg("setting MODEM_CONTROL_REGISTER Failed");
-		return -1;
-	}
-
-	return 0;
-}
-
-/*****************************************************************************
- * mos7840_get_modem_info
- *      function to get modem info
- *****************************************************************************/
-
-static int mos7840_get_modem_info(struct moschip_port *mos7840_port,
-				  unsigned int __user *value)
-{
-	unsigned int result = 0;
-	__u16 msr;
-	unsigned int mcr = mos7840_port->shadowMCR;
-        mos7840_get_uart_reg(mos7840_port->port,
-						MODEM_STATUS_REGISTER, &msr);
-	result = ((mcr & MCR_DTR) ? TIOCM_DTR : 0)	/* 0x002 */
-	    |((mcr & MCR_RTS) ? TIOCM_RTS : 0)	/* 0x004 */
-	    |((msr & MOS7840_MSR_CTS) ? TIOCM_CTS : 0)	/* 0x020 */
-	    |((msr & MOS7840_MSR_CD) ? TIOCM_CAR : 0)	/* 0x040 */
-	    |((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0)	/* 0x080 */
-	    |((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0);	/* 0x100 */
-
-	dbg("%s -- %x", __func__, result);
-
-	if (copy_to_user(value, &result, sizeof(int)))
-		return -EFAULT;
-	return 0;
-}
-
-/*****************************************************************************
  * mos7840_get_serial_info
  *      function to get information about serial port
  *****************************************************************************/
@@ -2281,7 +2181,6 @@ static int mos7840_ioctl(struct tty_struct *tty, struct file *file,
 	struct async_icount cnow;
 	struct async_icount cprev;
 	struct serial_icounter_struct icount;
-	int mosret = 0;
 
 	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port");
@@ -2303,20 +2202,6 @@ static int mos7840_ioctl(struct tty_struct *tty, struct file *file,
 		return mos7840_get_lsr_info(tty, argp);
 		return 0;
 
-	/* FIXME: use the modem hooks and remove this */
-	case TIOCMBIS:
-	case TIOCMBIC:
-	case TIOCMSET:
-		dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __func__,
-		    port->number);
-		mosret =
-		    mos7840_set_modem_info(mos7840_port, cmd, argp);
-		return mosret;
-
-	case TIOCMGET:
-		dbg("%s (%d) TIOCMGET", __func__, port->number);
-		return mos7840_get_modem_info(mos7840_port, argp);
-
 	case TIOCGSERIAL:
 		dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
 		return mos7840_get_serial_info(mos7840_port, argp);
-- 
1.6.4.2


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

* [PATCH 27/79] serial: 8250: add IRQ trigger support
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (25 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 26/79] mos7840: remove old dead modem logic Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 28/79] 8250: Now honours baud rate lower bounds Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Vikram Pandita, Alan Cox, Greg Kroah-Hartman

From: Vikram Pandita <vikram.pandita@ti.com>

There is currently no provision for passing IRQ trigger flags for
serial IRQs with triggering requirements (such as GPIO IRQs)

This patch adds irqflags to plat_serial8250_port that can be passed
from board file to reqest_irq() of 8250 driver

Changes are backward compatible with boards passing UPF_SHARE_IRQ flag

Tested on Zoom2 board that has IRQF_TRIGGER_RISING requirement for 8250 irq

[Moved new flag to end to fix bugs in the original with the old_serial array
	-- Alan]

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/8250.c       |   14 +++++++++-----
 drivers/serial/8250.h       |    1 +
 include/linux/serial_8250.h |    1 +
 include/linux/serial_core.h |    1 +
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index fb867a9..83168a6 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1677,7 +1677,7 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
 		INIT_LIST_HEAD(&up->list);
 		i->head = &up->list;
 		spin_unlock_irq(&i->lock);
-
+		irq_flags |= up->port.irqflags;
 		ret = request_irq(up->port.irq, serial8250_interrupt,
 				  irq_flags, "serial", i);
 		if (ret < 0)
@@ -2026,7 +2026,7 @@ static int serial8250_startup(struct uart_port *port)
 		 * allow register changes to become visible.
 		 */
 		spin_lock_irqsave(&up->port.lock, flags);
-		if (up->port.flags & UPF_SHARE_IRQ)
+		if (up->port.irqflags & IRQF_SHARED)
 			disable_irq_nosync(up->port.irq);
 
 		wait_for_xmitr(up, UART_LSR_THRE);
@@ -2039,7 +2039,7 @@ static int serial8250_startup(struct uart_port *port)
 		iir = serial_in(up, UART_IIR);
 		serial_out(up, UART_IER, 0);
 
-		if (up->port.flags & UPF_SHARE_IRQ)
+		if (up->port.irqflags & IRQF_SHARED)
 			enable_irq(up->port.irq);
 		spin_unlock_irqrestore(&up->port.lock, flags);
 
@@ -2671,6 +2671,7 @@ static void __init serial8250_isa_init_ports(void)
 	     i++, up++) {
 		up->port.iobase   = old_serial_port[i].port;
 		up->port.irq      = irq_canonicalize(old_serial_port[i].irq);
+		up->port.irqflags = old_serial_port[i].irqflags;
 		up->port.uartclk  = old_serial_port[i].baud_base * 16;
 		up->port.flags    = old_serial_port[i].flags;
 		up->port.hub6     = old_serial_port[i].hub6;
@@ -2679,7 +2680,7 @@ static void __init serial8250_isa_init_ports(void)
 		up->port.regshift = old_serial_port[i].iomem_reg_shift;
 		set_io_from_upio(&up->port);
 		if (share_irqs)
-			up->port.flags |= UPF_SHARE_IRQ;
+			up->port.irqflags |= IRQF_SHARED;
 	}
 }
 
@@ -2869,6 +2870,7 @@ int __init early_serial_setup(struct uart_port *port)
 	p->iobase       = port->iobase;
 	p->membase      = port->membase;
 	p->irq          = port->irq;
+	p->irqflags     = port->irqflags;
 	p->uartclk      = port->uartclk;
 	p->fifosize     = port->fifosize;
 	p->regshift     = port->regshift;
@@ -2942,6 +2944,7 @@ static int __devinit serial8250_probe(struct platform_device *dev)
 		port.iobase		= p->iobase;
 		port.membase		= p->membase;
 		port.irq		= p->irq;
+		port.irqflags		= p->irqflags;
 		port.uartclk		= p->uartclk;
 		port.regshift		= p->regshift;
 		port.iotype		= p->iotype;
@@ -2954,7 +2957,7 @@ static int __devinit serial8250_probe(struct platform_device *dev)
 		port.serial_out		= p->serial_out;
 		port.dev		= &dev->dev;
 		if (share_irqs)
-			port.flags |= UPF_SHARE_IRQ;
+			port.irqflags |= IRQF_SHARED;
 		ret = serial8250_register_port(&port);
 		if (ret < 0) {
 			dev_err(&dev->dev, "unable to register port at index %d "
@@ -3096,6 +3099,7 @@ int serial8250_register_port(struct uart_port *port)
 		uart->port.iobase       = port->iobase;
 		uart->port.membase      = port->membase;
 		uart->port.irq          = port->irq;
+		uart->port.irqflags     = port->irqflags;
 		uart->port.uartclk      = port->uartclk;
 		uart->port.fifosize     = port->fifosize;
 		uart->port.regshift     = port->regshift;
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h
index 5202603..6e19ea3 100644
--- a/drivers/serial/8250.h
+++ b/drivers/serial/8250.h
@@ -25,6 +25,7 @@ struct old_serial_port {
 	unsigned char io_type;
 	unsigned char *iomem_base;
 	unsigned short iomem_reg_shift;
+	unsigned long irqflags;
 };
 
 /*
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index d4d2a78..fb46aba 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -22,6 +22,7 @@ struct plat_serial8250_port {
 	void __iomem	*membase;	/* ioremap cookie or NULL */
 	resource_size_t	mapbase;	/* resource base */
 	unsigned int	irq;		/* interrupt number */
+	unsigned long	irqflags;	/* request_irq flags */
 	unsigned int	uartclk;	/* UART clock rate */
 	void            *private_data;
 	unsigned char	regshift;	/* register shift */
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 23d2fb0..3cd255f 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -265,6 +265,7 @@ struct uart_port {
 	unsigned int		(*serial_in)(struct uart_port *, int);
 	void			(*serial_out)(struct uart_port *, int, int);
 	unsigned int		irq;			/* irq number */
+	unsigned long		irqflags;		/* irq flags  */
 	unsigned int		uartclk;		/* base uart clock */
 	unsigned int		fifosize;		/* tx fifo size */
 	unsigned char		x_char;			/* xon/xoff char */
-- 
1.6.4.2


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

* [PATCH 28/79] 8250: Now honours baud rate lower bounds
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (26 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 27/79] serial: 8250: add IRQ trigger support Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 29/79] tty: Add a full port_close function Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Anton Vorontsov, Alan Cox, Greg Kroah-Hartman

From: Anton Vorontsov <avorontsov@ru.mvista.com>

A platform clock drives 8250 ports in most SOC systems, the clock
might run at high frequencies, and so it's not always possible to
downscale uart clock to a desired value.

Currently the 8250 uart driver accepts not supported baud rates, and
what is worse, it is doing this silently, and then passes not accepted
values to a new termios, so userspace has no chance to catch this kind
of errors (userspace verifies that settings were accepted by reading
back and comparing the settings).

This patch fixes the issue by passing minimum baud rate to the
uart_get_baud_rate() call, the call should take care of all bounds,
so userspace should now report:

  # stty -F /dev/ttyS0 speed 300
  115200
  stty: /dev/ttyS0: unable to perform all requested operations

p.s. uart_get_baud_rate() falls back to 9600, which still might be too
     low for some 10 GHz platforms, but that's a separate issue, and
     we can wait with fixing this till we find such a platform.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/8250.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 83168a6..1fd4894 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2272,7 +2272,9 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
+	baud = uart_get_baud_rate(port, termios, old,
+				  port->uartclk / 16 / 0xffff,
+				  port->uartclk / 16);
 	quot = serial8250_get_divisor(port, baud);
 
 	/*
-- 
1.6.4.2


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

* [PATCH 29/79] tty: Add a full port_close function
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (27 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 28/79] 8250: Now honours baud rate lower bounds Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 30/79] riscom8: split open and close methods up Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, stable, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Now we are extracting out methods for shutdown and the like we can add a
proper tty_port_close method that knows all the innards of the tty closing
process and hides the lot from the caller.

At some point in the future this will be paired with a similar open()
helper and the drivers can stick to hardware management.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_port.c |   29 +++++++++++++++++++++++++++--
 include/linux/tty.h     |    8 +++++++-
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index 9769b11..549bd0f 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -96,6 +96,14 @@ void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty)
 }
 EXPORT_SYMBOL(tty_port_tty_set);
 
+static void tty_port_shutdown(struct tty_port *port)
+{
+	if (port->ops->shutdown &&
+		test_and_clear_bit(ASYNC_INITIALIZED, &port->flags))
+			port->ops->shutdown(port);
+
+}
+
 /**
  *	tty_port_hangup		-	hangup helper
  *	@port: tty port
@@ -116,6 +124,7 @@ void tty_port_hangup(struct tty_port *port)
 	port->tty = NULL;
 	spin_unlock_irqrestore(&port->lock, flags);
 	wake_up_interruptible(&port->open_wait);
+	tty_port_shutdown(port);
 }
 EXPORT_SYMBOL(tty_port_hangup);
 
@@ -296,15 +305,17 @@ int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct f
 
 	if (port->count) {
 		spin_unlock_irqrestore(&port->lock, flags);
+		if (port->ops->drop)
+			port->ops->drop(port);
 		return 0;
 	}
-	port->flags |= ASYNC_CLOSING;
+	set_bit(ASYNC_CLOSING, &port->flags);
 	tty->closing = 1;
 	spin_unlock_irqrestore(&port->lock, flags);
 	/* Don't block on a stalled port, just pull the chain */
 	if (tty->flow_stopped)
 		tty_driver_flush_buffer(tty);
-	if (port->flags & ASYNC_INITIALIZED &&
+	if (test_bit(ASYNCB_INITIALIZED, &port->flags) &&
 			port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
 		tty_wait_until_sent(tty, port->closing_wait);
 	if (port->drain_delay) {
@@ -318,6 +329,9 @@ int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct f
 			timeout = 2 * HZ;
 		schedule_timeout_interruptible(timeout);
 	}
+	/* Don't call port->drop for the last reference. Callers will want
+	   to drop the last active reference in ->shutdown() or the tty
+	   shutdown path */
 	return 1;
 }
 EXPORT_SYMBOL(tty_port_close_start);
@@ -348,3 +362,14 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
 	spin_unlock_irqrestore(&port->lock, flags);
 }
 EXPORT_SYMBOL(tty_port_close_end);
+
+void tty_port_close(struct tty_port *port, struct tty_struct *tty,
+							struct file *filp)
+{
+	if (tty_port_close_start(port, tty, filp) == 0)
+		return;
+	tty_port_shutdown(port);
+	tty_port_close_end(port, tty);
+	tty_port_tty_set(port, NULL);
+}
+EXPORT_SYMBOL(tty_port_close);
diff --git a/include/linux/tty.h b/include/linux/tty.h
index a916a31..ecb3d1b 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -187,7 +187,12 @@ struct tty_port;
 struct tty_port_operations {
 	/* Return 1 if the carrier is raised */
 	int (*carrier_raised)(struct tty_port *port);
+	/* Control the DTR line */
 	void (*dtr_rts)(struct tty_port *port, int raise);
+	/* Called when the last close completes or a hangup finishes
+	   IFF the port was initialized. Do not use to free resources */
+	void (*shutdown)(struct tty_port *port);
+	void (*drop)(struct tty_port *port);
 };
 	
 struct tty_port {
@@ -459,7 +464,8 @@ extern int tty_port_block_til_ready(struct tty_port *port,
 extern int tty_port_close_start(struct tty_port *port,
 				struct tty_struct *tty, struct file *filp);
 extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
-
+extern void tty_port_close(struct tty_port *port,
+				struct tty_struct *tty, struct file *filp);
 extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc);
 extern int tty_unregister_ldisc(int disc);
 extern int tty_set_ldisc(struct tty_struct *tty, int ldisc);
-- 
1.6.4.2


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

* [PATCH 30/79] riscom8: split open and close methods up
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (28 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 29/79] tty: Add a full port_close function Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 31/79] mxser: Split close ready for a standard tty_port_close method Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Moving towards a tty_port method for open/close

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/riscom8.c |   47 ++++++++++++++++++++++++++---------------------
 1 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 171711a..9499991 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -921,20 +921,12 @@ static void rc_flush_buffer(struct tty_struct *tty)
 	tty_wakeup(tty);
 }
 
-static void rc_close(struct tty_struct *tty, struct file *filp)
+static void rc_close_port(struct tty_struct *tty, struct tty_port *port)
 {
-	struct riscom_port *port = tty->driver_data;
-	struct riscom_board *bp;
 	unsigned long flags;
+	struct riscom_port *rp = container_of(port, struct riscom_port, port);
+	struct riscom_board *bp = port_Board(rp);
 	unsigned long timeout;
-
-	if (!port || rc_paranoia_check(port, tty->name, "close"))
-		return;
-
-	bp = port_Board(port);
-	
-	if (tty_port_close_start(&port->port, tty, filp) == 0)
-		return;
 	
 	/*
 	 * At this point we stop accepting input.  To do this, we
@@ -944,29 +936,42 @@ static void rc_close(struct tty_struct *tty, struct file *filp)
 	 */
 
 	spin_lock_irqsave(&riscom_lock, flags);
-	port->IER &= ~IER_RXD;
-	if (port->port.flags & ASYNC_INITIALIZED) {
-		port->IER &= ~IER_TXRDY;
-		port->IER |= IER_TXEMPTY;
-		rc_out(bp, CD180_CAR, port_No(port));
-		rc_out(bp, CD180_IER, port->IER);
+	rp->IER &= ~IER_RXD;
+	if (port->flags & ASYNC_INITIALIZED) {
+		rp->IER &= ~IER_TXRDY;
+		rp->IER |= IER_TXEMPTY;
+		rc_out(bp, CD180_CAR, port_No(rp));
+		rc_out(bp, CD180_IER, rp->IER);
 		/*
 		 * Before we drop DTR, make sure the UART transmitter
 		 * has completely drained; this is especially
 		 * important if there is a transmit FIFO!
 		 */
 		timeout = jiffies + HZ;
-		while (port->IER & IER_TXEMPTY) {
+		while (rp->IER & IER_TXEMPTY) {
 			spin_unlock_irqrestore(&riscom_lock, flags);
-			msleep_interruptible(jiffies_to_msecs(port->timeout));
+			msleep_interruptible(jiffies_to_msecs(rp->timeout));
 			spin_lock_irqsave(&riscom_lock, flags);
 			if (time_after(jiffies, timeout))
 				break;
 		}
 	}
-	rc_shutdown_port(tty, bp, port);
-	rc_flush_buffer(tty);
+	rc_shutdown_port(tty, bp, rp);
 	spin_unlock_irqrestore(&riscom_lock, flags);
+}
+
+static void rc_close(struct tty_struct *tty, struct file *filp)
+{
+	struct riscom_port *port = tty->driver_data;
+
+	if (!port || rc_paranoia_check(port, tty->name, "close"))
+		return;
+
+	if (tty_port_close_start(&port->port, tty, filp) == 0)
+		return;
+
+	rc_close_port(tty, &port->port);
+	rc_flush_buffer(tty);
 
 	tty_port_close_end(&port->port, tty);
 }
-- 
1.6.4.2


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

* [PATCH 31/79] mxser: Split close ready for a standard tty_port_close method
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (29 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 30/79] riscom8: split open and close methods up Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 32/79] isicom: Split the close hardware bits out Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

From: Alan Cox <alan@linux.intel.com>

Prepare for the tty_port_close function by splitting out methods

Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 drivers/char/mxser.c |   45 +++++++++++++++++++++++----------------------
 1 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index dbf8d52..30544ca 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1073,34 +1073,17 @@ static void mxser_flush_buffer(struct tty_struct *tty)
 }
 
 
-/*
- * This routine is called when the serial port gets closed.  First, we
- * wait for the last remaining data to be sent.  Then, we unlink its
- * async structure from the interrupt chain if necessary, and we free
- * that IRQ if nothing is left in the chain.
- */
-static void mxser_close(struct tty_struct *tty, struct file *filp)
+static void mxser_close_port(struct tty_struct *tty, struct tty_port *port)
 {
-	struct mxser_port *info = tty->driver_data;
-	struct tty_port *port = &info->port;
-
+	struct mxser_port *info = container_of(port, struct mxser_port, port);
 	unsigned long timeout;
-
-	if (tty->index == MXSER_PORTS)
-		return;
-	if (!info)
-		return;
-
-	if (tty_port_close_start(port, tty, filp) == 0)
-		return;
-
 	/*
 	 * Save the termios structure, since this port may have
 	 * separate termios for callout and dialin.
 	 *
 	 * FIXME: Can this go ?
 	 */
-	if (info->port.flags & ASYNC_NORMAL_ACTIVE)
+	if (port->flags & ASYNC_NORMAL_ACTIVE)
 		info->normal_termios = *tty->termios;
 	/*
 	 * At this point we stop accepting input.  To do this, we
@@ -1112,7 +1095,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
 	if (info->board->chip_flag)
 		info->IER &= ~MOXA_MUST_RECV_ISR;
 
-	if (info->port.flags & ASYNC_INITIALIZED) {
+	if (port->flags & ASYNC_INITIALIZED) {
 		outb(info->IER, info->ioaddr + UART_IER);
 		/*
 		 * Before we drop DTR, make sure the UART transmitter
@@ -1127,8 +1110,26 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
 		}
 	}
 	mxser_shutdown(tty);
-	mxser_flush_buffer(tty);
 
+}
+
+/*
+ * This routine is called when the serial port gets closed.  First, we
+ * wait for the last remaining data to be sent.  Then, we unlink its
+ * async structure from the interrupt chain if necessary, and we free
+ * that IRQ if nothing is left in the chain.
+ */
+static void mxser_close(struct tty_struct *tty, struct file *filp)
+{
+	struct mxser_port *info = tty->driver_data;
+	struct tty_port *port = &info->port;
+
+	if (tty->index == MXSER_PORTS)
+		return;
+	if (tty_port_close_start(port, tty, filp) == 0)
+		return;
+	mxser_close_port(tty, port);
+	mxser_flush_buffer(tty);
 	/* Right now the tty_port set is done outside of the close_end helper
 	   as we don't yet have everyone using refcounts */	
 	tty_port_close_end(port, tty);
-- 
1.6.4.2


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

* [PATCH 32/79] isicom: Split the close hardware bits out
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (30 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 31/79] mxser: Split close ready for a standard tty_port_close method Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 33/79] tty: riscom8 kref and tty_port_close Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

From: Alan Cox <alan@linux.intel.com>

Start to extract and build a model for a common tty_port_close()

Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 drivers/char/isicom.c |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 4f1f4cd..08f5743 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -952,19 +952,12 @@ static void isicom_flush_buffer(struct tty_struct *tty)
 	tty_wakeup(tty);
 }
 
-static void isicom_close(struct tty_struct *tty, struct file *filp)
+static void isicom_close_port(struct tty_port *port)
 {
-	struct isi_port *ip = tty->driver_data;
-	struct tty_port *port = &ip->port;
-	struct isi_board *card;
+	struct isi_port *ip = container_of(port, struct isi_port, port);
+	struct isi_board *card = ip->card;
 	unsigned long flags;
 
-	BUG_ON(!ip);
-
-	card = ip->card;
-	if (isicom_paranoia_check(ip, tty->name, "isicom_close"))
-		return;
-
 	/* indicate to the card that no more data can be received
 	   on this port */
 	spin_lock_irqsave(&card->card_lock, flags);
@@ -974,9 +967,19 @@ static void isicom_close(struct tty_struct *tty, struct file *filp)
 	}
 	isicom_shutdown_port(ip);
 	spin_unlock_irqrestore(&card->card_lock, flags);
+}
 
+static void isicom_close(struct tty_struct *tty, struct file *filp)
+{
+	struct isi_port *ip = tty->driver_data;
+	struct tty_port *port = &ip->port;
+	if (isicom_paranoia_check(ip, tty->name, "isicom_close"))
+		return;
+
+	if (tty_port_close_start(port, tty, filp) == 0)
+		return;
+	isicom_close_port(port);
 	isicom_flush_buffer(tty);
-	
 	tty_port_close_end(port, tty);
 }
 
-- 
1.6.4.2


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

* [PATCH 33/79] tty: riscom8 kref and tty_port_close
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (31 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 32/79] isicom: Split the close hardware bits out Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 34/79] cyclades: use the full port_close function Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

We need to kref this driver in order to use port_close

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/riscom8.c |  131 +++++++++++++++++++++--------------------------
 1 files changed, 59 insertions(+), 72 deletions(-)

diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 9499991..7b5623b 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -343,7 +343,7 @@ static void rc_receive_exc(struct riscom_board const *bp)
 	if (port == NULL)
 		return;
 
-	tty = port->port.tty;
+	tty = tty_port_tty_get(&port->port);
 
 #ifdef RC_REPORT_OVERRUN
 	status = rc_in(bp, CD180_RCSR);
@@ -355,18 +355,18 @@ static void rc_receive_exc(struct riscom_board const *bp)
 #endif
 	ch = rc_in(bp, CD180_RDR);
 	if (!status)
-		return;
+		goto out;
 	if (status & RCSR_TOUT)  {
 		printk(KERN_WARNING "rc%d: port %d: Receiver timeout. "
 				    "Hardware problems ?\n",
 		       board_No(bp), port_No(port));
-		return;
+		goto out;
 
 	} else if (status & RCSR_BREAK)  {
 		printk(KERN_INFO "rc%d: port %d: Handling break...\n",
 		       board_No(bp), port_No(port));
 		flag = TTY_BREAK;
-		if (port->port.flags & ASYNC_SAK)
+		if (tty && (port->port.flags & ASYNC_SAK))
 			do_SAK(tty);
 
 	} else if (status & RCSR_PE)
@@ -380,8 +380,12 @@ static void rc_receive_exc(struct riscom_board const *bp)
 	else
 		flag = TTY_NORMAL;
 
-	tty_insert_flip_char(tty, ch, flag);
-	tty_flip_buffer_push(tty);
+	if (tty) {
+		tty_insert_flip_char(tty, ch, flag);
+		tty_flip_buffer_push(tty);
+	}
+out:
+	tty_kref_put(tty);
 }
 
 static void rc_receive(struct riscom_board const *bp)
@@ -394,7 +398,7 @@ static void rc_receive(struct riscom_board const *bp)
 	if (port == NULL)
 		return;
 
-	tty = port->port.tty;
+	tty = tty_port_tty_get(&port->port);
 
 	count = rc_in(bp, CD180_RDCR);
 
@@ -403,15 +407,14 @@ static void rc_receive(struct riscom_board const *bp)
 #endif
 
 	while (count--)  {
-		if (tty_buffer_request_room(tty, 1) == 0)  {
-			printk(KERN_WARNING "rc%d: port %d: Working around "
-					    "flip buffer overflow.\n",
-			       board_No(bp), port_No(port));
-			break;
-		}
-		tty_insert_flip_char(tty, rc_in(bp, CD180_RDR), TTY_NORMAL);
+		u8 ch = rc_in(bp, CD180_RDR);
+		if (tty)
+			tty_insert_flip_char(tty, ch, TTY_NORMAL);
+	}
+	if (tty) {
+		tty_flip_buffer_push(tty);
+		tty_kref_put(tty);
 	}
-	tty_flip_buffer_push(tty);
 }
 
 static void rc_transmit(struct riscom_board const *bp)
@@ -424,22 +427,22 @@ static void rc_transmit(struct riscom_board const *bp)
 	if (port == NULL)
 		return;
 
-	tty = port->port.tty;
+	tty = tty_port_tty_get(&port->port);
 
 	if (port->IER & IER_TXEMPTY) {
 		/* FIFO drained */
 		rc_out(bp, CD180_CAR, port_No(port));
 		port->IER &= ~IER_TXEMPTY;
 		rc_out(bp, CD180_IER, port->IER);
-		return;
+		goto out;
 	}
 
 	if ((port->xmit_cnt <= 0 && !port->break_length)
-	    || tty->stopped || tty->hw_stopped)  {
+	    || (tty && (tty->stopped || tty->hw_stopped)))  {
 		rc_out(bp, CD180_CAR, port_No(port));
 		port->IER &= ~IER_TXRDY;
 		rc_out(bp, CD180_IER, port->IER);
-		return;
+		goto out;
 	}
 
 	if (port->break_length)  {
@@ -480,8 +483,10 @@ static void rc_transmit(struct riscom_board const *bp)
 		port->IER &= ~IER_TXRDY;
 		rc_out(bp, CD180_IER, port->IER);
 	}
-	if (port->xmit_cnt <= port->wakeup_chars)
+	if (tty && port->xmit_cnt <= port->wakeup_chars)
 		tty_wakeup(tty);
+out:
+	tty_kref_put(tty);
 }
 
 static void rc_check_modem(struct riscom_board const *bp)
@@ -494,37 +499,43 @@ static void rc_check_modem(struct riscom_board const *bp)
 	if (port == NULL)
 		return;
 
-	tty = port->port.tty;
+	tty = tty_port_tty_get(&port->port);
 
 	mcr = rc_in(bp, CD180_MCR);
 	if (mcr & MCR_CDCHG) {
 		if (rc_in(bp, CD180_MSVR) & MSVR_CD)
 			wake_up_interruptible(&port->port.open_wait);
-		else
+		else if (tty)
 			tty_hangup(tty);
 	}
 
 #ifdef RISCOM_BRAIN_DAMAGED_CTS
 	if (mcr & MCR_CTSCHG)  {
 		if (rc_in(bp, CD180_MSVR) & MSVR_CTS)  {
-			tty->hw_stopped = 0;
 			port->IER |= IER_TXRDY;
-			if (port->xmit_cnt <= port->wakeup_chars)
-				tty_wakeup(tty);
+			if (tty) {
+				tty->hw_stopped = 0;
+				if (port->xmit_cnt <= port->wakeup_chars)
+					tty_wakeup(tty);
+			}
 		} else  {
-			tty->hw_stopped = 1;
+			if (tty)
+				tty->hw_stopped = 1;
 			port->IER &= ~IER_TXRDY;
 		}
 		rc_out(bp, CD180_IER, port->IER);
 	}
 	if (mcr & MCR_DSRCHG)  {
 		if (rc_in(bp, CD180_MSVR) & MSVR_DSR)  {
-			tty->hw_stopped = 0;
 			port->IER |= IER_TXRDY;
-			if (port->xmit_cnt <= port->wakeup_chars)
-				tty_wakeup(tty);
+			if (tty) {
+				tty->hw_stopped = 0;
+				if (port->xmit_cnt <= port->wakeup_chars)
+					tty_wakeup(tty);
+			}
 		} else  {
-			tty->hw_stopped = 1;
+			if (tty)
+				tty->hw_stopped = 1;
 			port->IER &= ~IER_TXRDY;
 		}
 		rc_out(bp, CD180_IER, port->IER);
@@ -533,6 +544,7 @@ static void rc_check_modem(struct riscom_board const *bp)
 
 	/* Clear change bits */
 	rc_out(bp, CD180_MCR, 0);
+	tty_kref_put(tty);
 }
 
 /* The main interrupt processing routine */
@@ -632,9 +644,9 @@ static void rc_shutdown_board(struct riscom_board *bp)
  * Setting up port characteristics.
  * Must be called with disabled interrupts
  */
-static void rc_change_speed(struct riscom_board *bp, struct riscom_port *port)
+static void rc_change_speed(struct tty_struct *tty, struct riscom_board *bp,
+						struct riscom_port *port)
 {
-	struct tty_struct *tty = port->port.tty;
 	unsigned long baud;
 	long tmp;
 	unsigned char cor1 = 0, cor3 = 0;
@@ -781,7 +793,8 @@ static void rc_change_speed(struct riscom_board *bp, struct riscom_port *port)
 }
 
 /* Must be called with interrupts enabled */
-static int rc_setup_port(struct riscom_board *bp, struct riscom_port *port)
+static int rc_setup_port(struct tty_struct *tty, struct riscom_board *bp,
+						struct riscom_port *port)
 {
 	unsigned long flags;
 
@@ -793,11 +806,11 @@ static int rc_setup_port(struct riscom_board *bp, struct riscom_port *port)
 
 	spin_lock_irqsave(&riscom_lock, flags);
 
-	clear_bit(TTY_IO_ERROR, &port->port.tty->flags);
+	clear_bit(TTY_IO_ERROR, &tty->flags);
 	if (port->port.count == 1)
 		bp->count++;
 	port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
-	rc_change_speed(bp, port);
+	rc_change_speed(tty, bp, port);
 	port->port.flags |= ASYNC_INITIALIZED;
 
 	spin_unlock_irqrestore(&riscom_lock, flags);
@@ -898,9 +911,9 @@ static int rc_open(struct tty_struct *tty, struct file *filp)
 
 	port->port.count++;
 	tty->driver_data = port;
-	port->port.tty = tty;
+	tty_port_tty_set(&port->port, tty);
 
-	error = rc_setup_port(bp, port);
+	error = rc_setup_port(tty, bp, port);
 	if (error == 0)
 		error = tty_port_block_til_ready(&port->port, tty, filp);
 	return error;
@@ -921,7 +934,7 @@ static void rc_flush_buffer(struct tty_struct *tty)
 	tty_wakeup(tty);
 }
 
-static void rc_close_port(struct tty_struct *tty, struct tty_port *port)
+static void rc_close_port(struct tty_port *port, struct tty_struct *tty)
 {
 	unsigned long flags;
 	struct riscom_port *rp = container_of(port, struct riscom_port, port);
@@ -966,14 +979,7 @@ static void rc_close(struct tty_struct *tty, struct file *filp)
 
 	if (!port || rc_paranoia_check(port, tty->name, "close"))
 		return;
-
-	if (tty_port_close_start(&port->port, tty, filp) == 0)
-		return;
-
-	rc_close_port(tty, &port->port);
-	rc_flush_buffer(tty);
-
-	tty_port_close_end(&port->port, tty);
+	tty_port_close(&port->port, tty, filp);
 }
 
 static int rc_write(struct tty_struct *tty,
@@ -1175,7 +1181,7 @@ static int rc_send_break(struct tty_struct *tty, int length)
 	return 0;
 }
 
-static int rc_set_serial_info(struct riscom_port *port,
+static int rc_set_serial_info(struct tty_struct *tty, struct riscom_port *port,
 				     struct serial_struct __user *newinfo)
 {
 	struct serial_struct tmp;
@@ -1185,17 +1191,6 @@ static int rc_set_serial_info(struct riscom_port *port,
 	if (copy_from_user(&tmp, newinfo, sizeof(tmp)))
 		return -EFAULT;
 
-#if 0
-	if ((tmp.irq != bp->irq) ||
-	    (tmp.port != bp->base) ||
-	    (tmp.type != PORT_CIRRUS) ||
-	    (tmp.baud_base != (RC_OSCFREQ + CD180_TPC/2) / CD180_TPC) ||
-	    (tmp.custom_divisor != 0) ||
-	    (tmp.xmit_fifo_size != CD180_NFIFO) ||
-	    (tmp.flags & ~RISCOM_LEGAL_FLAGS))
-		return -EINVAL;
-#endif
-
 	change_speed = ((port->port.flags & ASYNC_SPD_MASK) !=
 			(tmp.flags & ASYNC_SPD_MASK));
 
@@ -1217,7 +1212,7 @@ static int rc_set_serial_info(struct riscom_port *port,
 		unsigned long flags;
 
 		spin_lock_irqsave(&riscom_lock, flags);
-		rc_change_speed(bp, port);
+		rc_change_speed(tty, bp, port);
 		spin_unlock_irqrestore(&riscom_lock, flags);
 	}
 	return 0;
@@ -1260,7 +1255,7 @@ static int rc_ioctl(struct tty_struct *tty, struct file *filp,
 		break;
 	case TIOCSSERIAL:
 		lock_kernel();
-		retval = rc_set_serial_info(port, argp);
+		retval = rc_set_serial_info(tty, port, argp);
 		unlock_kernel();
 		break;
 	default:
@@ -1355,21 +1350,12 @@ static void rc_start(struct tty_struct *tty)
 static void rc_hangup(struct tty_struct *tty)
 {
 	struct riscom_port *port = tty->driver_data;
-	struct riscom_board *bp;
-	unsigned long flags;
 
 	if (rc_paranoia_check(port, tty->name, "rc_hangup"))
 		return;
 
-	bp = port_Board(port);
-
-	rc_shutdown_port(tty, bp, port);
-	spin_lock_irqsave(&port->port.lock, flags);
-	port->port.count = 0;
-	port->port.flags &= ~ASYNC_NORMAL_ACTIVE;
-	port->port.tty = NULL;
-	wake_up_interruptible(&port->port.open_wait);
-	spin_unlock_irqrestore(&port->port.lock, flags);
+	rc_shutdown_port(tty, port_Board(port), port);
+	tty_port_hangup(&port->port);
 }
 
 static void rc_set_termios(struct tty_struct *tty,
@@ -1382,7 +1368,7 @@ static void rc_set_termios(struct tty_struct *tty,
 		return;
 
 	spin_lock_irqsave(&riscom_lock, flags);
-	rc_change_speed(port_Board(port), port);
+	rc_change_speed(tty, port_Board(port), port);
 	spin_unlock_irqrestore(&riscom_lock, flags);
 
 	if ((old_termios->c_cflag & CRTSCTS) &&
@@ -1415,6 +1401,7 @@ static const struct tty_operations riscom_ops = {
 
 static const struct tty_port_operations riscom_port_ops = {
 	.carrier_raised = carrier_raised,
+	.shutdown = rc_close_port,
 };
 
 
-- 
1.6.4.2


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

* [PATCH 34/79] cyclades: use the full port_close function
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (32 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 33/79] tty: riscom8 kref and tty_port_close Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 35/79] tty: make the kref destructor occur asynchronously Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Convert cyclades to use the full tty_port_close helper

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/cyclades.c |   36 +++++++++++++++++-------------------
 1 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index f518e0b..70bd61b 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -1750,24 +1750,15 @@ static void cy_flush_buffer(struct tty_struct *tty)
 }				/* cy_flush_buffer */
 
 
-/*
- * This routine is called when a particular tty device is closed.
- */
-static void cy_close(struct tty_struct *tty, struct file *filp)
+static void cy_do_close(struct tty_port *port)
 {
-	struct cyclades_port *info = tty->driver_data;
+	struct cyclades_port *info = container_of(port, struct cyclades_port,
+								port);
 	struct cyclades_card *card;
 	unsigned long flags;
 	int channel;
 
-	if (!info || serial_paranoia_check(info, tty->name, "cy_close"))
-		return;
-
 	card = info->card;
-
-	if (!tty_port_close_start(&info->port, tty, filp))
-		return;
-
 	channel = info->line - card->first_line;
 	spin_lock_irqsave(&card->card_lock, flags);
 
@@ -1779,7 +1770,7 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 			/* Waiting for on-board buffers to be empty before
 			   closing the port */
 			spin_unlock_irqrestore(&card->card_lock, flags);
-			cy_wait_until_sent(tty, info->timeout);
+			cy_wait_until_sent(port->tty, info->timeout);
 			spin_lock_irqsave(&card->card_lock, flags);
 		}
 	} else {
@@ -1801,14 +1792,19 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
 		}
 #endif
 	}
-
 	spin_unlock_irqrestore(&card->card_lock, flags);
-	cy_shutdown(info, tty);
-	cy_flush_buffer(tty);
-
-	tty_port_tty_set(&info->port, NULL);
+	cy_shutdown(info, port->tty);
+}
 
-	tty_port_close_end(&info->port, tty);
+/*
+ * This routine is called when a particular tty device is closed.
+ */
+static void cy_close(struct tty_struct *tty, struct file *filp)
+{
+	struct cyclades_port *info = tty->driver_data;
+	if (!info || serial_paranoia_check(info, tty->name, "cy_close"))
+		return;
+	tty_port_close(&info->port, tty, filp);
 }				/* cy_close */
 
 /* This routine gets called when tty_write has put something into
@@ -3113,11 +3109,13 @@ static void cyz_dtr_rts(struct tty_port *port, int raise)
 static const struct tty_port_operations cyy_port_ops = {
 	.carrier_raised = cyy_carrier_raised,
 	.dtr_rts = cyy_dtr_rts,
+	.shutdown = cy_do_close,
 };
 
 static const struct tty_port_operations cyz_port_ops = {
 	.carrier_raised = cyz_carrier_raised,
 	.dtr_rts = cyz_dtr_rts,
+	.shutdown = cy_do_close,
 };
 
 /*
-- 
1.6.4.2


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

* [PATCH 35/79] tty: make the kref destructor occur asynchronously
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (33 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 34/79] cyclades: use the full port_close function Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 36/79] cdc_acm: Fix to use modern speed interfaces Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

We want to be able to sleep in the destructor for USB at least. It isn't a
hot path so just pushing it to a work queue doesn't really cause any
difficulty.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_io.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 9384480..385cca7 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1386,10 +1386,14 @@ EXPORT_SYMBOL(tty_shutdown);
  *		tty_mutex - sometimes only
  *		takes the file list lock internally when working on the list
  *	of ttys that the driver keeps.
+ *
+ *	This method gets called from a work queue so that the driver private
+ *	shutdown ops can sleep (needed for USB at least)
  */
-static void release_one_tty(struct kref *kref)
+static void release_one_tty(struct work_struct *work)
 {
-	struct tty_struct *tty = container_of(kref, struct tty_struct, kref);
+	struct tty_struct *tty =
+		container_of(work, struct tty_struct, hangup_work);
 	struct tty_driver *driver = tty->driver;
 
 	if (tty->ops->shutdown)
@@ -1407,6 +1411,15 @@ static void release_one_tty(struct kref *kref)
 	free_tty_struct(tty);
 }
 
+static void queue_release_one_tty(struct kref *kref)
+{
+	struct tty_struct *tty = container_of(kref, struct tty_struct, kref);
+	/* The hangup queue is now free so we can reuse it rather than
+	   waste a chunk of memory for each port */
+	INIT_WORK(&tty->hangup_work, release_one_tty);
+	schedule_work(&tty->hangup_work);
+}
+
 /**
  *	tty_kref_put		-	release a tty kref
  *	@tty: tty device
@@ -1418,7 +1431,7 @@ static void release_one_tty(struct kref *kref)
 void tty_kref_put(struct tty_struct *tty)
 {
 	if (tty)
-		kref_put(&tty->kref, release_one_tty);
+		kref_put(&tty->kref, queue_release_one_tty);
 }
 EXPORT_SYMBOL(tty_kref_put);
 
-- 
1.6.4.2


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

* [PATCH 36/79] cdc_acm: Fix to use modern speed interfaces
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (34 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 35/79] tty: make the kref destructor occur asynchronously Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 37/79] tty: USB hangup is racy Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, stable, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

This changed in 2006 so its about time the ACM driver caught up

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/class/cdc-acm.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 2bfc41e..85a1a55 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -858,10 +858,7 @@ static void acm_tty_set_termios(struct tty_struct *tty,
 	if (!ACM_READY(acm))
 		return;
 
-	/* FIXME: Needs to support the tty_baud interface */
-	/* FIXME: Broken on sparc */
-	newline.dwDTERate = cpu_to_le32p(acm_tty_speed +
-		(termios->c_cflag & CBAUD & ~CBAUDEX) + (termios->c_cflag & CBAUDEX ? 15 : 0));
+	newline.dwDTERate = cpu_to_le32(tty_get_baud_rate(tty));
 	newline.bCharFormat = termios->c_cflag & CSTOPB ? 2 : 0;
 	newline.bParityType = termios->c_cflag & PARENB ?
 				(termios->c_cflag & PARODD ? 1 : 2) +
-- 
1.6.4.2


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

* [PATCH 37/79] tty: USB hangup is racy
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (35 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 36/79] cdc_acm: Fix to use modern speed interfaces Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 38/79] tty: remove dtr/rts use from the driver open methods Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, stable, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

The USB layer uses tty_hangup to deal with unplugs of the physical hardware
(analogous to loss of carrier) and then frees the resources. However the
tty_hangup is asynchronous. As the hangup can sleep we can use tty_vhangup
which is the non async version to avoid freeing resources too early.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 99188c9..21dd72a 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1161,10 +1161,7 @@ void usb_serial_disconnect(struct usb_interface *interface)
 		if (port) {
 			struct tty_struct *tty = tty_port_tty_get(&port->port);
 			if (tty) {
-				/* The hangup will occur asynchronously but
-				   the object refcounts will sort out all the
-				   cleanup */
-				tty_hangup(tty);
+				tty_vhangup(tty);
 				tty_kref_put(tty);
 			}
 			kill_traffic(port);
-- 
1.6.4.2


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

* [PATCH 38/79] tty: remove dtr/rts use from the driver open methods
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (36 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 37/79] tty: USB hangup is racy Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 39/79] tty: USB can now use the shutdown method for kref based freeing of ports Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, stable, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

These are handled by the tty_port core code which will raise and lower the
carrier correctly in tty_wait_until_ready

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/cp210x.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 985cbcf..b5275c4 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -399,12 +399,6 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port,
 
 	/* Configure the termios structure */
 	cp210x_get_termios(tty, port);
-
-	/* Set the DTR and RTS pins low */
-	cp210x_tiocmset_port(tty ? (struct usb_serial_port *) tty->driver_data
-			: port,
-		NULL, TIOCM_DTR | TIOCM_RTS, 0);
-
 	return 0;
 }
 
-- 
1.6.4.2


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

* [PATCH 39/79] tty: USB can now use the shutdown method for kref based freeing of ports
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (37 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 38/79] tty: remove dtr/rts use from the driver open methods Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 40/79] vt: add an event interface Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, stable, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |   28 +++++++---------------------
 1 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 21dd72a..31c7a09 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -316,16 +316,19 @@ static void serial_do_down(struct usb_serial_port *port)
  *
  *	Do the resource freeing and refcount dropping for the port. We must
  *	be careful about ordering and we must avoid freeing up the console.
+ *
+ *	Called when the last tty kref is dropped.
  */
 
-static void serial_do_free(struct usb_serial_port *port)
+static void serial_do_free(struct tty_struct *tty)
 {
+	struct usb_serial_port *port = tty->driver_data;
 	struct usb_serial *serial;
 	struct module *owner;
 
 	/* The console is magical, do not hang up the console hardware
 	   or there will be tears */
-	if (port->console)
+	if (port == NULL || port->console)
 		return;
 
 	serial = port->serial;
@@ -350,30 +353,12 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
 
 	dbg("%s - port %d", __func__, port->number);
 
-	/* FIXME:
-	   This leaves a very narrow race. Really we should do the
-	   serial_do_free() on tty->shutdown(), but tty->shutdown can
-	   be called from IRQ context and serial_do_free can sleep.
-
-	   The right fix is probably to make the tty free (which is rare)
-	   and thus tty->shutdown() occur via a work queue and simplify all
-	   the drivers that use it.
-	*/
-	if (tty_hung_up_p(filp)) {
-		/* serial_hangup already called serial_down at this point.
-		   Another user may have already reopened the port but
-		   serial_do_free is refcounted */
-		serial_do_free(port);
-		return;
-	}
-
 	if (tty_port_close_start(&port->port, tty, filp) == 0)
 		return;
-
 	serial_do_down(port);		
 	tty_port_close_end(&port->port, tty);
 	tty_port_tty_set(&port->port, NULL);
-	serial_do_free(port);
+
 }
 
 static void serial_hangup(struct tty_struct *tty)
@@ -1243,6 +1228,7 @@ static const struct tty_operations serial_ops = {
 	.chars_in_buffer =	serial_chars_in_buffer,
 	.tiocmget =		serial_tiocmget,
 	.tiocmset =		serial_tiocmset,
+	.shutdown =		serial_do_free,
 	.proc_fops =		&serial_proc_fops,
 };
 
-- 
1.6.4.2


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

* [PATCH 40/79] vt: add an event interface
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (38 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 39/79] tty: USB can now use the shutdown method for kref based freeing of ports Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 41/79] vt: remove power stuff from kernel/power Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

This is needed and requested in various forms for ConsoleKit, screenblank
handling and the like so do the job with a single interface. Also build the
interface so that unlike VT_WAITACTIVE and friends it won't miss events.

FIXME: Should this be a waitactive ioctl or a new device file you can poll
and read events from. We need the code anyway to fix up the existing broken
wait for console switch logic but the ConsoleKit people would prefer the
new device to the ioctl we have here

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/vt.c       |    4 +-
 drivers/char/vt_ioctl.c |  185 ++++++++++++++++++++++++++++++++++-------------
 include/linux/vt.h      |   14 ++++
 include/linux/vt_kern.h |    3 +-
 4 files changed, 154 insertions(+), 52 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index e47a4c8..33214d9 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -252,7 +252,6 @@ static void notify_update(struct vc_data *vc)
 	struct vt_notifier_param param = { .vc = vc };
 	atomic_notifier_call_chain(&vt_notifier_list, VT_UPDATE, &param);
 }
-
 /*
  *	Low-Level Functions
  */
@@ -935,6 +934,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
 
 	if (CON_IS_VISIBLE(vc))
 		update_screen(vc);
+	vt_event_post(VT_EVENT_RESIZE, vc->vc_num, vc->vc_num);
 	return err;
 }
 
@@ -3637,6 +3637,7 @@ void do_blank_screen(int entering_gfx)
 		blank_state = blank_vesa_wait;
 		mod_timer(&console_timer, jiffies + vesa_off_interval);
 	}
+	vt_event_post(VT_EVENT_BLANK, vc->vc_num, vc->vc_num);
 }
 EXPORT_SYMBOL(do_blank_screen);
 
@@ -3681,6 +3682,7 @@ void do_unblank_screen(int leaving_gfx)
 		console_blank_hook(0);
 	set_palette(vc);
 	set_cursor(vc);
+	vt_event_post(VT_EVENT_UNBLANK, vc->vc_num, vc->vc_num);
 }
 EXPORT_SYMBOL(do_unblank_screen);
 
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 95189f2..35ad94e 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -62,6 +62,133 @@ extern struct tty_driver *console_driver;
 static void complete_change_console(struct vc_data *vc);
 
 /*
+ *	User space VT_EVENT handlers
+ */
+
+struct vt_event_wait {
+	struct list_head list;
+	struct vt_event event;
+	int done;
+};
+
+static LIST_HEAD(vt_events);
+static DEFINE_SPINLOCK(vt_event_lock);
+static DECLARE_WAIT_QUEUE_HEAD(vt_event_waitqueue);
+
+/**
+ *	vt_event_post
+ *	@event: the event that occurred
+ *	@old: old console
+ *	@new: new console
+ *
+ *	Post an VT event to interested VT handlers
+ */
+
+void vt_event_post(unsigned int event, unsigned int old, unsigned int new)
+{
+	struct list_head *pos, *head;
+	unsigned long flags;
+	int wake = 0;
+
+	spin_lock_irqsave(&vt_event_lock, flags);
+	head = &vt_events;
+
+	list_for_each(pos, head) {
+		struct vt_event_wait *ve = list_entry(pos,
+						struct vt_event_wait, list);
+		if (!(ve->event.event & event))
+			continue;
+		ve->event.event = event;
+		/* kernel view is consoles 0..n-1, user space view is
+		   console 1..n with 0 meaning current, so we must bias */
+		ve->event.old = old + 1;
+		ve->event.new = new + 1;
+		wake = 1;
+		ve->done = 1;
+	}
+	spin_unlock_irqrestore(&vt_event_lock, flags);
+	if (wake)
+		wake_up_interruptible(&vt_event_waitqueue);
+}
+
+/**
+ *	vt_event_wait		-	wait for an event
+ *	@vw: our event
+ *
+ *	Waits for an event to occur which completes our vt_event_wait
+ *	structure. On return the structure has wv->done set to 1 for success
+ *	or 0 if some event such as a signal ended the wait.
+ */
+
+static void vt_event_wait(struct vt_event_wait *vw)
+{
+	unsigned long flags;
+	/* Prepare the event */
+	INIT_LIST_HEAD(&vw->list);
+	vw->done = 0;
+	/* Queue our event */
+	spin_lock_irqsave(&vt_event_lock, flags);
+	list_add(&vw->list, &vt_events);
+	spin_unlock_irqrestore(&vt_event_lock, flags);
+	/* Wait for it to pass */
+	wait_event_interruptible(vt_event_waitqueue, vw->done);
+	/* Dequeue it */
+	spin_lock_irqsave(&vt_event_lock, flags);
+	list_del(&vw->list);
+	spin_unlock_irqrestore(&vt_event_lock, flags);
+}
+
+/**
+ *	vt_event_wait_ioctl	-	event ioctl handler
+ *	@arg: argument to ioctl
+ *
+ *	Implement the VT_WAITEVENT ioctl using the VT event interface
+ */
+
+static int vt_event_wait_ioctl(struct vt_event __user *event)
+{
+	struct vt_event_wait vw;
+
+	if (copy_from_user(&vw.event, event, sizeof(struct vt_event)))
+		return -EFAULT;
+	/* Highest supported event for now */
+	if (vw.event.event & ~VT_MAX_EVENT)
+		return -EINVAL;
+
+	vt_event_wait(&vw);
+	/* If it occurred report it */
+	if (vw.done) {
+		if (copy_to_user(event, &vw.event, sizeof(struct vt_event)))
+			return -EFAULT;
+		return 0;
+	}
+	return -EINTR;
+}
+
+/**
+ *	vt_waitactive	-	active console wait
+ *	@event: event code
+ *	@n: new console
+ *
+ *	Helper for event waits. Used to implement the legacy
+ *	event waiting ioctls in terms of events
+ */
+
+int vt_waitactive(int n)
+{
+	struct vt_event_wait vw;
+	do {
+		if (n == fg_console + 1)
+			break;
+		vw.event.event = VT_EVENT_SWITCH;
+		vt_event_wait(&vw);
+		if (vw.done == 0)
+			return -EINTR;
+	} while (vw.event.new != n);
+	return 0;
+}
+
+/*
  * these are the valid i/o ports we're allowed to change. they map all the
  * video ports
  */
@@ -360,6 +487,8 @@ do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud, int perm, struct vc_
 	return 0;
 }
 
+
+
 /*
  * We handle the console-specific ioctl's here.  We allow the
  * capability to modify any console, not just the fg_console. 
@@ -851,7 +980,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
 		if (arg == 0 || arg > MAX_NR_CONSOLES)
 			ret = -ENXIO;
 		else
-			ret = vt_waitactive(arg - 1);
+			ret = vt_waitactive(arg);
 		break;
 
 	/*
@@ -1159,6 +1288,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
 		ret = put_user(vc->vc_hi_font_mask,
 					(unsigned short __user *)arg);
 		break;
+	case VT_WAITEVENT:
+		ret = vt_event_wait_ioctl((struct vt_event __user *)arg);
+		break;
 	default:
 		ret = -ENOIOCTLCMD;
 	}
@@ -1170,54 +1302,6 @@ eperm:
 	goto out;
 }
 
-/*
- * Sometimes we want to wait until a particular VT has been activated. We
- * do it in a very simple manner. Everybody waits on a single queue and
- * get woken up at once. Those that are satisfied go on with their business,
- * while those not ready go back to sleep. Seems overkill to add a wait
- * to each vt just for this - usually this does nothing!
- */
-static DECLARE_WAIT_QUEUE_HEAD(vt_activate_queue);
-
-/*
- * Sleeps until a vt is activated, or the task is interrupted. Returns
- * 0 if activation, -EINTR if interrupted by a signal handler.
- */
-int vt_waitactive(int vt)
-{
-	int retval;
-	DECLARE_WAITQUEUE(wait, current);
-
-	add_wait_queue(&vt_activate_queue, &wait);
-	for (;;) {
-		retval = 0;
-
-		/*
-		 * Synchronize with redraw_screen(). By acquiring the console
-		 * semaphore we make sure that the console switch is completed
-		 * before we return. If we didn't wait for the semaphore, we
-		 * could return at a point where fg_console has already been
-		 * updated, but the console switch hasn't been completed.
-		 */
-		acquire_console_sem();
-		set_current_state(TASK_INTERRUPTIBLE);
-		if (vt == fg_console) {
-			release_console_sem();
-			break;
-		}
-		release_console_sem();
-		retval = -ERESTARTNOHAND;
-		if (signal_pending(current))
-			break;
-		schedule();
-	}
-	remove_wait_queue(&vt_activate_queue, &wait);
-	__set_current_state(TASK_RUNNING);
-	return retval;
-}
-
-#define vt_wake_waitactive() wake_up(&vt_activate_queue)
-
 void reset_vc(struct vc_data *vc)
 {
 	vc->vc_mode = KD_TEXT;
@@ -1262,6 +1346,7 @@ void vc_SAK(struct work_struct *work)
 static void complete_change_console(struct vc_data *vc)
 {
 	unsigned char old_vc_mode;
+	int old = fg_console;
 
 	last_console = fg_console;
 
@@ -1325,7 +1410,7 @@ static void complete_change_console(struct vc_data *vc)
 	/*
 	 * Wake anyone waiting for their VT to activate
 	 */
-	vt_wake_waitactive();
+	vt_event_post(VT_EVENT_SWITCH, old, vc->vc_num);
 	return;
 }
 
diff --git a/include/linux/vt.h b/include/linux/vt.h
index 02c1c02..89c03a1 100644
--- a/include/linux/vt.h
+++ b/include/linux/vt.h
@@ -74,4 +74,18 @@ struct vt_consize {
 #define VT_UNLOCKSWITCH 0x560C  /* allow vt switching */
 #define VT_GETHIFONTMASK 0x560D  /* return hi font mask */
 
+struct vt_event {
+	unsigned int event;
+#define VT_EVENT_SWITCH		0x0001	/* Console switch */
+#define VT_EVENT_BLANK		0x0002	/* Screen blank */
+#define VT_EVENT_UNBLANK	0x0004	/* Screen unblank */
+#define VT_EVENT_RESIZE		0x0008	/* Resize display */
+#define VT_MAX_EVENT		0x000F
+	unsigned int old;		/* Old console */
+	unsigned int new;		/* New console (if changing) */
+	unsigned int pad[4];		/* Padding for expansion */
+};
+
+#define VT_WAITEVENT	0x560E	/* Wait for an event */
+
 #endif /* _LINUX_VT_H */
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 2f11134..f8c797d 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -91,7 +91,8 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
 #endif
 
 /* vt.c */
-int vt_waitactive(int vt);
+void vt_event_post(unsigned int event, unsigned int old, unsigned int new);
+int vt_waitactive(int n);
 void change_console(struct vc_data *new_vc);
 void reset_vc(struct vc_data *vc);
 extern int unbind_con_driver(const struct consw *csw, int first, int last,
-- 
1.6.4.2


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

* [PATCH 41/79] vt: remove power stuff from kernel/power
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (39 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 40/79] vt: add an event interface Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 42/79] vt: move kernel stuff out of vt.h Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

In the past someone gratuitiously borrowed chunks of kernel internal vt
code and dumped them in kernel/power. They have all sorts of deep relations
with the vt code so put them in the vt tree instead

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/vt_ioctl.c |   56 +++++++++++++++++++++++++++++++++++++++++
 include/linux/vt_kern.h |    1 +
 kernel/power/console.c  |   63 +++-------------------------------------------
 3 files changed, 62 insertions(+), 58 deletions(-)

diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 35ad94e..d29fbd4 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -16,6 +16,7 @@
 #include <linux/tty.h>
 #include <linux/timer.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/kd.h>
 #include <linux/vt.h>
 #include <linux/string.h>
@@ -1483,3 +1484,58 @@ void change_console(struct vc_data *new_vc)
 
 	complete_change_console(new_vc);
 }
+
+/* Perform a kernel triggered VT switch for suspend/resume */
+
+static int disable_vt_switch;
+
+int vt_move_to_console(unsigned int vt, int alloc)
+{
+	int prev;
+
+	acquire_console_sem();
+	/* Graphics mode - up to X */
+	if (disable_vt_switch) {
+		release_console_sem();
+		return 0;
+	}
+	prev = fg_console;
+
+	if (alloc && vc_allocate(vt)) {
+		/* we can't have a free VC for now. Too bad,
+		 * we don't want to mess the screen for now. */
+		release_console_sem();
+		return -ENOSPC;
+	}
+
+	if (set_console(vt)) {
+		/*
+		 * We're unable to switch to the SUSPEND_CONSOLE.
+		 * Let the calling function know so it can decide
+		 * what to do.
+		 */
+		release_console_sem();
+		return -EIO;
+	}
+	release_console_sem();
+	if (vt_waitactive(vt)) {
+		pr_debug("Suspend: Can't switch VCs.");
+		return -EINTR;
+	}
+	return prev;
+}
+
+/*
+ * Normally during a suspend, we allocate a new console and switch to it.
+ * When we resume, we switch back to the original console.  This switch
+ * can be slow, so on systems where the framebuffer can handle restoration
+ * of video registers anyways, there's little point in doing the console
+ * switch.  This function allows you to disable it by passing it '0'.
+ */
+void pm_set_vt_switch(int do_switch)
+{
+	acquire_console_sem();
+	disable_vt_switch = !do_switch;
+	release_console_sem();
+}
+EXPORT_SYMBOL(pm_set_vt_switch);
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index f8c797d..5b53efe 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -117,4 +117,5 @@ struct vt_spawn_console {
 };
 extern struct vt_spawn_console vt_spawn_con;
 
+extern int vt_move_to_console(unsigned int vt, int alloc);
 #endif /* _VT_KERN_H */
diff --git a/kernel/power/console.c b/kernel/power/console.c
index a3961b2..5187136 100644
--- a/kernel/power/console.c
+++ b/kernel/power/console.c
@@ -14,56 +14,13 @@
 #define SUSPEND_CONSOLE	(MAX_NR_CONSOLES-1)
 
 static int orig_fgconsole, orig_kmsg;
-static int disable_vt_switch;
-
-/*
- * Normally during a suspend, we allocate a new console and switch to it.
- * When we resume, we switch back to the original console.  This switch
- * can be slow, so on systems where the framebuffer can handle restoration
- * of video registers anyways, there's little point in doing the console
- * switch.  This function allows you to disable it by passing it '0'.
- */
-void pm_set_vt_switch(int do_switch)
-{
-	acquire_console_sem();
-	disable_vt_switch = !do_switch;
-	release_console_sem();
-}
-EXPORT_SYMBOL(pm_set_vt_switch);
 
 int pm_prepare_console(void)
 {
-	acquire_console_sem();
-
-	if (disable_vt_switch) {
-		release_console_sem();
-		return 0;
-	}
-
-	orig_fgconsole = fg_console;
-
-	if (vc_allocate(SUSPEND_CONSOLE)) {
-	  /* we can't have a free VC for now. Too bad,
-	   * we don't want to mess the screen for now. */
-		release_console_sem();
+	orig_fgconsole = vt_move_to_console(SUSPEND_CONSOLE, 1);
+	if (orig_fgconsole < 0)
 		return 1;
-	}
 
-	if (set_console(SUSPEND_CONSOLE)) {
-		/*
-		 * We're unable to switch to the SUSPEND_CONSOLE.
-		 * Let the calling function know so it can decide
-		 * what to do.
-		 */
-		release_console_sem();
-		return 1;
-	}
-	release_console_sem();
-
-	if (vt_waitactive(SUSPEND_CONSOLE)) {
-		pr_debug("Suspend: Can't switch VCs.");
-		return 1;
-	}
 	orig_kmsg = kmsg_redirect;
 	kmsg_redirect = SUSPEND_CONSOLE;
 	return 0;
@@ -71,19 +28,9 @@ int pm_prepare_console(void)
 
 void pm_restore_console(void)
 {
-	acquire_console_sem();
-	if (disable_vt_switch) {
-		release_console_sem();
-		return;
-	}
-	set_console(orig_fgconsole);
-	release_console_sem();
-
-	if (vt_waitactive(orig_fgconsole)) {
-		pr_debug("Resume: Can't switch VCs.");
-		return;
+	if (orig_fgconsole >= 0) {
+		vt_move_to_console(orig_fgconsole, 0);
+		kmsg_redirect = orig_kmsg;
 	}
-
-	kmsg_redirect = orig_kmsg;
 }
 #endif
-- 
1.6.4.2


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

* [PATCH 42/79] vt: move kernel stuff out of vt.h
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (40 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 41/79] vt: remove power stuff from kernel/power Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 43/79] vt: add an activate and lock Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

We have vt_kern.h for this


Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 include/linux/vt.h      |   11 -----------
 include/linux/vt_kern.h |   12 ++++++++++++
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/include/linux/vt.h b/include/linux/vt.h
index 89c03a1..831daf6 100644
--- a/include/linux/vt.h
+++ b/include/linux/vt.h
@@ -1,17 +1,6 @@
 #ifndef _LINUX_VT_H
 #define _LINUX_VT_H
 
-#ifdef __KERNEL__
-struct notifier_block;
-
-struct vt_notifier_param {
-	struct vc_data *vc;	/* VC on which the update happened */
-	unsigned int c;		/* Printed char */
-};
-
-extern int register_vt_notifier(struct notifier_block *nb);
-extern int unregister_vt_notifier(struct notifier_block *nb);
-#endif
 
 /*
  * These constants are also useful for user-level apps (e.g., VC
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 5b53efe..c0c4e11 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -13,6 +13,7 @@
 #include <linux/console_struct.h>
 #include <linux/mm.h>
 #include <linux/consolemap.h>
+#include <linux/notifier.h>
 
 /*
  * Presently, a lot of graphics programs do not restore the contents of
@@ -118,4 +119,15 @@ struct vt_spawn_console {
 extern struct vt_spawn_console vt_spawn_con;
 
 extern int vt_move_to_console(unsigned int vt, int alloc);
+
+/* Interfaces for VC notification of character events (for accessibility etc) */
+
+struct vt_notifier_param {
+	struct vc_data *vc;	/* VC on which the update happened */
+	unsigned int c;		/* Printed char */
+};
+
+extern int register_vt_notifier(struct notifier_block *nb);
+extern int unregister_vt_notifier(struct notifier_block *nb);
+
 #endif /* _VT_KERN_H */
-- 
1.6.4.2


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

* [PATCH 43/79] vt: add an activate and lock
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (41 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 42/79] vt: move kernel stuff out of vt.h Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 44/79] tty: USB does not need the filp argument in the drivers Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

X and other graphical interfaces need to be able to flip to a console
and lock it into graphics mode without races.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/vt_ioctl.c |   38 +++++++++++++++++++++++++++++++++++++-
 include/linux/vt.h      |    7 +++++++
 2 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index d29fbd4..0fceb8f 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -972,6 +972,41 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
 		}
 		break;
 
+	case VT_SETACTIVATE:
+	{
+		struct vt_setactivate vsa;
+
+		if (!perm)
+			goto eperm;
+
+		if (copy_from_user(&vsa, (struct vt_setactivate __user *)arg,
+						sizeof(struct vt_setactivate)))
+			return -EFAULT;
+		if (vsa.console == 0 || vsa.console > MAX_NR_CONSOLES)
+			ret = -ENXIO;
+		else {
+			vsa.console--;
+			acquire_console_sem();
+			ret = vc_allocate(vsa.console);
+			if (ret == 0) {
+				struct vc_data *nvc;
+				/* This is safe providing we don't drop the
+				   console sem between vc_allocate and
+				   finishing referencing nvc */
+				nvc = vc_cons[vsa.console].d;
+				nvc->vt_mode = vsa.mode;
+				nvc->vt_mode.frsig = 0;
+				put_pid(nvc->vt_pid);
+				nvc->vt_pid = get_pid(task_pid(current));
+			}
+			release_console_sem();
+			if (ret)
+				break;
+			/* Commence switch and lock */
+			set_console(arg);
+		}
+	}
+
 	/*
 	 * wait until the specified VT has been activated
 	 */
@@ -1342,7 +1377,8 @@ void vc_SAK(struct work_struct *work)
 }
 
 /*
- * Performs the back end of a vt switch
+ * Performs the back end of a vt switch. Called under the console
+ * semaphore.
  */
 static void complete_change_console(struct vc_data *vc)
 {
diff --git a/include/linux/vt.h b/include/linux/vt.h
index 831daf6..7afca0d 100644
--- a/include/linux/vt.h
+++ b/include/linux/vt.h
@@ -77,4 +77,11 @@ struct vt_event {
 
 #define VT_WAITEVENT	0x560E	/* Wait for an event */
 
+struct vt_setactivate {
+	unsigned int console;
+	struct vt_mode mode;
+};
+
+#define VT_SETACTIVATE	0x560F	/* Activate and set the mode of a console */
+
 #endif /* _LINUX_VT_H */
-- 
1.6.4.2


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

* [PATCH 44/79] tty: USB does not need the filp argument in the drivers
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (42 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 43/79] vt: add an activate and lock Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 45/79] isicom: split the open method for the isicom device Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

And indeed none of them use it. Clean this up as it will make moving to a
standard open method rather easier.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/ark3116.c          |    5 ++---
 drivers/usb/serial/belkin_sa.c        |    4 ++--
 drivers/usb/serial/ch341.c            |    5 ++---
 drivers/usb/serial/console.c          |    4 ++--
 drivers/usb/serial/cp210x.c           |    6 ++----
 drivers/usb/serial/cyberjack.c        |    4 ++--
 drivers/usb/serial/cypress_m8.c       |    6 ++----
 drivers/usb/serial/digi_acceleport.c  |    6 ++----
 drivers/usb/serial/empeg.c            |    8 +++-----
 drivers/usb/serial/ftdi_sio.c         |    6 ++----
 drivers/usb/serial/garmin_gps.c       |    3 +--
 drivers/usb/serial/generic.c          |    3 +--
 drivers/usb/serial/io_edgeport.c      |    6 ++----
 drivers/usb/serial/io_ti.c            |    3 +--
 drivers/usb/serial/ipaq.c             |    9 ++-------
 drivers/usb/serial/ipw.c              |    3 +--
 drivers/usb/serial/ir-usb.c           |    6 ++----
 drivers/usb/serial/iuu_phoenix.c      |    5 ++---
 drivers/usb/serial/keyspan.c          |    3 +--
 drivers/usb/serial/keyspan.h          |    3 +--
 drivers/usb/serial/keyspan_pda.c      |    2 +-
 drivers/usb/serial/kl5kusb105.c       |   10 ++--------
 drivers/usb/serial/kobil_sct.c        |    6 ++----
 drivers/usb/serial/mct_u232.c         |    6 ++----
 drivers/usb/serial/mos7720.c          |    3 +--
 drivers/usb/serial/mos7840.c          |    3 +--
 drivers/usb/serial/navman.c           |    3 +--
 drivers/usb/serial/omninet.c          |    6 ++----
 drivers/usb/serial/opticon.c          |    3 +--
 drivers/usb/serial/option.c           |    6 ++----
 drivers/usb/serial/oti6858.c          |    6 ++----
 drivers/usb/serial/pl2303.c           |    5 +----
 drivers/usb/serial/sierra.c           |    3 +--
 drivers/usb/serial/spcp8x5.c          |    5 +----
 drivers/usb/serial/symbolserial.c     |    3 +--
 drivers/usb/serial/ti_usb_3410_5052.c |    6 ++----
 drivers/usb/serial/usb-serial.c       |    2 +-
 drivers/usb/serial/usb_debug.c        |    5 ++---
 drivers/usb/serial/visor.c            |    6 ++----
 drivers/usb/serial/whiteheat.c        |    5 ++---
 include/linux/usb/serial.h            |    7 +++----
 41 files changed, 68 insertions(+), 131 deletions(-)

diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index aec6188..7ddde4d 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -318,8 +318,7 @@ static void ark3116_set_termios(struct tty_struct *tty,
 	return;
 }
 
-static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port,
-					struct file *filp)
+static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct ktermios tmp_termios;
 	struct usb_serial *serial = port->serial;
@@ -334,7 +333,7 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port,
 		return -ENOMEM;
 	}
 
-	result = usb_serial_generic_open(tty, port, filp);
+	result = usb_serial_generic_open(tty, port);
 	if (result)
 		goto err_out;
 
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index 7033b03..a0467bc 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -92,7 +92,7 @@ static int debug;
 static int  belkin_sa_startup(struct usb_serial *serial);
 static void belkin_sa_release(struct usb_serial *serial);
 static int  belkin_sa_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+			struct usb_serial_port *port);
 static void belkin_sa_close(struct usb_serial_port *port);
 static void belkin_sa_read_int_callback(struct urb *urb);
 static void belkin_sa_set_termios(struct tty_struct *tty,
@@ -213,7 +213,7 @@ static void belkin_sa_release(struct usb_serial *serial)
 
 
 static int  belkin_sa_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+					struct usb_serial_port *port)
 {
 	int retval = 0;
 
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
index 2830766..8c894a7 100644
--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -300,8 +300,7 @@ static void ch341_close(struct usb_serial_port *port)
 
 
 /* open this device, set default parameters */
-static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port,
-				struct file *filp)
+static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	struct ch341_private *priv = usb_get_serial_port_data(serial->port[0]);
@@ -333,7 +332,7 @@ static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port,
 		return -EPROTO;
 	}
 
-	r = usb_serial_generic_open(tty, port, filp);
+	r = usb_serial_generic_open(tty, port);
 
 out:	return r;
 }
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index 0e4f2e4..be086e4 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -150,9 +150,9 @@ static int usb_console_setup(struct console *co, char *options)
 		/* only call the device specific open if this
 		 * is the first time the port is opened */
 		if (serial->type->open)
-			retval = serial->type->open(NULL, port, NULL);
+			retval = serial->type->open(NULL, port);
 		else
-			retval = usb_serial_generic_open(NULL, port, NULL);
+			retval = usb_serial_generic_open(NULL, port);
 
 		if (retval) {
 			err("could not open USB console port");
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index b5275c4..4a208fe 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -33,8 +33,7 @@
 /*
  * Function Prototypes
  */
-static int cp210x_open(struct tty_struct *, struct usb_serial_port *,
-							struct file *);
+static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *);
 static void cp210x_cleanup(struct usb_serial_port *);
 static void cp210x_close(struct usb_serial_port *);
 static void cp210x_get_termios(struct tty_struct *,
@@ -368,8 +367,7 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
 	return baud;
 }
 
-static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port,
-				struct file *filp)
+static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	int result;
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 336523f..b0f6402 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -61,7 +61,7 @@ static int cyberjack_startup(struct usb_serial *serial);
 static void cyberjack_disconnect(struct usb_serial *serial);
 static void cyberjack_release(struct usb_serial *serial);
 static int  cyberjack_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+	struct usb_serial_port *port);
 static void cyberjack_close(struct usb_serial_port *port);
 static int cyberjack_write(struct tty_struct *tty,
 	struct usb_serial_port *port, const unsigned char *buf, int count);
@@ -173,7 +173,7 @@ static void cyberjack_release(struct usb_serial *serial)
 }
 
 static int  cyberjack_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+					struct usb_serial_port *port)
 {
 	struct cyberjack_private *priv;
 	unsigned long flags;
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 59adfe1..df1adb9 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -172,8 +172,7 @@ static int  cypress_earthmate_startup(struct usb_serial *serial);
 static int  cypress_hidcom_startup(struct usb_serial *serial);
 static int  cypress_ca42v2_startup(struct usb_serial *serial);
 static void cypress_release(struct usb_serial *serial);
-static int  cypress_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+static int  cypress_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void cypress_close(struct usb_serial_port *port);
 static void cypress_dtr_rts(struct usb_serial_port *port, int on);
 static int  cypress_write(struct tty_struct *tty, struct usb_serial_port *port,
@@ -633,8 +632,7 @@ static void cypress_release(struct usb_serial *serial)
 }
 
 
-static int cypress_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	struct usb_serial *serial = port->serial;
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index f480809..ab3dd99 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -453,8 +453,7 @@ static int digi_write(struct tty_struct *tty, struct usb_serial_port *port,
 static void digi_write_bulk_callback(struct urb *urb);
 static int digi_write_room(struct tty_struct *tty);
 static int digi_chars_in_buffer(struct tty_struct *tty);
-static int digi_open(struct tty_struct *tty, struct usb_serial_port *port,
-	struct file *filp);
+static int digi_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void digi_close(struct usb_serial_port *port);
 static int digi_carrier_raised(struct usb_serial_port *port);
 static void digi_dtr_rts(struct usb_serial_port *port, int on);
@@ -1347,8 +1346,7 @@ static int digi_carrier_raised(struct usb_serial_port *port)
 	return 0;
 }
 
-static int digi_open(struct tty_struct *tty, struct usb_serial_port *port,
-				struct file *filp)
+static int digi_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	int ret;
 	unsigned char buf[32];
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 80cb347..da559a7 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -79,8 +79,7 @@ static int debug;
 #define EMPEG_PRODUCT_ID		0x0001
 
 /* function prototypes for an empeg-car player */
-static int  empeg_open(struct tty_struct *tty, struct usb_serial_port *port,
-						struct file *filp);
+static int  empeg_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void empeg_close(struct usb_serial_port *port);
 static int  empeg_write(struct tty_struct *tty, struct usb_serial_port *port,
 						const unsigned char *buf,
@@ -142,8 +141,7 @@ static int		bytes_out;
 /******************************************************************************
  * Empeg specific driver functions
  ******************************************************************************/
-static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port,
-				struct file *filp)
+static int empeg_open(struct tty_struct *tty,struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	int result = 0;
@@ -151,7 +149,7 @@ static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port,
 	dbg("%s - port %d", __func__, port->number);
 
 	/* Force default termio settings */
-	empeg_set_termios(tty, port, NULL) ;
+	empeg_set_termios(tty, port, NULL);
 
 	bytes_in = 0;
 	bytes_out = 0;
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 8fec5d4..76a17f9 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -747,8 +747,7 @@ static int  ftdi_sio_probe(struct usb_serial *serial,
 					const struct usb_device_id *id);
 static int  ftdi_sio_port_probe(struct usb_serial_port *port);
 static int  ftdi_sio_port_remove(struct usb_serial_port *port);
-static int  ftdi_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+static int  ftdi_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void ftdi_close(struct usb_serial_port *port);
 static void ftdi_dtr_rts(struct usb_serial_port *port, int on);
 static int  ftdi_write(struct tty_struct *tty, struct usb_serial_port *port,
@@ -1680,8 +1679,7 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port)
 	return 0;
 }
 
-static int ftdi_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
 { /* ftdi_open */
 	struct usb_device *dev = port->serial->dev;
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 8839f1c..20432d3 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -933,8 +933,7 @@ static int garmin_init_session(struct usb_serial_port *port)
 
 
 
-static int garmin_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int garmin_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	unsigned long flags;
 	int status = 0;
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index ce57f6a..d9398e9 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -114,8 +114,7 @@ void usb_serial_generic_deregister(void)
 #endif
 }
 
-int usb_serial_generic_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	int result = 0;
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index 0191693..dc0f832 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -205,8 +205,7 @@ static void edge_bulk_out_data_callback(struct urb *urb);
 static void edge_bulk_out_cmd_callback(struct urb *urb);
 
 /* function prototypes for the usbserial callbacks */
-static int edge_open(struct tty_struct *tty, struct usb_serial_port *port,
-					struct file *filp);
+static int edge_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void edge_close(struct usb_serial_port *port);
 static int edge_write(struct tty_struct *tty, struct usb_serial_port *port,
 					const unsigned char *buf, int count);
@@ -852,8 +851,7 @@ static void edge_bulk_out_cmd_callback(struct urb *urb)
  *	If successful, we return 0
  *	Otherwise we return a negative error number.
  *****************************************************************************/
-static int edge_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct edgeport_port *edge_port = usb_get_serial_port_data(port);
 	struct usb_serial *serial;
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index e8bc42f..d4cc0f7 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -1831,8 +1831,7 @@ static void edge_bulk_out_callback(struct urb *urb)
 	tty_kref_put(tty);
 }
 
-static int edge_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct edgeport_port *edge_port = usb_get_serial_port_data(port);
 	struct edgeport_serial *edge_serial;
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 2545d45..24fcc64 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -75,7 +75,7 @@ static int initial_wait;
 
 /* Function prototypes for an ipaq */
 static int  ipaq_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+			struct usb_serial_port *port);
 static void ipaq_close(struct usb_serial_port *port);
 static int  ipaq_calc_num_ports(struct usb_serial *serial);
 static int  ipaq_startup(struct usb_serial *serial);
@@ -587,7 +587,7 @@ static int		bytes_in;
 static int		bytes_out;
 
 static int ipaq_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+			struct usb_serial_port *port)
 {
 	struct usb_serial	*serial = port->serial;
 	struct ipaq_private	*priv;
@@ -628,11 +628,6 @@ static int ipaq_open(struct tty_struct *tty,
 		priv->free_len += PACKET_SIZE;
 	}
 
-	if (tty) {
-		/* FIXME: These two are bogus */
-		tty->raw = 1;
-		tty->real_raw = 1;
-	}
 	/*
 	 * Lose the small buffers usbserial provides. Make larger ones.
 	 */
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c
index 29ad038..727d323 100644
--- a/drivers/usb/serial/ipw.c
+++ b/drivers/usb/serial/ipw.c
@@ -193,8 +193,7 @@ static void ipw_read_bulk_callback(struct urb *urb)
 	return;
 }
 
-static int ipw_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_device *dev = port->serial->dev;
 	u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT;
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 66009b6..95d8d26 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -86,8 +86,7 @@ static int buffer_size;
 static int xbof = -1;
 
 static int  ir_startup (struct usb_serial *serial);
-static int  ir_open(struct tty_struct *tty, struct usb_serial_port *port,
-					struct file *filep);
+static int  ir_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void ir_close(struct usb_serial_port *port);
 static int  ir_write(struct tty_struct *tty, struct usb_serial_port *port,
 					const unsigned char *buf, int count);
@@ -296,8 +295,7 @@ static int ir_startup(struct usb_serial *serial)
 	return 0;
 }
 
-static int ir_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int ir_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	char *buffer;
 	int result = 0;
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 96873a7..f3f9be0 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -1018,8 +1018,7 @@ static void iuu_close(struct usb_serial_port *port)
 	}
 }
 
-static int iuu_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	u8 *buf;
@@ -1077,7 +1076,7 @@ static int iuu_open(struct tty_struct *tty,
 		tty->termios->c_iflag = 0;
 		priv->termios_initialized = 1;
 		priv->poll = 0;
-	 }
+	}
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 	/* initialize writebuf */
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 2594b87..f8c4b07 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -1209,8 +1209,7 @@ static int keyspan_write_room(struct tty_struct *tty)
 }
 
 
-static int keyspan_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct keyspan_port_private 	*p_priv;
 	struct keyspan_serial_private 	*s_priv;
diff --git a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h
index 3107ed1..30771e5 100644
--- a/drivers/usb/serial/keyspan.h
+++ b/drivers/usb/serial/keyspan.h
@@ -36,8 +36,7 @@
 
 /* Function prototypes for Keyspan serial converter */
 static int  keyspan_open		(struct tty_struct *tty,
-					 struct usb_serial_port *port,
-					 struct file *filp);
+					 struct usb_serial_port *port);
 static void keyspan_close		(struct usb_serial_port *port);
 static void keyspan_dtr_rts		(struct usb_serial_port *port, int on);
 static int  keyspan_startup		(struct usb_serial *serial);
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index d0b12e4..257c16c 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -681,7 +681,7 @@ static int keyspan_pda_carrier_raised(struct usb_serial_port *port)
 
 
 static int keyspan_pda_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+					struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	unsigned char room;
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index 0f44bb8..a616731 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -75,8 +75,7 @@ static int debug;
 static int  klsi_105_startup(struct usb_serial *serial);
 static void klsi_105_disconnect(struct usb_serial *serial);
 static void klsi_105_release(struct usb_serial *serial);
-static int  klsi_105_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+static int  klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void klsi_105_close(struct usb_serial_port *port);
 static int  klsi_105_write(struct tty_struct *tty,
 	struct usb_serial_port *port, const unsigned char *buf, int count);
@@ -358,8 +357,7 @@ static void klsi_105_release(struct usb_serial *serial)
 	}
 } /* klsi_105_release */
 
-static int  klsi_105_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int  klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct klsi_105_private *priv = usb_get_serial_port_data(port);
 	int retval = 0;
@@ -371,10 +369,6 @@ static int  klsi_105_open(struct tty_struct *tty,
 
 	dbg("%s port %d", __func__, port->number);
 
-	/* force low_latency on so that our tty_push actually forces
-	 * the data through
-	 * tty->low_latency = 1; */
-
 	/* Do a defined restart:
 	 * Set up sane default baud rate and send the 'READ_ON'
 	 * vendor command.
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 6db0e56..9790157 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -70,8 +70,7 @@ static int debug;
 /* Function prototypes */
 static int  kobil_startup(struct usb_serial *serial);
 static void kobil_release(struct usb_serial *serial);
-static int  kobil_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+static int  kobil_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void kobil_close(struct usb_serial_port *port);
 static int  kobil_write(struct tty_struct *tty, struct usb_serial_port *port,
 			 const unsigned char *buf, int count);
@@ -211,8 +210,7 @@ static void kobil_release(struct usb_serial *serial)
 }
 
 
-static int kobil_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	int result = 0;
 	struct kobil_private *priv;
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index d8825e1..d501aef 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -93,8 +93,7 @@ static int debug;
  */
 static int  mct_u232_startup(struct usb_serial *serial);
 static void mct_u232_release(struct usb_serial *serial);
-static int  mct_u232_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+static int  mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void mct_u232_close(struct usb_serial_port *port);
 static void mct_u232_dtr_rts(struct usb_serial_port *port, int on);
 static void mct_u232_read_int_callback(struct urb *urb);
@@ -421,8 +420,7 @@ static void mct_u232_release(struct usb_serial *serial)
 	}
 } /* mct_u232_release */
 
-static int  mct_u232_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int  mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	struct mct_u232_private *priv = usb_get_serial_port_data(port);
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 4342a8a..763e32a 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -319,8 +319,7 @@ static int send_mos_cmd(struct usb_serial *serial, __u8 request, __u16 value,
 	return status;
 }
 
-static int mos7720_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int mos7720_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial *serial;
 	struct usb_serial_port *port0;
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index b93f0f9..f11abf5 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -824,8 +824,7 @@ static int mos7840_serial_probe(struct usb_serial *serial,
  *	Otherwise we return a negative error number.
  *****************************************************************************/
 
-static int mos7840_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	int response;
 	int j;
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c
index f5f3751..5ceaa4c 100644
--- a/drivers/usb/serial/navman.c
+++ b/drivers/usb/serial/navman.c
@@ -80,8 +80,7 @@ exit:
 			__func__, result);
 }
 
-static int navman_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int navman_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	int result = 0;
 
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 56857dd..0622650 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -64,8 +64,7 @@ static int debug;
 #define BT_IGNITIONPRO_ID	0x2000
 
 /* function prototypes */
-static int  omninet_open(struct tty_struct *tty, struct usb_serial_port *port,
-							struct file *filp);
+static int  omninet_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void omninet_close(struct usb_serial_port *port);
 static void omninet_read_bulk_callback(struct urb *urb);
 static void omninet_write_bulk_callback(struct urb *urb);
@@ -163,8 +162,7 @@ static int omninet_attach(struct usb_serial *serial)
 	return 0;
 }
 
-static int omninet_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int omninet_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial	*serial = port->serial;
 	struct usb_serial_port	*wport;
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index 336bba7..1085a57 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -144,8 +144,7 @@ exit:
 	spin_unlock(&priv->lock);
 }
 
-static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port,
-			struct file *filp)
+static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct opticon_private *priv = usb_get_serial_data(port->serial);
 	unsigned long flags;
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index c784ddb..fe47051 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -45,8 +45,7 @@
 /* Function prototypes */
 static int  option_probe(struct usb_serial *serial,
 			const struct usb_device_id *id);
-static int  option_open(struct tty_struct *tty, struct usb_serial_port *port,
-							struct file *filp);
+static int  option_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void option_close(struct usb_serial_port *port);
 static void option_dtr_rts(struct usb_serial_port *port, int on);
 
@@ -961,8 +960,7 @@ static int option_chars_in_buffer(struct tty_struct *tty)
 	return data_len;
 }
 
-static int option_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int option_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct option_port_private *portdata;
 	int i, err;
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index 3cece27..e90f88a 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -141,8 +141,7 @@ struct oti6858_control_pkt {
 	  && ((a)->frame_fmt == (priv)->pending_setup.frame_fmt))
 
 /* function prototypes */
-static int oti6858_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void oti6858_close(struct usb_serial_port *port);
 static void oti6858_set_termios(struct tty_struct *tty,
 			struct usb_serial_port *port, struct ktermios *old);
@@ -566,8 +565,7 @@ static void oti6858_set_termios(struct tty_struct *tty,
 	spin_unlock_irqrestore(&priv->lock, flags);
 }
 
-static int oti6858_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct oti6858_private *priv = usb_get_serial_port_data(port);
 	struct ktermios tmp_termios;
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 3e86815..a63ea99 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -691,8 +691,7 @@ static void pl2303_close(struct usb_serial_port *port)
 
 }
 
-static int pl2303_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct ktermios tmp_termios;
 	struct usb_serial *serial = port->serial;
@@ -714,8 +713,6 @@ static int pl2303_open(struct tty_struct *tty,
 	if (tty)
 		pl2303_set_termios(tty, port, &tmp_termios);
 
-	/* FIXME: need to assert RTS and DTR if CRTSCTS off */
-
 	dbg("%s - submitting read urb", __func__);
 	port->read_urb->dev = serial->dev;
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index f48d05e..55391bb 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -734,8 +734,7 @@ static void sierra_close(struct usb_serial_port *port)
 	}
 }
 
-static int sierra_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct sierra_port_private *portdata;
 	struct usb_serial *serial = port->serial;
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
index 3c249d8..8b312a0 100644
--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -623,8 +623,7 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
 
 /* open the serial port. do some usb system call. set termios and get the line
  * status of the device. then submit the read urb */
-static int spcp8x5_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct ktermios tmp_termios;
 	struct usb_serial *serial = port->serial;
@@ -658,8 +657,6 @@ static int spcp8x5_open(struct tty_struct *tty,
 	priv->line_status = status & 0xf0 ;
 	spin_unlock_irqrestore(&priv->lock, flags);
 
-	/* FIXME: need to assert RTS and DTR if CRTSCTS off */
-
 	dbg("%s - submitting read urb", __func__);
 	port->read_urb->dev = serial->dev;
 	ret = usb_submit_urb(port->read_urb, GFP_KERNEL);
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c
index 6157fac..cb7e95f 100644
--- a/drivers/usb/serial/symbolserial.c
+++ b/drivers/usb/serial/symbolserial.c
@@ -124,8 +124,7 @@ exit:
 	spin_unlock(&priv->lock);
 }
 
-static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port,
-			struct file *filp)
+static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct symbol_private *priv = usb_get_serial_data(port->serial);
 	unsigned long flags;
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 3bc609f..1e9dc88 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -98,8 +98,7 @@ struct ti_device {
 
 static int ti_startup(struct usb_serial *serial);
 static void ti_release(struct usb_serial *serial);
-static int ti_open(struct tty_struct *tty, struct usb_serial_port *port,
-		struct file *file);
+static int ti_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void ti_close(struct usb_serial_port *port);
 static int ti_write(struct tty_struct *tty, struct usb_serial_port *port,
 		const unsigned char *data, int count);
@@ -492,8 +491,7 @@ static void ti_release(struct usb_serial *serial)
 }
 
 
-static int ti_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *file)
+static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct ti_port *tport = usb_get_serial_port_data(port);
 	struct ti_device *tdev;
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 31c7a09..3dda684 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -244,7 +244,7 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
 
 		/* only call the device specific open if this
 		 * is the first time the port is opened */
-		retval = serial->type->open(tty, port, filp);
+		retval = serial->type->open(tty, port);
 		if (retval)
 			goto bailout_interface_put;
 		mutex_unlock(&serial->disc_mutex);
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
index 6148009..7b5bfc4 100644
--- a/drivers/usb/serial/usb_debug.c
+++ b/drivers/usb/serial/usb_debug.c
@@ -43,11 +43,10 @@ static struct usb_driver debug_driver = {
 	.no_dynamic_id = 	1,
 };
 
-static int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port,
-							struct file *filp)
+static int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	port->bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE;
-	return usb_serial_generic_open(tty, port, filp);
+	return usb_serial_generic_open(tty, port);
 }
 
 /* This HW really does not support a serial break, so one will be
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index f5d0f64..1aa5d20 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -36,8 +36,7 @@
 #define DRIVER_DESC "USB HandSpring Visor / Palm OS driver"
 
 /* function prototypes for a handspring visor */
-static int  visor_open(struct tty_struct *tty, struct usb_serial_port *port,
-					struct file *filp);
+static int  visor_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void visor_close(struct usb_serial_port *port);
 static int  visor_write(struct tty_struct *tty, struct usb_serial_port *port,
 					const unsigned char *buf, int count);
@@ -273,8 +272,7 @@ static int stats;
 /******************************************************************************
  * Handspring Visor specific driver functions
  ******************************************************************************/
-static int visor_open(struct tty_struct *tty, struct usb_serial_port *port,
-							struct file *filp)
+static int visor_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	struct visor_private *priv = usb_get_serial_port_data(port);
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 8d126dd..81f2ae5 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -146,7 +146,7 @@ static int  whiteheat_firmware_attach(struct usb_serial *serial);
 static int  whiteheat_attach(struct usb_serial *serial);
 static void whiteheat_release(struct usb_serial *serial);
 static int  whiteheat_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+			struct usb_serial_port *port);
 static void whiteheat_close(struct usb_serial_port *port);
 static int  whiteheat_write(struct tty_struct *tty,
 			struct usb_serial_port *port,
@@ -659,8 +659,7 @@ static void whiteheat_release(struct usb_serial *serial)
 	return;
 }
 
-static int whiteheat_open(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp)
+static int whiteheat_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	int		retval = 0;
 
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 0ec50ba..1cbaf4a 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -238,9 +238,8 @@ struct usb_serial_driver {
 	int (*resume)(struct usb_serial *serial);
 
 	/* serial function calls */
-	/* Called by console with tty = NULL and by tty */
-	int  (*open)(struct tty_struct *tty,
-			struct usb_serial_port *port, struct file *filp);
+	/* Called by console and by the tty layer */
+	int  (*open)(struct tty_struct *tty, struct usb_serial_port *port);
 	void (*close)(struct usb_serial_port *port);
 	int  (*write)(struct tty_struct *tty, struct usb_serial_port *port,
 			const unsigned char *buf, int count);
@@ -300,7 +299,7 @@ static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
 extern struct usb_serial *usb_serial_get_by_index(unsigned int minor);
 extern void usb_serial_put(struct usb_serial *serial);
 extern int usb_serial_generic_open(struct tty_struct *tty,
-		struct usb_serial_port *port, struct file *filp);
+	struct usb_serial_port *port);
 extern int usb_serial_generic_write(struct tty_struct *tty,
 	struct usb_serial_port *port, const unsigned char *buf, int count);
 extern void usb_serial_generic_close(struct usb_serial_port *port);
-- 
1.6.4.2


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

* [PATCH 45/79] isicom: split the open method for the isicom device
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (43 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 44/79] tty: USB does not need the filp argument in the drivers Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 46/79] serial: kill off uart_info Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

From: Alan Cox <alan@linux.intel.com>

Again moving towards being able to add a common open method

Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 drivers/char/isicom.c |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 08f5743..426bfdd 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -846,37 +846,53 @@ static int isicom_carrier_raised(struct tty_port *port)
 	return (ip->status & ISI_DCD)?1 : 0;
 }
 
-static int isicom_open(struct tty_struct *tty, struct file *filp)
+static struct tty_port *isicom_find_port(struct tty_struct *tty)
 {
 	struct isi_port *port;
 	struct isi_board *card;
 	unsigned int board;
-	int error, line;
+	int line = tty->index;
 
-	line = tty->index;
 	if (line < 0 || line > PORT_COUNT-1)
-		return -ENODEV;
+		return NULL;
 	board = BOARD(line);
 	card = &isi_card[board];
 
 	if (!(card->status & FIRMWARE_LOADED))
-		return -ENODEV;
+		return NULL;
 
 	/*  open on a port greater than the port count for the card !!! */
 	if (line > ((board * 16) + card->port_count - 1))
-		return -ENODEV;
+		return NULL;
 
 	port = &isi_ports[line];
 	if (isicom_paranoia_check(port, tty->name, "isicom_open"))
-		return -ENODEV;
+		return NULL;
+
+	return &port->port;
+}
+	
+static int isicom_open(struct tty_struct *tty, struct file *filp)
+{
+	struct isi_port *port;
+	struct isi_board *card;
+	struct tty_port *tport;
+	int error = 0;
 
+	tport = isicom_find_port(tty);
+	if (tport == NULL)
+		return -ENODEV;
+	port = container_of(tport, struct isi_port, port);
+	card = &isi_card[BOARD(tty->index)];
 	isicom_setup_board(card);
 
 	/* FIXME: locking on port.count etc */
 	port->port.count++;
 	tty->driver_data = port;
 	tty_port_tty_set(&port->port, tty);
-	error = isicom_setup_port(tty);
+	/* FIXME: Locking on Initialized flag */
+	if (!test_bit(ASYNCB_INITIALIZED, &tport->flags))
+		error = isicom_setup_port(tty);
 	if (error == 0)
 		error = tty_port_block_til_ready(&port->port, tty, filp);
 	return error;
-- 
1.6.4.2


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

* [PATCH 46/79] serial: kill off uart_info
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (44 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 45/79] isicom: split the open method for the isicom device Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 47/79] serial: Fold closing_* fields into the tty_port ones Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

We moved this into uart_state, now move the fields out of the separate
structure and kill it off.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 arch/mn10300/kernel/asm-offsets.c       |    6 +-
 drivers/serial/21285.c                  |    8 +-
 drivers/serial/8250.c                   |   10 +-
 drivers/serial/amba-pl010.c             |    6 +-
 drivers/serial/amba-pl011.c             |    6 +-
 drivers/serial/atmel_serial.c           |   14 +-
 drivers/serial/bfin_5xx.c               |   20 +-
 drivers/serial/bfin_sport_uart.c        |    6 +-
 drivers/serial/clps711x.c               |    4 +-
 drivers/serial/cpm_uart/cpm_uart_core.c |    2 +-
 drivers/serial/dz.c                     |    6 +-
 drivers/serial/icom.c                   |   16 +-
 drivers/serial/imx.c                    |   16 +-
 drivers/serial/ioc3_serial.c            |   52 +++---
 drivers/serial/ioc4_serial.c            |   66 ++++----
 drivers/serial/ip22zilog.c              |   14 +-
 drivers/serial/jsm/jsm_neo.c            |    2 +-
 drivers/serial/jsm/jsm_tty.c            |   20 +-
 drivers/serial/m32r_sio.c               |    6 +-
 drivers/serial/max3100.c                |   16 +-
 drivers/serial/mcf.c                    |    4 +-
 drivers/serial/mpc52xx_uart.c           |    4 +-
 drivers/serial/mpsc.c                   |    4 +-
 drivers/serial/msm_serial.c             |    6 +-
 drivers/serial/mux.c                    |    4 +-
 drivers/serial/netx-serial.c            |    6 +-
 drivers/serial/nwpserial.c              |    4 +-
 drivers/serial/pmac_zilog.c             |   12 +-
 drivers/serial/pnx8xxx_uart.c           |    8 +-
 drivers/serial/pxa.c                    |    6 +-
 drivers/serial/sa1100.c                 |    8 +-
 drivers/serial/samsung.c                |    8 +-
 drivers/serial/sb1250-duart.c           |    6 +-
 drivers/serial/sc26xx.c                 |   10 +-
 drivers/serial/serial_core.c            |  286 +++++++++++++++----------------
 drivers/serial/serial_ks8695.c          |    6 +-
 drivers/serial/serial_lh7a40x.c         |    6 +-
 drivers/serial/serial_txx9.c            |    4 +-
 drivers/serial/sh-sci.c                 |   10 +-
 drivers/serial/sn_console.c             |   22 ++--
 drivers/serial/sunhv.c                  |    8 +-
 drivers/serial/sunsab.c                 |   10 +-
 drivers/serial/sunsu.c                  |    6 +-
 drivers/serial/sunzilog.c               |   14 +-
 drivers/serial/timbuart.c               |   10 +-
 drivers/serial/uartlite.c               |    6 +-
 drivers/serial/ucc_uart.c               |    4 +-
 drivers/serial/vr41xx_siu.c             |    6 +-
 drivers/serial/zs.c                     |    6 +-
 include/linux/serial_core.h             |   64 ++++----
 50 files changed, 422 insertions(+), 432 deletions(-)

diff --git a/arch/mn10300/kernel/asm-offsets.c b/arch/mn10300/kernel/asm-offsets.c
index 2646fcb..82b4007 100644
--- a/arch/mn10300/kernel/asm-offsets.c
+++ b/arch/mn10300/kernel/asm-offsets.c
@@ -95,7 +95,7 @@ void foo(void)
 	OFFSET(__iobase,		mn10300_serial_port, _iobase);
 
 	DEFINE(__UART_XMIT_SIZE,	UART_XMIT_SIZE);
-	OFFSET(__xmit_buffer,		uart_info, xmit.buf);
-	OFFSET(__xmit_head,		uart_info, xmit.head);
-	OFFSET(__xmit_tail,		uart_info, xmit.tail);
+	OFFSET(__xmit_buffer,		uart_state, xmit.buf);
+	OFFSET(__xmit_head,		uart_state, xmit.head);
+	OFFSET(__xmit_tail,		uart_state, xmit.tail);
 }
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index cb6d85d..1e3d193 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -86,7 +86,7 @@ static void serial21285_enable_ms(struct uart_port *port)
 static irqreturn_t serial21285_rx_chars(int irq, void *dev_id)
 {
 	struct uart_port *port = dev_id;
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	unsigned int status, ch, flag, rxs, max_count = 256;
 
 	status = *CSR_UARTFLG;
@@ -124,7 +124,7 @@ static irqreturn_t serial21285_rx_chars(int irq, void *dev_id)
 static irqreturn_t serial21285_tx_chars(int irq, void *dev_id)
 {
 	struct uart_port *port = dev_id;
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 	int count = 256;
 
 	if (port->x_char) {
@@ -235,8 +235,8 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
 	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
 	quot = uart_get_divisor(port, baud);
 
-	if (port->info && port->info->port.tty) {
-		struct tty_struct *tty = port->info->port.tty;
+	if (port->state && port->state->port.tty) {
+		struct tty_struct *tty = port->state->port.tty;
 		unsigned int b = port->uartclk / (16 * quot);
 		tty_encode_baud_rate(tty, b, b);
 	}
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 1fd4894..e415c5e 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1382,7 +1382,7 @@ static void serial8250_enable_ms(struct uart_port *port)
 static void
 receive_chars(struct uart_8250_port *up, unsigned int *status)
 {
-	struct tty_struct *tty = up->port.info->port.tty;
+	struct tty_struct *tty = up->port.state->port.tty;
 	unsigned char ch, lsr = *status;
 	int max_count = 256;
 	char flag;
@@ -1457,7 +1457,7 @@ ignore_char:
 
 static void transmit_chars(struct uart_8250_port *up)
 {
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 	int count;
 
 	if (up->port.x_char) {
@@ -1500,7 +1500,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
 	status |= up->msr_saved_flags;
 	up->msr_saved_flags = 0;
 	if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI &&
-	    up->port.info != NULL) {
+	    up->port.state != NULL) {
 		if (status & UART_MSR_TERI)
 			up->port.icount.rng++;
 		if (status & UART_MSR_DDSR)
@@ -1510,7 +1510,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
 		if (status & UART_MSR_DCTS)
 			uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-		wake_up_interruptible(&up->port.info->delta_msr_wait);
+		wake_up_interruptible(&up->port.state->delta_msr_wait);
 	}
 
 	return status;
@@ -1764,7 +1764,7 @@ static void serial8250_backup_timeout(unsigned long data)
 	up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
 	spin_unlock_irqrestore(&up->port.lock, flags);
 	if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) &&
-	    (!uart_circ_empty(&up->port.info->xmit) || up->port.x_char) &&
+	    (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) &&
 	    (lsr & UART_LSR_THRE)) {
 		iir &= ~(UART_IIR_ID | UART_IIR_NO_INT);
 		iir |= UART_IIR_THRI;
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 58a4879..3903241 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -117,7 +117,7 @@ static void pl010_enable_ms(struct uart_port *port)
 
 static void pl010_rx_chars(struct uart_amba_port *uap)
 {
-	struct tty_struct *tty = uap->port.info->port.tty;
+	struct tty_struct *tty = uap->port.state->port.tty;
 	unsigned int status, ch, flag, rsr, max_count = 256;
 
 	status = readb(uap->port.membase + UART01x_FR);
@@ -172,7 +172,7 @@ static void pl010_rx_chars(struct uart_amba_port *uap)
 
 static void pl010_tx_chars(struct uart_amba_port *uap)
 {
-	struct circ_buf *xmit = &uap->port.info->xmit;
+	struct circ_buf *xmit = &uap->port.state->xmit;
 	int count;
 
 	if (uap->port.x_char) {
@@ -225,7 +225,7 @@ static void pl010_modem_status(struct uart_amba_port *uap)
 	if (delta & UART01x_FR_CTS)
 		uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS);
 
-	wake_up_interruptible(&uap->port.info->delta_msr_wait);
+	wake_up_interruptible(&uap->port.state->delta_msr_wait);
 }
 
 static irqreturn_t pl010_int(int irq, void *dev_id)
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 72ba0c6..ef82a34 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -124,7 +124,7 @@ static void pl011_enable_ms(struct uart_port *port)
 
 static void pl011_rx_chars(struct uart_amba_port *uap)
 {
-	struct tty_struct *tty = uap->port.info->port.tty;
+	struct tty_struct *tty = uap->port.state->port.tty;
 	unsigned int status, ch, flag, max_count = 256;
 
 	status = readw(uap->port.membase + UART01x_FR);
@@ -175,7 +175,7 @@ static void pl011_rx_chars(struct uart_amba_port *uap)
 
 static void pl011_tx_chars(struct uart_amba_port *uap)
 {
-	struct circ_buf *xmit = &uap->port.info->xmit;
+	struct circ_buf *xmit = &uap->port.state->xmit;
 	int count;
 
 	if (uap->port.x_char) {
@@ -226,7 +226,7 @@ static void pl011_modem_status(struct uart_amba_port *uap)
 	if (delta & UART01x_FR_CTS)
 		uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS);
 
-	wake_up_interruptible(&uap->port.info->delta_msr_wait);
+	wake_up_interruptible(&uap->port.state->delta_msr_wait);
 }
 
 static irqreturn_t pl011_int(int irq, void *dev_id)
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 607d43a..963e3c1 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -427,7 +427,7 @@ static void atmel_rx_chars(struct uart_port *port)
  */
 static void atmel_tx_chars(struct uart_port *port)
 {
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	if (port->x_char && UART_GET_CSR(port) & ATMEL_US_TXRDY) {
 		UART_PUT_CHAR(port, port->x_char);
@@ -560,7 +560,7 @@ static irqreturn_t atmel_interrupt(int irq, void *dev_id)
 static void atmel_tx_dma(struct uart_port *port)
 {
 	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 	struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
 	int count;
 
@@ -663,14 +663,14 @@ static void atmel_rx_from_ring(struct uart_port *port)
 	 * uart_start(), which takes the lock.
 	 */
 	spin_unlock(&port->lock);
-	tty_flip_buffer_push(port->info->port.tty);
+	tty_flip_buffer_push(port->state->port.tty);
 	spin_lock(&port->lock);
 }
 
 static void atmel_rx_from_dma(struct uart_port *port)
 {
 	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	struct atmel_dma_buffer *pdc;
 	int rx_idx = atmel_port->pdc_rx_idx;
 	unsigned int head;
@@ -776,7 +776,7 @@ static void atmel_tasklet_func(unsigned long data)
 		if (status_change & ATMEL_US_CTS)
 			uart_handle_cts_change(port, !(status & ATMEL_US_CTS));
 
-		wake_up_interruptible(&port->info->delta_msr_wait);
+		wake_up_interruptible(&port->state->delta_msr_wait);
 
 		atmel_port->irq_status_prev = status;
 	}
@@ -795,7 +795,7 @@ static void atmel_tasklet_func(unsigned long data)
 static int atmel_startup(struct uart_port *port)
 {
 	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	int retval;
 
 	/*
@@ -854,7 +854,7 @@ static int atmel_startup(struct uart_port *port)
 	}
 	if (atmel_use_dma_tx(port)) {
 		struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
-		struct circ_buf *xmit = &port->info->xmit;
+		struct circ_buf *xmit = &port->state->xmit;
 
 		pdc->buf = xmit->buf;
 		pdc->dma_addr = dma_map_single(port->dev,
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 4fff4e5..50abb7e 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -144,7 +144,7 @@ static void bfin_serial_stop_tx(struct uart_port *port)
 {
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
 #ifdef CONFIG_SERIAL_BFIN_DMA
-	struct circ_buf *xmit = &uart->port.info->xmit;
+	struct circ_buf *xmit = &uart->port.state->xmit;
 #endif
 
 	while (!(UART_GET_LSR(uart) & TEMT))
@@ -171,7 +171,7 @@ static void bfin_serial_stop_tx(struct uart_port *port)
 static void bfin_serial_start_tx(struct uart_port *port)
 {
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
-	struct tty_struct *tty = uart->port.info->port.tty;
+	struct tty_struct *tty = uart->port.state->port.tty;
 
 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
 	if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
@@ -243,10 +243,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
 			return;
 		}
 
-	if (!uart->port.info || !uart->port.info->port.tty)
+	if (!uart->port.state || !uart->port.state->port.tty)
 		return;
 #endif
-	tty = uart->port.info->port.tty;
+	tty = uart->port.state->port.tty;
 
 	if (ANOMALY_05000363) {
 		/* The BF533 (and BF561) family of processors have a nice anomaly
@@ -331,7 +331,7 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
 
 static void bfin_serial_tx_chars(struct bfin_serial_port *uart)
 {
-	struct circ_buf *xmit = &uart->port.info->xmit;
+	struct circ_buf *xmit = &uart->port.state->xmit;
 
 	if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) {
 #ifdef CONFIG_BF54x
@@ -398,7 +398,7 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
 #ifdef CONFIG_SERIAL_BFIN_DMA
 static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
 {
-	struct circ_buf *xmit = &uart->port.info->xmit;
+	struct circ_buf *xmit = &uart->port.state->xmit;
 
 	uart->tx_done = 0;
 
@@ -436,7 +436,7 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
 
 static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
 {
-	struct tty_struct *tty = uart->port.info->port.tty;
+	struct tty_struct *tty = uart->port.state->port.tty;
 	int i, flg, status;
 
 	status = UART_GET_LSR(uart);
@@ -529,7 +529,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
 static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
 {
 	struct bfin_serial_port *uart = dev_id;
-	struct circ_buf *xmit = &uart->port.info->xmit;
+	struct circ_buf *xmit = &uart->port.state->xmit;
 
 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
 	if (uart->scts && !(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
@@ -965,10 +965,10 @@ static void bfin_serial_set_ldisc(struct uart_port *port)
 	int line = port->line;
 	unsigned short val;
 
-	if (line >= port->info->port.tty->driver->num)
+	if (line >= port->state->port.tty->driver->num)
 		return;
 
-	switch (port->info->port.tty->termios->c_line) {
+	switch (port->state->port.tty->termios->c_line) {
 	case N_IRDA:
 		val = UART_GET_GCTL(&bfin_serial_ports[line]);
 		val |= (IREN | RPOLC);
diff --git a/drivers/serial/bfin_sport_uart.c b/drivers/serial/bfin_sport_uart.c
index c108b1a..088bb35 100644
--- a/drivers/serial/bfin_sport_uart.c
+++ b/drivers/serial/bfin_sport_uart.c
@@ -178,7 +178,7 @@ static int sport_uart_setup(struct sport_uart_port *up, int sclk, int baud_rate)
 static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id)
 {
 	struct sport_uart_port *up = dev_id;
-	struct tty_struct *tty = up->port.info->port.tty;
+	struct tty_struct *tty = up->port.state->port.tty;
 	unsigned int ch;
 
 	do {
@@ -205,7 +205,7 @@ static irqreturn_t sport_uart_tx_irq(int irq, void *dev_id)
 static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
 {
 	struct sport_uart_port *up = dev_id;
-	struct tty_struct *tty = up->port.info->port.tty;
+	struct tty_struct *tty = up->port.state->port.tty;
 	unsigned int stat = SPORT_GET_STAT(up);
 
 	/* Overflow in RX FIFO */
@@ -290,7 +290,7 @@ fail1:
 
 static void sport_uart_tx_chars(struct sport_uart_port *up)
 {
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 
 	if (SPORT_GET_STAT(up) & TXF)
 		return;
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c
index 80e7642..b6acd19 100644
--- a/drivers/serial/clps711x.c
+++ b/drivers/serial/clps711x.c
@@ -93,7 +93,7 @@ static void clps711xuart_enable_ms(struct uart_port *port)
 static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id)
 {
 	struct uart_port *port = dev_id;
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	unsigned int status, ch, flg;
 
 	status = clps_readl(SYSFLG(port));
@@ -147,7 +147,7 @@ static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id)
 static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
 {
 	struct uart_port *port = dev_id;
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 	int count;
 
 	if (port->x_char) {
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index f8df068..8d349b2 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -244,7 +244,7 @@ static void cpm_uart_int_rx(struct uart_port *port)
 	int i;
 	unsigned char ch;
 	u8 *cp;
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
 	cbd_t __iomem *bdp;
 	u16 status;
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c
index 6042b87..57421d7 100644
--- a/drivers/serial/dz.c
+++ b/drivers/serial/dz.c
@@ -197,7 +197,7 @@ static inline void dz_receive_chars(struct dz_mux *mux)
 	while ((status = dz_in(dport, DZ_RBUF)) & DZ_DVAL) {
 		dport = &mux->dport[LINE(status)];
 		uport = &dport->port;
-		tty = uport->info->port.tty;	/* point to the proper dev */
+		tty = uport->state->port.tty;	/* point to the proper dev */
 
 		ch = UCHAR(status);		/* grab the char */
 		flag = TTY_NORMAL;
@@ -249,7 +249,7 @@ static inline void dz_receive_chars(struct dz_mux *mux)
 	}
 	for (i = 0; i < DZ_NB_PORT; i++)
 		if (lines_rx[i])
-			tty_flip_buffer_push(mux->dport[i].port.info->port.tty);
+			tty_flip_buffer_push(mux->dport[i].port.state->port.tty);
 }
 
 /*
@@ -268,7 +268,7 @@ static inline void dz_transmit_chars(struct dz_mux *mux)
 
 	status = dz_in(dport, DZ_CSR);
 	dport = &mux->dport[LINE(status)];
-	xmit = &dport->port.info->xmit;
+	xmit = &dport->port.state->xmit;
 
 	if (dport->port.x_char) {		/* XON/XOFF chars */
 		dz_out(dport, DZ_TDR, dport->port.x_char);
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 060f4e3..f86c47e 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -627,7 +627,7 @@ static int icom_write(struct uart_port *port)
 	unsigned long data_count;
 	unsigned char cmdReg;
 	unsigned long offset;
-	int temp_tail = port->info->xmit.tail;
+	int temp_tail = port->state->xmit.tail;
 
 	trace(ICOM_PORT, "WRITE", 0);
 
@@ -638,11 +638,11 @@ static int icom_write(struct uart_port *port)
 	}
 
 	data_count = 0;
-	while ((port->info->xmit.head != temp_tail) &&
+	while ((port->state->xmit.head != temp_tail) &&
 	       (data_count <= XMIT_BUFF_SZ)) {
 
 		ICOM_PORT->xmit_buf[data_count++] =
-		    port->info->xmit.buf[temp_tail];
+		    port->state->xmit.buf[temp_tail];
 
 		temp_tail++;
 		temp_tail &= (UART_XMIT_SIZE - 1);
@@ -694,7 +694,7 @@ static inline void check_modem_status(struct icom_port *icom_port)
 			uart_handle_cts_change(&icom_port->uart_port,
 					       delta_status & ICOM_CTS);
 
-		wake_up_interruptible(&icom_port->uart_port.info->
+		wake_up_interruptible(&icom_port->uart_port.state->
 				      delta_msr_wait);
 		old_status = status;
 	}
@@ -718,10 +718,10 @@ static void xmit_interrupt(u16 port_int_reg, struct icom_port *icom_port)
 		icom_port->uart_port.icount.tx += count;
 
 		for (i=0; i<count &&
-			!uart_circ_empty(&icom_port->uart_port.info->xmit); i++) {
+			!uart_circ_empty(&icom_port->uart_port.state->xmit); i++) {
 
-			icom_port->uart_port.info->xmit.tail++;
-			icom_port->uart_port.info->xmit.tail &=
+			icom_port->uart_port.state->xmit.tail++;
+			icom_port->uart_port.state->xmit.tail &=
 				(UART_XMIT_SIZE - 1);
 		}
 
@@ -735,7 +735,7 @@ static void xmit_interrupt(u16 port_int_reg, struct icom_port *icom_port)
 static void recv_interrupt(u16 port_int_reg, struct icom_port *icom_port)
 {
 	short int count, rcv_buff;
-	struct tty_struct *tty = icom_port->uart_port.info->port.tty;
+	struct tty_struct *tty = icom_port->uart_port.state->port.tty;
 	unsigned short int status;
 	struct uart_icount *icount;
 	unsigned long offset;
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 7485afd..1febeaf 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -224,7 +224,7 @@ static void imx_mctrl_check(struct imx_port *sport)
 	if (changed & TIOCM_CTS)
 		uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-	wake_up_interruptible(&sport->port.info->delta_msr_wait);
+	wake_up_interruptible(&sport->port.state->delta_msr_wait);
 }
 
 /*
@@ -236,7 +236,7 @@ static void imx_timeout(unsigned long data)
 	struct imx_port *sport = (struct imx_port *)data;
 	unsigned long flags;
 
-	if (sport->port.info) {
+	if (sport->port.state) {
 		spin_lock_irqsave(&sport->port.lock, flags);
 		imx_mctrl_check(sport);
 		spin_unlock_irqrestore(&sport->port.lock, flags);
@@ -323,7 +323,7 @@ static void imx_enable_ms(struct uart_port *port)
 
 static inline void imx_transmit_buffer(struct imx_port *sport)
 {
-	struct circ_buf *xmit = &sport->port.info->xmit;
+	struct circ_buf *xmit = &sport->port.state->xmit;
 
 	while (!(readl(sport->port.membase + UTS) & UTS_TXFULL)) {
 		/* send xmit->buf[xmit->tail]
@@ -388,7 +388,7 @@ static irqreturn_t imx_rtsint(int irq, void *dev_id)
 
 	writel(USR1_RTSD, sport->port.membase + USR1);
 	uart_handle_cts_change(&sport->port, !!val);
-	wake_up_interruptible(&sport->port.info->delta_msr_wait);
+	wake_up_interruptible(&sport->port.state->delta_msr_wait);
 
 	spin_unlock_irqrestore(&sport->port.lock, flags);
 	return IRQ_HANDLED;
@@ -397,7 +397,7 @@ static irqreturn_t imx_rtsint(int irq, void *dev_id)
 static irqreturn_t imx_txint(int irq, void *dev_id)
 {
 	struct imx_port *sport = dev_id;
-	struct circ_buf *xmit = &sport->port.info->xmit;
+	struct circ_buf *xmit = &sport->port.state->xmit;
 	unsigned long flags;
 
 	spin_lock_irqsave(&sport->port.lock,flags);
@@ -427,7 +427,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)
 {
 	struct imx_port *sport = dev_id;
 	unsigned int rx,flg,ignored = 0;
-	struct tty_struct *tty = sport->port.info->port.tty;
+	struct tty_struct *tty = sport->port.state->port.tty;
 	unsigned long flags, temp;
 
 	spin_lock_irqsave(&sport->port.lock,flags);
@@ -900,11 +900,11 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
 	rational_best_approximation(16 * div * baud, sport->port.uartclk,
 		1 << 16, 1 << 16, &num, &denom);
 
-	if (port->info && port->info->port.tty) {
+	if (port->state && port->state->port.tty) {
 		tdiv64 = sport->port.uartclk;
 		tdiv64 *= num;
 		do_div(tdiv64, denom * 16 * div);
-		tty_encode_baud_rate(sport->port.info->port.tty,
+		tty_encode_baud_rate(sport->port.state->port.tty,
 				(speed_t)tdiv64, (speed_t)tdiv64);
 	}
 
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index ae3699d..de4ab1b 100644
--- a/drivers/serial/ioc3_serial.c
+++ b/drivers/serial/ioc3_serial.c
@@ -897,25 +897,25 @@ static void transmit_chars(struct uart_port *the_port)
 	char *start;
 	struct tty_struct *tty;
 	struct ioc3_port *port = get_ioc3_port(the_port);
-	struct uart_info *info;
+	struct uart_state *state;
 
 	if (!the_port)
 		return;
 	if (!port)
 		return;
 
-	info = the_port->info;
-	tty = info->port.tty;
+	state = the_port->state;
+	tty = state->port.tty;
 
-	if (uart_circ_empty(&info->xmit) || uart_tx_stopped(the_port)) {
+	if (uart_circ_empty(&state->xmit) || uart_tx_stopped(the_port)) {
 		/* Nothing to do or hw stopped */
 		set_notification(port, N_ALL_OUTPUT, 0);
 		return;
 	}
 
-	head = info->xmit.head;
-	tail = info->xmit.tail;
-	start = (char *)&info->xmit.buf[tail];
+	head = state->xmit.head;
+	tail = state->xmit.tail;
+	start = (char *)&state->xmit.buf[tail];
 
 	/* write out all the data or until the end of the buffer */
 	xmit_count = (head < tail) ? (UART_XMIT_SIZE - tail) : (head - tail);
@@ -928,14 +928,14 @@ static void transmit_chars(struct uart_port *the_port)
 			/* advance the pointers */
 			tail += result;
 			tail &= UART_XMIT_SIZE - 1;
-			info->xmit.tail = tail;
-			start = (char *)&info->xmit.buf[tail];
+			state->xmit.tail = tail;
+			start = (char *)&state->xmit.buf[tail];
 		}
 	}
-	if (uart_circ_chars_pending(&info->xmit) < WAKEUP_CHARS)
+	if (uart_circ_chars_pending(&state->xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(the_port);
 
-	if (uart_circ_empty(&info->xmit)) {
+	if (uart_circ_empty(&state->xmit)) {
 		set_notification(port, N_OUTPUT_LOWAT, 0);
 	} else {
 		set_notification(port, N_OUTPUT_LOWAT, 1);
@@ -956,7 +956,7 @@ ioc3_change_speed(struct uart_port *the_port,
 	unsigned int cflag;
 	int baud;
 	int new_parity = 0, new_parity_enable = 0, new_stop = 0, new_data = 8;
-	struct uart_info *info = the_port->info;
+	struct uart_state *state = the_port->state;
 
 	cflag = new_termios->c_cflag;
 
@@ -997,14 +997,14 @@ ioc3_change_speed(struct uart_port *the_port,
 
 	the_port->ignore_status_mask = N_ALL_INPUT;
 
-	info->port.tty->low_latency = 1;
+	state->port.tty->low_latency = 1;
 
-	if (I_IGNPAR(info->port.tty))
+	if (I_IGNPAR(state->port.tty))
 		the_port->ignore_status_mask &= ~(N_PARITY_ERROR
 						  | N_FRAMING_ERROR);
-	if (I_IGNBRK(info->port.tty)) {
+	if (I_IGNBRK(state->port.tty)) {
 		the_port->ignore_status_mask &= ~N_BREAK;
-		if (I_IGNPAR(info->port.tty))
+		if (I_IGNPAR(state->port.tty))
 			the_port->ignore_status_mask &= ~N_OVERRUN_ERROR;
 	}
 	if (!(cflag & CREAD)) {
@@ -1286,7 +1286,7 @@ static inline int do_read(struct uart_port *the_port, char *buf, int len)
 						uart_handle_dcd_change
 							(port->ip_port, 0);
 						wake_up_interruptible
-						    (&the_port->info->
+						    (&the_port->state->
 						     delta_msr_wait);
 					}
 
@@ -1392,21 +1392,21 @@ static int receive_chars(struct uart_port *the_port)
 	struct tty_struct *tty;
 	unsigned char ch[MAX_CHARS];
 	int read_count = 0, read_room, flip = 0;
-	struct uart_info *info = the_port->info;
+	struct uart_state *state = the_port->state;
 	struct ioc3_port *port = get_ioc3_port(the_port);
 	unsigned long pflags;
 
 	/* Make sure all the pointers are "good" ones */
-	if (!info)
+	if (!state)
 		return 0;
-	if (!info->port.tty)
+	if (!state->port.tty)
 		return 0;
 
 	if (!(port->ip_flags & INPUT_ENABLE))
 		return 0;
 
 	spin_lock_irqsave(&the_port->lock, pflags);
-	tty = info->port.tty;
+	tty = state->port.tty;
 
 	read_count = do_read(the_port, ch, MAX_CHARS);
 	if (read_count > 0) {
@@ -1491,7 +1491,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
 				uart_handle_dcd_change(the_port,
 						shadow & SHADOW_DCD);
 				wake_up_interruptible
-				    (&the_port->info->delta_msr_wait);
+				    (&the_port->state->delta_msr_wait);
 			} else if ((port->ip_notify & N_DDCD)
 				   && !(shadow & SHADOW_DCD)) {
 				/* Flag delta DCD/no DCD */
@@ -1511,7 +1511,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
 				uart_handle_cts_change(the_port, shadow
 						& SHADOW_CTS);
 				wake_up_interruptible
-				    (&the_port->info->delta_msr_wait);
+				    (&the_port->state->delta_msr_wait);
 			}
 		}
 
@@ -1721,14 +1721,14 @@ static void ic3_shutdown(struct uart_port *the_port)
 {
 	unsigned long port_flags;
 	struct ioc3_port *port;
-	struct uart_info *info;
+	struct uart_state *state;
 
 	port = get_ioc3_port(the_port);
 	if (!port)
 		return;
 
-	info = the_port->info;
-	wake_up_interruptible(&info->delta_msr_wait);
+	state = the_port->state;
+	wake_up_interruptible(&state->delta_msr_wait);
 
 	spin_lock_irqsave(&the_port->lock, port_flags);
 	set_notification(port, N_ALL, 0);
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index e5c58fe..2055d32 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -1627,25 +1627,25 @@ static void transmit_chars(struct uart_port *the_port)
 	char *start;
 	struct tty_struct *tty;
 	struct ioc4_port *port = get_ioc4_port(the_port, 0);
-	struct uart_info *info;
+	struct uart_state *state;
 
 	if (!the_port)
 		return;
 	if (!port)
 		return;
 
-	info = the_port->info;
-	tty = info->port.tty;
+	state = the_port->state;
+	tty = state->port.tty;
 
-	if (uart_circ_empty(&info->xmit) || uart_tx_stopped(the_port)) {
+	if (uart_circ_empty(&state->xmit) || uart_tx_stopped(the_port)) {
 		/* Nothing to do or hw stopped */
 		set_notification(port, N_ALL_OUTPUT, 0);
 		return;
 	}
 
-	head = info->xmit.head;
-	tail = info->xmit.tail;
-	start = (char *)&info->xmit.buf[tail];
+	head = state->xmit.head;
+	tail = state->xmit.tail;
+	start = (char *)&state->xmit.buf[tail];
 
 	/* write out all the data or until the end of the buffer */
 	xmit_count = (head < tail) ? (UART_XMIT_SIZE - tail) : (head - tail);
@@ -1658,14 +1658,14 @@ static void transmit_chars(struct uart_port *the_port)
 			/* advance the pointers */
 			tail += result;
 			tail &= UART_XMIT_SIZE - 1;
-			info->xmit.tail = tail;
-			start = (char *)&info->xmit.buf[tail];
+			state->xmit.tail = tail;
+			start = (char *)&state->xmit.buf[tail];
 		}
 	}
-	if (uart_circ_chars_pending(&info->xmit) < WAKEUP_CHARS)
+	if (uart_circ_chars_pending(&state->xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(the_port);
 
-	if (uart_circ_empty(&info->xmit)) {
+	if (uart_circ_empty(&state->xmit)) {
 		set_notification(port, N_OUTPUT_LOWAT, 0);
 	} else {
 		set_notification(port, N_OUTPUT_LOWAT, 1);
@@ -1686,7 +1686,7 @@ ioc4_change_speed(struct uart_port *the_port,
 	int baud, bits;
 	unsigned cflag;
 	int new_parity = 0, new_parity_enable = 0, new_stop = 0, new_data = 8;
-	struct uart_info *info = the_port->info;
+	struct uart_state *state = the_port->state;
 
 	cflag = new_termios->c_cflag;
 
@@ -1738,14 +1738,14 @@ ioc4_change_speed(struct uart_port *the_port,
 
 	the_port->ignore_status_mask = N_ALL_INPUT;
 
-	info->port.tty->low_latency = 1;
+	state->port.tty->low_latency = 1;
 
-	if (I_IGNPAR(info->port.tty))
+	if (I_IGNPAR(state->port.tty))
 		the_port->ignore_status_mask &= ~(N_PARITY_ERROR
 						| N_FRAMING_ERROR);
-	if (I_IGNBRK(info->port.tty)) {
+	if (I_IGNBRK(state->port.tty)) {
 		the_port->ignore_status_mask &= ~N_BREAK;
-		if (I_IGNPAR(info->port.tty))
+		if (I_IGNPAR(state->port.tty))
 			the_port->ignore_status_mask &= ~N_OVERRUN_ERROR;
 	}
 	if (!(cflag & CREAD)) {
@@ -1784,7 +1784,7 @@ ioc4_change_speed(struct uart_port *the_port,
 static inline int ic4_startup_local(struct uart_port *the_port)
 {
 	struct ioc4_port *port;
-	struct uart_info *info;
+	struct uart_state *state;
 
 	if (!the_port)
 		return -1;
@@ -1793,7 +1793,7 @@ static inline int ic4_startup_local(struct uart_port *the_port)
 	if (!port)
 		return -1;
 
-	info = the_port->info;
+	state = the_port->state;
 
 	local_open(port);
 
@@ -1801,7 +1801,7 @@ static inline int ic4_startup_local(struct uart_port *the_port)
 	ioc4_set_proto(port, the_port->mapbase);
 
 	/* set the speed of the serial port */
-	ioc4_change_speed(the_port, info->port.tty->termios,
+	ioc4_change_speed(the_port, state->port.tty->termios,
 			  (struct ktermios *)0);
 
 	return 0;
@@ -1882,7 +1882,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
 				the_port = port->ip_port;
 				the_port->icount.dcd = 1;
 				wake_up_interruptible
-					    (&the_port-> info->delta_msr_wait);
+					    (&the_port->state->delta_msr_wait);
 			} else if ((port->ip_notify & N_DDCD)
 					&& !(shadow & IOC4_SHADOW_DCD)) {
 				/* Flag delta DCD/no DCD */
@@ -1904,7 +1904,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
 				the_port->icount.cts =
 					(shadow & IOC4_SHADOW_CTS) ? 1 : 0;
 				wake_up_interruptible
-					(&the_port->info->delta_msr_wait);
+					(&the_port->state->delta_msr_wait);
 			}
 		}
 
@@ -2236,7 +2236,7 @@ static inline int do_read(struct uart_port *the_port, unsigned char *buf,
 						   && port->ip_port) {
 						the_port->icount.dcd = 0;
 						wake_up_interruptible
-						    (&the_port->info->
+						    (&the_port->state->
 							delta_msr_wait);
 					}
 
@@ -2341,17 +2341,17 @@ static void receive_chars(struct uart_port *the_port)
 	unsigned char ch[IOC4_MAX_CHARS];
 	int read_count, request_count = IOC4_MAX_CHARS;
 	struct uart_icount *icount;
-	struct uart_info *info = the_port->info;
+	struct uart_state *state = the_port->state;
 	unsigned long pflags;
 
 	/* Make sure all the pointers are "good" ones */
-	if (!info)
+	if (!state)
 		return;
-	if (!info->port.tty)
+	if (!state->port.tty)
 		return;
 
 	spin_lock_irqsave(&the_port->lock, pflags);
-	tty = info->port.tty;
+	tty = state->port.tty;
 
 	request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS);
 
@@ -2430,19 +2430,19 @@ static void ic4_shutdown(struct uart_port *the_port)
 {
 	unsigned long port_flags;
 	struct ioc4_port *port;
-	struct uart_info *info;
+	struct uart_state *state;
 
 	port = get_ioc4_port(the_port, 0);
 	if (!port)
 		return;
 
-	info = the_port->info;
+	state = the_port->state;
 	port->ip_port = NULL;
 
-	wake_up_interruptible(&info->delta_msr_wait);
+	wake_up_interruptible(&state->delta_msr_wait);
 
-	if (info->port.tty)
-		set_bit(TTY_IO_ERROR, &info->port.tty->flags);
+	if (state->port.tty)
+		set_bit(TTY_IO_ERROR, &state->port.tty->flags);
 
 	spin_lock_irqsave(&the_port->lock, port_flags);
 	set_notification(port, N_ALL, 0);
@@ -2538,7 +2538,7 @@ static int ic4_startup(struct uart_port *the_port)
 	int retval;
 	struct ioc4_port *port;
 	struct ioc4_control *control;
-	struct uart_info *info;
+	struct uart_state *state;
 	unsigned long port_flags;
 
 	if (!the_port)
@@ -2546,7 +2546,7 @@ static int ic4_startup(struct uart_port *the_port)
 	port = get_ioc4_port(the_port, 1);
 	if (!port)
 		return -ENODEV;
-	info = the_port->info;
+	state = the_port->state;
 
 	control = port->ip_control;
 	if (!control) {
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c
index 0d9acbd..2e847de 100644
--- a/drivers/serial/ip22zilog.c
+++ b/drivers/serial/ip22zilog.c
@@ -256,9 +256,9 @@ static struct tty_struct *ip22zilog_receive_chars(struct uart_ip22zilog_port *up
 	unsigned int r1;
 
 	tty = NULL;
-	if (up->port.info != NULL &&
-	    up->port.info->port.tty != NULL)
-		tty = up->port.info->port.tty;
+	if (up->port.state != NULL &&
+	    up->port.state->port.tty != NULL)
+		tty = up->port.state->port.tty;
 
 	for (;;) {
 		ch = readb(&channel->control);
@@ -354,7 +354,7 @@ static void ip22zilog_status_handle(struct uart_ip22zilog_port *up,
 			uart_handle_cts_change(&up->port,
 					       (status & CTS));
 
-		wake_up_interruptible(&up->port.info->delta_msr_wait);
+		wake_up_interruptible(&up->port.state->delta_msr_wait);
 	}
 
 	up->prev_status = status;
@@ -404,9 +404,9 @@ static void ip22zilog_transmit_chars(struct uart_ip22zilog_port *up,
 		return;
 	}
 
-	if (up->port.info == NULL)
+	if (up->port.state == NULL)
 		goto ack_tx_int;
-	xmit = &up->port.info->xmit;
+	xmit = &up->port.state->xmit;
 	if (uart_circ_empty(xmit))
 		goto ack_tx_int;
 	if (uart_tx_stopped(&up->port))
@@ -607,7 +607,7 @@ static void ip22zilog_start_tx(struct uart_port *port)
 		port->icount.tx++;
 		port->x_char = 0;
 	} else {
-		struct circ_buf *xmit = &port->info->xmit;
+		struct circ_buf *xmit = &port->state->xmit;
 
 		writeb(xmit->buf[xmit->tail], &channel->data);
 		ZSDELAY();
diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c
index 9dadaa1..b4b124e 100644
--- a/drivers/serial/jsm/jsm_neo.c
+++ b/drivers/serial/jsm/jsm_neo.c
@@ -989,7 +989,7 @@ static void neo_param(struct jsm_channel *ch)
 			{     50, B50     },
 		};
 
-		cflag = C_BAUD(ch->uart_port.info->port.tty);
+		cflag = C_BAUD(ch->uart_port.state->port.tty);
 		baud = 9600;
 		for (i = 0; i < ARRAY_SIZE(baud_rates); i++) {
 			if (baud_rates[i].cflag == cflag) {
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c
index 00f4577..7439c03 100644
--- a/drivers/serial/jsm/jsm_tty.c
+++ b/drivers/serial/jsm/jsm_tty.c
@@ -147,7 +147,7 @@ static void jsm_tty_send_xchar(struct uart_port *port, char ch)
 	struct ktermios *termios;
 
 	spin_lock_irqsave(&port->lock, lock_flags);
-	termios = port->info->port.tty->termios;
+	termios = port->state->port.tty->termios;
 	if (ch == termios->c_cc[VSTART])
 		channel->ch_bd->bd_ops->send_start_character(channel);
 
@@ -245,7 +245,7 @@ static int jsm_tty_open(struct uart_port *port)
 	channel->ch_cached_lsr = 0;
 	channel->ch_stops_sent = 0;
 
-	termios = port->info->port.tty->termios;
+	termios = port->state->port.tty->termios;
 	channel->ch_c_cflag	= termios->c_cflag;
 	channel->ch_c_iflag	= termios->c_iflag;
 	channel->ch_c_oflag	= termios->c_oflag;
@@ -278,7 +278,7 @@ static void jsm_tty_close(struct uart_port *port)
 	jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, "start\n");
 
 	bd = channel->ch_bd;
-	ts = port->info->port.tty->termios;
+	ts = port->state->port.tty->termios;
 
 	channel->ch_flags &= ~(CH_STOPI);
 
@@ -530,7 +530,7 @@ void jsm_input(struct jsm_channel *ch)
 	if (!ch)
 		return;
 
-	tp = ch->uart_port.info->port.tty;
+	tp = ch->uart_port.state->port.tty;
 
 	bd = ch->ch_bd;
 	if(!bd)
@@ -849,7 +849,7 @@ int jsm_tty_write(struct uart_port *port)
 	u16 tail;
 	u16 tmask;
 	u32 remain;
-	int temp_tail = port->info->xmit.tail;
+	int temp_tail = port->state->xmit.tail;
 	struct jsm_channel *channel = (struct jsm_channel *)port;
 
 	tmask = WQUEUEMASK;
@@ -865,10 +865,10 @@ int jsm_tty_write(struct uart_port *port)
 	data_count = 0;
 	if (bufcount >= remain) {
 		bufcount -= remain;
-		while ((port->info->xmit.head != temp_tail) &&
+		while ((port->state->xmit.head != temp_tail) &&
 		(data_count < remain)) {
 			channel->ch_wqueue[head++] =
-			port->info->xmit.buf[temp_tail];
+			port->state->xmit.buf[temp_tail];
 
 			temp_tail++;
 			temp_tail &= (UART_XMIT_SIZE - 1);
@@ -880,10 +880,10 @@ int jsm_tty_write(struct uart_port *port)
 	data_count1 = 0;
 	if (bufcount > 0) {
 		remain = bufcount;
-		while ((port->info->xmit.head != temp_tail) &&
+		while ((port->state->xmit.head != temp_tail) &&
 			(data_count1 < remain)) {
 			channel->ch_wqueue[head++] =
-				port->info->xmit.buf[temp_tail];
+				port->state->xmit.buf[temp_tail];
 
 			temp_tail++;
 			temp_tail &= (UART_XMIT_SIZE - 1);
@@ -892,7 +892,7 @@ int jsm_tty_write(struct uart_port *port)
 		}
 	}
 
-	port->info->xmit.tail = temp_tail;
+	port->state->xmit.tail = temp_tail;
 
 	data_count += data_count1;
 	if (data_count) {
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c
index 611c97a..bea5c21 100644
--- a/drivers/serial/m32r_sio.c
+++ b/drivers/serial/m32r_sio.c
@@ -286,7 +286,7 @@ static void m32r_sio_start_tx(struct uart_port *port)
 {
 #ifdef CONFIG_SERIAL_M32R_PLDSIO
 	struct uart_sio_port *up = (struct uart_sio_port *)port;
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 
 	if (!(up->ier & UART_IER_THRI)) {
 		up->ier |= UART_IER_THRI;
@@ -325,7 +325,7 @@ static void m32r_sio_enable_ms(struct uart_port *port)
 
 static void receive_chars(struct uart_sio_port *up, int *status)
 {
-	struct tty_struct *tty = up->port.info->port.tty;
+	struct tty_struct *tty = up->port.state->port.tty;
 	unsigned char ch;
 	unsigned char flag;
 	int max_count = 256;
@@ -398,7 +398,7 @@ static void receive_chars(struct uart_sio_port *up, int *status)
 
 static void transmit_chars(struct uart_sio_port *up)
 {
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 	int count;
 
 	if (up->port.x_char) {
diff --git a/drivers/serial/max3100.c b/drivers/serial/max3100.c
index 9fd33e5..75ab006 100644
--- a/drivers/serial/max3100.c
+++ b/drivers/serial/max3100.c
@@ -184,7 +184,7 @@ static void max3100_timeout(unsigned long data)
 {
 	struct max3100_port *s = (struct max3100_port *)data;
 
-	if (s->port.info) {
+	if (s->port.state) {
 		max3100_dowork(s);
 		mod_timer(&s->timer, jiffies + s->poll_time);
 	}
@@ -261,7 +261,7 @@ static void max3100_work(struct work_struct *w)
 	int rxchars;
 	u16 tx, rx;
 	int conf, cconf, rts, crts;
-	struct circ_buf *xmit = &s->port.info->xmit;
+	struct circ_buf *xmit = &s->port.state->xmit;
 
 	dev_dbg(&s->spi->dev, "%s\n", __func__);
 
@@ -307,8 +307,8 @@ static void max3100_work(struct work_struct *w)
 			}
 		}
 
-		if (rxchars > 16 && s->port.info->port.tty != NULL) {
-			tty_flip_buffer_push(s->port.info->port.tty);
+		if (rxchars > 16 && s->port.state->port.tty != NULL) {
+			tty_flip_buffer_push(s->port.state->port.tty);
 			rxchars = 0;
 		}
 		if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
@@ -320,8 +320,8 @@ static void max3100_work(struct work_struct *w)
 		  (!uart_circ_empty(xmit) &&
 		   !uart_tx_stopped(&s->port))));
 
-	if (rxchars > 0 && s->port.info->port.tty != NULL)
-		tty_flip_buffer_push(s->port.info->port.tty);
+	if (rxchars > 0 && s->port.state->port.tty != NULL)
+		tty_flip_buffer_push(s->port.state->port.tty);
 }
 
 static irqreturn_t max3100_irq(int irqno, void *dev_id)
@@ -429,7 +429,7 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios,
 	int baud = 0;
 	unsigned cflag;
 	u32 param_new, param_mask, parity = 0;
-	struct tty_struct *tty = s->port.info->port.tty;
+	struct tty_struct *tty = s->port.state->port.tty;
 
 	dev_dbg(&s->spi->dev, "%s\n", __func__);
 	if (!tty)
@@ -529,7 +529,7 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios,
 			MAX3100_STATUS_OE;
 
 	/* we are sending char from a workqueue so enable */
-	s->port.info->port.tty->low_latency = 1;
+	s->port.state->port.tty->low_latency = 1;
 
 	if (s->poll_time > 0)
 		del_timer_sync(&s->timer);
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
index 0eefb07..b443824 100644
--- a/drivers/serial/mcf.c
+++ b/drivers/serial/mcf.c
@@ -323,7 +323,7 @@ static void mcf_rx_chars(struct mcf_uart *pp)
 		uart_insert_char(port, status, MCFUART_USR_RXOVERRUN, ch, flag);
 	}
 
-	tty_flip_buffer_push(port->info->port.tty);
+	tty_flip_buffer_push(port->state->port.tty);
 }
 
 /****************************************************************************/
@@ -331,7 +331,7 @@ static void mcf_rx_chars(struct mcf_uart *pp)
 static void mcf_tx_chars(struct mcf_uart *pp)
 {
 	struct uart_port *port = &pp->port;
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	if (port->x_char) {
 		/* Send special char - probably flow control */
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index abbd146..d7bcd07 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -745,7 +745,7 @@ static struct uart_ops mpc52xx_uart_ops = {
 static inline int
 mpc52xx_uart_int_rx_chars(struct uart_port *port)
 {
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	unsigned char ch, flag;
 	unsigned short status;
 
@@ -812,7 +812,7 @@ mpc52xx_uart_int_rx_chars(struct uart_port *port)
 static inline int
 mpc52xx_uart_int_tx_chars(struct uart_port *port)
 {
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	/* Process out of band chars */
 	if (port->x_char) {
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index 61d3ade..b5496c2 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -936,7 +936,7 @@ static int serial_polled;
 static int mpsc_rx_intr(struct mpsc_port_info *pi)
 {
 	struct mpsc_rx_desc *rxre;
-	struct tty_struct *tty = pi->port.info->port.tty;
+	struct tty_struct *tty = pi->port.state->port.tty;
 	u32	cmdstat, bytes_in, i;
 	int	rc = 0;
 	u8	*bp;
@@ -1109,7 +1109,7 @@ static void mpsc_setup_tx_desc(struct mpsc_port_info *pi, u32 count, u32 intr)
 
 static void mpsc_copy_tx_data(struct mpsc_port_info *pi)
 {
-	struct circ_buf *xmit = &pi->port.info->xmit;
+	struct circ_buf *xmit = &pi->port.state->xmit;
 	u8 *bp;
 	u32 i;
 
diff --git a/drivers/serial/msm_serial.c b/drivers/serial/msm_serial.c
index f7c24ba..ff18d50 100644
--- a/drivers/serial/msm_serial.c
+++ b/drivers/serial/msm_serial.c
@@ -88,7 +88,7 @@ static void msm_enable_ms(struct uart_port *port)
 
 static void handle_rx(struct uart_port *port)
 {
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	unsigned int sr;
 
 	/*
@@ -136,7 +136,7 @@ static void handle_rx(struct uart_port *port)
 
 static void handle_tx(struct uart_port *port)
 {
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 	struct msm_port *msm_port = UART_TO_MSM(port);
 	int sent_tx;
 
@@ -169,7 +169,7 @@ static void handle_delta_cts(struct uart_port *port)
 {
 	msm_write(port, UART_CR_CMD_RESET_CTS, UART_CR);
 	port->icount.cts++;
-	wake_up_interruptible(&port->info->delta_msr_wait);
+	wake_up_interruptible(&port->state->delta_msr_wait);
 }
 
 static irqreturn_t msm_irq(int irq, void *dev_id)
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c
index 953a5ff..7571aaa 100644
--- a/drivers/serial/mux.c
+++ b/drivers/serial/mux.c
@@ -199,7 +199,7 @@ static void mux_break_ctl(struct uart_port *port, int break_state)
 static void mux_write(struct uart_port *port)
 {
 	int count;
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	if(port->x_char) {
 		UART_PUT_CHAR(port, port->x_char);
@@ -243,7 +243,7 @@ static void mux_write(struct uart_port *port)
 static void mux_read(struct uart_port *port)
 {
 	int data;
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	__u32 start_count = port->icount.rx;
 
 	while(1) {
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c
index 3e5dda8..7735c9f 100644
--- a/drivers/serial/netx-serial.c
+++ b/drivers/serial/netx-serial.c
@@ -140,7 +140,7 @@ static void netx_enable_ms(struct uart_port *port)
 
 static inline void netx_transmit_buffer(struct uart_port *port)
 {
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	if (port->x_char) {
 		writel(port->x_char, port->membase + UART_DR);
@@ -185,7 +185,7 @@ static unsigned int netx_tx_empty(struct uart_port *port)
 
 static void netx_txint(struct uart_port *port)
 {
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
 		netx_stop_tx(port);
@@ -201,7 +201,7 @@ static void netx_txint(struct uart_port *port)
 static void netx_rxint(struct uart_port *port)
 {
 	unsigned char rx, flg, status;
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 
 	while (!(readl(port->membase + UART_FR) & FR_RXFE)) {
 		rx = readl(port->membase + UART_DR);
diff --git a/drivers/serial/nwpserial.c b/drivers/serial/nwpserial.c
index 9e150b1..e1ab8ec 100644
--- a/drivers/serial/nwpserial.c
+++ b/drivers/serial/nwpserial.c
@@ -126,7 +126,7 @@ static void nwpserial_config_port(struct uart_port *port, int flags)
 static irqreturn_t nwpserial_interrupt(int irq, void *dev_id)
 {
 	struct nwpserial_port *up = dev_id;
-	struct tty_struct *tty = up->port.info->port.tty;
+	struct tty_struct *tty = up->port.state->port.tty;
 	irqreturn_t ret;
 	unsigned int iir;
 	unsigned char ch;
@@ -261,7 +261,7 @@ static void nwpserial_start_tx(struct uart_port *port)
 	struct nwpserial_port *up;
 	struct circ_buf *xmit;
 	up = container_of(port, struct nwpserial_port, port);
-	xmit  = &up->port.info->xmit;
+	xmit  = &up->port.state->xmit;
 
 	if (port->x_char) {
 		nwpserial_putchar(up, up->port.x_char);
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 9c1243f..ab4c85b 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -242,12 +242,12 @@ static struct tty_struct *pmz_receive_chars(struct uart_pmac_port *uap)
 	}
 
 	/* Sanity check, make sure the old bug is no longer happening */
-	if (uap->port.info == NULL || uap->port.info->port.tty == NULL) {
+	if (uap->port.state == NULL || uap->port.state->port.tty == NULL) {
 		WARN_ON(1);
 		(void)read_zsdata(uap);
 		return NULL;
 	}
-	tty = uap->port.info->port.tty;
+	tty = uap->port.state->port.tty;
 
 	while (1) {
 		error = 0;
@@ -369,7 +369,7 @@ static void pmz_status_handle(struct uart_pmac_port *uap)
 			uart_handle_cts_change(&uap->port,
 					       !(status & CTS));
 
-		wake_up_interruptible(&uap->port.info->delta_msr_wait);
+		wake_up_interruptible(&uap->port.state->delta_msr_wait);
 	}
 
 	if (status & BRK_ABRT)
@@ -420,9 +420,9 @@ static void pmz_transmit_chars(struct uart_pmac_port *uap)
 		return;
 	}
 
-	if (uap->port.info == NULL)
+	if (uap->port.state == NULL)
 		goto ack_tx_int;
-	xmit = &uap->port.info->xmit;
+	xmit = &uap->port.state->xmit;
 	if (uart_circ_empty(xmit)) {
 		uart_write_wakeup(&uap->port);
 		goto ack_tx_int;
@@ -655,7 +655,7 @@ static void pmz_start_tx(struct uart_port *port)
 		port->icount.tx++;
 		port->x_char = 0;
 	} else {
-		struct circ_buf *xmit = &port->info->xmit;
+		struct circ_buf *xmit = &port->state->xmit;
 
 		write_zsdata(uap, xmit->buf[xmit->tail]);
 		zssync(uap);
diff --git a/drivers/serial/pnx8xxx_uart.c b/drivers/serial/pnx8xxx_uart.c
index 1bb8f1b..2da7476 100644
--- a/drivers/serial/pnx8xxx_uart.c
+++ b/drivers/serial/pnx8xxx_uart.c
@@ -100,7 +100,7 @@ static void pnx8xxx_mctrl_check(struct pnx8xxx_port *sport)
 	if (changed & TIOCM_CTS)
 		uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-	wake_up_interruptible(&sport->port.info->delta_msr_wait);
+	wake_up_interruptible(&sport->port.state->delta_msr_wait);
 }
 
 /*
@@ -112,7 +112,7 @@ static void pnx8xxx_timeout(unsigned long data)
 	struct pnx8xxx_port *sport = (struct pnx8xxx_port *)data;
 	unsigned long flags;
 
-	if (sport->port.info) {
+	if (sport->port.state) {
 		spin_lock_irqsave(&sport->port.lock, flags);
 		pnx8xxx_mctrl_check(sport);
 		spin_unlock_irqrestore(&sport->port.lock, flags);
@@ -181,7 +181,7 @@ static void pnx8xxx_enable_ms(struct uart_port *port)
 
 static void pnx8xxx_rx_chars(struct pnx8xxx_port *sport)
 {
-	struct tty_struct *tty = sport->port.info->port.tty;
+	struct tty_struct *tty = sport->port.state->port.tty;
 	unsigned int status, ch, flg;
 
 	status = FIFO_TO_SM(serial_in(sport, PNX8XXX_FIFO)) |
@@ -243,7 +243,7 @@ static void pnx8xxx_rx_chars(struct pnx8xxx_port *sport)
 
 static void pnx8xxx_tx_chars(struct pnx8xxx_port *sport)
 {
-	struct circ_buf *xmit = &sport->port.info->xmit;
+	struct circ_buf *xmit = &sport->port.state->xmit;
 
 	if (sport->port.x_char) {
 		serial_out(sport, PNX8XXX_FIFO, sport->port.x_char);
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index a48a8a1..ad48919 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -96,7 +96,7 @@ static void serial_pxa_stop_rx(struct uart_port *port)
 
 static inline void receive_chars(struct uart_pxa_port *up, int *status)
 {
-	struct tty_struct *tty = up->port.info->port.tty;
+	struct tty_struct *tty = up->port.state->port.tty;
 	unsigned int ch, flag;
 	int max_count = 256;
 
@@ -161,7 +161,7 @@ static inline void receive_chars(struct uart_pxa_port *up, int *status)
 
 static void transmit_chars(struct uart_pxa_port *up)
 {
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 	int count;
 
 	if (up->port.x_char) {
@@ -220,7 +220,7 @@ static inline void check_modem_status(struct uart_pxa_port *up)
 	if (status & UART_MSR_DCTS)
 		uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-	wake_up_interruptible(&up->port.info->delta_msr_wait);
+	wake_up_interruptible(&up->port.state->delta_msr_wait);
 }
 
 /*
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 94530f0..61ef3ae 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -117,7 +117,7 @@ static void sa1100_mctrl_check(struct sa1100_port *sport)
 	if (changed & TIOCM_CTS)
 		uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-	wake_up_interruptible(&sport->port.info->delta_msr_wait);
+	wake_up_interruptible(&sport->port.state->delta_msr_wait);
 }
 
 /*
@@ -129,7 +129,7 @@ static void sa1100_timeout(unsigned long data)
 	struct sa1100_port *sport = (struct sa1100_port *)data;
 	unsigned long flags;
 
-	if (sport->port.info) {
+	if (sport->port.state) {
 		spin_lock_irqsave(&sport->port.lock, flags);
 		sa1100_mctrl_check(sport);
 		spin_unlock_irqrestore(&sport->port.lock, flags);
@@ -189,7 +189,7 @@ static void sa1100_enable_ms(struct uart_port *port)
 static void
 sa1100_rx_chars(struct sa1100_port *sport)
 {
-	struct tty_struct *tty = sport->port.info->port.tty;
+	struct tty_struct *tty = sport->port.state->port.tty;
 	unsigned int status, ch, flg;
 
 	status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) |
@@ -239,7 +239,7 @@ sa1100_rx_chars(struct sa1100_port *sport)
 
 static void sa1100_tx_chars(struct sa1100_port *sport)
 {
-	struct circ_buf *xmit = &sport->port.info->xmit;
+	struct circ_buf *xmit = &sport->port.state->xmit;
 
 	if (sport->port.x_char) {
 		UART_PUT_CHAR(sport, sport->port.x_char);
diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
index c8851a0..1523e8d 100644
--- a/drivers/serial/samsung.c
+++ b/drivers/serial/samsung.c
@@ -196,7 +196,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
 {
 	struct s3c24xx_uart_port *ourport = dev_id;
 	struct uart_port *port = &ourport->port;
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	unsigned int ufcon, ch, flag, ufstat, uerstat;
 	int max_count = 64;
 
@@ -281,7 +281,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id)
 {
 	struct s3c24xx_uart_port *ourport = id;
 	struct uart_port *port = &ourport->port;
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 	int count = 256;
 
 	if (port->x_char) {
@@ -992,10 +992,10 @@ static int s3c24xx_serial_cpufreq_transition(struct notifier_block *nb,
 		struct ktermios *termios;
 		struct tty_struct *tty;
 
-		if (uport->info == NULL)
+		if (uport->state == NULL)
 			goto exit;
 
-		tty = uport->info->port.tty;
+		tty = uport->state->port.tty;
 
 		if (tty == NULL)
 			goto exit;
diff --git a/drivers/serial/sb1250-duart.c b/drivers/serial/sb1250-duart.c
index 319e8b8..fa5f303 100644
--- a/drivers/serial/sb1250-duart.c
+++ b/drivers/serial/sb1250-duart.c
@@ -384,13 +384,13 @@ static void sbd_receive_chars(struct sbd_port *sport)
 		uart_insert_char(uport, status, M_DUART_OVRUN_ERR, ch, flag);
 	}
 
-	tty_flip_buffer_push(uport->info->port.tty);
+	tty_flip_buffer_push(uport->state->port.tty);
 }
 
 static void sbd_transmit_chars(struct sbd_port *sport)
 {
 	struct uart_port *uport = &sport->port;
-	struct circ_buf *xmit = &sport->port.info->xmit;
+	struct circ_buf *xmit = &sport->port.state->xmit;
 	unsigned int mask;
 	int stop_tx;
 
@@ -440,7 +440,7 @@ static void sbd_status_handle(struct sbd_port *sport)
 
 	if (delta & ((M_DUART_IN_PIN2_VAL | M_DUART_IN_PIN0_VAL) <<
 		     S_DUART_IN_PIN_CHNG))
-		wake_up_interruptible(&uport->info->delta_msr_wait);
+		wake_up_interruptible(&uport->state->delta_msr_wait);
 }
 
 static irqreturn_t sbd_interrupt(int irq, void *dev_id)
diff --git a/drivers/serial/sc26xx.c b/drivers/serial/sc26xx.c
index e0be11c..75038ad 100644
--- a/drivers/serial/sc26xx.c
+++ b/drivers/serial/sc26xx.c
@@ -140,8 +140,8 @@ static struct tty_struct *receive_chars(struct uart_port *port)
 	char flag;
 	u8 status;
 
-	if (port->info != NULL)		/* Unopened serial console */
-		tty = port->info->port.tty;
+	if (port->state != NULL)		/* Unopened serial console */
+		tty = port->state->port.tty;
 
 	while (limit-- > 0) {
 		status = READ_SC_PORT(port, SR);
@@ -190,10 +190,10 @@ static void transmit_chars(struct uart_port *port)
 {
 	struct circ_buf *xmit;
 
-	if (!port->info)
+	if (!port->state)
 		return;
 
-	xmit = &port->info->xmit;
+	xmit = &port->state->xmit;
 	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
 		sc26xx_disable_irq(port, IMR_TXRDY);
 		return;
@@ -316,7 +316,7 @@ static void sc26xx_stop_tx(struct uart_port *port)
 /* port->lock held by caller.  */
 static void sc26xx_start_tx(struct uart_port *port)
 {
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	while (!uart_circ_empty(xmit)) {
 		if (!(READ_SC_PORT(port, SR) & SR_TXRDY)) {
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index b0bb29d..ea53b6f 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -52,7 +52,7 @@ static struct lock_class_key port_lock_key;
 
 #define HIGH_BITS_OFFSET	((sizeof(long)-sizeof(int))*8)
 
-#define uart_users(state)	((state)->count + (state)->info.port.blocked_open)
+#define uart_users(state)	((state)->count + (state)->port.blocked_open)
 
 #ifdef CONFIG_SERIAL_CORE_CONSOLE
 #define uart_console(port)	((port)->cons && (port)->cons->index == (port)->line)
@@ -71,19 +71,19 @@ static void uart_change_pm(struct uart_state *state, int pm_state);
  */
 void uart_write_wakeup(struct uart_port *port)
 {
-	struct uart_info *info = port->info;
+	struct uart_state *state = port->state;
 	/*
 	 * This means you called this function _after_ the port was
 	 * closed.  No cookie for you.
 	 */
-	BUG_ON(!info);
-	tasklet_schedule(&info->tlet);
+	BUG_ON(!state);
+	tasklet_schedule(&state->tlet);
 }
 
 static void uart_stop(struct tty_struct *tty)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	unsigned long flags;
 
 	spin_lock_irqsave(&port->lock, flags);
@@ -94,9 +94,9 @@ static void uart_stop(struct tty_struct *tty)
 static void __uart_start(struct tty_struct *tty)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 
-	if (!uart_circ_empty(&state->info.xmit) && state->info.xmit.buf &&
+	if (!uart_circ_empty(&state->xmit) && state->xmit.buf &&
 	    !tty->stopped && !tty->hw_stopped)
 		port->ops->start_tx(port);
 }
@@ -104,7 +104,7 @@ static void __uart_start(struct tty_struct *tty)
 static void uart_start(struct tty_struct *tty)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	unsigned long flags;
 
 	spin_lock_irqsave(&port->lock, flags);
@@ -115,7 +115,7 @@ static void uart_start(struct tty_struct *tty)
 static void uart_tasklet_action(unsigned long data)
 {
 	struct uart_state *state = (struct uart_state *)data;
-	tty_wakeup(state->info.port.tty);
+	tty_wakeup(state->port.tty);
 }
 
 static inline void
@@ -141,12 +141,11 @@ uart_update_mctrl(struct uart_port *port, unsigned int set, unsigned int clear)
  */
 static int uart_startup(struct uart_state *state, int init_hw)
 {
-	struct uart_info *info = &state->info;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	unsigned long page;
 	int retval = 0;
 
-	if (info->flags & UIF_INITIALIZED)
+	if (state->flags & UIF_INITIALIZED)
 		return 0;
 
 	/*
@@ -154,7 +153,7 @@ static int uart_startup(struct uart_state *state, int init_hw)
 	 * once we have successfully opened the port.  Also set
 	 * up the tty->alt_speed kludge
 	 */
-	set_bit(TTY_IO_ERROR, &info->port.tty->flags);
+	set_bit(TTY_IO_ERROR, &state->port.tty->flags);
 
 	if (port->type == PORT_UNKNOWN)
 		return 0;
@@ -163,14 +162,14 @@ static int uart_startup(struct uart_state *state, int init_hw)
 	 * Initialise and allocate the transmit and temporary
 	 * buffer.
 	 */
-	if (!info->xmit.buf) {
+	if (!state->xmit.buf) {
 		/* This is protected by the per port mutex */
 		page = get_zeroed_page(GFP_KERNEL);
 		if (!page)
 			return -ENOMEM;
 
-		info->xmit.buf = (unsigned char *) page;
-		uart_circ_clear(&info->xmit);
+		state->xmit.buf = (unsigned char *) page;
+		uart_circ_clear(&state->xmit);
 	}
 
 	retval = port->ops->startup(port);
@@ -185,20 +184,20 @@ static int uart_startup(struct uart_state *state, int init_hw)
 			 * Setup the RTS and DTR signals once the
 			 * port is open and ready to respond.
 			 */
-			if (info->port.tty->termios->c_cflag & CBAUD)
+			if (state->port.tty->termios->c_cflag & CBAUD)
 				uart_set_mctrl(port, TIOCM_RTS | TIOCM_DTR);
 		}
 
-		if (info->flags & UIF_CTS_FLOW) {
+		if (state->flags & UIF_CTS_FLOW) {
 			spin_lock_irq(&port->lock);
 			if (!(port->ops->get_mctrl(port) & TIOCM_CTS))
-				info->port.tty->hw_stopped = 1;
+				state->port.tty->hw_stopped = 1;
 			spin_unlock_irq(&port->lock);
 		}
 
-		info->flags |= UIF_INITIALIZED;
+		state->flags |= UIF_INITIALIZED;
 
-		clear_bit(TTY_IO_ERROR, &info->port.tty->flags);
+		clear_bit(TTY_IO_ERROR, &state->port.tty->flags);
 	}
 
 	if (retval && capable(CAP_SYS_ADMIN))
@@ -214,9 +213,8 @@ static int uart_startup(struct uart_state *state, int init_hw)
  */
 static void uart_shutdown(struct uart_state *state)
 {
-	struct uart_info *info = &state->info;
-	struct uart_port *port = state->port;
-	struct tty_struct *tty = info->port.tty;
+	struct uart_port *port = state->uart_port;
+	struct tty_struct *tty = state->port.tty;
 
 	/*
 	 * Set the TTY IO error marker
@@ -224,8 +222,8 @@ static void uart_shutdown(struct uart_state *state)
 	if (tty)
 		set_bit(TTY_IO_ERROR, &tty->flags);
 
-	if (info->flags & UIF_INITIALIZED) {
-		info->flags &= ~UIF_INITIALIZED;
+	if (state->flags & UIF_INITIALIZED) {
+		state->flags &= ~UIF_INITIALIZED;
 
 		/*
 		 * Turn off DTR and RTS early.
@@ -240,7 +238,7 @@ static void uart_shutdown(struct uart_state *state)
 		 * any outstanding file descriptors should be pointing at
 		 * hung_up_tty_fops now.
 		 */
-		wake_up_interruptible(&info->delta_msr_wait);
+		wake_up_interruptible(&state->delta_msr_wait);
 
 		/*
 		 * Free the IRQ and disable the port.
@@ -256,14 +254,14 @@ static void uart_shutdown(struct uart_state *state)
 	/*
 	 * kill off our tasklet
 	 */
-	tasklet_kill(&info->tlet);
+	tasklet_kill(&state->tlet);
 
 	/*
 	 * Free the transmit buffer page.
 	 */
-	if (info->xmit.buf) {
-		free_page((unsigned long)info->xmit.buf);
-		info->xmit.buf = NULL;
+	if (state->xmit.buf) {
+		free_page((unsigned long)state->xmit.buf);
+		state->xmit.buf = NULL;
 	}
 }
 
@@ -430,8 +428,8 @@ EXPORT_SYMBOL(uart_get_divisor);
 static void
 uart_change_speed(struct uart_state *state, struct ktermios *old_termios)
 {
-	struct tty_struct *tty = state->info.port.tty;
-	struct uart_port *port = state->port;
+	struct tty_struct *tty = state->port.tty;
+	struct uart_port *port = state->uart_port;
 	struct ktermios *termios;
 
 	/*
@@ -447,14 +445,14 @@ uart_change_speed(struct uart_state *state, struct ktermios *old_termios)
 	 * Set flags based on termios cflag
 	 */
 	if (termios->c_cflag & CRTSCTS)
-		state->info.flags |= UIF_CTS_FLOW;
+		state->flags |= UIF_CTS_FLOW;
 	else
-		state->info.flags &= ~UIF_CTS_FLOW;
+		state->flags &= ~UIF_CTS_FLOW;
 
 	if (termios->c_cflag & CLOCAL)
-		state->info.flags &= ~UIF_CHECK_CD;
+		state->flags &= ~UIF_CHECK_CD;
 	else
-		state->info.flags |= UIF_CHECK_CD;
+		state->flags |= UIF_CHECK_CD;
 
 	port->ops->set_termios(port, termios, old_termios);
 }
@@ -482,7 +480,7 @@ static int uart_put_char(struct tty_struct *tty, unsigned char ch)
 {
 	struct uart_state *state = tty->driver_data;
 
-	return __uart_put_char(state->port, &state->info.xmit, ch);
+	return __uart_put_char(state->uart_port, &state->xmit, ch);
 }
 
 static void uart_flush_chars(struct tty_struct *tty)
@@ -508,8 +506,8 @@ uart_write(struct tty_struct *tty, const unsigned char *buf, int count)
 		return -EL3HLT;
 	}
 
-	port = state->port;
-	circ = &state->info.xmit;
+	port = state->uart_port;
+	circ = &state->xmit;
 
 	if (!circ->buf)
 		return 0;
@@ -539,9 +537,9 @@ static int uart_write_room(struct tty_struct *tty)
 	unsigned long flags;
 	int ret;
 
-	spin_lock_irqsave(&state->port->lock, flags);
-	ret = uart_circ_chars_free(&state->info.xmit);
-	spin_unlock_irqrestore(&state->port->lock, flags);
+	spin_lock_irqsave(&state->uart_port->lock, flags);
+	ret = uart_circ_chars_free(&state->xmit);
+	spin_unlock_irqrestore(&state->uart_port->lock, flags);
 	return ret;
 }
 
@@ -551,9 +549,9 @@ static int uart_chars_in_buffer(struct tty_struct *tty)
 	unsigned long flags;
 	int ret;
 
-	spin_lock_irqsave(&state->port->lock, flags);
-	ret = uart_circ_chars_pending(&state->info.xmit);
-	spin_unlock_irqrestore(&state->port->lock, flags);
+	spin_lock_irqsave(&state->uart_port->lock, flags);
+	ret = uart_circ_chars_pending(&state->xmit);
+	spin_unlock_irqrestore(&state->uart_port->lock, flags);
 	return ret;
 }
 
@@ -572,11 +570,11 @@ static void uart_flush_buffer(struct tty_struct *tty)
 		return;
 	}
 
-	port = state->port;
+	port = state->uart_port;
 	pr_debug("uart_flush_buffer(%d) called\n", tty->index);
 
 	spin_lock_irqsave(&port->lock, flags);
-	uart_circ_clear(&state->info.xmit);
+	uart_circ_clear(&state->xmit);
 	if (port->ops->flush_buffer)
 		port->ops->flush_buffer(port);
 	spin_unlock_irqrestore(&port->lock, flags);
@@ -590,7 +588,7 @@ static void uart_flush_buffer(struct tty_struct *tty)
 static void uart_send_xchar(struct tty_struct *tty, char ch)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	unsigned long flags;
 
 	if (port->ops->send_xchar)
@@ -613,13 +611,13 @@ static void uart_throttle(struct tty_struct *tty)
 		uart_send_xchar(tty, STOP_CHAR(tty));
 
 	if (tty->termios->c_cflag & CRTSCTS)
-		uart_clear_mctrl(state->port, TIOCM_RTS);
+		uart_clear_mctrl(state->uart_port, TIOCM_RTS);
 }
 
 static void uart_unthrottle(struct tty_struct *tty)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 
 	if (I_IXOFF(tty)) {
 		if (port->x_char)
@@ -635,7 +633,7 @@ static void uart_unthrottle(struct tty_struct *tty)
 static int uart_get_info(struct uart_state *state,
 			 struct serial_struct __user *retinfo)
 {
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	struct serial_struct tmp;
 
 	memset(&tmp, 0, sizeof(tmp));
@@ -674,7 +672,7 @@ static int uart_set_info(struct uart_state *state,
 			 struct serial_struct __user *newinfo)
 {
 	struct serial_struct new_serial;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	unsigned long new_port;
 	unsigned int change_irq, change_port, closing_wait;
 	unsigned int old_custom_divisor, close_delay;
@@ -840,15 +838,15 @@ static int uart_set_info(struct uart_state *state,
 	state->closing_wait    = closing_wait;
 	if (new_serial.xmit_fifo_size)
 		port->fifosize = new_serial.xmit_fifo_size;
-	if (state->info.port.tty)
-		state->info.port.tty->low_latency =
+	if (state->port.tty)
+		state->port.tty->low_latency =
 			(port->flags & UPF_LOW_LATENCY) ? 1 : 0;
 
  check_and_exit:
 	retval = 0;
 	if (port->type == PORT_UNKNOWN)
 		goto exit;
-	if (state->info.flags & UIF_INITIALIZED) {
+	if (state->flags & UIF_INITIALIZED) {
 		if (((old_flags ^ port->flags) & UPF_SPD_MASK) ||
 		    old_custom_divisor != port->custom_divisor) {
 			/*
@@ -861,7 +859,7 @@ static int uart_set_info(struct uart_state *state,
 				printk(KERN_NOTICE
 				       "%s sets custom speed on %s. This "
 				       "is deprecated.\n", current->comm,
-				       tty_name(state->info.port.tty, buf));
+				       tty_name(state->port.tty, buf));
 			}
 			uart_change_speed(state, NULL);
 		}
@@ -880,7 +878,7 @@ static int uart_set_info(struct uart_state *state,
 static int uart_get_lsr_info(struct uart_state *state,
 			     unsigned int __user *value)
 {
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	unsigned int result;
 
 	result = port->ops->tx_empty(port);
@@ -892,8 +890,8 @@ static int uart_get_lsr_info(struct uart_state *state,
 	 * interrupt happens).
 	 */
 	if (port->x_char ||
-	    ((uart_circ_chars_pending(&state->info.xmit) > 0) &&
-	     !state->info.port.tty->stopped && !state->info.port.tty->hw_stopped))
+	    ((uart_circ_chars_pending(&state->xmit) > 0) &&
+	     !state->port.tty->stopped && !state->port.tty->hw_stopped))
 		result &= ~TIOCSER_TEMT;
 
 	return put_user(result, value);
@@ -902,7 +900,7 @@ static int uart_get_lsr_info(struct uart_state *state,
 static int uart_tiocmget(struct tty_struct *tty, struct file *file)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	int result = -EIO;
 
 	mutex_lock(&state->mutex);
@@ -924,7 +922,7 @@ uart_tiocmset(struct tty_struct *tty, struct file *file,
 	      unsigned int set, unsigned int clear)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	int ret = -EIO;
 
 	mutex_lock(&state->mutex);
@@ -940,7 +938,7 @@ uart_tiocmset(struct tty_struct *tty, struct file *file,
 static int uart_break_ctl(struct tty_struct *tty, int break_state)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 
 	mutex_lock(&state->mutex);
 
@@ -953,7 +951,7 @@ static int uart_break_ctl(struct tty_struct *tty, int break_state)
 
 static int uart_do_autoconfig(struct uart_state *state)
 {
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	int flags, ret;
 
 	if (!capable(CAP_SYS_ADMIN))
@@ -1003,7 +1001,7 @@ static int uart_do_autoconfig(struct uart_state *state)
 static int
 uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 {
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	DECLARE_WAITQUEUE(wait, current);
 	struct uart_icount cprev, cnow;
 	int ret;
@@ -1020,7 +1018,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 	port->ops->enable_ms(port);
 	spin_unlock_irq(&port->lock);
 
-	add_wait_queue(&state->info.delta_msr_wait, &wait);
+	add_wait_queue(&state->delta_msr_wait, &wait);
 	for (;;) {
 		spin_lock_irq(&port->lock);
 		memcpy(&cnow, &port->icount, sizeof(struct uart_icount));
@@ -1048,7 +1046,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 	}
 
 	current->state = TASK_RUNNING;
-	remove_wait_queue(&state->info.delta_msr_wait, &wait);
+	remove_wait_queue(&state->delta_msr_wait, &wait);
 
 	return ret;
 }
@@ -1064,7 +1062,7 @@ static int uart_get_count(struct uart_state *state,
 {
 	struct serial_icounter_struct icount;
 	struct uart_icount cnow;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 
 	spin_lock_irq(&port->lock);
 	memcpy(&cnow, &port->icount, sizeof(struct uart_icount));
@@ -1160,7 +1158,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
 		break;
 
 	default: {
-		struct uart_port *port = state->port;
+		struct uart_port *port = state->uart_port;
 		if (port->ops->ioctl)
 			ret = port->ops->ioctl(port, cmd, arg);
 		break;
@@ -1175,7 +1173,7 @@ out:
 static void uart_set_ldisc(struct tty_struct *tty)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 
 	if (port->ops->set_ldisc)
 		port->ops->set_ldisc(port);
@@ -1207,7 +1205,7 @@ static void uart_set_termios(struct tty_struct *tty,
 
 	/* Handle transition to B0 status */
 	if ((old_termios->c_cflag & CBAUD) && !(cflag & CBAUD))
-		uart_clear_mctrl(state->port, TIOCM_RTS | TIOCM_DTR);
+		uart_clear_mctrl(state->uart_port, TIOCM_RTS | TIOCM_DTR);
 
 	/* Handle transition away from B0 status */
 	if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) {
@@ -1215,25 +1213,25 @@ static void uart_set_termios(struct tty_struct *tty,
 		if (!(cflag & CRTSCTS) ||
 		    !test_bit(TTY_THROTTLED, &tty->flags))
 			mask |= TIOCM_RTS;
-		uart_set_mctrl(state->port, mask);
+		uart_set_mctrl(state->uart_port, mask);
 	}
 
 	/* Handle turning off CRTSCTS */
 	if ((old_termios->c_cflag & CRTSCTS) && !(cflag & CRTSCTS)) {
-		spin_lock_irqsave(&state->port->lock, flags);
+		spin_lock_irqsave(&state->uart_port->lock, flags);
 		tty->hw_stopped = 0;
 		__uart_start(tty);
-		spin_unlock_irqrestore(&state->port->lock, flags);
+		spin_unlock_irqrestore(&state->uart_port->lock, flags);
 	}
 
 	/* Handle turning on CRTSCTS */
 	if (!(old_termios->c_cflag & CRTSCTS) && (cflag & CRTSCTS)) {
-		spin_lock_irqsave(&state->port->lock, flags);
-		if (!(state->port->ops->get_mctrl(state->port) & TIOCM_CTS)) {
+		spin_lock_irqsave(&state->uart_port->lock, flags);
+		if (!(state->uart_port->ops->get_mctrl(state->uart_port) & TIOCM_CTS)) {
 			tty->hw_stopped = 1;
-			state->port->ops->stop_tx(state->port);
+			state->uart_port->ops->stop_tx(state->uart_port);
 		}
-		spin_unlock_irqrestore(&state->port->lock, flags);
+		spin_unlock_irqrestore(&state->uart_port->lock, flags);
 	}
 #if 0
 	/*
@@ -1244,7 +1242,7 @@ static void uart_set_termios(struct tty_struct *tty,
 	 */
 	if (!(old_termios->c_cflag & CLOCAL) &&
 	    (tty->termios->c_cflag & CLOCAL))
-		wake_up_interruptible(&info->port.open_wait);
+		wake_up_interruptible(&state->uart_port.open_wait);
 #endif
 }
 
@@ -1260,10 +1258,10 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 
 	BUG_ON(!kernel_locked());
 
-	if (!state || !state->port)
+	if (!state || !state->uart_port)
 		return;
 
-	port = state->port;
+	port = state->uart_port;
 
 	pr_debug("uart_close(%d) called\n", port->line);
 
@@ -1306,7 +1304,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	 * At this point, we stop accepting input.  To do this, we
 	 * disable the receive line status interrupts.
 	 */
-	if (state->info.flags & UIF_INITIALIZED) {
+	if (state->flags & UIF_INITIALIZED) {
 		unsigned long flags;
 		spin_lock_irqsave(&port->lock, flags);
 		port->ops->stop_rx(port);
@@ -1325,9 +1323,9 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	tty_ldisc_flush(tty);
 
 	tty->closing = 0;
-	state->info.port.tty = NULL;
+	state->port.tty = NULL;
 
-	if (state->info.port.blocked_open) {
+	if (state->port.blocked_open) {
 		if (state->close_delay)
 			msleep_interruptible(state->close_delay);
 	} else if (!uart_console(port)) {
@@ -1337,8 +1335,8 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	/*
 	 * Wake up anyone trying to open this port.
 	 */
-	state->info.flags &= ~UIF_NORMAL_ACTIVE;
-	wake_up_interruptible(&state->info.port.open_wait);
+	state->flags &= ~UIF_NORMAL_ACTIVE;
+	wake_up_interruptible(&state->port.open_wait);
 
  done:
 	mutex_unlock(&state->mutex);
@@ -1347,7 +1345,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 static void uart_wait_until_sent(struct tty_struct *tty, int timeout)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	unsigned long char_time, expire;
 
 	if (port->type == PORT_UNKNOWN || port->fifosize == 0)
@@ -1412,20 +1410,19 @@ static void uart_wait_until_sent(struct tty_struct *tty, int timeout)
 static void uart_hangup(struct tty_struct *tty)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_info *info = &state->info;
 
 	BUG_ON(!kernel_locked());
-	pr_debug("uart_hangup(%d)\n", state->port->line);
+	pr_debug("uart_hangup(%d)\n", state->uart_port->line);
 
 	mutex_lock(&state->mutex);
-	if (info->flags & UIF_NORMAL_ACTIVE) {
+	if (state->flags & UIF_NORMAL_ACTIVE) {
 		uart_flush_buffer(tty);
 		uart_shutdown(state);
 		state->count = 0;
-		info->flags &= ~UIF_NORMAL_ACTIVE;
-		info->port.tty = NULL;
-		wake_up_interruptible(&info->port.open_wait);
-		wake_up_interruptible(&info->delta_msr_wait);
+		state->flags &= ~UIF_NORMAL_ACTIVE;
+		state->port.tty = NULL;
+		wake_up_interruptible(&state->port.open_wait);
+		wake_up_interruptible(&state->delta_msr_wait);
 	}
 	mutex_unlock(&state->mutex);
 }
@@ -1438,8 +1435,8 @@ static void uart_hangup(struct tty_struct *tty)
  */
 static void uart_update_termios(struct uart_state *state)
 {
-	struct tty_struct *tty = state->info.port.tty;
-	struct uart_port *port = state->port;
+	struct tty_struct *tty = state->port.tty;
+	struct uart_port *port = state->uart_port;
 
 	if (uart_console(port) && port->cons->cflag) {
 		tty->termios->c_cflag = port->cons->cflag;
@@ -1473,27 +1470,26 @@ static int
 uart_block_til_ready(struct file *filp, struct uart_state *state)
 {
 	DECLARE_WAITQUEUE(wait, current);
-	struct uart_info *info = &state->info;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	unsigned int mctrl;
 
-	info->port.blocked_open++;
+	state->port.blocked_open++;
 	state->count--;
 
-	add_wait_queue(&info->port.open_wait, &wait);
+	add_wait_queue(&state->port.open_wait, &wait);
 	while (1) {
 		set_current_state(TASK_INTERRUPTIBLE);
 
 		/*
 		 * If we have been hung up, tell userspace/restart open.
 		 */
-		if (tty_hung_up_p(filp) || info->port.tty == NULL)
+		if (tty_hung_up_p(filp) || state->port.tty == NULL)
 			break;
 
 		/*
 		 * If the port has been closed, tell userspace/restart open.
 		 */
-		if (!(info->flags & UIF_INITIALIZED))
+		if (!(state->flags & UIF_INITIALIZED))
 			break;
 
 		/*
@@ -1506,8 +1502,8 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 		 * have set TTY_IO_ERROR for a non-existant port.
 		 */
 		if ((filp->f_flags & O_NONBLOCK) ||
-		    (info->port.tty->termios->c_cflag & CLOCAL) ||
-		    (info->port.tty->flags & (1 << TTY_IO_ERROR)))
+		    (state->port.tty->termios->c_cflag & CLOCAL) ||
+		    (state->port.tty->flags & (1 << TTY_IO_ERROR)))
 			break;
 
 		/*
@@ -1515,7 +1511,7 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 		 * not set RTS here - we want to make sure we catch
 		 * the data from the modem.
 		 */
-		if (info->port.tty->termios->c_cflag & CBAUD)
+		if (state->port.tty->termios->c_cflag & CBAUD)
 			uart_set_mctrl(port, TIOCM_DTR);
 
 		/*
@@ -1537,15 +1533,15 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 			break;
 	}
 	set_current_state(TASK_RUNNING);
-	remove_wait_queue(&info->port.open_wait, &wait);
+	remove_wait_queue(&state->port.open_wait, &wait);
 
 	state->count++;
-	info->port.blocked_open--;
+	state->port.blocked_open--;
 
 	if (signal_pending(current))
 		return -ERESTARTSYS;
 
-	if (!info->port.tty || tty_hung_up_p(filp))
+	if (!state->port.tty || tty_hung_up_p(filp))
 		return -EAGAIN;
 
 	return 0;
@@ -1563,7 +1559,7 @@ static struct uart_state *uart_get(struct uart_driver *drv, int line)
 	}
 
 	state->count++;
-	if (!state->port || state->port->flags & UPF_DEAD) {
+	if (!state->uart_port || state->uart_port->flags & UPF_DEAD) {
 		ret = -ENXIO;
 		goto err_unlock;
 	}
@@ -1606,10 +1602,11 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 
 	/*
 	 * We take the semaphore inside uart_get to guarantee that we won't
-	 * be re-entered while allocating the info structure, or while we
+	 * be re-entered while allocating the state structure, or while we
 	 * request any IRQs that the driver may need.  This also has the nice
 	 * side-effect that it delays the action of uart_hangup, so we can
-	 * guarantee that info->port.tty will always contain something reasonable.
+	 * guarantee that state->port.tty will always contain something
+	 * reasonable.
 	 */
 	state = uart_get(drv, line);
 	if (IS_ERR(state)) {
@@ -1623,10 +1620,10 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 	 * Any failures from here onwards should not touch the count.
 	 */
 	tty->driver_data = state;
-	state->port->info = &state->info;
-	tty->low_latency = (state->port->flags & UPF_LOW_LATENCY) ? 1 : 0;
+	state->uart_port->state = state;
+	tty->low_latency = (state->uart_port->flags & UPF_LOW_LATENCY) ? 1 : 0;
 	tty->alt_speed = 0;
-	state->info.port.tty = tty;
+	state->port.tty = tty;
 
 	/*
 	 * If the port is in the middle of closing, bail out now.
@@ -1659,8 +1656,8 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 	/*
 	 * If this is the first open to succeed, adjust things to suit.
 	 */
-	if (retval == 0 && !(state->info.flags & UIF_NORMAL_ACTIVE)) {
-		state->info.flags |= UIF_NORMAL_ACTIVE;
+	if (retval == 0 && !(state->flags & UIF_NORMAL_ACTIVE)) {
+		state->flags |= UIF_NORMAL_ACTIVE;
 
 		uart_update_termios(state);
 	}
@@ -1688,7 +1685,7 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i)
 {
 	struct uart_state *state = drv->state + i;
 	int pm_state;
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 	char stat_buf[32];
 	unsigned int status;
 	int mmio;
@@ -1958,7 +1955,7 @@ EXPORT_SYMBOL_GPL(uart_set_options);
 
 static void uart_change_pm(struct uart_state *state, int pm_state)
 {
-	struct uart_port *port = state->port;
+	struct uart_port *port = state->uart_port;
 
 	if (state->pm_state != pm_state) {
 		if (port->ops->pm)
@@ -2005,11 +2002,11 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
 	}
 	port->suspended = 1;
 
-	if (state->info.flags & UIF_INITIALIZED) {
+	if (state->flags & UIF_INITIALIZED) {
 		const struct uart_ops *ops = port->ops;
 		int tries;
 
-		state->info.flags = (state->info.flags & ~UIF_INITIALIZED)
+		state->flags = (state->flags & ~UIF_INITIALIZED)
 				     | UIF_SUSPENDED;
 
 		spin_lock_irq(&port->lock);
@@ -2084,15 +2081,15 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
 		/*
 		 * If that's unset, use the tty termios setting.
 		 */
-		if (state->info.port.tty && termios.c_cflag == 0)
-			termios = *state->info.port.tty->termios;
+		if (state->port.tty && termios.c_cflag == 0)
+			termios = *state->port.tty->termios;
 
 		uart_change_pm(state, 0);
 		port->ops->set_termios(port, &termios, NULL);
 		console_start(port->cons);
 	}
 
-	if (state->info.flags & UIF_SUSPENDED) {
+	if (state->flags & UIF_SUSPENDED) {
 		const struct uart_ops *ops = port->ops;
 		int ret;
 
@@ -2107,7 +2104,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
 			ops->set_mctrl(port, port->mctrl);
 			ops->start_tx(port);
 			spin_unlock_irq(&port->lock);
-			state->info.flags |= UIF_INITIALIZED;
+			state->flags |= UIF_INITIALIZED;
 		} else {
 			/*
 			 * Failed to resume - maybe hardware went away?
@@ -2117,7 +2114,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
 			uart_shutdown(state);
 		}
 
-		state->info.flags &= ~UIF_SUSPENDED;
+		state->flags &= ~UIF_SUSPENDED;
 	}
 
 	mutex_unlock(&state->mutex);
@@ -2232,10 +2229,10 @@ static int uart_poll_init(struct tty_driver *driver, int line, char *options)
 	int parity = 'n';
 	int flow = 'n';
 
-	if (!state || !state->port)
+	if (!state || !state->uart_port)
 		return -1;
 
-	port = state->port;
+	port = state->uart_port;
 	if (!(port->ops->poll_get_char && port->ops->poll_put_char))
 		return -1;
 
@@ -2253,10 +2250,10 @@ static int uart_poll_get_char(struct tty_driver *driver, int line)
 	struct uart_state *state = drv->state + line;
 	struct uart_port *port;
 
-	if (!state || !state->port)
+	if (!state || !state->uart_port)
 		return -1;
 
-	port = state->port;
+	port = state->uart_port;
 	return port->ops->poll_get_char(port);
 }
 
@@ -2266,10 +2263,10 @@ static void uart_poll_put_char(struct tty_driver *driver, int line, char ch)
 	struct uart_state *state = drv->state + line;
 	struct uart_port *port;
 
-	if (!state || !state->port)
+	if (!state || !state->uart_port)
 		return;
 
-	port = state->port;
+	port = state->uart_port;
 	port->ops->poll_put_char(port, ch);
 }
 #endif
@@ -2365,9 +2362,9 @@ int uart_register_driver(struct uart_driver *drv)
 		state->closing_wait    = 30000;	/* 30 seconds */
 		mutex_init(&state->mutex);
 
-		tty_port_init(&state->info.port);
-		init_waitqueue_head(&state->info.delta_msr_wait);
-		tasklet_init(&state->info.tlet, uart_tasklet_action,
+		tty_port_init(&state->port);
+		init_waitqueue_head(&state->delta_msr_wait);
+		tasklet_init(&state->tlet, uart_tasklet_action,
 			     (unsigned long)state);
 	}
 
@@ -2430,16 +2427,16 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
 
 	mutex_lock(&port_mutex);
 	mutex_lock(&state->mutex);
-	if (state->port) {
+	if (state->uart_port) {
 		ret = -EINVAL;
 		goto out;
 	}
 
-	state->port = port;
+	state->uart_port = port;
 	state->pm_state = -1;
 
 	port->cons = drv->cons;
-	port->info = &state->info;
+	port->state = state;
 
 	/*
 	 * If this port is a console, then the spinlock is already
@@ -2488,13 +2485,12 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
 int uart_remove_one_port(struct uart_driver *drv, struct uart_port *port)
 {
 	struct uart_state *state = drv->state + port->line;
-	struct uart_info *info;
 
 	BUG_ON(in_interrupt());
 
-	if (state->port != port)
+	if (state->uart_port != port)
 		printk(KERN_ALERT "Removing wrong port: %p != %p\n",
-			state->port, port);
+			state->uart_port, port);
 
 	mutex_lock(&port_mutex);
 
@@ -2511,9 +2507,8 @@ int uart_remove_one_port(struct uart_driver *drv, struct uart_port *port)
 	 */
 	tty_unregister_device(drv->tty_driver, port->line);
 
-	info = &state->info;
-	if (info && info->port.tty)
-		tty_vhangup(info->port.tty);
+	if (state->port.tty)
+		tty_vhangup(state->port.tty);
 
 	/*
 	 * Free the port IO and memory resources, if any.
@@ -2529,10 +2524,9 @@ int uart_remove_one_port(struct uart_driver *drv, struct uart_port *port)
 	/*
 	 * Kill the tasklet, and free resources.
 	 */
-	if (info)
-		tasklet_kill(&info->tlet);
+	tasklet_kill(&state->tlet);
 
-	state->port = NULL;
+	state->uart_port = NULL;
 	mutex_unlock(&port_mutex);
 
 	return 0;
diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c
index 52db5cc..4560b2e 100644
--- a/drivers/serial/serial_ks8695.c
+++ b/drivers/serial/serial_ks8695.c
@@ -154,7 +154,7 @@ static void ks8695uart_disable_ms(struct uart_port *port)
 static irqreturn_t ks8695uart_rx_chars(int irq, void *dev_id)
 {
 	struct uart_port *port = dev_id;
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	unsigned int status, ch, lsr, flg, max_count = 256;
 
 	status = UART_GET_LSR(port);		/* clears pending LSR interrupts */
@@ -210,7 +210,7 @@ ignore_char:
 static irqreturn_t ks8695uart_tx_chars(int irq, void *dev_id)
 {
 	struct uart_port *port = dev_id;
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 	unsigned int count;
 
 	if (port->x_char) {
@@ -266,7 +266,7 @@ static irqreturn_t ks8695uart_modem_status(int irq, void *dev_id)
 	if (status & URMS_URTERI)
 		port->icount.rng++;
 
-	wake_up_interruptible(&port->info->delta_msr_wait);
+	wake_up_interruptible(&port->state->delta_msr_wait);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index a7bf024..057fc5e 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -138,7 +138,7 @@ static void lh7a40xuart_enable_ms (struct uart_port* port)
 
 static void lh7a40xuart_rx_chars (struct uart_port* port)
 {
-	struct tty_struct* tty = port->info->port.tty;
+	struct tty_struct* tty = port->state->port.tty;
 	int cbRxMax = 256;	/* (Gross) limit on receive */
 	unsigned int data;	/* Received data and status */
 	unsigned int flag;
@@ -184,7 +184,7 @@ static void lh7a40xuart_rx_chars (struct uart_port* port)
 
 static void lh7a40xuart_tx_chars (struct uart_port* port)
 {
-	struct circ_buf* xmit = &port->info->xmit;
+	struct circ_buf* xmit = &port->state->xmit;
 	int cbTxMax = port->fifosize;
 
 	if (port->x_char) {
@@ -241,7 +241,7 @@ static void lh7a40xuart_modem_status (struct uart_port* port)
 	if (delta & CTS)
 		uart_handle_cts_change (port, status & CTS);
 
-	wake_up_interruptible (&port->info->delta_msr_wait);
+	wake_up_interruptible (&port->state->delta_msr_wait);
 }
 
 static irqreturn_t lh7a40xuart_int (int irq, void* dev_id)
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c
index 54dd16d..0f7cf4c 100644
--- a/drivers/serial/serial_txx9.c
+++ b/drivers/serial/serial_txx9.c
@@ -272,7 +272,7 @@ static void serial_txx9_initialize(struct uart_port *port)
 static inline void
 receive_chars(struct uart_txx9_port *up, unsigned int *status)
 {
-	struct tty_struct *tty = up->port.info->port.tty;
+	struct tty_struct *tty = up->port.state->port.tty;
 	unsigned char ch;
 	unsigned int disr = *status;
 	int max_count = 256;
@@ -348,7 +348,7 @@ receive_chars(struct uart_txx9_port *up, unsigned int *status)
 
 static inline void transmit_chars(struct uart_txx9_port *up)
 {
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 	int count;
 
 	if (up->port.x_char) {
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 32dc2fc..85119fb 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -361,7 +361,7 @@ static inline int sci_rxroom(struct uart_port *port)
 
 static void sci_transmit_chars(struct uart_port *port)
 {
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 	unsigned int stopped = uart_tx_stopped(port);
 	unsigned short status;
 	unsigned short ctrl;
@@ -426,7 +426,7 @@ static void sci_transmit_chars(struct uart_port *port)
 static inline void sci_receive_chars(struct uart_port *port)
 {
 	struct sci_port *sci_port = to_sci_port(port);
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	int i, count, copied = 0;
 	unsigned short status;
 	unsigned char flag;
@@ -546,7 +546,7 @@ static inline int sci_handle_errors(struct uart_port *port)
 {
 	int copied = 0;
 	unsigned short status = sci_in(port, SCxSR);
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 
 	if (status & SCxSR_ORER(port)) {
 		/* overrun error */
@@ -600,7 +600,7 @@ static inline int sci_handle_errors(struct uart_port *port)
 
 static inline int sci_handle_fifo_overrun(struct uart_port *port)
 {
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	int copied = 0;
 
 	if (port->type != PORT_SCIF)
@@ -623,7 +623,7 @@ static inline int sci_handle_breaks(struct uart_port *port)
 {
 	int copied = 0;
 	unsigned short status = sci_in(port, SCxSR);
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	struct sci_port *s = to_sci_port(port);
 
 	if (uart_handle_break(port))
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c
index d5276c0..9794e0c 100644
--- a/drivers/serial/sn_console.c
+++ b/drivers/serial/sn_console.c
@@ -469,9 +469,9 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
 		return;
 	}
 
-	if (port->sc_port.info) {
+	if (port->sc_port.state) {
 		/* The serial_core stuffs are initilized, use them */
-		tty = port->sc_port.info->port.tty;
+		tty = port->sc_port.state->port.tty;
 	}
 	else {
 		/* Not registered yet - can't pass to tty layer.  */
@@ -550,9 +550,9 @@ static void sn_transmit_chars(struct sn_cons_port *port, int raw)
 
 	BUG_ON(!port->sc_is_asynch);
 
-	if (port->sc_port.info) {
+	if (port->sc_port.state) {
 		/* We're initilized, using serial core infrastructure */
-		xmit = &port->sc_port.info->xmit;
+		xmit = &port->sc_port.state->xmit;
 	} else {
 		/* Probably sn_sal_switch_to_asynch has been run but serial core isn't
 		 * initilized yet.  Just return.  Writes are going through
@@ -927,7 +927,7 @@ sn_sal_console_write(struct console *co, const char *s, unsigned count)
 	/* We can't look at the xmit buffer if we're not registered with serial core
 	 *  yet.  So only do the fancy recovery after registering
 	 */
-	if (!port->sc_port.info) {
+	if (!port->sc_port.state) {
 		/* Not yet registered with serial core - simple case */
 		puts_raw_fixed(port->sc_ops->sal_puts_raw, s, count);
 		return;
@@ -936,8 +936,8 @@ sn_sal_console_write(struct console *co, const char *s, unsigned count)
 	/* somebody really wants this output, might be an
 	 * oops, kdb, panic, etc.  make sure they get it. */
 	if (spin_is_locked(&port->sc_port.lock)) {
-		int lhead = port->sc_port.info->xmit.head;
-		int ltail = port->sc_port.info->xmit.tail;
+		int lhead = port->sc_port.state->xmit.head;
+		int ltail = port->sc_port.state->xmit.tail;
 		int counter, got_lock = 0;
 
 		/*
@@ -962,13 +962,13 @@ sn_sal_console_write(struct console *co, const char *s, unsigned count)
 				break;
 			} else {
 				/* still locked */
-				if ((lhead != port->sc_port.info->xmit.head)
+				if ((lhead != port->sc_port.state->xmit.head)
 				    || (ltail !=
-					port->sc_port.info->xmit.tail)) {
+					port->sc_port.state->xmit.tail)) {
 					lhead =
-						port->sc_port.info->xmit.head;
+						port->sc_port.state->xmit.head;
 					ltail =
-						port->sc_port.info->xmit.tail;
+						port->sc_port.state->xmit.tail;
 					counter = 0;
 				}
 			}
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index 1df5325..d548652 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -184,8 +184,8 @@ static struct tty_struct *receive_chars(struct uart_port *port)
 {
 	struct tty_struct *tty = NULL;
 
-	if (port->info != NULL)		/* Unopened serial console */
-		tty = port->info->port.tty;
+	if (port->state != NULL)		/* Unopened serial console */
+		tty = port->state->port.tty;
 
 	if (sunhv_ops->receive_chars(port, tty))
 		sun_do_break();
@@ -197,10 +197,10 @@ static void transmit_chars(struct uart_port *port)
 {
 	struct circ_buf *xmit;
 
-	if (!port->info)
+	if (!port->state)
 		return;
 
-	xmit = &port->info->xmit;
+	xmit = &port->state->xmit;
 	if (uart_circ_empty(xmit) || uart_tx_stopped(port))
 		return;
 
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index 0355efe..7c4f2fe 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -117,8 +117,8 @@ receive_chars(struct uart_sunsab_port *up,
 	int count = 0;
 	int i;
 
-	if (up->port.info != NULL)		/* Unopened serial console */
-		tty = up->port.info->port.tty;
+	if (up->port.state != NULL)		/* Unopened serial console */
+		tty = up->port.state->port.tty;
 
 	/* Read number of BYTES (Character + Status) available. */
 	if (stat->sreg.isr0 & SAB82532_ISR0_RPF) {
@@ -229,7 +229,7 @@ static void sunsab_tx_idle(struct uart_sunsab_port *);
 static void transmit_chars(struct uart_sunsab_port *up,
 			   union sab82532_irq_status *stat)
 {
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 	int i;
 
 	if (stat->sreg.isr1 & SAB82532_ISR1_ALLS) {
@@ -297,7 +297,7 @@ static void check_status(struct uart_sunsab_port *up,
 		up->port.icount.dsr++;
 	}
 
-	wake_up_interruptible(&up->port.info->delta_msr_wait);
+	wake_up_interruptible(&up->port.state->delta_msr_wait);
 }
 
 static irqreturn_t sunsab_interrupt(int irq, void *dev_id)
@@ -429,7 +429,7 @@ static void sunsab_tx_idle(struct uart_sunsab_port *up)
 static void sunsab_start_tx(struct uart_port *port)
 {
 	struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 	int i;
 
 	up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 47c6837..5a32365 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -311,7 +311,7 @@ static void sunsu_enable_ms(struct uart_port *port)
 static struct tty_struct *
 receive_chars(struct uart_sunsu_port *up, unsigned char *status)
 {
-	struct tty_struct *tty = up->port.info->port.tty;
+	struct tty_struct *tty = up->port.state->port.tty;
 	unsigned char ch, flag;
 	int max_count = 256;
 	int saw_console_brk = 0;
@@ -389,7 +389,7 @@ receive_chars(struct uart_sunsu_port *up, unsigned char *status)
 
 static void transmit_chars(struct uart_sunsu_port *up)
 {
-	struct circ_buf *xmit = &up->port.info->xmit;
+	struct circ_buf *xmit = &up->port.state->xmit;
 	int count;
 
 	if (up->port.x_char) {
@@ -441,7 +441,7 @@ static void check_modem_status(struct uart_sunsu_port *up)
 	if (status & UART_MSR_DCTS)
 		uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-	wake_up_interruptible(&up->port.info->delta_msr_wait);
+	wake_up_interruptible(&up->port.state->delta_msr_wait);
 }
 
 static irqreturn_t sunsu_serial_interrupt(int irq, void *dev_id)
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index e09d3ce..055034d 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -328,9 +328,9 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up,
 	unsigned char ch, r1, flag;
 
 	tty = NULL;
-	if (up->port.info != NULL &&		/* Unopened serial console */
-	    up->port.info->port.tty != NULL)	/* Keyboard || mouse */
-		tty = up->port.info->port.tty;
+	if (up->port.state != NULL &&		/* Unopened serial console */
+	    up->port.state->port.tty != NULL)	/* Keyboard || mouse */
+		tty = up->port.state->port.tty;
 
 	for (;;) {
 
@@ -451,7 +451,7 @@ static void sunzilog_status_handle(struct uart_sunzilog_port *up,
 			uart_handle_cts_change(&up->port,
 					       (status & CTS));
 
-		wake_up_interruptible(&up->port.info->delta_msr_wait);
+		wake_up_interruptible(&up->port.state->delta_msr_wait);
 	}
 
 	up->prev_status = status;
@@ -501,9 +501,9 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up,
 		return;
 	}
 
-	if (up->port.info == NULL)
+	if (up->port.state == NULL)
 		goto ack_tx_int;
-	xmit = &up->port.info->xmit;
+	xmit = &up->port.state->xmit;
 	if (uart_circ_empty(xmit))
 		goto ack_tx_int;
 
@@ -705,7 +705,7 @@ static void sunzilog_start_tx(struct uart_port *port)
 		port->icount.tx++;
 		port->x_char = 0;
 	} else {
-		struct circ_buf *xmit = &port->info->xmit;
+		struct circ_buf *xmit = &port->state->xmit;
 
 		writeb(xmit->buf[xmit->tail], &channel->data);
 		ZSDELAY();
diff --git a/drivers/serial/timbuart.c b/drivers/serial/timbuart.c
index 063a313..3d40be6 100644
--- a/drivers/serial/timbuart.c
+++ b/drivers/serial/timbuart.c
@@ -77,7 +77,7 @@ static void timbuart_flush_buffer(struct uart_port *port)
 
 static void timbuart_rx_chars(struct uart_port *port)
 {
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 
 	while (ioread32(port->membase + TIMBUART_ISR) & RXDP) {
 		u8 ch = ioread8(port->membase + TIMBUART_RXFIFO);
@@ -86,7 +86,7 @@ static void timbuart_rx_chars(struct uart_port *port)
 	}
 
 	spin_unlock(&port->lock);
-	tty_flip_buffer_push(port->info->port.tty);
+	tty_flip_buffer_push(port->state->port.tty);
 	spin_lock(&port->lock);
 
 	dev_dbg(port->dev, "%s - total read %d bytes\n",
@@ -95,7 +95,7 @@ static void timbuart_rx_chars(struct uart_port *port)
 
 static void timbuart_tx_chars(struct uart_port *port)
 {
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	while (!(ioread32(port->membase + TIMBUART_ISR) & TXBF) &&
 		!uart_circ_empty(xmit)) {
@@ -118,7 +118,7 @@ static void timbuart_handle_tx_port(struct uart_port *port, u32 isr, u32 *ier)
 {
 	struct timbuart_port *uart =
 		container_of(port, struct timbuart_port, port);
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	if (uart_circ_empty(xmit) || uart_tx_stopped(port))
 		return;
@@ -231,7 +231,7 @@ static void timbuart_mctrl_check(struct uart_port *port, u32 isr, u32 *ier)
 		iowrite32(CTS_DELTA, port->membase + TIMBUART_ISR);
 		cts = timbuart_get_mctrl(port);
 		uart_handle_cts_change(port, cts & TIOCM_CTS);
-		wake_up_interruptible(&port->info->delta_msr_wait);
+		wake_up_interruptible(&port->state->delta_msr_wait);
 	}
 
 	*ier |= CTS_DELTA;
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index 3317148..5d3a573 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -75,7 +75,7 @@ static struct uart_port ulite_ports[ULITE_NR_UARTS];
 
 static int ulite_receive(struct uart_port *port, int stat)
 {
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	unsigned char ch = 0;
 	char flag = TTY_NORMAL;
 
@@ -125,7 +125,7 @@ static int ulite_receive(struct uart_port *port, int stat)
 
 static int ulite_transmit(struct uart_port *port, int stat)
 {
-	struct circ_buf *xmit  = &port->info->xmit;
+	struct circ_buf *xmit  = &port->state->xmit;
 
 	if (stat & ULITE_STATUS_TXFULL)
 		return 0;
@@ -162,7 +162,7 @@ static irqreturn_t ulite_isr(int irq, void *dev_id)
 		busy |= ulite_transmit(port, stat);
 	} while (busy);
 
-	tty_flip_buffer_push(port->info->port.tty);
+	tty_flip_buffer_push(port->state->port.tty);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c
index e945e78..0c08f28 100644
--- a/drivers/serial/ucc_uart.c
+++ b/drivers/serial/ucc_uart.c
@@ -327,7 +327,7 @@ static int qe_uart_tx_pump(struct uart_qe_port *qe_port)
 	unsigned char *p;
 	unsigned int count;
 	struct uart_port *port = &qe_port->port;
-	struct circ_buf *xmit = &port->info->xmit;
+	struct circ_buf *xmit = &port->state->xmit;
 
 	bdp = qe_port->rx_cur;
 
@@ -466,7 +466,7 @@ static void qe_uart_int_rx(struct uart_qe_port *qe_port)
 	int i;
 	unsigned char ch, *cp;
 	struct uart_port *port = &qe_port->port;
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	struct qe_bd *bdp;
 	u16 status;
 	unsigned int flg;
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index dac550e..cf4410e 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -318,7 +318,7 @@ static inline void receive_chars(struct uart_port *port, uint8_t *status)
 	char flag;
 	int max_count = RX_MAX_COUNT;
 
-	tty = port->info->port.tty;
+	tty = port->state->port.tty;
 	lsr = *status;
 
 	do {
@@ -386,7 +386,7 @@ static inline void check_modem_status(struct uart_port *port)
 	if (msr & UART_MSR_DCTS)
 		uart_handle_cts_change(port, msr & UART_MSR_CTS);
 
-	wake_up_interruptible(&port->info->delta_msr_wait);
+	wake_up_interruptible(&port->state->delta_msr_wait);
 }
 
 static inline void transmit_chars(struct uart_port *port)
@@ -394,7 +394,7 @@ static inline void transmit_chars(struct uart_port *port)
 	struct circ_buf *xmit;
 	int max_count = TX_MAX_COUNT;
 
-	xmit = &port->info->xmit;
+	xmit = &port->state->xmit;
 
 	if (port->x_char) {
 		siu_write(port, UART_TX, port->x_char);
diff --git a/drivers/serial/zs.c b/drivers/serial/zs.c
index d8c2809..b9c9fb9 100644
--- a/drivers/serial/zs.c
+++ b/drivers/serial/zs.c
@@ -602,12 +602,12 @@ static void zs_receive_chars(struct zs_port *zport)
 		uart_insert_char(uport, status, Rx_OVR, ch, flag);
 	}
 
-	tty_flip_buffer_push(uport->info->port.tty);
+	tty_flip_buffer_push(uport->state->port.tty);
 }
 
 static void zs_raw_transmit_chars(struct zs_port *zport)
 {
-	struct circ_buf *xmit = &zport->port.info->xmit;
+	struct circ_buf *xmit = &zport->port.state->xmit;
 
 	/* XON/XOFF chars.  */
 	if (zport->port.x_char) {
@@ -686,7 +686,7 @@ static void zs_status_handle(struct zs_port *zport, struct zs_port *zport_a)
 			uport->icount.rng++;
 
 		if (delta)
-			wake_up_interruptible(&uport->info->delta_msr_wait);
+			wake_up_interruptible(&uport->state->delta_msr_wait);
 
 		spin_lock(&scc->zlock);
 	}
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 3cd255f..c154270 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -186,7 +186,6 @@
 #include <linux/sysrq.h>
 
 struct uart_port;
-struct uart_info;
 struct serial_struct;
 struct device;
 
@@ -284,7 +283,7 @@ struct uart_port {
 
 	unsigned int		read_status_mask;	/* driver specific */
 	unsigned int		ignore_status_mask;	/* driver specific */
-	struct uart_info	*info;			/* pointer to parent info */
+	struct uart_state	*state;			/* pointer to parent state */
 	struct uart_icount	icount;			/* statistics */
 
 	struct console		*cons;			/* struct console, if any */
@@ -343,8 +342,22 @@ struct uart_port {
  */
 typedef unsigned int __bitwise__ uif_t;
 
-struct uart_info {
+
+/*
+ * This is the state information which is persistent across opens.
+ * The low level driver must not to touch any elements contained
+ * within.
+ */
+struct uart_state {
 	struct tty_port		port;
+	unsigned int		close_delay;		/* msec */
+	unsigned int		closing_wait;		/* msec */
+
+#define USF_CLOSING_WAIT_INF	(0)
+#define USF_CLOSING_WAIT_NONE	(~0U)
+
+	int			count;
+	int			pm_state;
 	struct circ_buf		xmit;
 	uif_t			flags;
 
@@ -362,24 +375,7 @@ struct uart_info {
 
 	struct tasklet_struct	tlet;
 	wait_queue_head_t	delta_msr_wait;
-};
-
-/*
- * This is the state information which is persistent across opens.
- * The low level driver must not to touch any elements contained
- * within.
- */
-struct uart_state {
-	unsigned int		close_delay;		/* msec */
-	unsigned int		closing_wait;		/* msec */
-
-#define USF_CLOSING_WAIT_INF	(0)
-#define USF_CLOSING_WAIT_NONE	(~0U)
-
-	int			count;
-	int			pm_state;
-	struct uart_info	info;
-	struct uart_port	*port;
+	struct uart_port	*uart_port;
 
 	struct mutex		mutex;
 };
@@ -462,7 +458,7 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port);
 
 static inline int uart_tx_stopped(struct uart_port *port)
 {
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 	if(tty->stopped || tty->hw_stopped)
 		return 1;
 	return 0;
@@ -477,7 +473,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
 #ifdef SUPPORT_SYSRQ
 	if (port->sysrq) {
 		if (ch && time_before(jiffies, port->sysrq)) {
-			handle_sysrq(ch, port->info->port.tty);
+			handle_sysrq(ch, port->state->port.tty);
 			port->sysrq = 0;
 			return 1;
 		}
@@ -495,7 +491,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
  */
 static inline int uart_handle_break(struct uart_port *port)
 {
-	struct uart_info *info = port->info;
+	struct uart_state *state = port->state;
 #ifdef SUPPORT_SYSRQ
 	if (port->cons && port->cons->index == port->line) {
 		if (!port->sysrq) {
@@ -506,7 +502,7 @@ static inline int uart_handle_break(struct uart_port *port)
 	}
 #endif
 	if (port->flags & UPF_SAK)
-		do_SAK(info->port.tty);
+		do_SAK(state->port.tty);
 	return 0;
 }
 
@@ -518,7 +514,7 @@ static inline int uart_handle_break(struct uart_port *port)
 static inline void
 uart_handle_dcd_change(struct uart_port *port, unsigned int status)
 {
-	struct uart_info *info = port->info;
+	struct uart_state *state = port->state;
 
 	port->icount.dcd++;
 
@@ -527,11 +523,11 @@ uart_handle_dcd_change(struct uart_port *port, unsigned int status)
 		hardpps();
 #endif
 
-	if (info->flags & UIF_CHECK_CD) {
+	if (state->flags & UIF_CHECK_CD) {
 		if (status)
-			wake_up_interruptible(&info->port.open_wait);
-		else if (info->port.tty)
-			tty_hangup(info->port.tty);
+			wake_up_interruptible(&state->port.open_wait);
+		else if (state->port.tty)
+			tty_hangup(state->port.tty);
 	}
 }
 
@@ -543,12 +539,12 @@ uart_handle_dcd_change(struct uart_port *port, unsigned int status)
 static inline void
 uart_handle_cts_change(struct uart_port *port, unsigned int status)
 {
-	struct uart_info *info = port->info;
-	struct tty_struct *tty = info->port.tty;
+	struct uart_state *state = port->state;
+	struct tty_struct *tty = state->port.tty;
 
 	port->icount.cts++;
 
-	if (info->flags & UIF_CTS_FLOW) {
+	if (state->flags & UIF_CTS_FLOW) {
 		if (tty->hw_stopped) {
 			if (status) {
 				tty->hw_stopped = 0;
@@ -570,7 +566,7 @@ static inline void
 uart_insert_char(struct uart_port *port, unsigned int status,
 		 unsigned int overrun, unsigned int ch, unsigned int flag)
 {
-	struct tty_struct *tty = port->info->port.tty;
+	struct tty_struct *tty = port->state->port.tty;
 
 	if ((status & port->ignore_status_mask & ~overrun) == 0)
 		tty_insert_flip_char(tty, ch, flag);
-- 
1.6.4.2


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

* [PATCH 47/79] serial: Fold closing_* fields into the tty_port ones
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (45 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 46/79] serial: kill off uart_info Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 48/79] serial: use tty_port pointers in the core code Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Remove some more serial specific use

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/serial_core.c |   26 +++++++++++++-------------
 include/linux/serial_core.h  |    2 --
 include/linux/tty.h          |    4 ++--
 3 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index ea53b6f..2d63b13 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -651,10 +651,10 @@ static int uart_get_info(struct uart_state *state,
 	tmp.flags	    = port->flags;
 	tmp.xmit_fifo_size  = port->fifosize;
 	tmp.baud_base	    = port->uartclk / 16;
-	tmp.close_delay	    = state->close_delay / 10;
-	tmp.closing_wait    = state->closing_wait == USF_CLOSING_WAIT_NONE ?
+	tmp.close_delay	    = state->port.close_delay / 10;
+	tmp.closing_wait    = state->port.closing_wait == USF_CLOSING_WAIT_NONE ?
 				ASYNC_CLOSING_WAIT_NONE :
-				state->closing_wait / 10;
+				state->port.closing_wait / 10;
 	tmp.custom_divisor  = port->custom_divisor;
 	tmp.hub6	    = port->hub6;
 	tmp.io_type         = port->iotype;
@@ -724,8 +724,8 @@ static int uart_set_info(struct uart_state *state,
 		retval = -EPERM;
 		if (change_irq || change_port ||
 		    (new_serial.baud_base != port->uartclk / 16) ||
-		    (close_delay != state->close_delay) ||
-		    (closing_wait != state->closing_wait) ||
+		    (close_delay != state->port.close_delay) ||
+		    (closing_wait != state->port.closing_wait) ||
 		    (new_serial.xmit_fifo_size &&
 		     new_serial.xmit_fifo_size != port->fifosize) ||
 		    (((new_flags ^ old_flags) & ~UPF_USR_MASK) != 0))
@@ -834,8 +834,8 @@ static int uart_set_info(struct uart_state *state,
 	port->flags            = (port->flags & ~UPF_CHANGE_MASK) |
 				 (new_flags & UPF_CHANGE_MASK);
 	port->custom_divisor   = new_serial.custom_divisor;
-	state->close_delay     = close_delay;
-	state->closing_wait    = closing_wait;
+	state->port.close_delay     = close_delay;
+	state->port.closing_wait    = closing_wait;
 	if (new_serial.xmit_fifo_size)
 		port->fifosize = new_serial.xmit_fifo_size;
 	if (state->port.tty)
@@ -1297,8 +1297,8 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	 */
 	tty->closing = 1;
 
-	if (state->closing_wait != USF_CLOSING_WAIT_NONE)
-		tty_wait_until_sent(tty, msecs_to_jiffies(state->closing_wait));
+	if (state->port.closing_wait != USF_CLOSING_WAIT_NONE)
+		tty_wait_until_sent(tty, msecs_to_jiffies(state->port.closing_wait));
 
 	/*
 	 * At this point, we stop accepting input.  To do this, we
@@ -1326,8 +1326,8 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	state->port.tty = NULL;
 
 	if (state->port.blocked_open) {
-		if (state->close_delay)
-			msleep_interruptible(state->close_delay);
+		if (state->port.close_delay)
+			msleep_interruptible(state->port.close_delay);
 	} else if (!uart_console(port)) {
 		uart_change_pm(state, 3);
 	}
@@ -2358,11 +2358,11 @@ int uart_register_driver(struct uart_driver *drv)
 	for (i = 0; i < drv->nr; i++) {
 		struct uart_state *state = drv->state + i;
 
-		state->close_delay     = 500;	/* .5 seconds */
-		state->closing_wait    = 30000;	/* 30 seconds */
 		mutex_init(&state->mutex);
 
 		tty_port_init(&state->port);
+		state->port.close_delay     = 500;	/* .5 seconds */
+		state->port.closing_wait    = 30000;	/* 30 seconds */
 		init_waitqueue_head(&state->delta_msr_wait);
 		tasklet_init(&state->tlet, uart_tasklet_action,
 			     (unsigned long)state);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index c154270..fd11d4d 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -350,8 +350,6 @@ typedef unsigned int __bitwise__ uif_t;
  */
 struct uart_state {
 	struct tty_port		port;
-	unsigned int		close_delay;		/* msec */
-	unsigned int		closing_wait;		/* msec */
 
 #define USF_CLOSING_WAIT_INF	(0)
 #define USF_CLOSING_WAIT_NONE	(~0U)
diff --git a/include/linux/tty.h b/include/linux/tty.h
index ecb3d1b..9fdc3d8 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -206,8 +206,8 @@ struct tty_port {
 	unsigned long		flags;		/* TTY flags ASY_*/
 	struct mutex		mutex;		/* Locking */
 	unsigned char		*xmit_buf;	/* Optional buffer */
-	int			close_delay;	/* Close port delay */
-	int			closing_wait;	/* Delay for output */
+	unsigned int		close_delay;	/* Close port delay */
+	unsigned int		closing_wait;	/* Delay for output */
 	int			drain_delay;	/* Set to zero if no pure time
 						   based drain is needed else
 						   set to size of fifo */
-- 
1.6.4.2


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

* [PATCH 48/79] serial: use tty_port pointers in the core code
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (46 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 47/79] serial: Fold closing_* fields into the tty_port ones Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 49/79] serial: move count into the tty_port version Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

From: Alan Cox <alan@linux.intel.com>

Extract out a lot of the x.port. uses and also show up where there are
things left to be isolated that prevent use using the port helpers in the
serial layer at this point

Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 drivers/serial/serial_core.c |  288 +++++++++++++++++++++---------------------
 1 files changed, 146 insertions(+), 142 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 2d63b13..0ffefb3 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -141,7 +141,8 @@ uart_update_mctrl(struct uart_port *port, unsigned int set, unsigned int clear)
  */
 static int uart_startup(struct uart_state *state, int init_hw)
 {
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
+	struct tty_port *port = &state->port;
 	unsigned long page;
 	int retval = 0;
 
@@ -153,9 +154,9 @@ static int uart_startup(struct uart_state *state, int init_hw)
 	 * once we have successfully opened the port.  Also set
 	 * up the tty->alt_speed kludge
 	 */
-	set_bit(TTY_IO_ERROR, &state->port.tty->flags);
+	set_bit(TTY_IO_ERROR, &port->tty->flags);
 
-	if (port->type == PORT_UNKNOWN)
+	if (uport->type == PORT_UNKNOWN)
 		return 0;
 
 	/*
@@ -172,7 +173,7 @@ static int uart_startup(struct uart_state *state, int init_hw)
 		uart_circ_clear(&state->xmit);
 	}
 
-	retval = port->ops->startup(port);
+	retval = uport->ops->startup(uport);
 	if (retval == 0) {
 		if (init_hw) {
 			/*
@@ -184,20 +185,20 @@ static int uart_startup(struct uart_state *state, int init_hw)
 			 * Setup the RTS and DTR signals once the
 			 * port is open and ready to respond.
 			 */
-			if (state->port.tty->termios->c_cflag & CBAUD)
-				uart_set_mctrl(port, TIOCM_RTS | TIOCM_DTR);
+			if (port->tty->termios->c_cflag & CBAUD)
+				uart_set_mctrl(uport, TIOCM_RTS | TIOCM_DTR);
 		}
 
 		if (state->flags & UIF_CTS_FLOW) {
-			spin_lock_irq(&port->lock);
-			if (!(port->ops->get_mctrl(port) & TIOCM_CTS))
-				state->port.tty->hw_stopped = 1;
-			spin_unlock_irq(&port->lock);
+			spin_lock_irq(&uport->lock);
+			if (!(uport->ops->get_mctrl(uport) & TIOCM_CTS))
+				port->tty->hw_stopped = 1;
+			spin_unlock_irq(&uport->lock);
 		}
 
 		state->flags |= UIF_INITIALIZED;
 
-		clear_bit(TTY_IO_ERROR, &state->port.tty->flags);
+		clear_bit(TTY_IO_ERROR, &port->tty->flags);
 	}
 
 	if (retval && capable(CAP_SYS_ADMIN))
@@ -672,7 +673,8 @@ static int uart_set_info(struct uart_state *state,
 			 struct serial_struct __user *newinfo)
 {
 	struct serial_struct new_serial;
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
+	struct tty_port *port = &state->port;
 	unsigned long new_port;
 	unsigned int change_irq, change_port, closing_wait;
 	unsigned int old_custom_divisor, close_delay;
@@ -700,47 +702,47 @@ static int uart_set_info(struct uart_state *state,
 	 */
 	mutex_lock(&state->mutex);
 
-	change_irq  = !(port->flags & UPF_FIXED_PORT)
-		&& new_serial.irq != port->irq;
+	change_irq  = !(uport->flags & UPF_FIXED_PORT)
+		&& new_serial.irq != uport->irq;
 
 	/*
 	 * Since changing the 'type' of the port changes its resource
 	 * allocations, we should treat type changes the same as
 	 * IO port changes.
 	 */
-	change_port = !(port->flags & UPF_FIXED_PORT)
-		&& (new_port != port->iobase ||
-		    (unsigned long)new_serial.iomem_base != port->mapbase ||
-		    new_serial.hub6 != port->hub6 ||
-		    new_serial.io_type != port->iotype ||
-		    new_serial.iomem_reg_shift != port->regshift ||
-		    new_serial.type != port->type);
-
-	old_flags = port->flags;
+	change_port = !(uport->flags & UPF_FIXED_PORT)
+		&& (new_port != uport->iobase ||
+		    (unsigned long)new_serial.iomem_base != uport->mapbase ||
+		    new_serial.hub6 != uport->hub6 ||
+		    new_serial.io_type != uport->iotype ||
+		    new_serial.iomem_reg_shift != uport->regshift ||
+		    new_serial.type != uport->type);
+
+	old_flags = uport->flags;
 	new_flags = new_serial.flags;
-	old_custom_divisor = port->custom_divisor;
+	old_custom_divisor = uport->custom_divisor;
 
 	if (!capable(CAP_SYS_ADMIN)) {
 		retval = -EPERM;
 		if (change_irq || change_port ||
-		    (new_serial.baud_base != port->uartclk / 16) ||
-		    (close_delay != state->port.close_delay) ||
-		    (closing_wait != state->port.closing_wait) ||
+		    (new_serial.baud_base != uport->uartclk / 16) ||
+		    (close_delay != port->close_delay) ||
+		    (closing_wait != port->closing_wait) ||
 		    (new_serial.xmit_fifo_size &&
-		     new_serial.xmit_fifo_size != port->fifosize) ||
+		     new_serial.xmit_fifo_size != uport->fifosize) ||
 		    (((new_flags ^ old_flags) & ~UPF_USR_MASK) != 0))
 			goto exit;
-		port->flags = ((port->flags & ~UPF_USR_MASK) |
+		uport->flags = ((uport->flags & ~UPF_USR_MASK) |
 			       (new_flags & UPF_USR_MASK));
-		port->custom_divisor = new_serial.custom_divisor;
+		uport->custom_divisor = new_serial.custom_divisor;
 		goto check_and_exit;
 	}
 
 	/*
 	 * Ask the low level driver to verify the settings.
 	 */
-	if (port->ops->verify_port)
-		retval = port->ops->verify_port(port, &new_serial);
+	if (uport->ops->verify_port)
+		retval = uport->ops->verify_port(uport, &new_serial);
 
 	if ((new_serial.irq >= nr_irqs) || (new_serial.irq < 0) ||
 	    (new_serial.baud_base < 9600))
@@ -769,31 +771,31 @@ static int uart_set_info(struct uart_state *state,
 		unsigned long old_iobase, old_mapbase;
 		unsigned int old_type, old_iotype, old_hub6, old_shift;
 
-		old_iobase = port->iobase;
-		old_mapbase = port->mapbase;
-		old_type = port->type;
-		old_hub6 = port->hub6;
-		old_iotype = port->iotype;
-		old_shift = port->regshift;
+		old_iobase = uport->iobase;
+		old_mapbase = uport->mapbase;
+		old_type = uport->type;
+		old_hub6 = uport->hub6;
+		old_iotype = uport->iotype;
+		old_shift = uport->regshift;
 
 		/*
 		 * Free and release old regions
 		 */
 		if (old_type != PORT_UNKNOWN)
-			port->ops->release_port(port);
+			uport->ops->release_port(uport);
 
-		port->iobase = new_port;
-		port->type = new_serial.type;
-		port->hub6 = new_serial.hub6;
-		port->iotype = new_serial.io_type;
-		port->regshift = new_serial.iomem_reg_shift;
-		port->mapbase = (unsigned long)new_serial.iomem_base;
+		uport->iobase = new_port;
+		uport->type = new_serial.type;
+		uport->hub6 = new_serial.hub6;
+		uport->iotype = new_serial.io_type;
+		uport->regshift = new_serial.iomem_reg_shift;
+		uport->mapbase = (unsigned long)new_serial.iomem_base;
 
 		/*
 		 * Claim and map the new regions
 		 */
-		if (port->type != PORT_UNKNOWN) {
-			retval = port->ops->request_port(port);
+		if (uport->type != PORT_UNKNOWN) {
+			retval = uport->ops->request_port(uport);
 		} else {
 			/* Always success - Jean II */
 			retval = 0;
@@ -804,19 +806,19 @@ static int uart_set_info(struct uart_state *state,
 		 * new port, try to restore the old settings.
 		 */
 		if (retval && old_type != PORT_UNKNOWN) {
-			port->iobase = old_iobase;
-			port->type = old_type;
-			port->hub6 = old_hub6;
-			port->iotype = old_iotype;
-			port->regshift = old_shift;
-			port->mapbase = old_mapbase;
-			retval = port->ops->request_port(port);
+			uport->iobase = old_iobase;
+			uport->type = old_type;
+			uport->hub6 = old_hub6;
+			uport->iotype = old_iotype;
+			uport->regshift = old_shift;
+			uport->mapbase = old_mapbase;
+			retval = uport->ops->request_port(uport);
 			/*
 			 * If we failed to restore the old settings,
 			 * we fail like this.
 			 */
 			if (retval)
-				port->type = PORT_UNKNOWN;
+				uport->type = PORT_UNKNOWN;
 
 			/*
 			 * We failed anyway.
@@ -828,38 +830,38 @@ static int uart_set_info(struct uart_state *state,
 	}
 
 	if (change_irq)
-		port->irq      = new_serial.irq;
-	if (!(port->flags & UPF_FIXED_PORT))
-		port->uartclk  = new_serial.baud_base * 16;
-	port->flags            = (port->flags & ~UPF_CHANGE_MASK) |
+		uport->irq      = new_serial.irq;
+	if (!(uport->flags & UPF_FIXED_PORT))
+		uport->uartclk  = new_serial.baud_base * 16;
+	uport->flags            = (uport->flags & ~UPF_CHANGE_MASK) |
 				 (new_flags & UPF_CHANGE_MASK);
-	port->custom_divisor   = new_serial.custom_divisor;
-	state->port.close_delay     = close_delay;
-	state->port.closing_wait    = closing_wait;
+	uport->custom_divisor   = new_serial.custom_divisor;
+	port->close_delay     = close_delay;
+	port->closing_wait    = closing_wait;
 	if (new_serial.xmit_fifo_size)
-		port->fifosize = new_serial.xmit_fifo_size;
-	if (state->port.tty)
-		state->port.tty->low_latency =
-			(port->flags & UPF_LOW_LATENCY) ? 1 : 0;
+		uport->fifosize = new_serial.xmit_fifo_size;
+	if (port->tty)
+		port->tty->low_latency =
+			(uport->flags & UPF_LOW_LATENCY) ? 1 : 0;
 
  check_and_exit:
 	retval = 0;
-	if (port->type == PORT_UNKNOWN)
+	if (uport->type == PORT_UNKNOWN)
 		goto exit;
 	if (state->flags & UIF_INITIALIZED) {
-		if (((old_flags ^ port->flags) & UPF_SPD_MASK) ||
-		    old_custom_divisor != port->custom_divisor) {
+		if (((old_flags ^ uport->flags) & UPF_SPD_MASK) ||
+		    old_custom_divisor != uport->custom_divisor) {
 			/*
 			 * If they're setting up a custom divisor or speed,
 			 * instead of clearing it, then bitch about it. No
 			 * need to rate-limit; it's CAP_SYS_ADMIN only.
 			 */
-			if (port->flags & UPF_SPD_MASK) {
+			if (uport->flags & UPF_SPD_MASK) {
 				char buf[64];
 				printk(KERN_NOTICE
 				       "%s sets custom speed on %s. This "
 				       "is deprecated.\n", current->comm,
-				       tty_name(state->port.tty, buf));
+				       tty_name(port->tty, buf));
 			}
 			uart_change_speed(state, NULL);
 		}
@@ -878,10 +880,11 @@ static int uart_set_info(struct uart_state *state,
 static int uart_get_lsr_info(struct uart_state *state,
 			     unsigned int __user *value)
 {
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
+	struct tty_port *port = &state->port;
 	unsigned int result;
 
-	result = port->ops->tx_empty(port);
+	result = uport->ops->tx_empty(uport);
 
 	/*
 	 * If we're about to load something into the transmit
@@ -889,9 +892,9 @@ static int uart_get_lsr_info(struct uart_state *state,
 	 * avoid a race condition (depending on when the transmit
 	 * interrupt happens).
 	 */
-	if (port->x_char ||
+	if (uport->x_char ||
 	    ((uart_circ_chars_pending(&state->xmit) > 0) &&
-	     !state->port.tty->stopped && !state->port.tty->hw_stopped))
+	     !port->tty->stopped && !port->tty->hw_stopped))
 		result &= ~TIOCSER_TEMT;
 
 	return put_user(result, value);
@@ -900,17 +903,17 @@ static int uart_get_lsr_info(struct uart_state *state,
 static int uart_tiocmget(struct tty_struct *tty, struct file *file)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 	int result = -EIO;
 
 	mutex_lock(&state->mutex);
 	if ((!file || !tty_hung_up_p(file)) &&
 	    !(tty->flags & (1 << TTY_IO_ERROR))) {
-		result = port->mctrl;
+		result = uport->mctrl;
 
-		spin_lock_irq(&port->lock);
-		result |= port->ops->get_mctrl(port);
-		spin_unlock_irq(&port->lock);
+		spin_lock_irq(&uport->lock);
+		result |= uport->ops->get_mctrl(uport);
+		spin_unlock_irq(&uport->lock);
 	}
 	mutex_unlock(&state->mutex);
 
@@ -922,13 +925,13 @@ uart_tiocmset(struct tty_struct *tty, struct file *file,
 	      unsigned int set, unsigned int clear)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 	int ret = -EIO;
 
 	mutex_lock(&state->mutex);
 	if ((!file || !tty_hung_up_p(file)) &&
 	    !(tty->flags & (1 << TTY_IO_ERROR))) {
-		uart_update_mctrl(port, set, clear);
+		uart_update_mctrl(uport, set, clear);
 		ret = 0;
 	}
 	mutex_unlock(&state->mutex);
@@ -938,12 +941,12 @@ uart_tiocmset(struct tty_struct *tty, struct file *file,
 static int uart_break_ctl(struct tty_struct *tty, int break_state)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 
 	mutex_lock(&state->mutex);
 
-	if (port->type != PORT_UNKNOWN)
-		port->ops->break_ctl(port, break_state);
+	if (uport->type != PORT_UNKNOWN)
+		uport->ops->break_ctl(uport, break_state);
 
 	mutex_unlock(&state->mutex);
 	return 0;
@@ -951,7 +954,7 @@ static int uart_break_ctl(struct tty_struct *tty, int break_state)
 
 static int uart_do_autoconfig(struct uart_state *state)
 {
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 	int flags, ret;
 
 	if (!capable(CAP_SYS_ADMIN))
@@ -973,18 +976,18 @@ static int uart_do_autoconfig(struct uart_state *state)
 		 * If we already have a port type configured,
 		 * we must release its resources.
 		 */
-		if (port->type != PORT_UNKNOWN)
-			port->ops->release_port(port);
+		if (uport->type != PORT_UNKNOWN)
+			uport->ops->release_port(uport);
 
 		flags = UART_CONFIG_TYPE;
-		if (port->flags & UPF_AUTO_IRQ)
+		if (uport->flags & UPF_AUTO_IRQ)
 			flags |= UART_CONFIG_IRQ;
 
 		/*
 		 * This will claim the ports resources if
 		 * a port is found.
 		 */
-		port->ops->config_port(port, flags);
+		uport->ops->config_port(uport, flags);
 
 		ret = uart_startup(state, 1);
 	}
@@ -1001,7 +1004,7 @@ static int uart_do_autoconfig(struct uart_state *state)
 static int
 uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 {
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 	DECLARE_WAITQUEUE(wait, current);
 	struct uart_icount cprev, cnow;
 	int ret;
@@ -1009,20 +1012,20 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 	/*
 	 * note the counters on entry
 	 */
-	spin_lock_irq(&port->lock);
-	memcpy(&cprev, &port->icount, sizeof(struct uart_icount));
+	spin_lock_irq(&uport->lock);
+	memcpy(&cprev, &uport->icount, sizeof(struct uart_icount));
 
 	/*
 	 * Force modem status interrupts on
 	 */
-	port->ops->enable_ms(port);
-	spin_unlock_irq(&port->lock);
+	uport->ops->enable_ms(uport);
+	spin_unlock_irq(&uport->lock);
 
 	add_wait_queue(&state->delta_msr_wait, &wait);
 	for (;;) {
-		spin_lock_irq(&port->lock);
-		memcpy(&cnow, &port->icount, sizeof(struct uart_icount));
-		spin_unlock_irq(&port->lock);
+		spin_lock_irq(&uport->lock);
+		memcpy(&cnow, &uport->icount, sizeof(struct uart_icount));
+		spin_unlock_irq(&uport->lock);
 
 		set_current_state(TASK_INTERRUPTIBLE);
 
@@ -1062,11 +1065,11 @@ static int uart_get_count(struct uart_state *state,
 {
 	struct serial_icounter_struct icount;
 	struct uart_icount cnow;
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 
-	spin_lock_irq(&port->lock);
-	memcpy(&cnow, &port->icount, sizeof(struct uart_icount));
-	spin_unlock_irq(&port->lock);
+	spin_lock_irq(&uport->lock);
+	memcpy(&cnow, &uport->icount, sizeof(struct uart_icount));
+	spin_unlock_irq(&uport->lock);
 
 	icount.cts         = cnow.cts;
 	icount.dsr         = cnow.dsr;
@@ -1158,9 +1161,9 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
 		break;
 
 	default: {
-		struct uart_port *port = state->uart_port;
-		if (port->ops->ioctl)
-			ret = port->ops->ioctl(port, cmd, arg);
+		struct uart_port *uport = state->uart_port;
+		if (uport->ops->ioctl)
+			ret = uport->ops->ioctl(uport, cmd, arg);
 		break;
 	}
 	}
@@ -1173,10 +1176,10 @@ out:
 static void uart_set_ldisc(struct tty_struct *tty)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 
-	if (port->ops->set_ldisc)
-		port->ops->set_ldisc(port);
+	if (uport->ops->set_ldisc)
+		uport->ops->set_ldisc(uport);
 }
 
 static void uart_set_termios(struct tty_struct *tty,
@@ -1254,16 +1257,15 @@ static void uart_set_termios(struct tty_struct *tty,
 static void uart_close(struct tty_struct *tty, struct file *filp)
 {
 	struct uart_state *state = tty->driver_data;
-	struct uart_port *port;
+	struct tty_port *port;
+	struct uart_port *uport;
 
 	BUG_ON(!kernel_locked());
 
-	if (!state || !state->uart_port)
-		return;
-
-	port = state->uart_port;
+	uport = state->uart_port;
+	port = &state->port;
 
-	pr_debug("uart_close(%d) called\n", port->line);
+	pr_debug("uart_close(%d) called\n", uport->line);
 
 	mutex_lock(&state->mutex);
 
@@ -1297,8 +1299,8 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	 */
 	tty->closing = 1;
 
-	if (state->port.closing_wait != USF_CLOSING_WAIT_NONE)
-		tty_wait_until_sent(tty, msecs_to_jiffies(state->port.closing_wait));
+	if (port->closing_wait != USF_CLOSING_WAIT_NONE)
+		tty_wait_until_sent(tty, msecs_to_jiffies(port->closing_wait));
 
 	/*
 	 * At this point, we stop accepting input.  To do this, we
@@ -1307,14 +1309,14 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	if (state->flags & UIF_INITIALIZED) {
 		unsigned long flags;
 		spin_lock_irqsave(&port->lock, flags);
-		port->ops->stop_rx(port);
+		uport->ops->stop_rx(uport);
 		spin_unlock_irqrestore(&port->lock, flags);
 		/*
 		 * Before we drop DTR, make sure the UART transmitter
 		 * has completely drained; this is especially
 		 * important if there is a transmit FIFO!
 		 */
-		uart_wait_until_sent(tty, port->timeout);
+		uart_wait_until_sent(tty, uport->timeout);
 	}
 
 	uart_shutdown(state);
@@ -1323,12 +1325,12 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	tty_ldisc_flush(tty);
 
 	tty->closing = 0;
-	state->port.tty = NULL;
+	port->tty = NULL;
 
-	if (state->port.blocked_open) {
-		if (state->port.close_delay)
-			msleep_interruptible(state->port.close_delay);
-	} else if (!uart_console(port)) {
+	if (port->blocked_open) {
+		if (port->close_delay)
+			msleep_interruptible(port->close_delay);
+	} else if (!uart_console(uport)) {
 		uart_change_pm(state, 3);
 	}
 
@@ -1336,9 +1338,9 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	 * Wake up anyone trying to open this port.
 	 */
 	state->flags &= ~UIF_NORMAL_ACTIVE;
-	wake_up_interruptible(&state->port.open_wait);
+	wake_up_interruptible(&port->open_wait);
 
- done:
+done:
 	mutex_unlock(&state->mutex);
 }
 
@@ -1410,6 +1412,7 @@ static void uart_wait_until_sent(struct tty_struct *tty, int timeout)
 static void uart_hangup(struct tty_struct *tty)
 {
 	struct uart_state *state = tty->driver_data;
+	struct tty_port *port = &state->port;
 
 	BUG_ON(!kernel_locked());
 	pr_debug("uart_hangup(%d)\n", state->uart_port->line);
@@ -1420,8 +1423,8 @@ static void uart_hangup(struct tty_struct *tty)
 		uart_shutdown(state);
 		state->count = 0;
 		state->flags &= ~UIF_NORMAL_ACTIVE;
-		state->port.tty = NULL;
-		wake_up_interruptible(&state->port.open_wait);
+		port->tty = NULL;
+		wake_up_interruptible(&port->open_wait);
 		wake_up_interruptible(&state->delta_msr_wait);
 	}
 	mutex_unlock(&state->mutex);
@@ -1470,20 +1473,21 @@ static int
 uart_block_til_ready(struct file *filp, struct uart_state *state)
 {
 	DECLARE_WAITQUEUE(wait, current);
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
+	struct tty_port *port = &state->port;
 	unsigned int mctrl;
 
-	state->port.blocked_open++;
+	port->blocked_open++;
 	state->count--;
 
-	add_wait_queue(&state->port.open_wait, &wait);
+	add_wait_queue(&port->open_wait, &wait);
 	while (1) {
 		set_current_state(TASK_INTERRUPTIBLE);
 
 		/*
 		 * If we have been hung up, tell userspace/restart open.
 		 */
-		if (tty_hung_up_p(filp) || state->port.tty == NULL)
+		if (tty_hung_up_p(filp) || port->tty == NULL)
 			break;
 
 		/*
@@ -1502,8 +1506,8 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 		 * have set TTY_IO_ERROR for a non-existant port.
 		 */
 		if ((filp->f_flags & O_NONBLOCK) ||
-		    (state->port.tty->termios->c_cflag & CLOCAL) ||
-		    (state->port.tty->flags & (1 << TTY_IO_ERROR)))
+		    (port->tty->termios->c_cflag & CLOCAL) ||
+		    (port->tty->flags & (1 << TTY_IO_ERROR)))
 			break;
 
 		/*
@@ -1511,17 +1515,17 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 		 * not set RTS here - we want to make sure we catch
 		 * the data from the modem.
 		 */
-		if (state->port.tty->termios->c_cflag & CBAUD)
-			uart_set_mctrl(port, TIOCM_DTR);
+		if (port->tty->termios->c_cflag & CBAUD)
+			uart_set_mctrl(uport, TIOCM_DTR);
 
 		/*
 		 * and wait for the carrier to indicate that the
 		 * modem is ready for us.
 		 */
-		spin_lock_irq(&port->lock);
-		port->ops->enable_ms(port);
-		mctrl = port->ops->get_mctrl(port);
-		spin_unlock_irq(&port->lock);
+		spin_lock_irq(&uport->lock);
+		uport->ops->enable_ms(uport);
+		mctrl = uport->ops->get_mctrl(uport);
+		spin_unlock_irq(&uport->lock);
 		if (mctrl & TIOCM_CAR)
 			break;
 
@@ -1533,15 +1537,15 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 			break;
 	}
 	set_current_state(TASK_RUNNING);
-	remove_wait_queue(&state->port.open_wait, &wait);
+	remove_wait_queue(&port->open_wait, &wait);
 
 	state->count++;
-	state->port.blocked_open--;
+	port->blocked_open--;
 
 	if (signal_pending(current))
 		return -ERESTARTSYS;
 
-	if (!state->port.tty || tty_hung_up_p(filp))
+	if (!port->tty || tty_hung_up_p(filp))
 		return -EAGAIN;
 
 	return 0;
-- 
1.6.4.2


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

* [PATCH 49/79] serial: move count into the tty_port version
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (47 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 48/79] serial: use tty_port pointers in the core code Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 50/79] serial: move the flags into the tty_port field Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Remove more stuff from the serial special case code

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/serial_core.c |   38 ++++++++++++++++++++------------------
 include/linux/serial_core.h  |    1 -
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 0ffefb3..4af3364 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -52,7 +52,7 @@ static struct lock_class_key port_lock_key;
 
 #define HIGH_BITS_OFFSET	((sizeof(long)-sizeof(int))*8)
 
-#define uart_users(state)	((state)->count + (state)->port.blocked_open)
+#define uart_users(state)	((state)->port.count + (state)->port.blocked_open)
 
 #ifdef CONFIG_SERIAL_CORE_CONSOLE
 #define uart_console(port)	((port)->cons && (port)->cons->index == (port)->line)
@@ -694,7 +694,7 @@ static int uart_set_info(struct uart_state *state,
 			USF_CLOSING_WAIT_NONE : new_serial.closing_wait * 10;
 
 	/*
-	 * This semaphore protects state->count.  It is also
+	 * This semaphore protects port->count.  It is also
 	 * very useful to prevent opens.  Also, take the
 	 * port configuration semaphore to make sure that a
 	 * module insertion/removal doesn't change anything
@@ -1272,24 +1272,24 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	if (tty_hung_up_p(filp))
 		goto done;
 
-	if ((tty->count == 1) && (state->count != 1)) {
+	if ((tty->count == 1) && (port->count != 1)) {
 		/*
 		 * Uh, oh.  tty->count is 1, which means that the tty
-		 * structure will be freed.  state->count should always
+		 * structure will be freed.  port->count should always
 		 * be one in these conditions.  If it's greater than
 		 * one, we've got real problems, since it means the
 		 * serial port won't be shutdown.
 		 */
 		printk(KERN_ERR "uart_close: bad serial port count; tty->count is 1, "
-		       "state->count is %d\n", state->count);
-		state->count = 1;
+		       "port->count is %d\n", port->count);
+		port->count = 1;
 	}
-	if (--state->count < 0) {
+	if (--port->count < 0) {
 		printk(KERN_ERR "uart_close: bad serial port count for %s: %d\n",
-		       tty->name, state->count);
-		state->count = 0;
+		       tty->name, port->count);
+		port->count = 0;
 	}
-	if (state->count)
+	if (port->count)
 		goto done;
 
 	/*
@@ -1421,7 +1421,7 @@ static void uart_hangup(struct tty_struct *tty)
 	if (state->flags & UIF_NORMAL_ACTIVE) {
 		uart_flush_buffer(tty);
 		uart_shutdown(state);
-		state->count = 0;
+		port->count = 0;
 		state->flags &= ~UIF_NORMAL_ACTIVE;
 		port->tty = NULL;
 		wake_up_interruptible(&port->open_wait);
@@ -1478,7 +1478,7 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 	unsigned int mctrl;
 
 	port->blocked_open++;
-	state->count--;
+	port->count--;
 
 	add_wait_queue(&port->open_wait, &wait);
 	while (1) {
@@ -1539,7 +1539,7 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&port->open_wait, &wait);
 
-	state->count++;
+	port->count++;
 	port->blocked_open--;
 
 	if (signal_pending(current))
@@ -1562,7 +1562,7 @@ static struct uart_state *uart_get(struct uart_driver *drv, int line)
 		goto err;
 	}
 
-	state->count++;
+	state->port.count++;
 	if (!state->uart_port || state->uart_port->flags & UPF_DEAD) {
 		ret = -ENXIO;
 		goto err_unlock;
@@ -1570,7 +1570,7 @@ static struct uart_state *uart_get(struct uart_driver *drv, int line)
 	return state;
 
  err_unlock:
-	state->count--;
+	state->port.count--;
 	mutex_unlock(&state->mutex);
  err:
 	return ERR_PTR(ret);
@@ -1590,6 +1590,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 {
 	struct uart_driver *drv = (struct uart_driver *)tty->driver->driver_state;
 	struct uart_state *state;
+	struct tty_port *port;
 	int retval, line = tty->index;
 
 	BUG_ON(!kernel_locked());
@@ -1617,6 +1618,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 		retval = PTR_ERR(state);
 		goto fail;
 	}
+	port = &state->port;
 
 	/*
 	 * Once we set tty->driver_data here, we are guaranteed that
@@ -1627,14 +1629,14 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 	state->uart_port->state = state;
 	tty->low_latency = (state->uart_port->flags & UPF_LOW_LATENCY) ? 1 : 0;
 	tty->alt_speed = 0;
-	state->port.tty = tty;
+	port->tty = tty;
 
 	/*
 	 * If the port is in the middle of closing, bail out now.
 	 */
 	if (tty_hung_up_p(filp)) {
 		retval = -EAGAIN;
-		state->count--;
+		port->count--;
 		mutex_unlock(&state->mutex);
 		goto fail;
 	}
@@ -1642,7 +1644,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 	/*
 	 * Make sure the device is in D0 state.
 	 */
-	if (state->count == 1)
+	if (port->count == 1)
 		uart_change_pm(state, 0);
 
 	/*
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index fd11d4d..63ad909 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -354,7 +354,6 @@ struct uart_state {
 #define USF_CLOSING_WAIT_INF	(0)
 #define USF_CLOSING_WAIT_NONE	(~0U)
 
-	int			count;
 	int			pm_state;
 	struct circ_buf		xmit;
 	uif_t			flags;
-- 
1.6.4.2


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

* [PATCH 50/79] serial: move the flags into the tty_port field
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (48 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 49/79] serial: move count into the tty_port version Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 51/79] serial: kill off uif_t Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Fortunately the serial layer was designed to use the same flag values but
with different names. It has its own SUSPENDED flag which is a free slot in
the ASYNC flags so we allocate it in the ASYNC flags instead.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/serial_core.c |  153 +++++++++++++++++++++---------------------
 include/linux/serial.h       |    2 +
 include/linux/serial_core.h  |   48 +++++--------
 3 files changed, 98 insertions(+), 105 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 4af3364..744dec9 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -29,10 +29,10 @@
 #include <linux/console.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
-#include <linux/serial_core.h>
 #include <linux/smp_lock.h>
 #include <linux/device.h>
 #include <linux/serial.h> /* for serial_state and serial_icounter_struct */
+#include <linux/serial_core.h>
 #include <linux/delay.h>
 #include <linux/mutex.h>
 
@@ -146,7 +146,7 @@ static int uart_startup(struct uart_state *state, int init_hw)
 	unsigned long page;
 	int retval = 0;
 
-	if (state->flags & UIF_INITIALIZED)
+	if (port->flags & ASYNC_INITIALIZED)
 		return 0;
 
 	/*
@@ -189,14 +189,14 @@ static int uart_startup(struct uart_state *state, int init_hw)
 				uart_set_mctrl(uport, TIOCM_RTS | TIOCM_DTR);
 		}
 
-		if (state->flags & UIF_CTS_FLOW) {
+		if (port->flags & ASYNC_CTS_FLOW) {
 			spin_lock_irq(&uport->lock);
 			if (!(uport->ops->get_mctrl(uport) & TIOCM_CTS))
 				port->tty->hw_stopped = 1;
 			spin_unlock_irq(&uport->lock);
 		}
 
-		state->flags |= UIF_INITIALIZED;
+		set_bit(ASYNCB_INITIALIZED, &port->flags);
 
 		clear_bit(TTY_IO_ERROR, &port->tty->flags);
 	}
@@ -214,7 +214,7 @@ static int uart_startup(struct uart_state *state, int init_hw)
  */
 static void uart_shutdown(struct uart_state *state)
 {
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 	struct tty_struct *tty = state->port.tty;
 
 	/*
@@ -223,14 +223,12 @@ static void uart_shutdown(struct uart_state *state)
 	if (tty)
 		set_bit(TTY_IO_ERROR, &tty->flags);
 
-	if (state->flags & UIF_INITIALIZED) {
-		state->flags &= ~UIF_INITIALIZED;
-
+	if (test_and_clear_bit(ASYNCB_INITIALIZED, &state->port.flags)) {
 		/*
 		 * Turn off DTR and RTS early.
 		 */
 		if (!tty || (tty->termios->c_cflag & HUPCL))
-			uart_clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
+			uart_clear_mctrl(uport, TIOCM_DTR | TIOCM_RTS);
 
 		/*
 		 * clear delta_msr_wait queue to avoid mem leaks: we may free
@@ -244,12 +242,12 @@ static void uart_shutdown(struct uart_state *state)
 		/*
 		 * Free the IRQ and disable the port.
 		 */
-		port->ops->shutdown(port);
+		uport->ops->shutdown(uport);
 
 		/*
 		 * Ensure that the IRQ handler isn't running on another CPU.
 		 */
-		synchronize_irq(port->irq);
+		synchronize_irq(uport->irq);
 	}
 
 	/*
@@ -429,15 +427,16 @@ EXPORT_SYMBOL(uart_get_divisor);
 static void
 uart_change_speed(struct uart_state *state, struct ktermios *old_termios)
 {
-	struct tty_struct *tty = state->port.tty;
-	struct uart_port *port = state->uart_port;
+	struct tty_port *port = &state->port;
+	struct tty_struct *tty = port->tty;
+	struct uart_port *uport = state->uart_port;
 	struct ktermios *termios;
 
 	/*
 	 * If we have no tty, termios, or the port does not exist,
 	 * then we can't set the parameters for this port.
 	 */
-	if (!tty || !tty->termios || port->type == PORT_UNKNOWN)
+	if (!tty || !tty->termios || uport->type == PORT_UNKNOWN)
 		return;
 
 	termios = tty->termios;
@@ -446,16 +445,16 @@ uart_change_speed(struct uart_state *state, struct ktermios *old_termios)
 	 * Set flags based on termios cflag
 	 */
 	if (termios->c_cflag & CRTSCTS)
-		state->flags |= UIF_CTS_FLOW;
+		set_bit(ASYNCB_CTS_FLOW, &port->flags);
 	else
-		state->flags &= ~UIF_CTS_FLOW;
+		clear_bit(ASYNCB_CTS_FLOW, &port->flags);
 
 	if (termios->c_cflag & CLOCAL)
-		state->flags &= ~UIF_CHECK_CD;
+		clear_bit(ASYNCB_CHECK_CD, &port->flags);
 	else
-		state->flags |= UIF_CHECK_CD;
+		set_bit(ASYNCB_CHECK_CD, &port->flags);
 
-	port->ops->set_termios(port, termios, old_termios);
+	uport->ops->set_termios(uport, termios, old_termios);
 }
 
 static inline int
@@ -848,7 +847,7 @@ static int uart_set_info(struct uart_state *state,
 	retval = 0;
 	if (uport->type == PORT_UNKNOWN)
 		goto exit;
-	if (state->flags & UIF_INITIALIZED) {
+	if (port->flags & ASYNC_INITIALIZED) {
 		if (((old_flags ^ uport->flags) & UPF_SPD_MASK) ||
 		    old_custom_divisor != uport->custom_divisor) {
 			/*
@@ -1306,7 +1305,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	 * At this point, we stop accepting input.  To do this, we
 	 * disable the receive line status interrupts.
 	 */
-	if (state->flags & UIF_INITIALIZED) {
+	if (port->flags & ASYNC_INITIALIZED) {
 		unsigned long flags;
 		spin_lock_irqsave(&port->lock, flags);
 		uport->ops->stop_rx(uport);
@@ -1337,7 +1336,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	/*
 	 * Wake up anyone trying to open this port.
 	 */
-	state->flags &= ~UIF_NORMAL_ACTIVE;
+	clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
 	wake_up_interruptible(&port->open_wait);
 
 done:
@@ -1418,11 +1417,11 @@ static void uart_hangup(struct tty_struct *tty)
 	pr_debug("uart_hangup(%d)\n", state->uart_port->line);
 
 	mutex_lock(&state->mutex);
-	if (state->flags & UIF_NORMAL_ACTIVE) {
+	if (port->flags & ASYNC_NORMAL_ACTIVE) {
 		uart_flush_buffer(tty);
 		uart_shutdown(state);
 		port->count = 0;
-		state->flags &= ~UIF_NORMAL_ACTIVE;
+		clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
 		port->tty = NULL;
 		wake_up_interruptible(&port->open_wait);
 		wake_up_interruptible(&state->delta_msr_wait);
@@ -1493,7 +1492,7 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 		/*
 		 * If the port has been closed, tell userspace/restart open.
 		 */
-		if (!(state->flags & UIF_INITIALIZED))
+		if (!(port->flags & ASYNC_INITIALIZED))
 			break;
 
 		/*
@@ -1662,8 +1661,8 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 	/*
 	 * If this is the first open to succeed, adjust things to suit.
 	 */
-	if (retval == 0 && !(state->flags & UIF_NORMAL_ACTIVE)) {
-		state->flags |= UIF_NORMAL_ACTIVE;
+	if (retval == 0 && !(port->flags & ASYNC_NORMAL_ACTIVE)) {
+		set_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
 
 		uart_update_termios(state);
 	}
@@ -1985,63 +1984,64 @@ static int serial_match_port(struct device *dev, void *data)
 	return dev->devt == devt; /* Actually, only one tty per port */
 }
 
-int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
+int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
 {
-	struct uart_state *state = drv->state + port->line;
+	struct uart_state *state = drv->state + uport->line;
+	struct tty_port *port = &state->port;
 	struct device *tty_dev;
-	struct uart_match match = {port, drv};
+	struct uart_match match = {uport, drv};
 
 	mutex_lock(&state->mutex);
 
-	if (!console_suspend_enabled && uart_console(port)) {
+	if (!console_suspend_enabled && uart_console(uport)) {
 		/* we're going to avoid suspending serial console */
 		mutex_unlock(&state->mutex);
 		return 0;
 	}
 
-	tty_dev = device_find_child(port->dev, &match, serial_match_port);
+	tty_dev = device_find_child(uport->dev, &match, serial_match_port);
 	if (device_may_wakeup(tty_dev)) {
-		enable_irq_wake(port->irq);
+		enable_irq_wake(uport->irq);
 		put_device(tty_dev);
 		mutex_unlock(&state->mutex);
 		return 0;
 	}
-	port->suspended = 1;
+	uport->suspended = 1;
 
-	if (state->flags & UIF_INITIALIZED) {
-		const struct uart_ops *ops = port->ops;
+	if (port->flags & ASYNC_INITIALIZED) {
+		const struct uart_ops *ops = uport->ops;
 		int tries;
 
-		state->flags = (state->flags & ~UIF_INITIALIZED)
-				     | UIF_SUSPENDED;
+		set_bit(ASYNCB_SUSPENDED, &port->flags);
+		clear_bit(ASYNCB_INITIALIZED, &port->flags);
 
-		spin_lock_irq(&port->lock);
-		ops->stop_tx(port);
-		ops->set_mctrl(port, 0);
-		ops->stop_rx(port);
-		spin_unlock_irq(&port->lock);
+		spin_lock_irq(&uport->lock);
+		ops->stop_tx(uport);
+		ops->set_mctrl(uport, 0);
+		ops->stop_rx(uport);
+		spin_unlock_irq(&uport->lock);
 
 		/*
 		 * Wait for the transmitter to empty.
 		 */
-		for (tries = 3; !ops->tx_empty(port) && tries; tries--)
+		for (tries = 3; !ops->tx_empty(uport) && tries; tries--)
 			msleep(10);
 		if (!tries)
 			printk(KERN_ERR "%s%s%s%d: Unable to drain "
 					"transmitter\n",
-			       port->dev ? dev_name(port->dev) : "",
-			       port->dev ? ": " : "",
+			       uport->dev ? dev_name(uport->dev) : "",
+			       uport->dev ? ": " : "",
 			       drv->dev_name,
-			       drv->tty_driver->name_base + port->line);
+			       drv->tty_driver->name_base + uport->line);
 
-		ops->shutdown(port);
+		ops->shutdown(uport);
 	}
 
 	/*
 	 * Disable the console device before suspending.
 	 */
-	if (uart_console(port))
-		console_stop(port->cons);
+	if (uart_console(uport))
+		console_stop(uport->cons);
 
 	uart_change_pm(state, 3);
 
@@ -2050,67 +2050,68 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
 	return 0;
 }
 
-int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
+int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
 {
-	struct uart_state *state = drv->state + port->line;
+	struct uart_state *state = drv->state + uport->line;
+	struct tty_port *port = &state->port;
 	struct device *tty_dev;
-	struct uart_match match = {port, drv};
+	struct uart_match match = {uport, drv};
 
 	mutex_lock(&state->mutex);
 
-	if (!console_suspend_enabled && uart_console(port)) {
+	if (!console_suspend_enabled && uart_console(uport)) {
 		/* no need to resume serial console, it wasn't suspended */
 		mutex_unlock(&state->mutex);
 		return 0;
 	}
 
-	tty_dev = device_find_child(port->dev, &match, serial_match_port);
-	if (!port->suspended && device_may_wakeup(tty_dev)) {
-		disable_irq_wake(port->irq);
+	tty_dev = device_find_child(uport->dev, &match, serial_match_port);
+	if (!uport->suspended && device_may_wakeup(tty_dev)) {
+		disable_irq_wake(uport->irq);
 		mutex_unlock(&state->mutex);
 		return 0;
 	}
-	port->suspended = 0;
+	uport->suspended = 0;
 
 	/*
 	 * Re-enable the console device after suspending.
 	 */
-	if (uart_console(port)) {
+	if (uart_console(uport)) {
 		struct ktermios termios;
 
 		/*
 		 * First try to use the console cflag setting.
 		 */
 		memset(&termios, 0, sizeof(struct ktermios));
-		termios.c_cflag = port->cons->cflag;
+		termios.c_cflag = uport->cons->cflag;
 
 		/*
 		 * If that's unset, use the tty termios setting.
 		 */
-		if (state->port.tty && termios.c_cflag == 0)
-			termios = *state->port.tty->termios;
+		if (port->tty && termios.c_cflag == 0)
+			termios = *port->tty->termios;
 
 		uart_change_pm(state, 0);
-		port->ops->set_termios(port, &termios, NULL);
-		console_start(port->cons);
+		uport->ops->set_termios(uport, &termios, NULL);
+		console_start(uport->cons);
 	}
 
-	if (state->flags & UIF_SUSPENDED) {
-		const struct uart_ops *ops = port->ops;
+	if (port->flags & ASYNC_SUSPENDED) {
+		const struct uart_ops *ops = uport->ops;
 		int ret;
 
 		uart_change_pm(state, 0);
-		spin_lock_irq(&port->lock);
-		ops->set_mctrl(port, 0);
-		spin_unlock_irq(&port->lock);
-		ret = ops->startup(port);
+		spin_lock_irq(&uport->lock);
+		ops->set_mctrl(uport, 0);
+		spin_unlock_irq(&uport->lock);
+		ret = ops->startup(uport);
 		if (ret == 0) {
 			uart_change_speed(state, NULL);
-			spin_lock_irq(&port->lock);
-			ops->set_mctrl(port, port->mctrl);
-			ops->start_tx(port);
-			spin_unlock_irq(&port->lock);
-			state->flags |= UIF_INITIALIZED;
+			spin_lock_irq(&uport->lock);
+			ops->set_mctrl(uport, uport->mctrl);
+			ops->start_tx(uport);
+			spin_unlock_irq(&uport->lock);
+			set_bit(ASYNCB_INITIALIZED, &port->flags);
 		} else {
 			/*
 			 * Failed to resume - maybe hardware went away?
@@ -2120,7 +2121,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
 			uart_shutdown(state);
 		}
 
-		state->flags &= ~UIF_SUSPENDED;
+		clear_bit(ASYNCB_SUSPENDED, &port->flags);
 	}
 
 	mutex_unlock(&state->mutex);
diff --git a/include/linux/serial.h b/include/linux/serial.h
index e5bb75a..c8613c3 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -122,6 +122,7 @@ struct serial_uart_config {
 
 /* Internal flags used only by kernel */
 #define ASYNCB_INITIALIZED	31 /* Serial port was initialized */
+#define ASYNCB_SUSPENDED	30 /* Serial port is suspended */
 #define ASYNCB_NORMAL_ACTIVE	29 /* Normal device is active */
 #define ASYNCB_BOOT_AUTOCONF	28 /* Autoconfigure port on bootup */
 #define ASYNCB_CLOSING		27 /* Serial port is closing */
@@ -133,6 +134,7 @@ struct serial_uart_config {
 #define ASYNCB_FIRST_KERNEL	22
 
 #define ASYNC_HUP_NOTIFY	(1U << ASYNCB_HUP_NOTIFY)
+#define ASYNC_SUSPENDED		(1U << ASYNCB_SUSPENDED)
 #define ASYNC_FOURPORT		(1U << ASYNCB_FOURPORT)
 #define ASYNC_SAK		(1U << ASYNCB_SAK)
 #define ASYNC_SPLIT_TERMIOS	(1U << ASYNCB_SPLIT_TERMIOS)
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 63ad909..284ef7f 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -20,6 +20,8 @@
 #ifndef LINUX_SERIAL_CORE_H
 #define LINUX_SERIAL_CORE_H
 
+#include <linux/serial.h>
+
 /*
  * The type definitions.  These are from Ted Ts'o's serial.h
  */
@@ -356,19 +358,6 @@ struct uart_state {
 
 	int			pm_state;
 	struct circ_buf		xmit;
-	uif_t			flags;
-
-/*
- * Definitions for info->flags.  These are _private_ to serial_core, and
- * are specific to this structure.  They may be queried by low level drivers.
- *
- * FIXME: use the ASY_ definitions
- */
-#define UIF_CHECK_CD		((__force uif_t) (1 << 25))
-#define UIF_CTS_FLOW		((__force uif_t) (1 << 26))
-#define UIF_NORMAL_ACTIVE	((__force uif_t) (1 << 29))
-#define UIF_INITIALIZED		((__force uif_t) (1 << 31))
-#define UIF_SUSPENDED		((__force uif_t) (1 << 30))
 
 	struct tasklet_struct	tlet;
 	wait_queue_head_t	delta_msr_wait;
@@ -509,22 +498,23 @@ static inline int uart_handle_break(struct uart_port *port)
  *	@status: new carrier detect status, nonzero if active
  */
 static inline void
-uart_handle_dcd_change(struct uart_port *port, unsigned int status)
+uart_handle_dcd_change(struct uart_port *uport, unsigned int status)
 {
-	struct uart_state *state = port->state;
+	struct uart_state *state = uport->state;
+	struct tty_port *port = &state->port;
 
-	port->icount.dcd++;
+	uport->icount.dcd++;
 
 #ifdef CONFIG_HARD_PPS
-	if ((port->flags & UPF_HARDPPS_CD) && status)
+	if ((uport->flags & UPF_HARDPPS_CD) && status)
 		hardpps();
 #endif
 
-	if (state->flags & UIF_CHECK_CD) {
+	if (port->flags & ASYNC_CHECK_CD) {
 		if (status)
-			wake_up_interruptible(&state->port.open_wait);
-		else if (state->port.tty)
-			tty_hangup(state->port.tty);
+			wake_up_interruptible(&port->open_wait);
+		else if (port->tty)
+			tty_hangup(port->tty);
 	}
 }
 
@@ -534,24 +524,24 @@ uart_handle_dcd_change(struct uart_port *port, unsigned int status)
  *	@status: new clear to send status, nonzero if active
  */
 static inline void
-uart_handle_cts_change(struct uart_port *port, unsigned int status)
+uart_handle_cts_change(struct uart_port *uport, unsigned int status)
 {
-	struct uart_state *state = port->state;
-	struct tty_struct *tty = state->port.tty;
+	struct tty_port *port = &uport->state->port;
+	struct tty_struct *tty = port->tty;
 
-	port->icount.cts++;
+	uport->icount.cts++;
 
-	if (state->flags & UIF_CTS_FLOW) {
+	if (port->flags & ASYNC_CTS_FLOW) {
 		if (tty->hw_stopped) {
 			if (status) {
 				tty->hw_stopped = 0;
-				port->ops->start_tx(port);
-				uart_write_wakeup(port);
+				uport->ops->start_tx(uport);
+				uart_write_wakeup(uport);
 			}
 		} else {
 			if (!status) {
 				tty->hw_stopped = 1;
-				port->ops->stop_tx(port);
+				uport->ops->stop_tx(uport);
 			}
 		}
 	}
-- 
1.6.4.2


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

* [PATCH 51/79] serial: kill off uif_t
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (49 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 50/79] serial: move the flags into the tty_port field Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 52/79] serial: replace the state mutex with the tty port mutex Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

This typedef is now extinct

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 include/linux/serial_core.h |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 284ef7f..f98dc78 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -337,18 +337,7 @@ struct uart_port {
 };
 
 /*
- * This is the state information which is only valid when the port
- * is open; it may be cleared the core driver once the device has
- * been closed.  Either the low level driver or the core can modify
- * stuff here.
- */
-typedef unsigned int __bitwise__ uif_t;
-
-
-/*
  * This is the state information which is persistent across opens.
- * The low level driver must not to touch any elements contained
- * within.
  */
 struct uart_state {
 	struct tty_port		port;
-- 
1.6.4.2


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

* [PATCH 52/79] serial: replace the state mutex with the tty port mutex
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (50 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 51/79] serial: kill off uif_t Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 53/79] serial: move delta_msr_wait into the tty_port Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

They cover essentially the same stuff and we can therefore fold it into the
tty_port one.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/pmac_zilog.c  |    8 +-
 drivers/serial/serial_core.c |  227 ++++++++++++++++++++++--------------------
 include/linux/serial_core.h  |    2 -
 3 files changed, 123 insertions(+), 114 deletions(-)

diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index ab4c85b..0dc7868 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1645,7 +1645,7 @@ static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state)
 	state = pmz_uart_reg.state + uap->port.line;
 
 	mutex_lock(&pmz_irq_mutex);
-	mutex_lock(&state->mutex);
+	mutex_lock(&state->port.mutex);
 
 	spin_lock_irqsave(&uap->port.lock, flags);
 
@@ -1676,7 +1676,7 @@ static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state)
 	/* Shut the chip down */
 	pmz_set_scc_power(uap, 0);
 
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&state->port.mutex);
 	mutex_unlock(&pmz_irq_mutex);
 
 	pmz_debug("suspend, switching complete\n");
@@ -1705,7 +1705,7 @@ static int pmz_resume(struct macio_dev *mdev)
 	state = pmz_uart_reg.state + uap->port.line;
 
 	mutex_lock(&pmz_irq_mutex);
-	mutex_lock(&state->mutex);
+	mutex_lock(&state->port.mutex);
 
 	spin_lock_irqsave(&uap->port.lock, flags);
 	if (!ZS_IS_OPEN(uap) && !ZS_IS_CONS(uap)) {
@@ -1737,7 +1737,7 @@ static int pmz_resume(struct macio_dev *mdev)
 	}
 
  bail:
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&state->port.mutex);
 	mutex_unlock(&pmz_irq_mutex);
 
 	/* Right now, we deal with delay by blocking here, I'll be
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 744dec9..9d42e57 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -633,35 +633,36 @@ static void uart_unthrottle(struct tty_struct *tty)
 static int uart_get_info(struct uart_state *state,
 			 struct serial_struct __user *retinfo)
 {
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
+	struct tty_port *port = &state->port;
 	struct serial_struct tmp;
 
 	memset(&tmp, 0, sizeof(tmp));
 
 	/* Ensure the state we copy is consistent and no hardware changes
 	   occur as we go */
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 
-	tmp.type	    = port->type;
-	tmp.line	    = port->line;
-	tmp.port	    = port->iobase;
+	tmp.type	    = uport->type;
+	tmp.line	    = uport->line;
+	tmp.port	    = uport->iobase;
 	if (HIGH_BITS_OFFSET)
-		tmp.port_high = (long) port->iobase >> HIGH_BITS_OFFSET;
-	tmp.irq		    = port->irq;
-	tmp.flags	    = port->flags;
-	tmp.xmit_fifo_size  = port->fifosize;
-	tmp.baud_base	    = port->uartclk / 16;
-	tmp.close_delay	    = state->port.close_delay / 10;
-	tmp.closing_wait    = state->port.closing_wait == USF_CLOSING_WAIT_NONE ?
+		tmp.port_high = (long) uport->iobase >> HIGH_BITS_OFFSET;
+	tmp.irq		    = uport->irq;
+	tmp.flags	    = uport->flags;
+	tmp.xmit_fifo_size  = uport->fifosize;
+	tmp.baud_base	    = uport->uartclk / 16;
+	tmp.close_delay	    = port->close_delay / 10;
+	tmp.closing_wait    = port->closing_wait == USF_CLOSING_WAIT_NONE ?
 				ASYNC_CLOSING_WAIT_NONE :
-				state->port.closing_wait / 10;
-	tmp.custom_divisor  = port->custom_divisor;
-	tmp.hub6	    = port->hub6;
-	tmp.io_type         = port->iotype;
-	tmp.iomem_reg_shift = port->regshift;
-	tmp.iomem_base      = (void *)(unsigned long)port->mapbase;
+				port->closing_wait / 10;
+	tmp.custom_divisor  = uport->custom_divisor;
+	tmp.hub6	    = uport->hub6;
+	tmp.io_type         = uport->iotype;
+	tmp.iomem_reg_shift = uport->regshift;
+	tmp.iomem_base      = (void *)(unsigned long)uport->mapbase;
 
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 
 	if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
 		return -EFAULT;
@@ -699,7 +700,7 @@ static int uart_set_info(struct uart_state *state,
 	 * module insertion/removal doesn't change anything
 	 * under us.
 	 */
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 
 	change_irq  = !(uport->flags & UPF_FIXED_PORT)
 		&& new_serial.irq != uport->irq;
@@ -867,7 +868,7 @@ static int uart_set_info(struct uart_state *state,
 	} else
 		retval = uart_startup(state, 1);
  exit:
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 	return retval;
 }
 
@@ -902,10 +903,11 @@ static int uart_get_lsr_info(struct uart_state *state,
 static int uart_tiocmget(struct tty_struct *tty, struct file *file)
 {
 	struct uart_state *state = tty->driver_data;
+	struct tty_port *port = &state->port;
 	struct uart_port *uport = state->uart_port;
 	int result = -EIO;
 
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 	if ((!file || !tty_hung_up_p(file)) &&
 	    !(tty->flags & (1 << TTY_IO_ERROR))) {
 		result = uport->mctrl;
@@ -914,7 +916,7 @@ static int uart_tiocmget(struct tty_struct *tty, struct file *file)
 		result |= uport->ops->get_mctrl(uport);
 		spin_unlock_irq(&uport->lock);
 	}
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 
 	return result;
 }
@@ -925,35 +927,38 @@ uart_tiocmset(struct tty_struct *tty, struct file *file,
 {
 	struct uart_state *state = tty->driver_data;
 	struct uart_port *uport = state->uart_port;
+	struct tty_port *port = &state->port;
 	int ret = -EIO;
 
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 	if ((!file || !tty_hung_up_p(file)) &&
 	    !(tty->flags & (1 << TTY_IO_ERROR))) {
 		uart_update_mctrl(uport, set, clear);
 		ret = 0;
 	}
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 	return ret;
 }
 
 static int uart_break_ctl(struct tty_struct *tty, int break_state)
 {
 	struct uart_state *state = tty->driver_data;
+	struct tty_port *port = &state->port;
 	struct uart_port *uport = state->uart_port;
 
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 
 	if (uport->type != PORT_UNKNOWN)
 		uport->ops->break_ctl(uport, break_state);
 
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 	return 0;
 }
 
 static int uart_do_autoconfig(struct uart_state *state)
 {
 	struct uart_port *uport = state->uart_port;
+	struct tty_port *port = &state->port;
 	int flags, ret;
 
 	if (!capable(CAP_SYS_ADMIN))
@@ -964,7 +969,7 @@ static int uart_do_autoconfig(struct uart_state *state)
 	 * changing, and hence any extra opens of the port while
 	 * we're auto-configuring.
 	 */
-	if (mutex_lock_interruptible(&state->mutex))
+	if (mutex_lock_interruptible(&port->mutex))
 		return -ERESTARTSYS;
 
 	ret = -EBUSY;
@@ -990,7 +995,7 @@ static int uart_do_autoconfig(struct uart_state *state)
 
 		ret = uart_startup(state, 1);
 	}
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 	return ret;
 }
 
@@ -1093,6 +1098,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
 	   unsigned long arg)
 {
 	struct uart_state *state = tty->driver_data;
+	struct tty_port *port = &state->port;
 	void __user *uarg = (void __user *)arg;
 	int ret = -ENOIOCTLCMD;
 
@@ -1143,7 +1149,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
 	if (ret != -ENOIOCTLCMD)
 		goto out;
 
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 
 	if (tty_hung_up_p(filp)) {
 		ret = -EIO;
@@ -1167,7 +1173,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
 	}
 	}
 out_up:
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 out:
 	return ret;
 }
@@ -1266,7 +1272,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 
 	pr_debug("uart_close(%d) called\n", uport->line);
 
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 
 	if (tty_hung_up_p(filp))
 		goto done;
@@ -1340,7 +1346,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	wake_up_interruptible(&port->open_wait);
 
 done:
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 }
 
 static void uart_wait_until_sent(struct tty_struct *tty, int timeout)
@@ -1416,7 +1422,7 @@ static void uart_hangup(struct tty_struct *tty)
 	BUG_ON(!kernel_locked());
 	pr_debug("uart_hangup(%d)\n", state->uart_port->line);
 
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 	if (port->flags & ASYNC_NORMAL_ACTIVE) {
 		uart_flush_buffer(tty);
 		uart_shutdown(state);
@@ -1426,7 +1432,7 @@ static void uart_hangup(struct tty_struct *tty)
 		wake_up_interruptible(&port->open_wait);
 		wake_up_interruptible(&state->delta_msr_wait);
 	}
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 }
 
 /*
@@ -1528,9 +1534,9 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 		if (mctrl & TIOCM_CAR)
 			break;
 
-		mutex_unlock(&state->mutex);
+		mutex_unlock(&port->mutex);
 		schedule();
-		mutex_lock(&state->mutex);
+		mutex_lock(&port->mutex);
 
 		if (signal_pending(current))
 			break;
@@ -1553,15 +1559,17 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
 static struct uart_state *uart_get(struct uart_driver *drv, int line)
 {
 	struct uart_state *state;
+	struct tty_port *port;
 	int ret = 0;
 
 	state = drv->state + line;
-	if (mutex_lock_interruptible(&state->mutex)) {
+	port = &state->port;
+	if (mutex_lock_interruptible(&port->mutex)) {
 		ret = -ERESTARTSYS;
 		goto err;
 	}
 
-	state->port.count++;
+	port->count++;
 	if (!state->uart_port || state->uart_port->flags & UPF_DEAD) {
 		ret = -ENXIO;
 		goto err_unlock;
@@ -1569,8 +1577,8 @@ static struct uart_state *uart_get(struct uart_driver *drv, int line)
 	return state;
 
  err_unlock:
-	state->port.count--;
-	mutex_unlock(&state->mutex);
+	port->count--;
+	mutex_unlock(&port->mutex);
  err:
 	return ERR_PTR(ret);
 }
@@ -1636,7 +1644,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 	if (tty_hung_up_p(filp)) {
 		retval = -EAGAIN;
 		port->count--;
-		mutex_unlock(&state->mutex);
+		mutex_unlock(&port->mutex);
 		goto fail;
 	}
 
@@ -1656,7 +1664,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 	 */
 	if (retval == 0)
 		retval = uart_block_til_ready(filp, state);
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 
 	/*
 	 * If this is the first open to succeed, adjust things to suit.
@@ -1667,7 +1675,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 		uart_update_termios(state);
 	}
 
- fail:
+fail:
 	return retval;
 }
 
@@ -1689,57 +1697,58 @@ static const char *uart_type(struct uart_port *port)
 static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i)
 {
 	struct uart_state *state = drv->state + i;
+	struct tty_port *port = &state->port;
 	int pm_state;
-	struct uart_port *port = state->uart_port;
+	struct uart_port *uport = state->uart_port;
 	char stat_buf[32];
 	unsigned int status;
 	int mmio;
 
-	if (!port)
+	if (!uport)
 		return;
 
-	mmio = port->iotype >= UPIO_MEM;
+	mmio = uport->iotype >= UPIO_MEM;
 	seq_printf(m, "%d: uart:%s %s%08llX irq:%d",
-			port->line, uart_type(port),
+			uport->line, uart_type(uport),
 			mmio ? "mmio:0x" : "port:",
-			mmio ? (unsigned long long)port->mapbase
-			     : (unsigned long long) port->iobase,
-			port->irq);
+			mmio ? (unsigned long long)uport->mapbase
+			     : (unsigned long long)uport->iobase,
+			uport->irq);
 
-	if (port->type == PORT_UNKNOWN) {
+	if (uport->type == PORT_UNKNOWN) {
 		seq_putc(m, '\n');
 		return;
 	}
 
 	if (capable(CAP_SYS_ADMIN)) {
-		mutex_lock(&state->mutex);
+		mutex_lock(&port->mutex);
 		pm_state = state->pm_state;
 		if (pm_state)
 			uart_change_pm(state, 0);
-		spin_lock_irq(&port->lock);
-		status = port->ops->get_mctrl(port);
-		spin_unlock_irq(&port->lock);
+		spin_lock_irq(&uport->lock);
+		status = uport->ops->get_mctrl(uport);
+		spin_unlock_irq(&uport->lock);
 		if (pm_state)
 			uart_change_pm(state, pm_state);
-		mutex_unlock(&state->mutex);
+		mutex_unlock(&port->mutex);
 
 		seq_printf(m, " tx:%d rx:%d",
-				port->icount.tx, port->icount.rx);
-		if (port->icount.frame)
+				uport->icount.tx, uport->icount.rx);
+		if (uport->icount.frame)
 			seq_printf(m, " fe:%d",
-				port->icount.frame);
-		if (port->icount.parity)
+				uport->icount.frame);
+		if (uport->icount.parity)
 			seq_printf(m, " pe:%d",
-				port->icount.parity);
-		if (port->icount.brk)
+				uport->icount.parity);
+		if (uport->icount.brk)
 			seq_printf(m, " brk:%d",
-				port->icount.brk);
-		if (port->icount.overrun)
+				uport->icount.brk);
+		if (uport->icount.overrun)
 			seq_printf(m, " oe:%d",
-				port->icount.overrun);
+				uport->icount.overrun);
 
 #define INFOBIT(bit, str) \
-	if (port->mctrl & (bit)) \
+	if (uport->mctrl & (bit)) \
 		strncat(stat_buf, (str), sizeof(stat_buf) - \
 			strlen(stat_buf) - 2)
 #define STATBIT(bit, str) \
@@ -1991,11 +2000,11 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
 	struct device *tty_dev;
 	struct uart_match match = {uport, drv};
 
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 
 	if (!console_suspend_enabled && uart_console(uport)) {
 		/* we're going to avoid suspending serial console */
-		mutex_unlock(&state->mutex);
+		mutex_unlock(&port->mutex);
 		return 0;
 	}
 
@@ -2003,7 +2012,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
 	if (device_may_wakeup(tty_dev)) {
 		enable_irq_wake(uport->irq);
 		put_device(tty_dev);
-		mutex_unlock(&state->mutex);
+		mutex_unlock(&port->mutex);
 		return 0;
 	}
 	uport->suspended = 1;
@@ -2045,7 +2054,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
 
 	uart_change_pm(state, 3);
 
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 
 	return 0;
 }
@@ -2057,18 +2066,18 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
 	struct device *tty_dev;
 	struct uart_match match = {uport, drv};
 
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 
 	if (!console_suspend_enabled && uart_console(uport)) {
 		/* no need to resume serial console, it wasn't suspended */
-		mutex_unlock(&state->mutex);
+		mutex_unlock(&port->mutex);
 		return 0;
 	}
 
 	tty_dev = device_find_child(uport->dev, &match, serial_match_port);
 	if (!uport->suspended && device_may_wakeup(tty_dev)) {
 		disable_irq_wake(uport->irq);
-		mutex_unlock(&state->mutex);
+		mutex_unlock(&port->mutex);
 		return 0;
 	}
 	uport->suspended = 0;
@@ -2124,7 +2133,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
 		clear_bit(ASYNCB_SUSPENDED, &port->flags);
 	}
 
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 
 	return 0;
 }
@@ -2364,12 +2373,11 @@ int uart_register_driver(struct uart_driver *drv)
 	 */
 	for (i = 0; i < drv->nr; i++) {
 		struct uart_state *state = drv->state + i;
+		struct tty_port *port = &state->port;
 
-		mutex_init(&state->mutex);
-
-		tty_port_init(&state->port);
-		state->port.close_delay     = 500;	/* .5 seconds */
-		state->port.closing_wait    = 30000;	/* 30 seconds */
+		tty_port_init(port);
+		port->close_delay     = 500;	/* .5 seconds */
+		port->closing_wait    = 30000;	/* 30 seconds */
 		init_waitqueue_head(&state->delta_msr_wait);
 		tasklet_init(&state->tlet, uart_tasklet_action,
 			     (unsigned long)state);
@@ -2419,62 +2427,64 @@ struct tty_driver *uart_console_device(struct console *co, int *index)
  *	level uart drivers to expand uart_port, rather than having yet
  *	more levels of structures.
  */
-int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
+int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
 {
 	struct uart_state *state;
+	struct tty_port *port;
 	int ret = 0;
 	struct device *tty_dev;
 
 	BUG_ON(in_interrupt());
 
-	if (port->line >= drv->nr)
+	if (uport->line >= drv->nr)
 		return -EINVAL;
 
-	state = drv->state + port->line;
+	state = drv->state + uport->line;
+	port = &state->port;
 
 	mutex_lock(&port_mutex);
-	mutex_lock(&state->mutex);
+	mutex_lock(&port->mutex);
 	if (state->uart_port) {
 		ret = -EINVAL;
 		goto out;
 	}
 
-	state->uart_port = port;
+	state->uart_port = uport;
 	state->pm_state = -1;
 
-	port->cons = drv->cons;
-	port->state = state;
+	uport->cons = drv->cons;
+	uport->state = state;
 
 	/*
 	 * If this port is a console, then the spinlock is already
 	 * initialised.
 	 */
-	if (!(uart_console(port) && (port->cons->flags & CON_ENABLED))) {
-		spin_lock_init(&port->lock);
-		lockdep_set_class(&port->lock, &port_lock_key);
+	if (!(uart_console(uport) && (uport->cons->flags & CON_ENABLED))) {
+		spin_lock_init(&uport->lock);
+		lockdep_set_class(&uport->lock, &port_lock_key);
 	}
 
-	uart_configure_port(drv, state, port);
+	uart_configure_port(drv, state, uport);
 
 	/*
 	 * Register the port whether it's detected or not.  This allows
 	 * setserial to be used to alter this ports parameters.
 	 */
-	tty_dev = tty_register_device(drv->tty_driver, port->line, port->dev);
+	tty_dev = tty_register_device(drv->tty_driver, uport->line, uport->dev);
 	if (likely(!IS_ERR(tty_dev))) {
 		device_init_wakeup(tty_dev, 1);
 		device_set_wakeup_enable(tty_dev, 0);
 	} else
 		printk(KERN_ERR "Cannot register tty device on line %d\n",
-		       port->line);
+		       uport->line);
 
 	/*
 	 * Ensure UPF_DEAD is not set.
 	 */
-	port->flags &= ~UPF_DEAD;
+	uport->flags &= ~UPF_DEAD;
 
  out:
-	mutex_unlock(&state->mutex);
+	mutex_unlock(&port->mutex);
 	mutex_unlock(&port_mutex);
 
 	return ret;
@@ -2489,15 +2499,16 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
  *	core driver.  No further calls will be made to the low-level code
  *	for this port.
  */
-int uart_remove_one_port(struct uart_driver *drv, struct uart_port *port)
+int uart_remove_one_port(struct uart_driver *drv, struct uart_port *uport)
 {
-	struct uart_state *state = drv->state + port->line;
+	struct uart_state *state = drv->state + uport->line;
+	struct tty_port *port = &state->port;
 
 	BUG_ON(in_interrupt());
 
-	if (state->uart_port != port)
+	if (state->uart_port != uport)
 		printk(KERN_ALERT "Removing wrong port: %p != %p\n",
-			state->uart_port, port);
+			state->uart_port, uport);
 
 	mutex_lock(&port_mutex);
 
@@ -2505,28 +2516,28 @@ int uart_remove_one_port(struct uart_driver *drv, struct uart_port *port)
 	 * Mark the port "dead" - this prevents any opens from
 	 * succeeding while we shut down the port.
 	 */
-	mutex_lock(&state->mutex);
-	port->flags |= UPF_DEAD;
-	mutex_unlock(&state->mutex);
+	mutex_lock(&port->mutex);
+	uport->flags |= UPF_DEAD;
+	mutex_unlock(&port->mutex);
 
 	/*
 	 * Remove the devices from the tty layer
 	 */
-	tty_unregister_device(drv->tty_driver, port->line);
+	tty_unregister_device(drv->tty_driver, uport->line);
 
-	if (state->port.tty)
-		tty_vhangup(state->port.tty);
+	if (port->tty)
+		tty_vhangup(port->tty);
 
 	/*
 	 * Free the port IO and memory resources, if any.
 	 */
-	if (port->type != PORT_UNKNOWN)
-		port->ops->release_port(port);
+	if (uport->type != PORT_UNKNOWN)
+		uport->ops->release_port(uport);
 
 	/*
 	 * Indicate that there isn't a port here anymore.
 	 */
-	port->type = PORT_UNKNOWN;
+	uport->type = PORT_UNKNOWN;
 
 	/*
 	 * Kill the tasklet, and free resources.
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index f98dc78..27767ea 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -351,8 +351,6 @@ struct uart_state {
 	struct tasklet_struct	tlet;
 	wait_queue_head_t	delta_msr_wait;
 	struct uart_port	*uart_port;
-
-	struct mutex		mutex;
 };
 
 #define UART_XMIT_SIZE	PAGE_SIZE
-- 
1.6.4.2


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

* [PATCH 53/79] serial: move delta_msr_wait into the tty_port
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (51 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 52/79] serial: replace the state mutex with the tty port mutex Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:36 ` [PATCH 54/79] serial: move port users helper Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

From: Alan Cox <alan@linux.intel.com>

This is used by various drivers not just serial and can be extracted
as commonality

Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 drivers/char/cyclades.c         |    9 ++++-----
 drivers/char/esp.c              |    7 +++----
 drivers/char/mxser.c            |    8 +++-----
 drivers/char/tty_port.c         |    2 ++
 drivers/serial/8250.c           |    2 +-
 drivers/serial/amba-pl010.c     |    2 +-
 drivers/serial/amba-pl011.c     |    2 +-
 drivers/serial/atmel_serial.c   |    2 +-
 drivers/serial/icom.c           |    2 +-
 drivers/serial/imx.c            |    4 ++--
 drivers/serial/ioc3_serial.c    |    8 ++++----
 drivers/serial/ioc4_serial.c    |    8 ++++----
 drivers/serial/ip22zilog.c      |    2 +-
 drivers/serial/msm_serial.c     |    2 +-
 drivers/serial/pmac_zilog.c     |    2 +-
 drivers/serial/pnx8xxx_uart.c   |    2 +-
 drivers/serial/pxa.c            |    2 +-
 drivers/serial/sa1100.c         |    2 +-
 drivers/serial/sb1250-duart.c   |    2 +-
 drivers/serial/serial_core.c    |   18 +++++++++++-------
 drivers/serial/serial_ks8695.c  |    2 +-
 drivers/serial/serial_lh7a40x.c |    2 +-
 drivers/serial/sunsab.c         |    2 +-
 drivers/serial/sunsu.c          |    2 +-
 drivers/serial/sunzilog.c       |    2 +-
 drivers/serial/timbuart.c       |    2 +-
 drivers/serial/vr41xx_siu.c     |    2 +-
 drivers/serial/zs.c             |    2 +-
 include/linux/cyclades.h        |    1 -
 include/linux/hayesesp.h        |    1 -
 include/linux/serial_core.h     |    1 -
 include/linux/tty.h             |    1 +
 32 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 70bd61b..df5038b 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -729,7 +729,7 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
 		if (mdm_change & CyRI)
 			info->icount.rng++;
 
-		wake_up_interruptible(&info->delta_msr_wait);
+		wake_up_interruptible(&info->port.delta_msr_wait);
 	}
 
 	if ((mdm_change & CyDCD) && (info->port.flags & ASYNC_CHECK_CD)) {
@@ -1197,7 +1197,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
 			break;
 		}
 		if (delta_count)
-			wake_up_interruptible(&info->delta_msr_wait);
+			wake_up_interruptible(&info->port.delta_msr_wait);
 		if (special_count)
 			tty_schedule_flip(tty);
 		tty_kref_put(tty);
@@ -1464,7 +1464,7 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
 		spin_lock_irqsave(&card->card_lock, flags);
 
 		/* Clear delta_msr_wait queue to avoid mem leaks. */
-		wake_up_interruptible(&info->delta_msr_wait);
+		wake_up_interruptible(&info->port.delta_msr_wait);
 
 		if (info->port.xmit_buf) {
 			unsigned char *temp;
@@ -2788,7 +2788,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
 		/* note the counters on entry */
 		cnow = info->icount;
 		spin_unlock_irqrestore(&info->card->card_lock, flags);
-		ret_val = wait_event_interruptible(info->delta_msr_wait,
+		ret_val = wait_event_interruptible(info->port.delta_msr_wait,
 				cy_cflags_changed(info, arg, &cnow));
 		break;
 
@@ -3153,7 +3153,6 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
 		info->port.close_delay = 5 * HZ / 10;
 		info->port.flags = STD_COM_FLAGS;
 		init_completion(&info->shutdown_wait);
-		init_waitqueue_head(&info->delta_msr_wait);
 
 		if (cy_is_Z(cinfo)) {
 			struct FIRM_ID *firm_id = cinfo->base_addr + ID_ADDRESS;
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index a5c59fc..b19d43c 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -572,7 +572,7 @@ static void check_modem_status(struct esp_struct *info)
 			info->icount.dcd++;
 		if (status & UART_MSR_DCTS)
 			info->icount.cts++;
-		wake_up_interruptible(&info->delta_msr_wait);
+		wake_up_interruptible(&info->port.delta_msr_wait);
 	}
 
 	if ((info->port.flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
@@ -927,7 +927,7 @@ static void shutdown(struct esp_struct *info)
 	 * clear delta_msr_wait queue to avoid mem leaks: we may free the irq
 	 * here so the queue might never be waken up
 	 */
-	wake_up_interruptible(&info->delta_msr_wait);
+	wake_up_interruptible(&info->port.delta_msr_wait);
 	wake_up_interruptible(&info->break_wait);
 
 	/* stop a DMA transfer on the port being closed */
@@ -1800,7 +1800,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file *file,
 		spin_unlock_irqrestore(&info->lock, flags);
 		while (1) {
 			/* FIXME: convert to new style wakeup */
-			interruptible_sleep_on(&info->delta_msr_wait);
+			interruptible_sleep_on(&info->port.delta_msr_wait);
 			/* see if a signal did it */
 			if (signal_pending(current))
 				return -ERESTARTSYS;
@@ -2452,7 +2452,6 @@ static int __init espserial_init(void)
 		info->config.flow_off = flow_off;
 		info->config.pio_threshold = pio_threshold;
 		info->next_port = ports;
-		init_waitqueue_head(&info->delta_msr_wait);
 		init_waitqueue_head(&info->break_wait);
 		ports = info;
 		printk(KERN_INFO "ttyP%d at 0x%04x (irq = %d) is an ESP ",
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 30544ca..37058ff 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -258,7 +258,6 @@ struct mxser_port {
 	struct mxser_mon mon_data;
 
 	spinlock_t slock;
-	wait_queue_head_t delta_msr_wait;
 };
 
 struct mxser_board {
@@ -818,7 +817,7 @@ static void mxser_check_modem_status(struct tty_struct *tty,
 	if (status & UART_MSR_DCTS)
 		port->icount.cts++;
 	port->mon_data.modem_status = status;
-	wake_up_interruptible(&port->delta_msr_wait);
+	wake_up_interruptible(&port->port.delta_msr_wait);
 
 	if ((port->port.flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
 		if (status & UART_MSR_DCD)
@@ -973,7 +972,7 @@ static void mxser_shutdown(struct tty_struct *tty)
 	 * clear delta_msr_wait queue to avoid mem leaks: we may free the irq
 	 * here so the queue might never be waken up
 	 */
-	wake_up_interruptible(&info->delta_msr_wait);
+	wake_up_interruptible(&info->port.delta_msr_wait);
 
 	/*
 	 * Free the IRQ, if necessary
@@ -1762,7 +1761,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
 		cnow = info->icount;	/* note the counters on entry */
 		spin_unlock_irqrestore(&info->slock, flags);
 
-		return wait_event_interruptible(info->delta_msr_wait,
+		return wait_event_interruptible(info->port.delta_msr_wait,
 				mxser_cflags_changed(info, arg, &cnow));
 	/*
 	 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
@@ -2414,7 +2413,6 @@ static int __devinit mxser_initbrd(struct mxser_board *brd,
 		info->port.close_delay = 5 * HZ / 10;
 		info->port.closing_wait = 30 * HZ;
 		info->normal_termios = mxvar_sdriver->init_termios;
-		init_waitqueue_head(&info->delta_msr_wait);
 		memset(&info->mon_data, 0, sizeof(struct mxser_mon));
 		info->err_shadow = 0;
 		spin_lock_init(&info->slock);
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index 549bd0f..c767e30 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -23,6 +23,7 @@ void tty_port_init(struct tty_port *port)
 	memset(port, 0, sizeof(*port));
 	init_waitqueue_head(&port->open_wait);
 	init_waitqueue_head(&port->close_wait);
+	init_waitqueue_head(&port->delta_msr_wait);
 	mutex_init(&port->mutex);
 	spin_lock_init(&port->lock);
 	port->close_delay = (50 * HZ) / 100;
@@ -124,6 +125,7 @@ void tty_port_hangup(struct tty_port *port)
 	port->tty = NULL;
 	spin_unlock_irqrestore(&port->lock, flags);
 	wake_up_interruptible(&port->open_wait);
+	wake_up_interruptible(&port->delta_msr_wait);
 	tty_port_shutdown(port);
 }
 EXPORT_SYMBOL(tty_port_hangup);
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index e415c5e..2209620 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1510,7 +1510,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
 		if (status & UART_MSR_DCTS)
 			uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-		wake_up_interruptible(&up->port.state->delta_msr_wait);
+		wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 	}
 
 	return status;
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 3903241..429a8ae 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -225,7 +225,7 @@ static void pl010_modem_status(struct uart_amba_port *uap)
 	if (delta & UART01x_FR_CTS)
 		uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS);
 
-	wake_up_interruptible(&uap->port.state->delta_msr_wait);
+	wake_up_interruptible(&uap->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t pl010_int(int irq, void *dev_id)
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index ef82a34..ef7adc8 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -226,7 +226,7 @@ static void pl011_modem_status(struct uart_amba_port *uap)
 	if (delta & UART01x_FR_CTS)
 		uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS);
 
-	wake_up_interruptible(&uap->port.state->delta_msr_wait);
+	wake_up_interruptible(&uap->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t pl011_int(int irq, void *dev_id)
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 963e3c1..3551c5c 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -776,7 +776,7 @@ static void atmel_tasklet_func(unsigned long data)
 		if (status_change & ATMEL_US_CTS)
 			uart_handle_cts_change(port, !(status & ATMEL_US_CTS));
 
-		wake_up_interruptible(&port->state->delta_msr_wait);
+		wake_up_interruptible(&port->state->port.delta_msr_wait);
 
 		atmel_port->irq_status_prev = status;
 	}
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index f86c47e..2d7feec 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -695,7 +695,7 @@ static inline void check_modem_status(struct icom_port *icom_port)
 					       delta_status & ICOM_CTS);
 
 		wake_up_interruptible(&icom_port->uart_port.state->
-				      delta_msr_wait);
+				      port.delta_msr_wait);
 		old_status = status;
 	}
 	spin_unlock(&icom_port->uart_port.lock);
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 1febeaf..18130f1 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -224,7 +224,7 @@ static void imx_mctrl_check(struct imx_port *sport)
 	if (changed & TIOCM_CTS)
 		uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-	wake_up_interruptible(&sport->port.state->delta_msr_wait);
+	wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 }
 
 /*
@@ -388,7 +388,7 @@ static irqreturn_t imx_rtsint(int irq, void *dev_id)
 
 	writel(USR1_RTSD, sport->port.membase + USR1);
 	uart_handle_cts_change(&sport->port, !!val);
-	wake_up_interruptible(&sport->port.state->delta_msr_wait);
+	wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 
 	spin_unlock_irqrestore(&sport->port.lock, flags);
 	return IRQ_HANDLED;
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index de4ab1b..d8983dd 100644
--- a/drivers/serial/ioc3_serial.c
+++ b/drivers/serial/ioc3_serial.c
@@ -1287,7 +1287,7 @@ static inline int do_read(struct uart_port *the_port, char *buf, int len)
 							(port->ip_port, 0);
 						wake_up_interruptible
 						    (&the_port->state->
-						     delta_msr_wait);
+						     port.delta_msr_wait);
 					}
 
 					/* If we had any data to return, we
@@ -1491,7 +1491,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
 				uart_handle_dcd_change(the_port,
 						shadow & SHADOW_DCD);
 				wake_up_interruptible
-				    (&the_port->state->delta_msr_wait);
+				    (&the_port->state->port.delta_msr_wait);
 			} else if ((port->ip_notify & N_DDCD)
 				   && !(shadow & SHADOW_DCD)) {
 				/* Flag delta DCD/no DCD */
@@ -1511,7 +1511,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
 				uart_handle_cts_change(the_port, shadow
 						& SHADOW_CTS);
 				wake_up_interruptible
-				    (&the_port->state->delta_msr_wait);
+				    (&the_port->state->port.delta_msr_wait);
 			}
 		}
 
@@ -1728,7 +1728,7 @@ static void ic3_shutdown(struct uart_port *the_port)
 		return;
 
 	state = the_port->state;
-	wake_up_interruptible(&state->delta_msr_wait);
+	wake_up_interruptible(&state->port.delta_msr_wait);
 
 	spin_lock_irqsave(&the_port->lock, port_flags);
 	set_notification(port, N_ALL, 0);
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index 2055d32..2e02c30 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -1882,7 +1882,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
 				the_port = port->ip_port;
 				the_port->icount.dcd = 1;
 				wake_up_interruptible
-					    (&the_port->state->delta_msr_wait);
+					    (&the_port->state->port.delta_msr_wait);
 			} else if ((port->ip_notify & N_DDCD)
 					&& !(shadow & IOC4_SHADOW_DCD)) {
 				/* Flag delta DCD/no DCD */
@@ -1904,7 +1904,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
 				the_port->icount.cts =
 					(shadow & IOC4_SHADOW_CTS) ? 1 : 0;
 				wake_up_interruptible
-					(&the_port->state->delta_msr_wait);
+					(&the_port->state->port.delta_msr_wait);
 			}
 		}
 
@@ -2237,7 +2237,7 @@ static inline int do_read(struct uart_port *the_port, unsigned char *buf,
 						the_port->icount.dcd = 0;
 						wake_up_interruptible
 						    (&the_port->state->
-							delta_msr_wait);
+							port.delta_msr_wait);
 					}
 
 					/* If we had any data to return, we
@@ -2439,7 +2439,7 @@ static void ic4_shutdown(struct uart_port *the_port)
 	state = the_port->state;
 	port->ip_port = NULL;
 
-	wake_up_interruptible(&state->delta_msr_wait);
+	wake_up_interruptible(&state->port.delta_msr_wait);
 
 	if (state->port.tty)
 		set_bit(TTY_IO_ERROR, &state->port.tty->flags);
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c
index 2e847de..ebff4a1 100644
--- a/drivers/serial/ip22zilog.c
+++ b/drivers/serial/ip22zilog.c
@@ -354,7 +354,7 @@ static void ip22zilog_status_handle(struct uart_ip22zilog_port *up,
 			uart_handle_cts_change(&up->port,
 					       (status & CTS));
 
-		wake_up_interruptible(&up->port.state->delta_msr_wait);
+		wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 	}
 
 	up->prev_status = status;
diff --git a/drivers/serial/msm_serial.c b/drivers/serial/msm_serial.c
index ff18d50..b05c5aa 100644
--- a/drivers/serial/msm_serial.c
+++ b/drivers/serial/msm_serial.c
@@ -169,7 +169,7 @@ static void handle_delta_cts(struct uart_port *port)
 {
 	msm_write(port, UART_CR_CMD_RESET_CTS, UART_CR);
 	port->icount.cts++;
-	wake_up_interruptible(&port->state->delta_msr_wait);
+	wake_up_interruptible(&port->state->port.delta_msr_wait);
 }
 
 static irqreturn_t msm_irq(int irq, void *dev_id)
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 0dc7868..0700cd1 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -369,7 +369,7 @@ static void pmz_status_handle(struct uart_pmac_port *uap)
 			uart_handle_cts_change(&uap->port,
 					       !(status & CTS));
 
-		wake_up_interruptible(&uap->port.state->delta_msr_wait);
+		wake_up_interruptible(&uap->port.state->port.delta_msr_wait);
 	}
 
 	if (status & BRK_ABRT)
diff --git a/drivers/serial/pnx8xxx_uart.c b/drivers/serial/pnx8xxx_uart.c
index 2da7476..0aa75a9 100644
--- a/drivers/serial/pnx8xxx_uart.c
+++ b/drivers/serial/pnx8xxx_uart.c
@@ -100,7 +100,7 @@ static void pnx8xxx_mctrl_check(struct pnx8xxx_port *sport)
 	if (changed & TIOCM_CTS)
 		uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-	wake_up_interruptible(&sport->port.state->delta_msr_wait);
+	wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 }
 
 /*
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index ad48919..6443b7f 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -220,7 +220,7 @@ static inline void check_modem_status(struct uart_pxa_port *up)
 	if (status & UART_MSR_DCTS)
 		uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-	wake_up_interruptible(&up->port.state->delta_msr_wait);
+	wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 }
 
 /*
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 61ef3ae..7f5e268 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -117,7 +117,7 @@ static void sa1100_mctrl_check(struct sa1100_port *sport)
 	if (changed & TIOCM_CTS)
 		uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-	wake_up_interruptible(&sport->port.state->delta_msr_wait);
+	wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 }
 
 /*
diff --git a/drivers/serial/sb1250-duart.c b/drivers/serial/sb1250-duart.c
index fa5f303..a2f2b32 100644
--- a/drivers/serial/sb1250-duart.c
+++ b/drivers/serial/sb1250-duart.c
@@ -440,7 +440,7 @@ static void sbd_status_handle(struct sbd_port *sport)
 
 	if (delta & ((M_DUART_IN_PIN2_VAL | M_DUART_IN_PIN0_VAL) <<
 		     S_DUART_IN_PIN_CHNG))
-		wake_up_interruptible(&uport->state->delta_msr_wait);
+		wake_up_interruptible(&uport->state->port.delta_msr_wait);
 }
 
 static irqreturn_t sbd_interrupt(int irq, void *dev_id)
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 9d42e57..e16d153 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -215,7 +215,8 @@ static int uart_startup(struct uart_state *state, int init_hw)
 static void uart_shutdown(struct uart_state *state)
 {
 	struct uart_port *uport = state->uart_port;
-	struct tty_struct *tty = state->port.tty;
+	struct tty_port *port = &state->port;
+	struct tty_struct *tty = port->tty;
 
 	/*
 	 * Set the TTY IO error marker
@@ -223,7 +224,7 @@ static void uart_shutdown(struct uart_state *state)
 	if (tty)
 		set_bit(TTY_IO_ERROR, &tty->flags);
 
-	if (test_and_clear_bit(ASYNCB_INITIALIZED, &state->port.flags)) {
+	if (test_and_clear_bit(ASYNCB_INITIALIZED, &port->flags)) {
 		/*
 		 * Turn off DTR and RTS early.
 		 */
@@ -237,7 +238,7 @@ static void uart_shutdown(struct uart_state *state)
 		 * any outstanding file descriptors should be pointing at
 		 * hung_up_tty_fops now.
 		 */
-		wake_up_interruptible(&state->delta_msr_wait);
+		wake_up_interruptible(&port->delta_msr_wait);
 
 		/*
 		 * Free the IRQ and disable the port.
@@ -1004,11 +1005,15 @@ static int uart_do_autoconfig(struct uart_state *state)
  * - mask passed in arg for lines of interest
  *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
  * Caller should use TIOCGICOUNT to see which one it was
+ *
+ * FIXME: This wants extracting into a common all driver implementation
+ * of TIOCMWAIT using tty_port.
  */
 static int
 uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 {
 	struct uart_port *uport = state->uart_port;
+	struct tty_port *port = &state->port;
 	DECLARE_WAITQUEUE(wait, current);
 	struct uart_icount cprev, cnow;
 	int ret;
@@ -1025,7 +1030,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 	uport->ops->enable_ms(uport);
 	spin_unlock_irq(&uport->lock);
 
-	add_wait_queue(&state->delta_msr_wait, &wait);
+	add_wait_queue(&port->delta_msr_wait, &wait);
 	for (;;) {
 		spin_lock_irq(&uport->lock);
 		memcpy(&cnow, &uport->icount, sizeof(struct uart_icount));
@@ -1053,7 +1058,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 	}
 
 	current->state = TASK_RUNNING;
-	remove_wait_queue(&state->delta_msr_wait, &wait);
+	remove_wait_queue(&port->delta_msr_wait, &wait);
 
 	return ret;
 }
@@ -1430,7 +1435,7 @@ static void uart_hangup(struct tty_struct *tty)
 		clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
 		port->tty = NULL;
 		wake_up_interruptible(&port->open_wait);
-		wake_up_interruptible(&state->delta_msr_wait);
+		wake_up_interruptible(&port->delta_msr_wait);
 	}
 	mutex_unlock(&port->mutex);
 }
@@ -2378,7 +2383,6 @@ int uart_register_driver(struct uart_driver *drv)
 		tty_port_init(port);
 		port->close_delay     = 500;	/* .5 seconds */
 		port->closing_wait    = 30000;	/* 30 seconds */
-		init_waitqueue_head(&state->delta_msr_wait);
 		tasklet_init(&state->tlet, uart_tasklet_action,
 			     (unsigned long)state);
 	}
diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c
index 4560b2e..2e71bbc 100644
--- a/drivers/serial/serial_ks8695.c
+++ b/drivers/serial/serial_ks8695.c
@@ -266,7 +266,7 @@ static irqreturn_t ks8695uart_modem_status(int irq, void *dev_id)
 	if (status & URMS_URTERI)
 		port->icount.rng++;
 
-	wake_up_interruptible(&port->state->delta_msr_wait);
+	wake_up_interruptible(&port->state->port.delta_msr_wait);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index 057fc5e..ea74470 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -241,7 +241,7 @@ static void lh7a40xuart_modem_status (struct uart_port* port)
 	if (delta & CTS)
 		uart_handle_cts_change (port, status & CTS);
 
-	wake_up_interruptible (&port->state->delta_msr_wait);
+	wake_up_interruptible (&port->state->port.delta_msr_wait);
 }
 
 static irqreturn_t lh7a40xuart_int (int irq, void* dev_id)
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index 7c4f2fe..d1ad341 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -297,7 +297,7 @@ static void check_status(struct uart_sunsab_port *up,
 		up->port.icount.dsr++;
 	}
 
-	wake_up_interruptible(&up->port.state->delta_msr_wait);
+	wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t sunsab_interrupt(int irq, void *dev_id)
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 5a32365..68d262b 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -441,7 +441,7 @@ static void check_modem_status(struct uart_sunsu_port *up)
 	if (status & UART_MSR_DCTS)
 		uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-	wake_up_interruptible(&up->port.state->delta_msr_wait);
+	wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t sunsu_serial_interrupt(int irq, void *dev_id)
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index 055034d..ef693ae 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -451,7 +451,7 @@ static void sunzilog_status_handle(struct uart_sunzilog_port *up,
 			uart_handle_cts_change(&up->port,
 					       (status & CTS));
 
-		wake_up_interruptible(&up->port.state->delta_msr_wait);
+		wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 	}
 
 	up->prev_status = status;
diff --git a/drivers/serial/timbuart.c b/drivers/serial/timbuart.c
index 3d40be6..34b31da 100644
--- a/drivers/serial/timbuart.c
+++ b/drivers/serial/timbuart.c
@@ -231,7 +231,7 @@ static void timbuart_mctrl_check(struct uart_port *port, u32 isr, u32 *ier)
 		iowrite32(CTS_DELTA, port->membase + TIMBUART_ISR);
 		cts = timbuart_get_mctrl(port);
 		uart_handle_cts_change(port, cts & TIOCM_CTS);
-		wake_up_interruptible(&port->state->delta_msr_wait);
+		wake_up_interruptible(&port->state->port.delta_msr_wait);
 	}
 
 	*ier |= CTS_DELTA;
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index cf4410e..3beb6ab 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -386,7 +386,7 @@ static inline void check_modem_status(struct uart_port *port)
 	if (msr & UART_MSR_DCTS)
 		uart_handle_cts_change(port, msr & UART_MSR_CTS);
 
-	wake_up_interruptible(&port->state->delta_msr_wait);
+	wake_up_interruptible(&port->state->port.delta_msr_wait);
 }
 
 static inline void transmit_chars(struct uart_port *port)
diff --git a/drivers/serial/zs.c b/drivers/serial/zs.c
index b9c9fb9..1a7fd3e 100644
--- a/drivers/serial/zs.c
+++ b/drivers/serial/zs.c
@@ -686,7 +686,7 @@ static void zs_status_handle(struct zs_port *zport, struct zs_port *zport_a)
 			uport->icount.rng++;
 
 		if (delta)
-			wake_up_interruptible(&uport->state->delta_msr_wait);
+			wake_up_interruptible(&uport->state->port.delta_msr_wait);
 
 		spin_lock(&scc->zlock);
 	}
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index bbebef7..a5049ea 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -578,7 +578,6 @@ struct cyclades_port {
 	struct cyclades_idle_stats	idle_stats;
 	struct cyclades_icount	icount;
 	struct completion       shutdown_wait;
-	wait_queue_head_t       delta_msr_wait;
 	int throttle;
 };
 
diff --git a/include/linux/hayesesp.h b/include/linux/hayesesp.h
index 940aeb5..92b08cf 100644
--- a/include/linux/hayesesp.h
+++ b/include/linux/hayesesp.h
@@ -96,7 +96,6 @@ struct esp_struct {
 	int			xmit_head;
 	int			xmit_tail;
 	int			xmit_cnt;
-	wait_queue_head_t	delta_msr_wait;
 	wait_queue_head_t	break_wait;
 	struct async_icount	icount;	/* kernel counters for the 4 input interrupts */
 	struct hayes_esp_config config; /* port configuration */
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 27767ea..bcafecd 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -349,7 +349,6 @@ struct uart_state {
 	struct circ_buf		xmit;
 
 	struct tasklet_struct	tlet;
-	wait_queue_head_t	delta_msr_wait;
 	struct uart_port	*uart_port;
 };
 
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 9fdc3d8..0daa8a7 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -203,6 +203,7 @@ struct tty_port {
 	int			count;		/* Usage count */
 	wait_queue_head_t	open_wait;	/* Open waiters */
 	wait_queue_head_t	close_wait;	/* Close waiters */
+	wait_queue_head_t	delta_msr_wait;	/* Modem status change */
 	unsigned long		flags;		/* TTY flags ASY_*/
 	struct mutex		mutex;		/* Locking */
 	unsigned char		*xmit_buf;	/* Optional buffer */
-- 
1.6.4.2


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

* [PATCH 54/79] serial: move port users helper
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (52 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 53/79] serial: move delta_msr_wait into the tty_port Greg Kroah-Hartman
@ 2009-09-19 21:36 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 55/79] serial: kill USF_CLOSING_* definitions Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

This little helper is now tty_port specific and useful generally so move it

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/serial_core.c |    6 ++----
 include/linux/tty.h          |    5 +++++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index e16d153..3c45a8d 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -52,8 +52,6 @@ static struct lock_class_key port_lock_key;
 
 #define HIGH_BITS_OFFSET	((sizeof(long)-sizeof(int))*8)
 
-#define uart_users(state)	((state)->port.count + (state)->port.blocked_open)
-
 #ifdef CONFIG_SERIAL_CORE_CONSOLE
 #define uart_console(port)	((port)->cons && (port)->cons->index == (port)->line)
 #else
@@ -758,7 +756,7 @@ static int uart_set_info(struct uart_state *state,
 		/*
 		 * Make sure that we are the sole user of this port.
 		 */
-		if (uart_users(state) > 1)
+		if (tty_port_users(port) > 1)
 			goto exit;
 
 		/*
@@ -974,7 +972,7 @@ static int uart_do_autoconfig(struct uart_state *state)
 		return -ERESTARTSYS;
 
 	ret = -EBUSY;
-	if (uart_users(state) == 1) {
+	if (tty_port_users(port) == 1) {
 		uart_shutdown(state);
 
 		/*
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 0daa8a7..a0e0330 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -467,6 +467,11 @@ extern int tty_port_close_start(struct tty_port *port,
 extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
 extern void tty_port_close(struct tty_port *port,
 				struct tty_struct *tty, struct file *filp);
+extern inline int tty_port_users(struct tty_port *port)
+{
+	return port->count + port->blocked_open;
+}
+
 extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc);
 extern int tty_unregister_ldisc(int disc);
 extern int tty_set_ldisc(struct tty_struct *tty, int ldisc);
-- 
1.6.4.2


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

* [PATCH 55/79] serial: kill USF_CLOSING_* definitions
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (53 preceding siblings ...)
  2009-09-19 21:36 ` [PATCH 54/79] serial: move port users helper Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 56/79] serial: introduce tty krefs Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

The serial layer for some reason uses different defines for the special
case close delays and then conditionally switches to/from the normal ones
in the ioctls.

Remove this rather pointless abstraction

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/serial_core.c |    6 +++---
 include/linux/serial_core.h  |    3 ---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 3c45a8d..69c4e20 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -652,7 +652,7 @@ static int uart_get_info(struct uart_state *state,
 	tmp.xmit_fifo_size  = uport->fifosize;
 	tmp.baud_base	    = uport->uartclk / 16;
 	tmp.close_delay	    = port->close_delay / 10;
-	tmp.closing_wait    = port->closing_wait == USF_CLOSING_WAIT_NONE ?
+	tmp.closing_wait    = port->closing_wait == ASYNC_CLOSING_WAIT_NONE ?
 				ASYNC_CLOSING_WAIT_NONE :
 				port->closing_wait / 10;
 	tmp.custom_divisor  = uport->custom_divisor;
@@ -690,7 +690,7 @@ static int uart_set_info(struct uart_state *state,
 	new_serial.irq = irq_canonicalize(new_serial.irq);
 	close_delay = new_serial.close_delay * 10;
 	closing_wait = new_serial.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
-			USF_CLOSING_WAIT_NONE : new_serial.closing_wait * 10;
+			ASYNC_CLOSING_WAIT_NONE : new_serial.closing_wait * 10;
 
 	/*
 	 * This semaphore protects port->count.  It is also
@@ -1307,7 +1307,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	 */
 	tty->closing = 1;
 
-	if (port->closing_wait != USF_CLOSING_WAIT_NONE)
+	if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
 		tty_wait_until_sent(tty, msecs_to_jiffies(port->closing_wait));
 
 	/*
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index bcafecd..d58e460 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -342,9 +342,6 @@ struct uart_port {
 struct uart_state {
 	struct tty_port		port;
 
-#define USF_CLOSING_WAIT_INF	(0)
-#define USF_CLOSING_WAIT_NONE	(~0U)
-
 	int			pm_state;
 	struct circ_buf		xmit;
 
-- 
1.6.4.2


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

* [PATCH 56/79] serial: introduce tty krefs
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (54 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 55/79] serial: kill USF_CLOSING_* definitions Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 57/79] Set proper console speed on resume if console suspend is disabled Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

From: Alan Cox <alan@linux.intel.com>

Initially just use the helper and thus krefs when we set and clear the
port values.

Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 drivers/serial/serial_core.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 69c4e20..3fd0134 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1333,7 +1333,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	tty_ldisc_flush(tty);
 
 	tty->closing = 0;
-	port->tty = NULL;
+	tty_port_tty_set(port, NULL);
 
 	if (port->blocked_open) {
 		if (port->close_delay)
@@ -1431,7 +1431,7 @@ static void uart_hangup(struct tty_struct *tty)
 		uart_shutdown(state);
 		port->count = 0;
 		clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
-		port->tty = NULL;
+		tty_port_tty_set(port, NULL);
 		wake_up_interruptible(&port->open_wait);
 		wake_up_interruptible(&port->delta_msr_wait);
 	}
@@ -1639,7 +1639,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
 	state->uart_port->state = state;
 	tty->low_latency = (state->uart_port->flags & UPF_LOW_LATENCY) ? 1 : 0;
 	tty->alt_speed = 0;
-	port->tty = tty;
+	tty_port_tty_set(port, tty);
 
 	/*
 	 * If the port is in the middle of closing, bail out now.
-- 
1.6.4.2


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

* [PATCH 57/79] Set proper console speed on resume if console suspend is disabled
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (55 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 56/79] serial: introduce tty krefs Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 58/79] tty: USB serial termios bits Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Deepak Saxena, Alan Cox, Greg Kroah-Hartman

From: Deepak Saxena <dsaxena@laptop.org>

Commit b5b82df6, from May 2007, breaks no_console_suspend on the OLPC
XO laptop. Basically what happens is that upon returning from resume,
serial8250_resume_port() will reconfigure the port for high speed
mode and all console output will be garbled, making debug of the
resume path painful. This patch modifies uart_resume_port() to
reset the port to the state it was in before we suspended.

Original patch by Marcelo Tosatti

Second patch by Deepak then reworked by Alan to fit with the tty changes
before it got submitted. Also fixed the console path to set c_i/ospeed as
some drivers require the termios fields are valid

Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/serial_core.c |   32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 3fd0134..2514d00 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -2068,11 +2068,29 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
 	struct tty_port *port = &state->port;
 	struct device *tty_dev;
 	struct uart_match match = {uport, drv};
+	struct ktermios termios;
 
 	mutex_lock(&port->mutex);
 
 	if (!console_suspend_enabled && uart_console(uport)) {
 		/* no need to resume serial console, it wasn't suspended */
+		/*
+		 * First try to use the console cflag setting.
+		 */
+		memset(&termios, 0, sizeof(struct ktermios));
+		termios.c_cflag = uport->cons->cflag;
+		/*
+		 * If that's unset, use the tty termios setting.
+		 */
+		if (termios.c_cflag == 0)
+			termios = *state->port.tty->termios;
+		else {
+			termios.c_ispeed = termios.c_ospeed =
+				tty_termios_input_baud_rate(&termios);
+			termios.c_ispeed = termios.c_ospeed =
+				tty_termios_baud_rate(&termios);
+		}
+		uport->ops->set_termios(uport, &termios, NULL);
 		mutex_unlock(&port->mutex);
 		return 0;
 	}
@@ -2089,20 +2107,6 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
 	 * Re-enable the console device after suspending.
 	 */
 	if (uart_console(uport)) {
-		struct ktermios termios;
-
-		/*
-		 * First try to use the console cflag setting.
-		 */
-		memset(&termios, 0, sizeof(struct ktermios));
-		termios.c_cflag = uport->cons->cflag;
-
-		/*
-		 * If that's unset, use the tty termios setting.
-		 */
-		if (port->tty && termios.c_cflag == 0)
-			termios = *port->tty->termios;
-
 		uart_change_pm(state, 0);
 		uport->ops->set_termios(uport, &termios, NULL);
 		console_start(uport->cons);
-- 
1.6.4.2


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

* [PATCH 58/79] tty: USB serial termios bits
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (56 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 57/79] Set proper console speed on resume if console suspend is disabled Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 59/79] n_tty: honor opost flag for echoes Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Various drivers have hacks to mangle termios structures. This stems from
the fact there is no nice setup hook for configuring the termios settings
when the port is created

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_io.c            |    1 +
 drivers/usb/serial/ark3116.c     |   46 +++++++++----------------------------
 drivers/usb/serial/cypress_m8.c  |   12 ++-------
 drivers/usb/serial/empeg.c       |   12 ++-------
 drivers/usb/serial/iuu_phoenix.c |   31 +++++++++++--------------
 drivers/usb/serial/kobil_sct.c   |   22 +++++++++---------
 drivers/usb/serial/oti6858.c     |   21 ++++++++---------
 drivers/usb/serial/spcp8x5.c     |   21 ++++++++---------
 drivers/usb/serial/usb-serial.c  |   38 ++++++++++++++++++++++++++++++-
 drivers/usb/serial/whiteheat.c   |    6 ++--
 include/linux/usb/serial.h       |    3 ++
 11 files changed, 106 insertions(+), 107 deletions(-)

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 385cca7..05f443c 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1184,6 +1184,7 @@ int tty_init_termios(struct tty_struct *tty)
 	tty->termios->c_ospeed = tty_termios_baud_rate(tty->termios);
 	return 0;
 }
+EXPORT_SYMBOL_GPL(tty_init_termios);
 
 /**
  *	tty_driver_install_tty() - install a tty entry in the driver
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 7ddde4d..5d25d3e 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -35,11 +35,6 @@ static struct usb_device_id id_table [] = {
 };
 MODULE_DEVICE_TABLE(usb, id_table);
 
-struct ark3116_private {
-	spinlock_t lock;
-	u8 termios_initialized;
-};
-
 static inline void ARK3116_SND(struct usb_serial *serial, int seq,
 			       __u8 request, __u8 requesttype,
 			       __u16 value, __u16 index)
@@ -82,22 +77,11 @@ static inline void ARK3116_RCV_QUIET(struct usb_serial *serial,
 static int ark3116_attach(struct usb_serial *serial)
 {
 	char *buf;
-	struct ark3116_private *priv;
-	int i;
-
-	for (i = 0; i < serial->num_ports; ++i) {
-		priv = kzalloc(sizeof(struct ark3116_private), GFP_KERNEL);
-		if (!priv)
-			goto cleanup;
-		spin_lock_init(&priv->lock);
-
-		usb_set_serial_port_data(serial->port[i], priv);
-	}
 
 	buf = kmalloc(1, GFP_KERNEL);
 	if (!buf) {
 		dbg("error kmalloc -> out of mem?");
-		goto cleanup;
+		return -ENOMEM;
 	}
 
 	/* 3 */
@@ -149,13 +133,16 @@ static int ark3116_attach(struct usb_serial *serial)
 
 	kfree(buf);
 	return 0;
+}
 
-cleanup:
-	for (--i; i >= 0; --i) {
-		kfree(usb_get_serial_port_data(serial->port[i]));
-		usb_set_serial_port_data(serial->port[i], NULL);
-	}
-	return -ENOMEM;
+static void ark3116_init_termios(struct tty_struct *tty)
+{
+	struct ktermios *termios = tty->termios;
+	*termios = tty_std_termios;
+	termios->c_cflag = B9600 | CS8
+				      | CREAD | HUPCL | CLOCAL;
+	termios->c_ispeed = 9600;
+	termios->c_ospeed = 9600;
 }
 
 static void ark3116_set_termios(struct tty_struct *tty,
@@ -163,10 +150,8 @@ static void ark3116_set_termios(struct tty_struct *tty,
 				struct ktermios *old_termios)
 {
 	struct usb_serial *serial = port->serial;
-	struct ark3116_private *priv = usb_get_serial_port_data(port);
 	struct ktermios *termios = tty->termios;
 	unsigned int cflag = termios->c_cflag;
-	unsigned long flags;
 	int baud;
 	int ark3116_baud;
 	char *buf;
@@ -176,16 +161,6 @@ static void ark3116_set_termios(struct tty_struct *tty,
 
 	dbg("%s - port %d", __func__, port->number);
 
-	spin_lock_irqsave(&priv->lock, flags);
-	if (!priv->termios_initialized) {
-		*termios = tty_std_termios;
-		termios->c_cflag = B9600 | CS8
-					      | CREAD | HUPCL | CLOCAL;
-		termios->c_ispeed = 9600;
-		termios->c_ospeed = 9600;
-		priv->termios_initialized = 1;
-	}
-	spin_unlock_irqrestore(&priv->lock, flags);
 
 	cflag = termios->c_cflag;
 	termios->c_cflag &= ~(CMSPAR|CRTSCTS);
@@ -454,6 +429,7 @@ static struct usb_serial_driver ark3116_device = {
 	.num_ports =		1,
 	.attach =		ark3116_attach,
 	.set_termios =		ark3116_set_termios,
+	.init_termios =		ark3116_init_termios,
 	.ioctl =		ark3116_ioctl,
 	.tiocmget =		ark3116_tiocmget,
 	.open =			ark3116_open,
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index df1adb9..e0a8b71 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -657,15 +657,7 @@ static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 	/* Set termios */
-	result = cypress_write(tty, port, NULL, 0);
-
-	if (result) {
-		dev_err(&port->dev,
-			"%s - failed setting the control lines - error %d\n",
-							__func__, result);
-		return result;
-	} else
-		dbg("%s - success setting the control lines", __func__);
+	cypress_send(port);
 
 	if (tty)
 		cypress_set_termios(tty, port, &priv->tmp_termios);
@@ -1003,6 +995,8 @@ static void cypress_set_termios(struct tty_struct *tty,
 	dbg("%s - port %d", __func__, port->number);
 
 	spin_lock_irqsave(&priv->lock, flags);
+	/* We can't clean this one up as we don't know the device type
+	   early enough */
 	if (!priv->termios_initialized) {
 		if (priv->chiptype == CT_EARTHMATE) {
 			*(tty->termios) = tty_std_termios;
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index da559a7..33c9e9c 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -89,8 +89,7 @@ static int  empeg_chars_in_buffer(struct tty_struct *tty);
 static void empeg_throttle(struct tty_struct *tty);
 static void empeg_unthrottle(struct tty_struct *tty);
 static int  empeg_startup(struct usb_serial *serial);
-static void empeg_set_termios(struct tty_struct *tty,
-		struct usb_serial_port *port, struct ktermios *old_termios);
+static void empeg_init_termios(struct tty_struct *tty);
 static void empeg_write_bulk_callback(struct urb *urb);
 static void empeg_read_bulk_callback(struct urb *urb);
 
@@ -122,7 +121,7 @@ static struct usb_serial_driver empeg_device = {
 	.throttle =		empeg_throttle,
 	.unthrottle =		empeg_unthrottle,
 	.attach =		empeg_startup,
-	.set_termios =		empeg_set_termios,
+	.init_termios =		empeg_init_termios,
 	.write =		empeg_write,
 	.write_room =		empeg_write_room,
 	.chars_in_buffer =	empeg_chars_in_buffer,
@@ -148,9 +147,6 @@ static int empeg_open(struct tty_struct *tty,struct usb_serial_port *port)
 
 	dbg("%s - port %d", __func__, port->number);
 
-	/* Force default termio settings */
-	empeg_set_termios(tty, port, NULL);
-
 	bytes_in = 0;
 	bytes_out = 0;
 
@@ -423,11 +419,9 @@ static int  empeg_startup(struct usb_serial *serial)
 }
 
 
-static void empeg_set_termios(struct tty_struct *tty,
-		struct usb_serial_port *port, struct ktermios *old_termios)
+static void empeg_init_termios(struct tty_struct *tty)
 {
 	struct ktermios *termios = tty->termios;
-	dbg("%s - port %d", __func__, port->number);
 
 	/*
 	 * The empeg-car player wants these particular tty settings.
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index f3f9be0..6138c1c 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -71,7 +71,6 @@ struct iuu_private {
 	spinlock_t lock;	/* store irq state */
 	wait_queue_head_t delta_msr_wait;
 	u8 line_status;
-	u8 termios_initialized;
 	int tiostatus;		/* store IUART SIGNAL for tiocmget call */
 	u8 reset;		/* if 1 reset is needed */
 	int poll;		/* number of poll */
@@ -1018,13 +1017,24 @@ static void iuu_close(struct usb_serial_port *port)
 	}
 }
 
+static void iuu_init_termios(struct tty_struct *tty)
+{
+	*(tty->termios) = tty_std_termios;
+	tty->termios->c_cflag = CLOCAL | CREAD | CS8 | B9600
+				| TIOCM_CTS | CSTOPB | PARENB;
+	tty->termios->c_ispeed = 9600;
+	tty->termios->c_ospeed = 9600;
+	tty->termios->c_lflag = 0;
+	tty->termios->c_oflag = 0;
+	tty->termios->c_iflag = 0;
+}
+
 static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
 	struct usb_serial *serial = port->serial;
 	u8 *buf;
 	int result;
 	u32 actual;
-	unsigned long flags;
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 
 	dbg("%s -  port %d", __func__, port->number);
@@ -1063,21 +1073,7 @@ static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port)
 			  port->bulk_in_buffer, 512,
 			  NULL, NULL);
 
-	/* set the termios structure */
-	spin_lock_irqsave(&priv->lock, flags);
-	if (tty && !priv->termios_initialized) {
-		*(tty->termios) = tty_std_termios;
-		tty->termios->c_cflag = CLOCAL | CREAD | CS8 | B9600
-					| TIOCM_CTS | CSTOPB | PARENB;
-		tty->termios->c_ispeed = 9600;
-		tty->termios->c_ospeed = 9600;
-		tty->termios->c_lflag = 0;
-		tty->termios->c_oflag = 0;
-		tty->termios->c_iflag = 0;
-		priv->termios_initialized = 1;
-		priv->poll = 0;
-	}
-	spin_unlock_irqrestore(&priv->lock, flags);
+	priv->poll = 0;
 
 	/* initialize writebuf */
 #define FISH(a, b, c, d) do { \
@@ -1200,6 +1196,7 @@ static struct usb_serial_driver iuu_device = {
 	.tiocmget = iuu_tiocmget,
 	.tiocmset = iuu_tiocmset,
 	.set_termios = iuu_set_termios,
+	.init_termios = iuu_init_termios,
 	.attach = iuu_startup,
 	.release = iuu_release,
 };
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 9790157..45ea694 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -84,7 +84,7 @@ static void kobil_read_int_callback(struct urb *urb);
 static void kobil_write_callback(struct urb *purb);
 static void kobil_set_termios(struct tty_struct *tty,
 			struct usb_serial_port *port, struct ktermios *old);
-
+static void kobil_init_termios(struct tty_struct *tty);
 
 static struct usb_device_id id_table [] = {
 	{ USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_ADAPTER_B_PRODUCT_ID) },
@@ -119,6 +119,7 @@ static struct usb_serial_driver kobil_device = {
 	.release =		kobil_release,
 	.ioctl =		kobil_ioctl,
 	.set_termios =		kobil_set_termios,
+	.init_termios =		kobil_init_termios,
 	.tiocmget =		kobil_tiocmget,
 	.tiocmset =		kobil_tiocmset,
 	.open =			kobil_open,
@@ -209,6 +210,15 @@ static void kobil_release(struct usb_serial *serial)
 		kfree(usb_get_serial_port_data(serial->port[i]));
 }
 
+static void kobil_init_termios(struct tty_struct *tty)
+{
+	/* Default to echo off and other sane device settings */
+	tty->termios->c_lflag = 0;
+	tty->termios->c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
+	tty->termios->c_iflag = IGNBRK | IGNPAR | IXOFF;
+	/* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */
+	tty->termios->c_oflag &= ~ONLCR;
+}
 
 static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
@@ -224,16 +234,6 @@ static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port)
 	/* someone sets the dev to 0 if the close method has been called */
 	port->interrupt_in_urb->dev = port->serial->dev;
 
-	if (tty) {
-
-		/* Default to echo off and other sane device settings */
-		tty->termios->c_lflag = 0;
-		tty->termios->c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN |
-								 XCASE);
-		tty->termios->c_iflag = IGNBRK | IGNPAR | IXOFF;
-		/* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */
-		tty->termios->c_oflag &= ~ONLCR;
-	}
 	/* allocate memory for transfer buffer */
 	transfer_buffer = kzalloc(transfer_buffer_length, GFP_KERNEL);
 	if (!transfer_buffer)
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index e90f88a..0f4a70c 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -145,6 +145,7 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port);
 static void oti6858_close(struct usb_serial_port *port);
 static void oti6858_set_termios(struct tty_struct *tty,
 			struct usb_serial_port *port, struct ktermios *old);
+static void oti6858_init_termios(struct tty_struct *tty);
 static int oti6858_ioctl(struct tty_struct *tty, struct file *file,
 			unsigned int cmd, unsigned long arg);
 static void oti6858_read_int_callback(struct urb *urb);
@@ -185,6 +186,7 @@ static struct usb_serial_driver oti6858_device = {
 	.write =		oti6858_write,
 	.ioctl =		oti6858_ioctl,
 	.set_termios =		oti6858_set_termios,
+	.init_termios = 	oti6858_init_termios,
 	.tiocmget =		oti6858_tiocmget,
 	.tiocmset =		oti6858_tiocmset,
 	.read_bulk_callback =	oti6858_read_bulk_callback,
@@ -205,7 +207,6 @@ struct oti6858_private {
 	struct {
 		u8 read_urb_in_use;
 		u8 write_urb_in_use;
-		u8 termios_initialized;
 	} flags;
 	struct delayed_work delayed_write_work;
 
@@ -446,6 +447,14 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty)
 	return chars;
 }
 
+static void oti6858_init_termios(struct tty_struct *tty)
+{
+	*(tty->termios) = tty_std_termios;
+	tty->termios->c_cflag = B38400 | CS8 | CREAD | HUPCL | CLOCAL;
+	tty->termios->c_ispeed = 38400;
+	tty->termios->c_ospeed = 38400;
+}
+
 static void oti6858_set_termios(struct tty_struct *tty,
 		struct usb_serial_port *port, struct ktermios *old_termios)
 {
@@ -463,16 +472,6 @@ static void oti6858_set_termios(struct tty_struct *tty,
 		return;
 	}
 
-	spin_lock_irqsave(&priv->lock, flags);
-	if (!priv->flags.termios_initialized) {
-		*(tty->termios) = tty_std_termios;
-		tty->termios->c_cflag = B38400 | CS8 | CREAD | HUPCL | CLOCAL;
-		tty->termios->c_ispeed = 38400;
-		tty->termios->c_ospeed = 38400;
-		priv->flags.termios_initialized = 1;
-	}
-	spin_unlock_irqrestore(&priv->lock, flags);
-
 	cflag = tty->termios->c_cflag;
 
 	spin_lock_irqsave(&priv->lock, flags);
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
index 8b312a0..61e7c40 100644
--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -299,7 +299,6 @@ struct spcp8x5_private {
 	wait_queue_head_t	delta_msr_wait;
 	u8 			line_control;
 	u8 			line_status;
-	u8 			termios_initialized;
 };
 
 /* desc : when device plug in,this function would be called.
@@ -498,6 +497,15 @@ static void spcp8x5_close(struct usb_serial_port *port)
 		dev_dbg(&port->dev, "usb_unlink_urb(read_urb) = %d\n", result);
 }
 
+static void spcp8x5_init_termios(struct tty_struct *tty)
+{
+	/* for the 1st time call this function */
+	*(tty->termios) = tty_std_termios;
+	tty->termios->c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL;
+	tty->termios->c_ispeed = 115200;
+	tty->termios->c_ospeed = 115200;
+}
+
 /* set the serial param for transfer. we should check if we really need to
  * transfer. if we set flow control we should do this too. */
 static void spcp8x5_set_termios(struct tty_struct *tty,
@@ -514,16 +522,6 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
 	int i;
 	u8 control;
 
-	/* for the 1st time call this function */
-	spin_lock_irqsave(&priv->lock, flags);
-	if (!priv->termios_initialized) {
-		*(tty->termios) = tty_std_termios;
-		tty->termios->c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL;
-		tty->termios->c_ispeed = 115200;
-		tty->termios->c_ospeed = 115200;
-		priv->termios_initialized = 1;
-	}
-	spin_unlock_irqrestore(&priv->lock, flags);
 
 	/* check that they really want us to change something */
 	if (!tty_termios_hw_change(tty->termios, old_termios))
@@ -1008,6 +1006,7 @@ static struct usb_serial_driver spcp8x5_device = {
 	.carrier_raised		= spcp8x5_carrier_raised,
 	.write 			= spcp8x5_write,
 	.set_termios 		= spcp8x5_set_termios,
+	.init_termios		= spcp8x5_init_termios,
 	.ioctl 			= spcp8x5_ioctl,
 	.tiocmget 		= spcp8x5_tiocmget,
 	.tiocmset 		= spcp8x5_tiocmset,
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 3dda684..80c1f4d 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -721,6 +721,41 @@ static const struct tty_port_operations serial_port_ops = {
 	.dtr_rts = serial_dtr_rts,
 };
 
+/**
+ *	serial_install		-	install tty
+ *	@driver: the driver (USB in our case)
+ *	@tty: the tty being created
+ *
+ *	Create the termios objects for this tty. We use the default USB
+ *	serial ones but permit them to be overriddenby serial->type->termios.
+ *	This lets us remove all the ugly hackery
+ */
+
+static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
+{
+	int idx = tty->index;
+	struct usb_serial *serial;
+	int retval;
+
+	/* If the termios setup has yet to be done */
+	if (tty->driver->termios[idx] == NULL) {
+		/* perform the standard setup */
+		retval = tty_init_termios(tty);
+		if (retval)
+			return retval;
+		/* allow the driver to update it */
+		serial = usb_serial_get_by_index(tty->index);
+		if (serial->type->init_termios)
+			serial->type->init_termios(tty);
+		usb_serial_put(serial);
+	}
+	/* Final install (we use the default method) */
+	tty_driver_kref_get(driver);
+	tty->count++;
+	driver->ttys[idx] = tty;
+	return 0;
+}
+
 int usb_serial_probe(struct usb_interface *interface,
 			       const struct usb_device_id *id)
 {
@@ -1228,7 +1263,8 @@ static const struct tty_operations serial_ops = {
 	.chars_in_buffer =	serial_chars_in_buffer,
 	.tiocmget =		serial_tiocmget,
 	.tiocmset =		serial_tiocmset,
-	.shutdown =		serial_do_free,
+	.shutdown = 		serial_do_free,
+	.install = 		serial_install,
 	.proc_fops =		&serial_proc_fops,
 };
 
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 81f2ae5..62424ee 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -259,7 +259,7 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command,
 						__u8 *data, __u8 datasize);
 static int firm_open(struct usb_serial_port *port);
 static int firm_close(struct usb_serial_port *port);
-static int firm_setup_port(struct tty_struct *tty);
+static void firm_setup_port(struct tty_struct *tty);
 static int firm_set_rts(struct usb_serial_port *port, __u8 onoff);
 static int firm_set_dtr(struct usb_serial_port *port, __u8 onoff);
 static int firm_set_break(struct usb_serial_port *port, __u8 onoff);
@@ -1210,7 +1210,7 @@ static int firm_close(struct usb_serial_port *port)
 }
 
 
-static int firm_setup_port(struct tty_struct *tty)
+static void firm_setup_port(struct tty_struct *tty)
 {
 	struct usb_serial_port *port = tty->driver_data;
 	struct whiteheat_port_settings port_settings;
@@ -1285,7 +1285,7 @@ static int firm_setup_port(struct tty_struct *tty)
 	port_settings.lloop = 0;
 
 	/* now send the message to the device */
-	return firm_send_command(port, WHITEHEAT_SETUP_PORT,
+	firm_send_command(port, WHITEHEAT_SETUP_PORT,
 			(__u8 *)&port_settings, sizeof(port_settings));
 }
 
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 1cbaf4a..7b85e32 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -260,6 +260,9 @@ struct usb_serial_driver {
 	   be an attached tty at this point */
 	void (*dtr_rts)(struct usb_serial_port *port, int on);
 	int  (*carrier_raised)(struct usb_serial_port *port);
+	/* Called by the usb serial hooks to allow the user to rework the
+	   termios state */
+	void (*init_termios)(struct tty_struct *tty);
 	/* USB events */
 	void (*read_int_callback)(struct urb *urb);
 	void (*write_int_callback)(struct urb *urb);
-- 
1.6.4.2


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

* [PATCH 59/79] n_tty: honor opost flag for echoes
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (57 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 58/79] tty: USB serial termios bits Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 60/79] n_tty: move echoctl check and clean up logic Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Joe Peterson, Linux Torvalds, Greg Kroah-Hartman

From: Joe Peterson <joe@skyrush.com>

Fixes the following bug:

      http://bugs.linuxbase.org/show_bug.cgi?id=2692

Causes processing of echoed characters (output from the echo buffer) to
honor the O_OPOST flag, which is consistent with the old behavior.

Note that this and the next patch ("n_tty: move echoctl check and
clean up logic") were verified together by the bug reporters, and
the test now passes.

Signed-off-by: Joe Peterson <joe@skyrush.com>
Cc: Linux Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/n_tty.c |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 4e28b35..e6eeeb2 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -272,7 +272,8 @@ static inline int is_continuation(unsigned char c, struct tty_struct *tty)
  *
  *	This is a helper function that handles one output character
  *	(including special characters like TAB, CR, LF, etc.),
- *	putting the results in the tty driver's write buffer.
+ *	doing OPOST processing and putting the results in the
+ *	tty driver's write buffer.
  *
  *	Note that Linux currently ignores TABDLY, CRDLY, VTDLY, FFDLY
  *	and NLDLY.  They simply aren't relevant in the world today.
@@ -350,8 +351,9 @@ static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
  *	@c: character (or partial unicode symbol)
  *	@tty: terminal device
  *
- *	Perform OPOST processing.  Returns -1 when the output device is
- *	full and the character must be retried.
+ *	Output one character with OPOST processing.
+ *	Returns -1 when the output device is full and the character
+ *	must be retried.
  *
  *	Locking: output_lock to protect column state and space left
  *		 (also, this is called from n_tty_write under the
@@ -377,8 +379,11 @@ static int process_output(unsigned char c, struct tty_struct *tty)
 /**
  *	process_output_block		-	block post processor
  *	@tty: terminal device
- *	@inbuf: user buffer
- *	@nr: number of bytes
+ *	@buf: character buffer
+ *	@nr: number of bytes to output
+ *
+ *	Output a block of characters with OPOST processing.
+ *	Returns the number of characters output.
  *
  *	This path is used to speed up block console writes, among other
  *	things when processing blocks of output data. It handles only
@@ -605,12 +610,18 @@ static void process_echoes(struct tty_struct *tty)
 			if (no_space_left)
 				break;
 		} else {
-			int retval;
-
-			retval = do_output_char(c, tty, space);
-			if (retval < 0)
-				break;
-			space -= retval;
+			if (O_OPOST(tty) &&
+			    !(test_bit(TTY_HW_COOK_OUT, &tty->flags))) {
+				int retval = do_output_char(c, tty, space);
+				if (retval < 0)
+					break;
+				space -= retval;
+			} else {
+				if (!space)
+					break;
+				tty_put_char(tty, c);
+				space -= 1;
+			}
 			cp += 1;
 			nr -= 1;
 		}
-- 
1.6.4.2


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

* [PATCH 60/79] n_tty: move echoctl check and clean up logic
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (58 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 59/79] n_tty: honor opost flag for echoes Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 61/79] tty: handle VT specific compat ioctls in vt driver Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Joe Peterson, Linus Torvalds, Greg Kroah-Hartman

From: Joe Peterson <joe@skyrush.com>

Check L_ECHOCTL before insertting a character in the echo buffer
(rather than as the buffer is processed), to be more consistent with
when all other L_ flags are checked.  Also cleaned up the related logic.

Note that this and the previous patch ("n_tty: honor opost flag for echoes")
were verified together by the reporters of the bug that patch addresses
(http://bugs.linuxbase.org/show_bug.cgi?id=2692), and the test now passes.

Signed-off-by: Joe Peterson <joe@skyrush.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/n_tty.c |   46 ++++++++++++++++++----------------------------
 1 files changed, 18 insertions(+), 28 deletions(-)

diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index e6eeeb2..2e50f4d 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -576,33 +576,23 @@ static void process_echoes(struct tty_struct *tty)
 				break;
 
 			default:
-				if (iscntrl(op)) {
-					if (L_ECHOCTL(tty)) {
-						/*
-						 * Ensure there is enough space
-						 * for the whole ctrl pair.
-						 */
-						if (space < 2) {
-							no_space_left = 1;
-							break;
-						}
-						tty_put_char(tty, '^');
-						tty_put_char(tty, op ^ 0100);
-						tty->column += 2;
-						space -= 2;
-					} else {
-						if (!space) {
-							no_space_left = 1;
-							break;
-						}
-						tty_put_char(tty, op);
-						space--;
-					}
-				}
 				/*
-				 * If above falls through, this was an
-				 * undefined op.
+				 * If the op is not a special byte code,
+				 * it is a ctrl char tagged to be echoed
+				 * as "^X" (where X is the letter
+				 * representing the control char).
+				 * Note that we must ensure there is
+				 * enough space for the whole ctrl pair.
+				 *
 				 */
+				if (space < 2) {
+					no_space_left = 1;
+					break;
+				}
+				tty_put_char(tty, '^');
+				tty_put_char(tty, op ^ 0100);
+				tty->column += 2;
+				space -= 2;
 				cp += 2;
 				nr -= 2;
 			}
@@ -809,8 +799,8 @@ static void echo_char_raw(unsigned char c, struct tty_struct *tty)
  *	Echo user input back onto the screen. This must be called only when
  *	L_ECHO(tty) is true. Called from the driver receive_buf path.
  *
- *	This variant tags control characters to be possibly echoed as
- *	as "^X" (where X is the letter representing the control char).
+ *	This variant tags control characters to be echoed as "^X"
+ *	(where X is the letter representing the control char).
  *
  *	Locking: echo_lock to protect the echo buffer
  */
@@ -823,7 +813,7 @@ static void echo_char(unsigned char c, struct tty_struct *tty)
 		add_echo_byte(ECHO_OP_START, tty);
 		add_echo_byte(ECHO_OP_START, tty);
 	} else {
-		if (iscntrl(c) && c != '\t')
+		if (L_ECHOCTL(tty) && iscntrl(c) && c != '\t')
 			add_echo_byte(ECHO_OP_START, tty);
 		add_echo_byte(c, tty);
 	}
-- 
1.6.4.2


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

* [PATCH 61/79] tty: handle VT specific compat ioctls in vt driver
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (59 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 60/79] n_tty: move echoctl check and clean up logic Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 62/79] tty: vt: use printk_once Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnd Bergmann, Greg Kroah-Hartman

From: Arnd Bergmann <arnd@arndb.de>

The VT specific compat_ioctl handlers are the only ones
in common code that require the BKL. Moving them into
the vt driver lets us remove the BKL from the other handlers
and cleans up the code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/vt.c       |    3 +
 drivers/char/vt_ioctl.c |  203 +++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/tty.h     |    3 +
 3 files changed, 209 insertions(+), 0 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 33214d9..5dfbfa7 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2910,6 +2910,9 @@ static const struct tty_operations con_ops = {
 	.flush_chars = con_flush_chars,
 	.chars_in_buffer = con_chars_in_buffer,
 	.ioctl = vt_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl = vt_compat_ioctl,
+#endif
 	.stop = con_stop,
 	.start = con_start,
 	.throttle = con_throttle,
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 0fceb8f..30b5d12 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -16,6 +16,7 @@
 #include <linux/tty.h>
 #include <linux/timer.h>
 #include <linux/kernel.h>
+#include <linux/compat.h>
 #include <linux/module.h>
 #include <linux/kd.h>
 #include <linux/vt.h>
@@ -1376,6 +1377,208 @@ void vc_SAK(struct work_struct *work)
 	release_console_sem();
 }
 
+#ifdef CONFIG_COMPAT
+
+struct compat_consolefontdesc {
+	unsigned short charcount;       /* characters in font (256 or 512) */
+	unsigned short charheight;      /* scan lines per character (1-32) */
+	compat_caddr_t chardata;	/* font data in expanded form */
+};
+
+static inline int
+compat_fontx_ioctl(int cmd, struct compat_consolefontdesc __user *user_cfd,
+			 int perm, struct console_font_op *op)
+{
+	struct compat_consolefontdesc cfdarg;
+	int i;
+
+	if (copy_from_user(&cfdarg, user_cfd, sizeof(struct compat_consolefontdesc)))
+		return -EFAULT;
+
+	switch (cmd) {
+	case PIO_FONTX:
+		if (!perm)
+			return -EPERM;
+		op->op = KD_FONT_OP_SET;
+		op->flags = KD_FONT_FLAG_OLD;
+		op->width = 8;
+		op->height = cfdarg.charheight;
+		op->charcount = cfdarg.charcount;
+		op->data = compat_ptr(cfdarg.chardata);
+		return con_font_op(vc_cons[fg_console].d, op);
+	case GIO_FONTX:
+		op->op = KD_FONT_OP_GET;
+		op->flags = KD_FONT_FLAG_OLD;
+		op->width = 8;
+		op->height = cfdarg.charheight;
+		op->charcount = cfdarg.charcount;
+		op->data = compat_ptr(cfdarg.chardata);
+		i = con_font_op(vc_cons[fg_console].d, op);
+		if (i)
+			return i;
+		cfdarg.charheight = op->height;
+		cfdarg.charcount = op->charcount;
+		if (copy_to_user(user_cfd, &cfdarg, sizeof(struct compat_consolefontdesc)))
+			return -EFAULT;
+		return 0;
+	}
+	return -EINVAL;
+}
+
+struct compat_console_font_op {
+	compat_uint_t op;        /* operation code KD_FONT_OP_* */
+	compat_uint_t flags;     /* KD_FONT_FLAG_* */
+	compat_uint_t width, height;     /* font size */
+	compat_uint_t charcount;
+	compat_caddr_t data;    /* font data with height fixed to 32 */
+};
+
+static inline int
+compat_kdfontop_ioctl(struct compat_console_font_op __user *fontop,
+			 int perm, struct console_font_op *op, struct vc_data *vc)
+{
+	int i;
+
+	if (copy_from_user(op, fontop, sizeof(struct compat_console_font_op)))
+		return -EFAULT;
+	if (!perm && op->op != KD_FONT_OP_GET)
+		return -EPERM;
+	op->data = compat_ptr(((struct compat_console_font_op *)op)->data);
+	op->flags |= KD_FONT_FLAG_OLD;
+	i = con_font_op(vc, op);
+	if (i)
+		return i;
+	((struct compat_console_font_op *)op)->data = (unsigned long)op->data;
+	if (copy_to_user(fontop, op, sizeof(struct compat_console_font_op)))
+		return -EFAULT;
+	return 0;
+}
+
+struct compat_unimapdesc {
+	unsigned short entry_ct;
+	compat_caddr_t entries;
+};
+
+static inline int
+compat_unimap_ioctl(unsigned int cmd, struct compat_unimapdesc __user *user_ud,
+			 int perm, struct vc_data *vc)
+{
+	struct compat_unimapdesc tmp;
+	struct unipair __user *tmp_entries;
+
+	if (copy_from_user(&tmp, user_ud, sizeof tmp))
+		return -EFAULT;
+	tmp_entries = compat_ptr(tmp.entries);
+	if (tmp_entries)
+		if (!access_ok(VERIFY_WRITE, tmp_entries,
+				tmp.entry_ct*sizeof(struct unipair)))
+			return -EFAULT;
+	switch (cmd) {
+	case PIO_UNIMAP:
+		if (!perm)
+			return -EPERM;
+		return con_set_unimap(vc, tmp.entry_ct, tmp_entries);
+	case GIO_UNIMAP:
+		if (!perm && fg_console != vc->vc_num)
+			return -EPERM;
+		return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), tmp_entries);
+	}
+	return 0;
+}
+
+long vt_compat_ioctl(struct tty_struct *tty, struct file * file,
+	     unsigned int cmd, unsigned long arg)
+{
+	struct vc_data *vc = tty->driver_data;
+	struct console_font_op op;	/* used in multiple places here */
+	struct kbd_struct *kbd;
+	unsigned int console;
+	void __user *up = (void __user *)arg;
+	int perm;
+	int ret = 0;
+
+	console = vc->vc_num;
+
+	lock_kernel();
+
+	if (!vc_cons_allocated(console)) { 	/* impossible? */
+		ret = -ENOIOCTLCMD;
+		goto out;
+	}
+
+	/*
+	 * To have permissions to do most of the vt ioctls, we either have
+	 * to be the owner of the tty, or have CAP_SYS_TTY_CONFIG.
+	 */
+	perm = 0;
+	if (current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG))
+		perm = 1;
+
+	kbd = kbd_table + console;
+	switch (cmd) {
+	/*
+	 * these need special handlers for incompatible data structures
+	 */
+	case PIO_FONTX:
+	case GIO_FONTX:
+		ret = compat_fontx_ioctl(cmd, up, perm, &op);
+		break;
+
+	case KDFONTOP:
+		ret = compat_kdfontop_ioctl(up, perm, &op, vc);
+		break;
+
+	case PIO_UNIMAP:
+	case GIO_UNIMAP:
+		ret = do_unimap_ioctl(cmd, up, perm, vc);
+		break;
+
+	/*
+	 * all these treat 'arg' as an integer
+	 */
+	case KIOCSOUND:
+	case KDMKTONE:
+#ifdef CONFIG_X86
+	case KDADDIO:
+	case KDDELIO:
+#endif
+	case KDSETMODE:
+	case KDMAPDISP:
+	case KDUNMAPDISP:
+	case KDSKBMODE:
+	case KDSKBMETA:
+	case KDSKBLED:
+	case KDSETLED:
+	case KDSIGACCEPT:
+	case VT_ACTIVATE:
+	case VT_WAITACTIVE:
+	case VT_RELDISP:
+	case VT_DISALLOCATE:
+	case VT_RESIZE:
+	case VT_RESIZEX:
+		goto fallback;
+
+	/*
+	 * the rest has a compatible data structure behind arg,
+	 * but we have to convert it to a proper 64 bit pointer.
+	 */
+	default:
+		arg = (unsigned long)compat_ptr(arg);
+		goto fallback;
+	}
+out:
+	unlock_kernel();
+	return ret;
+
+fallback:
+	unlock_kernel();
+	return vt_ioctl(tty, file, cmd, arg);
+}
+
+
+#endif /* CONFIG_COMPAT */
+
+
 /*
  * Performs the back end of a vt switch. Called under the console
  * semaphore.
diff --git a/include/linux/tty.h b/include/linux/tty.h
index a0e0330..f0f43d0 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -536,5 +536,8 @@ extern int pcxe_open(struct tty_struct *tty, struct file *filp);
 extern int vt_ioctl(struct tty_struct *tty, struct file *file,
 		    unsigned int cmd, unsigned long arg);
 
+extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file,
+		     unsigned int cmd, unsigned long arg);
+
 #endif /* __KERNEL__ */
 #endif
-- 
1.6.4.2


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

* [PATCH 62/79] tty: vt: use printk_once
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (60 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 61/79] tty: handle VT specific compat ioctls in vt driver Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 63/79] tty: Power: fix suspend vt regression Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marcin Slusarz, Greg Kroah-Hartman

From: Marcin Slusarz <marcin.slusarz@gmail.com>

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_ioctl.c |    4 +---
 drivers/char/vt.c        |    6 +-----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index ad6ba4e..8e67d5c 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -393,9 +393,7 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,
 		termios->c_cflag |= (BOTHER << IBSHIFT);
 #else
 	if (ifound == -1 || ofound == -1) {
-		static int warned;
-		if (!warned++)
-			printk(KERN_WARNING "tty: Unable to return correct "
+		printk_once(KERN_WARNING "tty: Unable to return correct "
 			  "speed data as your architecture needs updating.\n");
 	}
 #endif
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 5dfbfa7..0c80c68 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2129,11 +2129,7 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co
 	currcons = vc->vc_num;
 	if (!vc_cons_allocated(currcons)) {
 	    /* could this happen? */
-	    static int error = 0;
-	    if (!error) {
-		error = 1;
-		printk("con_write: tty %d not allocated\n", currcons+1);
-	    }
+		printk_once("con_write: tty %d not allocated\n", currcons+1);
 	    release_console_sem();
 	    return 0;
 	}
-- 
1.6.4.2


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

* [PATCH 63/79] tty: Power: fix suspend vt regression
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (61 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 62/79] tty: vt: use printk_once Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 64/79] TTY: fix typos Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Alan Cox, Greg Kroah-Hartman, Rafael J. Wysocki

From: Jiri Slaby <jirislaby@gmail.com>

vt_waitactive no longer accepts console parameter as console-1
since commit "vt: add an event interface". It expects console
number directly (as viewed by userspace -- counting from 1).

Fix a deadlock suspend regression by redefining adding one
to vt in vt_move_to_console.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/vt_ioctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 30b5d12..29c651a 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -1757,7 +1757,7 @@ int vt_move_to_console(unsigned int vt, int alloc)
 		return -EIO;
 	}
 	release_console_sem();
-	if (vt_waitactive(vt)) {
+	if (vt_waitactive(vt + 1)) {
 		pr_debug("Suspend: Can't switch VCs.");
 		return -EINTR;
 	}
-- 
1.6.4.2


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

* [PATCH 64/79] TTY: fix typos
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (62 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 63/79] tty: Power: fix suspend vt regression Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 65/79] tty: riscom8, fix shutdown declaration Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, Alan Cox, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1282) fixes some obvious typos in the TTY core.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_port.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index c767e30..a4bbb28 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -100,7 +100,7 @@ EXPORT_SYMBOL(tty_port_tty_set);
 static void tty_port_shutdown(struct tty_port *port)
 {
 	if (port->ops->shutdown &&
-		test_and_clear_bit(ASYNC_INITIALIZED, &port->flags))
+		test_and_clear_bit(ASYNCB_INITIALIZED, &port->flags))
 			port->ops->shutdown(port);
 
 }
@@ -311,7 +311,7 @@ int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct f
 			port->ops->drop(port);
 		return 0;
 	}
-	set_bit(ASYNC_CLOSING, &port->flags);
+	set_bit(ASYNCB_CLOSING, &port->flags);
 	tty->closing = 1;
 	spin_unlock_irqrestore(&port->lock, flags);
 	/* Don't block on a stalled port, just pull the chain */
-- 
1.6.4.2


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

* [PATCH 65/79] tty: riscom8, fix shutdown declaration
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (63 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 64/79] TTY: fix typos Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 66/79] tty: riscom8, fix tty refcnt Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Andrew Morton, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

tty_port_ops.shutdown takes only one parameter: tty port. Remove
the second one and use port->tty where needed instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/riscom8.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 7b5623b..3c7cf2c 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -934,7 +934,7 @@ static void rc_flush_buffer(struct tty_struct *tty)
 	tty_wakeup(tty);
 }
 
-static void rc_close_port(struct tty_port *port, struct tty_struct *tty)
+static void rc_close_port(struct tty_port *port)
 {
 	unsigned long flags;
 	struct riscom_port *rp = container_of(port, struct riscom_port, port);
@@ -969,7 +969,7 @@ static void rc_close_port(struct tty_port *port, struct tty_struct *tty)
 				break;
 		}
 	}
-	rc_shutdown_port(tty, bp, rp);
+	rc_shutdown_port(port->tty, bp, rp);
 	spin_unlock_irqrestore(&riscom_lock, flags);
 }
 
-- 
1.6.4.2


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

* [PATCH 66/79] tty: riscom8, fix tty refcnt
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (64 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 65/79] tty: riscom8, fix shutdown declaration Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 67/79] tty: USB: serial/mct_u232, " Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Stanse found a tty refcnt leak on one fail path in rc_transmit.
Fix that by jumping to the 'out' label.

http://stanse.fi.muni.cz/

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/riscom8.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 3c7cf2c..3cfa22d 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -467,7 +467,7 @@ static void rc_transmit(struct riscom_board const *bp)
 			rc_out(bp, CD180_CCR, CCR_CORCHG2);
 			port->break_length = 0;
 		}
-		return;
+		goto out;
 	}
 
 	count = CD180_NFIFO;
-- 
1.6.4.2


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

* [PATCH 67/79] tty: USB: serial/mct_u232, fix tty refcnt
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (65 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 66/79] tty: riscom8, fix tty refcnt Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 68/79] uartlite: support shared interrupt lines Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Stanse found a tty refcnt leak in read_int_callback. In fact
it's handled wrong altogether. tty_port_tty_get can return NULL
and it's not checked in that manner.

Fix that by checking the tty_port_tty_get retval and put tty kref
properly.

http://stanse.fi.muni.cz/

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/mct_u232.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index d501aef..ad4998b 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -566,10 +566,13 @@ static void mct_u232_read_int_callback(struct urb *urb)
 	 * Work-a-round: handle the 'usual' bulk-in pipe here
 	 */
 	if (urb->transfer_buffer_length > 2) {
-		tty = tty_port_tty_get(&port->port);
 		if (urb->actual_length) {
-			tty_insert_flip_string(tty, data, urb->actual_length);
-			tty_flip_buffer_push(tty);
+			tty = tty_port_tty_get(&port->port);
+			if (tty) {
+				tty_insert_flip_string(tty, data,
+						urb->actual_length);
+				tty_flip_buffer_push(tty);
+			}
 			tty_kref_put(tty);
 		}
 		goto exit;
-- 
1.6.4.2


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

* [PATCH 68/79] uartlite: support shared interrupt lines
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (66 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 67/79] tty: USB: serial/mct_u232, " Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 69/79] tty: Char: mxser, add support for CP112UL Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Peter Korsgaard, Greg Kroah-Hartman

From: Peter Korsgaard <jacmet@sunsite.dk>

Adapt isr to work with shared interrupt lines.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/uartlite.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index 5d3a573..377f271 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -154,17 +154,22 @@ static int ulite_transmit(struct uart_port *port, int stat)
 static irqreturn_t ulite_isr(int irq, void *dev_id)
 {
 	struct uart_port *port = dev_id;
-	int busy;
+	int busy, n = 0;
 
 	do {
 		int stat = readb(port->membase + ULITE_STATUS);
 		busy  = ulite_receive(port, stat);
 		busy |= ulite_transmit(port, stat);
+		n++;
 	} while (busy);
 
-	tty_flip_buffer_push(port->state->port.tty);
-
-	return IRQ_HANDLED;
+	/* work done? */
+	if (n > 1) {
+		tty_flip_buffer_push(port->state->port.tty);
+		return IRQ_HANDLED;
+	} else {
+		return IRQ_NONE;
+	}
 }
 
 static unsigned int ulite_tx_empty(struct uart_port *port)
@@ -221,7 +226,7 @@ static int ulite_startup(struct uart_port *port)
 	int ret;
 
 	ret = request_irq(port->irq, ulite_isr,
-			  IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "uartlite", port);
+			  IRQF_SHARED | IRQF_SAMPLE_RANDOM, "uartlite", port);
 	if (ret)
 		return ret;
 
-- 
1.6.4.2


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

* [PATCH 69/79] tty: Char: mxser, add support for CP112UL
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (67 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 68/79] uartlite: support shared interrupt lines Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 70/79] tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

Add support for MOXA:0x1120 pci device. It's a 2-port device and differs
in no way from the others. So this turns out to be a trivial
pci_device_id change.

Increase also the version number.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/mxser.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 37058ff..e218ae2 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -48,7 +48,7 @@
 
 #include "mxser.h"
 
-#define	MXSER_VERSION	"2.0.4"		/* 1.12 */
+#define	MXSER_VERSION	"2.0.5"		/* 1.14 */
 #define	MXSERMAJOR	 174
 
 #define MXSER_BOARDS		4	/* Max. boards */
@@ -69,6 +69,7 @@
 #define PCI_DEVICE_ID_POS104UL	0x1044
 #define PCI_DEVICE_ID_CB108	0x1080
 #define PCI_DEVICE_ID_CP102UF	0x1023
+#define PCI_DEVICE_ID_CP112UL	0x1120
 #define PCI_DEVICE_ID_CB114	0x1142
 #define PCI_DEVICE_ID_CP114UL	0x1143
 #define PCI_DEVICE_ID_CB134I	0x1341
@@ -139,7 +140,8 @@ static const struct mxser_cardinfo mxser_cards[] = {
 	{ "CP-138U series",	8, },
 	{ "POS-104UL series",	4, },
 	{ "CP-114UL series",	4, },
-/*30*/	{ "CP-102UF series",	2, }
+/*30*/	{ "CP-102UF series",	2, },
+	{ "CP-112UL series",	2, },
 };
 
 /* driver_data correspond to the lines in the structure above
@@ -170,6 +172,7 @@ static struct pci_device_id mxser_pcibrds[] = {
 	{ PCI_VDEVICE(MOXA, PCI_DEVICE_ID_POS104UL),	.driver_data = 28 },
 	{ PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP114UL),	.driver_data = 29 },
 	{ PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP102UF),	.driver_data = 30 },
+	{ PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP112UL),	.driver_data = 31 },
 	{ }
 };
 MODULE_DEVICE_TABLE(pci, mxser_pcibrds);
-- 
1.6.4.2


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

* [PATCH 70/79] tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (68 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 69/79] tty: Char: mxser, add support for CP112UL Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 71/79] usb-serial: change referencing of port and serial structures Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby, Greg Kroah-Hartman

From: Jiri Slaby <jirislaby@gmail.com>

In moxa specific ASPP_OQUEUE ioctl command, they apparently want
only know whether there is space in transmitter hold register.

So switch UART_LSR_TEMT to UART_LSR_THRE in that specific case
according to the change in 1.14 moxa drivers.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/mxser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index e218ae2..5e28d39 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1806,7 +1806,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
 
 		lock_kernel();
 		len = mxser_chars_in_buffer(tty);
-		lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_TEMT;
+		lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE;
 		len += (lsr ? 0 : 1);
 		unlock_kernel();
 
-- 
1.6.4.2


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

* [PATCH 71/79] usb-serial: change referencing of port and serial structures
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (69 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 70/79] tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 72/79] usb-serial: put subroutines in logical order Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1284) changes the referencing of the usb_serial and
usb_serial_port structures in usb-serial.c.  It's not feasible to make
the port structures keep a reference to the serial structure, because
the ports need to remain in existence when serial is released -- quite
a few of the drivers expect this.  Consequently taking a reference
to the port when the device file is open is insufficient; such a
reference would not pin serial.

To fix this, we now take a reference to serial when the device file is
opened.  The final put_device() for the ports occurs in
destroy_serial(), so that the ports will last as long as they are
needed.

The patch initializes all the port devices, including those in the
unused "fake" ports.  This makes the code more uniform because they
can all be released in the same way.  The error handling code in
usb_serial_probe() is much simplified by this approach; instead of
freeing everything by hand we can use a single usb_serial_put() call.

Also simplified is the port-release mechanism.  Instead of being two
separate routines, port_release() and port_free() can be combined into
one.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |   95 ++++++++------------------------------
 1 files changed, 20 insertions(+), 75 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 80c1f4d..f1a1f0f 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -43,8 +43,6 @@
 #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/"
 #define DRIVER_DESC "USB Serial Driver core"
 
-static void port_free(struct usb_serial_port *port);
-
 /* Driver structure we register with the USB core */
 static struct usb_driver usb_serial_driver = {
 	.name =		"usbserial",
@@ -145,27 +143,16 @@ static void destroy_serial(struct kref *kref)
 
 	serial->type->release(serial);
 
-	for (i = 0; i < serial->num_ports; ++i) {
+	/* Now that nothing is using the ports, they can be freed */
+	for (i = 0; i < serial->num_port_pointers; ++i) {
 		port = serial->port[i];
-		if (port)
+		if (port) {
+			port->serial = NULL;
 			put_device(&port->dev);
-	}
-
-	/* If this is a "fake" port, we have to clean it up here, as it will
-	 * not get cleaned up in port_release() as it was never registered with
-	 * the driver core */
-	if (serial->num_ports < serial->num_port_pointers) {
-		for (i = serial->num_ports;
-					i < serial->num_port_pointers; ++i) {
-			port = serial->port[i];
-			if (port)
-				port_free(port);
 		}
 	}
 
 	usb_put_dev(serial->dev);
-
-	/* free up any memory that we allocated */
 	kfree(serial);
 }
 
@@ -201,8 +188,6 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
 	port = serial->port[portNumber];
 	if (!port || serial->disconnected)
 		retval = -ENODEV;
-	else
-		get_device(&port->dev);
 	/*
 	 * Note: Our locking order requirement does not allow port->mutex
 	 * to be acquired while serial->disc_mutex is held.
@@ -213,7 +198,7 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
 
 	if (mutex_lock_interruptible(&port->mutex)) {
 		retval = -ERESTARTSYS;
-		goto bailout_port_put;
+		goto bailout_serial_put;
 	}
 
 	++port->port.count;
@@ -273,8 +258,6 @@ bailout_mutex_unlock:
 	tty->driver_data = NULL;
 	tty_port_tty_set(&port->port, NULL);
 	mutex_unlock(&port->mutex);
-bailout_port_put:
-	put_device(&port->dev);
 bailout_serial_put:
 	usb_serial_put(serial);
 	return retval;
@@ -333,14 +316,13 @@ static void serial_do_free(struct tty_struct *tty)
 
 	serial = port->serial;
 	owner = serial->type->driver.owner;
-	put_device(&port->dev);
-	/* Mustn't dereference port any more */
+
 	mutex_lock(&serial->disc_mutex);
 	if (!serial->disconnected)
 		usb_autopm_put_interface(serial->interface);
 	mutex_unlock(&serial->disc_mutex);
+
 	usb_serial_put(serial);
-	/* Mustn't dereference serial any more */
 	module_put(owner);
 }
 
@@ -581,14 +563,6 @@ static void usb_serial_port_work(struct work_struct *work)
 	tty_kref_put(tty);
 }
 
-static void port_release(struct device *dev)
-{
-	struct usb_serial_port *port = to_usb_serial_port(dev);
-
-	dbg ("%s - %s", __func__, dev_name(dev));
-	port_free(port);
-}
-
 static void kill_traffic(struct usb_serial_port *port)
 {
 	usb_kill_urb(port->read_urb);
@@ -608,8 +582,12 @@ static void kill_traffic(struct usb_serial_port *port)
 	usb_kill_urb(port->interrupt_out_urb);
 }
 
-static void port_free(struct usb_serial_port *port)
+static void port_release(struct device *dev)
 {
+	struct usb_serial_port *port = to_usb_serial_port(dev);
+
+	dbg ("%s - %s", __func__, dev_name(dev));
+
 	/*
 	 * Stop all the traffic before cancelling the work, so that
 	 * nobody will restart it by calling usb_serial_port_softint.
@@ -955,6 +933,11 @@ int usb_serial_probe(struct usb_interface *interface,
 		mutex_init(&port->mutex);
 		INIT_WORK(&port->work, usb_serial_port_work);
 		serial->port[i] = port;
+		port->dev.parent = &interface->dev;
+		port->dev.driver = NULL;
+		port->dev.bus = &usb_serial_bus_type;
+		port->dev.release = &port_release;
+		device_initialize(&port->dev);
 	}
 
 	/* set up the endpoint information */
@@ -1097,15 +1080,10 @@ int usb_serial_probe(struct usb_interface *interface,
 	/* register all of the individual ports with the driver core */
 	for (i = 0; i < num_ports; ++i) {
 		port = serial->port[i];
-		port->dev.parent = &interface->dev;
-		port->dev.driver = NULL;
-		port->dev.bus = &usb_serial_bus_type;
-		port->dev.release = &port_release;
-
 		dev_set_name(&port->dev, "ttyUSB%d", port->number);
 		dbg ("%s - registering %s", __func__, dev_name(&port->dev));
 		port->dev_state = PORT_REGISTERING;
-		retval = device_register(&port->dev);
+		retval = device_add(&port->dev);
 		if (retval) {
 			dev_err(&port->dev, "Error registering port device, "
 				"continuing\n");
@@ -1123,39 +1101,7 @@ exit:
 	return 0;
 
 probe_error:
-	for (i = 0; i < num_bulk_in; ++i) {
-		port = serial->port[i];
-		if (!port)
-			continue;
-		usb_free_urb(port->read_urb);
-		kfree(port->bulk_in_buffer);
-	}
-	for (i = 0; i < num_bulk_out; ++i) {
-		port = serial->port[i];
-		if (!port)
-			continue;
-		usb_free_urb(port->write_urb);
-		kfree(port->bulk_out_buffer);
-	}
-	for (i = 0; i < num_interrupt_in; ++i) {
-		port = serial->port[i];
-		if (!port)
-			continue;
-		usb_free_urb(port->interrupt_in_urb);
-		kfree(port->interrupt_in_buffer);
-	}
-	for (i = 0; i < num_interrupt_out; ++i) {
-		port = serial->port[i];
-		if (!port)
-			continue;
-		usb_free_urb(port->interrupt_out_urb);
-		kfree(port->interrupt_out_buffer);
-	}
-
-	/* free up any memory that we allocated */
-	for (i = 0; i < serial->num_port_pointers; ++i)
-		kfree(serial->port[i]);
-	kfree(serial);
+	usb_serial_put(serial);
 	return -EIO;
 }
 EXPORT_SYMBOL_GPL(usb_serial_probe);
@@ -1206,8 +1152,7 @@ void usb_serial_disconnect(struct usb_interface *interface)
 	}
 	serial->type->disconnect(serial);
 
-	/* let the last holder of this object
-	 * cause it to be cleaned up */
+	/* let the last holder of this object cause it to be cleaned up */
 	usb_serial_put(serial);
 	dev_info(dev, "device disconnected\n");
 }
-- 
1.6.4.2


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

* [PATCH 72/79] usb-serial: put subroutines in logical order
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (70 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 71/79] usb-serial: change referencing of port and serial structures Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 73/79] usb-serial: change logic of serial lookups Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1285) rearranges the subroutines in usb-serial.c
concerned with tty lifetimes into a more logical order: install, open,
hangup, close, release.  It also updates the formatting of the
kerneldoc comments.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |  154 +++++++++++++++++++-------------------
 1 files changed, 77 insertions(+), 77 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index f1a1f0f..266dc58 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -166,6 +166,41 @@ void usb_serial_put(struct usb_serial *serial)
 /*****************************************************************************
  * Driver tty interface functions
  *****************************************************************************/
+
+/**
+ * serial_install - install tty
+ * @driver: the driver (USB in our case)
+ * @tty: the tty being created
+ *
+ * Create the termios objects for this tty.  We use the default
+ * USB serial settings but permit them to be overridden by
+ * serial->type->init_termios.
+ */
+static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
+{
+	int idx = tty->index;
+	struct usb_serial *serial;
+	int retval;
+
+	/* If the termios setup has yet to be done */
+	if (tty->driver->termios[idx] == NULL) {
+		/* perform the standard setup */
+		retval = tty_init_termios(tty);
+		if (retval)
+			return retval;
+		/* allow the driver to update it */
+		serial = usb_serial_get_by_index(tty->index);
+		if (serial->type->init_termios)
+			serial->type->init_termios(tty);
+		usb_serial_put(serial);
+	}
+	/* Final install (we use the default method) */
+	tty_driver_kref_get(driver);
+	tty->count++;
+	driver->ttys[idx] = tty;
+	return 0;
+}
+
 static int serial_open (struct tty_struct *tty, struct file *filp)
 {
 	struct usb_serial *serial;
@@ -264,13 +299,11 @@ bailout_serial_put:
 }
 
 /**
- *	serial_do_down		-	shut down hardware
- *	@port: port to shut down
+ * serial_do_down - shut down hardware
+ * @port: port to shut down
  *
- *	Shut down a USB port unless it is the console. We never shut down the
- *	console hardware as it will always be in use.
- *
- *	Don't free any resources at this point
+ * Shut down a USB serial port unless it is the console.  We never
+ * shut down the console hardware as it will always be in use.
  */
 static void serial_do_down(struct usb_serial_port *port)
 {
@@ -278,8 +311,10 @@ static void serial_do_down(struct usb_serial_port *port)
 	struct usb_serial *serial;
 	struct module *owner;
 
-	/* The console is magical, do not hang up the console hardware
-	   or there will be tears */
+	/*
+	 * The console is magical.  Do not hang up the console hardware
+	 * or there will be tears.
+	 */
 	if (port->console)
 		return;
 
@@ -293,24 +328,50 @@ static void serial_do_down(struct usb_serial_port *port)
 	mutex_unlock(&port->mutex);
 }
 
+static void serial_hangup(struct tty_struct *tty)
+{
+	struct usb_serial_port *port = tty->driver_data;
+	serial_do_down(port);
+	tty_port_hangup(&port->port);
+	/* We must not free port yet - the USB serial layer depends on it's
+	   continued existence */
+}
+
+static void serial_close(struct tty_struct *tty, struct file *filp)
+{
+	struct usb_serial_port *port = tty->driver_data;
+
+	if (!port)
+		return;
+
+	dbg("%s - port %d", __func__, port->number);
+
+	if (tty_port_close_start(&port->port, tty, filp) == 0)
+		return;
+	serial_do_down(port);
+	tty_port_close_end(&port->port, tty);
+	tty_port_tty_set(&port->port, NULL);
+
+}
+
 /**
- *	serial_do_free		-	free resources post close/hangup
- *	@port: port to free up
+ * serial_do_free - free resources post close/hangup
+ * @port: port to free up
  *
- *	Do the resource freeing and refcount dropping for the port. We must
- *	be careful about ordering and we must avoid freeing up the console.
+ * Do the resource freeing and refcount dropping for the port.
+ * Avoid freeing the console.
  *
- *	Called when the last tty kref is dropped.
+ * Called when the last tty kref is dropped.
  */
-
 static void serial_do_free(struct tty_struct *tty)
 {
 	struct usb_serial_port *port = tty->driver_data;
 	struct usb_serial *serial;
 	struct module *owner;
 
-	/* The console is magical, do not hang up the console hardware
-	   or there will be tears */
+	/* The console is magical.  Do not hang up the console hardware
+	 * or there will be tears.
+	 */
 	if (port == NULL || port->console)
 		return;
 
@@ -326,32 +387,6 @@ static void serial_do_free(struct tty_struct *tty)
 	module_put(owner);
 }
 
-static void serial_close(struct tty_struct *tty, struct file *filp)
-{
-	struct usb_serial_port *port = tty->driver_data;
-
-	if (!port)
-		return;
-
-	dbg("%s - port %d", __func__, port->number);
-
-	if (tty_port_close_start(&port->port, tty, filp) == 0)
-		return;
-	serial_do_down(port);		
-	tty_port_close_end(&port->port, tty);
-	tty_port_tty_set(&port->port, NULL);
-
-}
-
-static void serial_hangup(struct tty_struct *tty)
-{
-	struct usb_serial_port *port = tty->driver_data;
-	serial_do_down(port);
-	tty_port_hangup(&port->port);
-	/* We must not free port yet - the USB serial layer depends on it's
-	   continued existence */
-}
-
 static int serial_write(struct tty_struct *tty, const unsigned char *buf,
 								int count)
 {
@@ -699,41 +734,6 @@ static const struct tty_port_operations serial_port_ops = {
 	.dtr_rts = serial_dtr_rts,
 };
 
-/**
- *	serial_install		-	install tty
- *	@driver: the driver (USB in our case)
- *	@tty: the tty being created
- *
- *	Create the termios objects for this tty. We use the default USB
- *	serial ones but permit them to be overriddenby serial->type->termios.
- *	This lets us remove all the ugly hackery
- */
-
-static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
-{
-	int idx = tty->index;
-	struct usb_serial *serial;
-	int retval;
-
-	/* If the termios setup has yet to be done */
-	if (tty->driver->termios[idx] == NULL) {
-		/* perform the standard setup */
-		retval = tty_init_termios(tty);
-		if (retval)
-			return retval;
-		/* allow the driver to update it */
-		serial = usb_serial_get_by_index(tty->index);
-		if (serial->type->init_termios)
-			serial->type->init_termios(tty);
-		usb_serial_put(serial);
-	}
-	/* Final install (we use the default method) */
-	tty_driver_kref_get(driver);
-	tty->count++;
-	driver->ttys[idx] = tty;
-	return 0;
-}
-
 int usb_serial_probe(struct usb_interface *interface,
 			       const struct usb_device_id *id)
 {
-- 
1.6.4.2


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

* [PATCH 73/79] usb-serial: change logic of serial lookups
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (71 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 72/79] usb-serial: put subroutines in logical order Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 74/79] usb-serial: acquire references when a new tty is installed Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1286) changes usb_serial_get_by_index().  Now the
routine will check whether the serial device has been disconnected; if
it has then the return value will be NULL.  If the device hasn't been
disconnected then the routine will return with serial->disc_mutex
held, so that the caller can use the structure without fear of racing
against driver unloads.

This permits the scope of table_mutex in destroy_serial() to be
reduced.  Instead of protecting the entire function, it suffices to
protect the part that actually uses serial_table[], i.e., the call to
return_serial().  There's no longer any danger of the refcount being
incremented after it reaches 0 (which was the reason for having the
large scope previously), because it can't reach 0 until the serial
device has been disconnected.

Also, the patch makes serial_install() check that serial is non-NULL
before attempting to use it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |   31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 266dc58..87802ea 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -66,6 +66,11 @@ static struct usb_serial *serial_table[SERIAL_TTY_MINORS];
 static DEFINE_MUTEX(table_lock);
 static LIST_HEAD(usb_serial_driver_list);
 
+/*
+ * Look up the serial structure.  If it is found and it hasn't been
+ * disconnected, return with its disc_mutex held and its refcount
+ * incremented.  Otherwise return NULL.
+ */
 struct usb_serial *usb_serial_get_by_index(unsigned index)
 {
 	struct usb_serial *serial;
@@ -73,8 +78,15 @@ struct usb_serial *usb_serial_get_by_index(unsigned index)
 	mutex_lock(&table_lock);
 	serial = serial_table[index];
 
-	if (serial)
-		kref_get(&serial->kref);
+	if (serial) {
+		mutex_lock(&serial->disc_mutex);
+		if (serial->disconnected) {
+			mutex_unlock(&serial->disc_mutex);
+			serial = NULL;
+		} else {
+			kref_get(&serial->kref);
+		}
+	}
 	mutex_unlock(&table_lock);
 	return serial;
 }
@@ -123,8 +135,10 @@ static void return_serial(struct usb_serial *serial)
 
 	dbg("%s", __func__);
 
+	mutex_lock(&table_lock);
 	for (i = 0; i < serial->num_ports; ++i)
 		serial_table[serial->minor + i] = NULL;
+	mutex_unlock(&table_lock);
 }
 
 static void destroy_serial(struct kref *kref)
@@ -158,9 +172,7 @@ static void destroy_serial(struct kref *kref)
 
 void usb_serial_put(struct usb_serial *serial)
 {
-	mutex_lock(&table_lock);
 	kref_put(&serial->kref, destroy_serial);
-	mutex_unlock(&table_lock);
 }
 
 /*****************************************************************************
@@ -190,9 +202,12 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
 			return retval;
 		/* allow the driver to update it */
 		serial = usb_serial_get_by_index(tty->index);
-		if (serial->type->init_termios)
-			serial->type->init_termios(tty);
-		usb_serial_put(serial);
+		if (serial) {
+			if (serial->type->init_termios)
+				serial->type->init_termios(tty);
+			usb_serial_put(serial);
+			mutex_unlock(&serial->disc_mutex);
+		}
 	}
 	/* Final install (we use the default method) */
 	tty_driver_kref_get(driver);
@@ -218,7 +233,6 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
 		return -ENODEV;
 	}
 
-	mutex_lock(&serial->disc_mutex);
 	portNumber = tty->index - serial->minor;
 	port = serial->port[portNumber];
 	if (!port || serial->disconnected)
@@ -529,6 +543,7 @@ static int serial_proc_show(struct seq_file *m, void *v)
 
 		seq_putc(m, '\n');
 		usb_serial_put(serial);
+		mutex_unlock(&serial->disc_mutex);
 	}
 	return 0;
 }
-- 
1.6.4.2


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

* [PATCH 74/79] usb-serial: acquire references when a new tty is installed
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (72 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 73/79] usb-serial: change logic of serial lookups Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 75/79] usb-serial: fix termios initialization logic Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1287) makes serial_install() be reponsible for acquiring
references to the usb_serial structure and the driver module when a
tty is first used.  This is more sensible than having serial_open() do
it, because a tty can be opened many times whereas it is installed
only once, when it is created.  (Not to mention that these actions are
reversed when the tty is released, not when it is closed.)  Finally,
it is at install time that the TTY core takes its own reference to the
usb_serial module, so it is only fitting that we should act the same
way in regard to the lower-level serial driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |  111 ++++++++++++++++----------------------
 1 files changed, 47 insertions(+), 64 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 87802ea..7d207d9 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -187,100 +187,92 @@ void usb_serial_put(struct usb_serial *serial)
  * Create the termios objects for this tty.  We use the default
  * USB serial settings but permit them to be overridden by
  * serial->type->init_termios.
+ *
+ * This is the first place a new tty gets used.  Hence this is where we
+ * acquire references to the usb_serial structure and the driver module,
+ * where we store a pointer to the port, and where we do an autoresume.
+ * All these actions are reversed in serial_do_free().
  */
 static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
 {
 	int idx = tty->index;
 	struct usb_serial *serial;
-	int retval;
+	struct usb_serial_port *port;
+	int retval = -ENODEV;
+
+	serial = usb_serial_get_by_index(idx);
+	if (!serial)
+		return retval;
+
+	port = serial->port[idx - serial->minor];
+	if (!port)
+		goto error_no_port;
+	if (!try_module_get(serial->type->driver.owner))
+		goto error_module_get;
+
+	retval = usb_autopm_get_interface(serial->interface);
+	if (retval)
+		goto error_get_interface;
 
 	/* If the termios setup has yet to be done */
 	if (tty->driver->termios[idx] == NULL) {
 		/* perform the standard setup */
 		retval = tty_init_termios(tty);
 		if (retval)
-			return retval;
+			goto error_init_termios;
 		/* allow the driver to update it */
-		serial = usb_serial_get_by_index(tty->index);
-		if (serial) {
-			if (serial->type->init_termios)
-				serial->type->init_termios(tty);
-			usb_serial_put(serial);
-			mutex_unlock(&serial->disc_mutex);
-		}
+		if (serial->type->init_termios)
+			serial->type->init_termios(tty);
 	}
+	mutex_unlock(&serial->disc_mutex);
+
+	tty->driver_data = port;
+
 	/* Final install (we use the default method) */
 	tty_driver_kref_get(driver);
 	tty->count++;
 	driver->ttys[idx] = tty;
-	return 0;
+	return retval;
+
+ error_init_termios:
+	usb_autopm_put_interface(serial->interface);
+ error_get_interface:
+	module_put(serial->type->driver.owner);
+ error_module_get:
+ error_no_port:
+	usb_serial_put(serial);
+	mutex_unlock(&serial->disc_mutex);
+	return retval;
 }
 
 static int serial_open (struct tty_struct *tty, struct file *filp)
 {
 	struct usb_serial *serial;
 	struct usb_serial_port *port;
-	unsigned int portNumber;
 	int retval = 0;
 	int first = 0;
 
 	dbg("%s", __func__);
 
-	/* get the serial object associated with this tty pointer */
-	serial = usb_serial_get_by_index(tty->index);
-	if (!serial) {
-		tty->driver_data = NULL;
-		return -ENODEV;
-	}
-
-	portNumber = tty->index - serial->minor;
-	port = serial->port[portNumber];
-	if (!port || serial->disconnected)
-		retval = -ENODEV;
-	/*
-	 * Note: Our locking order requirement does not allow port->mutex
-	 * to be acquired while serial->disc_mutex is held.
-	 */
-	mutex_unlock(&serial->disc_mutex);
-	if (retval)
-		goto bailout_serial_put;
+	port = tty->driver_data;
+	serial = port->serial;
 
-	if (mutex_lock_interruptible(&port->mutex)) {
-		retval = -ERESTARTSYS;
-		goto bailout_serial_put;
-	}
+	if (mutex_lock_interruptible(&port->mutex))
+		return -ERESTARTSYS;
 
 	++port->port.count;
-
-	/* set up our port structure making the tty driver
-	 * remember our port object, and us it */
-	tty->driver_data = port;
 	tty_port_tty_set(&port->port, tty);
 
 	/* If the console is attached, the device is already open */
 	if (port->port.count == 1 && !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 */
-		if (!try_module_get(serial->type->driver.owner)) {
-			retval = -ENODEV;
-			goto bailout_mutex_unlock;
-		}
-
 		mutex_lock(&serial->disc_mutex);
-		if (serial->disconnected)
-			retval = -ENODEV;
-		else
-			retval = usb_autopm_get_interface(serial->interface);
-		if (retval)
-			goto bailout_module_put;
 
 		/* only call the device specific open if this
 		 * is the first time the port is opened */
 		retval = serial->type->open(tty, port);
 		if (retval)
-			goto bailout_interface_put;
+			goto bailout_module_put;
 		mutex_unlock(&serial->disc_mutex);
 		set_bit(ASYNCB_INITIALIZED, &port->port.flags);
 	}
@@ -297,18 +289,11 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
 		goto bailout_mutex_unlock;
 	/* Undo the initial port actions */
 	mutex_lock(&serial->disc_mutex);
-bailout_interface_put:
-	usb_autopm_put_interface(serial->interface);
 bailout_module_put:
 	mutex_unlock(&serial->disc_mutex);
-	module_put(serial->type->driver.owner);
 bailout_mutex_unlock:
 	port->port.count = 0;
-	tty->driver_data = NULL;
-	tty_port_tty_set(&port->port, NULL);
 	mutex_unlock(&port->mutex);
-bailout_serial_put:
-	usb_serial_put(serial);
 	return retval;
 }
 
@@ -355,9 +340,6 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
 {
 	struct usb_serial_port *port = tty->driver_data;
 
-	if (!port)
-		return;
-
 	dbg("%s - port %d", __func__, port->number);
 
 	if (tty_port_close_start(&port->port, tty, filp) == 0)
@@ -365,7 +347,6 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
 	serial_do_down(port);
 	tty_port_close_end(&port->port, tty);
 	tty_port_tty_set(&port->port, NULL);
-
 }
 
 /**
@@ -386,9 +367,11 @@ static void serial_do_free(struct tty_struct *tty)
 	/* The console is magical.  Do not hang up the console hardware
 	 * or there will be tears.
 	 */
-	if (port == NULL || port->console)
+	if (port->console)
 		return;
 
+	tty->driver_data = NULL;
+
 	serial = port->serial;
 	owner = serial->type->driver.owner;
 
-- 
1.6.4.2


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

* [PATCH 75/79] usb-serial: fix termios initialization logic
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (73 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 74/79] usb-serial: acquire references when a new tty is installed Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 76/79] usb-serial: rename subroutines Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1288) fixes the initialization logic in
serial_install().  A new tty always needs to have a termios
initialized no matter what, not just in the case where the lower
driver will override the termios settings.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 7d207d9..1bc0a24 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -210,22 +210,21 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
 	if (!try_module_get(serial->type->driver.owner))
 		goto error_module_get;
 
+	/* perform the standard setup */
+	retval = tty_init_termios(tty);
+	if (retval)
+		goto error_init_termios;
+
 	retval = usb_autopm_get_interface(serial->interface);
 	if (retval)
 		goto error_get_interface;
 
-	/* If the termios setup has yet to be done */
-	if (tty->driver->termios[idx] == NULL) {
-		/* perform the standard setup */
-		retval = tty_init_termios(tty);
-		if (retval)
-			goto error_init_termios;
-		/* allow the driver to update it */
-		if (serial->type->init_termios)
-			serial->type->init_termios(tty);
-	}
 	mutex_unlock(&serial->disc_mutex);
 
+	/* allow the driver to update the settings */
+	if (serial->type->init_termios)
+		serial->type->init_termios(tty);
+
 	tty->driver_data = port;
 
 	/* Final install (we use the default method) */
@@ -234,9 +233,8 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
 	driver->ttys[idx] = tty;
 	return retval;
 
- error_init_termios:
-	usb_autopm_put_interface(serial->interface);
  error_get_interface:
+ error_init_termios:
 	module_put(serial->type->driver.owner);
  error_module_get:
  error_no_port:
-- 
1.6.4.2


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

* [PATCH 76/79] usb-serial: rename subroutines
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (74 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 75/79] usb-serial: fix termios initialization logic Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 77/79] usb-serial: add missing tests and debug lines Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1289) renames serial_do_down() to serial_down() and
serial_do_free() to serial_release().  It also adds a missing call to
tty_shutdown() in serial_release().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 1bc0a24..28125de 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -191,7 +191,7 @@ void usb_serial_put(struct usb_serial *serial)
  * This is the first place a new tty gets used.  Hence this is where we
  * acquire references to the usb_serial structure and the driver module,
  * where we store a pointer to the port, and where we do an autoresume.
- * All these actions are reversed in serial_do_free().
+ * All these actions are reversed in serial_release().
  */
 static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
 {
@@ -296,13 +296,13 @@ bailout_mutex_unlock:
 }
 
 /**
- * serial_do_down - shut down hardware
+ * serial_down - shut down hardware
  * @port: port to shut down
  *
  * Shut down a USB serial port unless it is the console.  We never
  * shut down the console hardware as it will always be in use.
  */
-static void serial_do_down(struct usb_serial_port *port)
+static void serial_down(struct usb_serial_port *port)
 {
 	struct usb_serial_driver *drv = port->serial->type;
 	struct usb_serial *serial;
@@ -328,7 +328,7 @@ static void serial_do_down(struct usb_serial_port *port)
 static void serial_hangup(struct tty_struct *tty)
 {
 	struct usb_serial_port *port = tty->driver_data;
-	serial_do_down(port);
+	serial_down(port);
 	tty_port_hangup(&port->port);
 	/* We must not free port yet - the USB serial layer depends on it's
 	   continued existence */
@@ -342,13 +342,13 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
 
 	if (tty_port_close_start(&port->port, tty, filp) == 0)
 		return;
-	serial_do_down(port);
+	serial_down(port);
 	tty_port_close_end(&port->port, tty);
 	tty_port_tty_set(&port->port, NULL);
 }
 
 /**
- * serial_do_free - free resources post close/hangup
+ * serial_release - free resources post close/hangup
  * @port: port to free up
  *
  * Do the resource freeing and refcount dropping for the port.
@@ -356,7 +356,7 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
  *
  * Called when the last tty kref is dropped.
  */
-static void serial_do_free(struct tty_struct *tty)
+static void serial_release(struct tty_struct *tty)
 {
 	struct usb_serial_port *port = tty->driver_data;
 	struct usb_serial *serial;
@@ -368,6 +368,9 @@ static void serial_do_free(struct tty_struct *tty)
 	if (port->console)
 		return;
 
+	/* Standard shutdown processing */
+	tty_shutdown(tty);
+
 	tty->driver_data = NULL;
 
 	serial = port->serial;
@@ -1204,7 +1207,7 @@ static const struct tty_operations serial_ops = {
 	.chars_in_buffer =	serial_chars_in_buffer,
 	.tiocmget =		serial_tiocmget,
 	.tiocmset =		serial_tiocmset,
-	.shutdown = 		serial_do_free,
+	.shutdown = 		serial_release,
 	.install = 		serial_install,
 	.proc_fops =		&serial_proc_fops,
 };
-- 
1.6.4.2


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

* [PATCH 77/79] usb-serial: add missing tests and debug lines
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (75 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 76/79] usb-serial: rename subroutines Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 78/79] usb-serial: straighten out serial_open Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1290) adds some missing tests.  serial_down() isn't
supposed to do anything if the hardware hasn't been initialized, and
serial_close() isn't supposed to do anything if the tty has gotten a
hangup (because serial_hangup() takes care of shutting down the
hardware).

The patch also updates and adds a few debugging lines.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 28125de..9a32580 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -200,6 +200,8 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
 	struct usb_serial_port *port;
 	int retval = -ENODEV;
 
+	dbg("%s", __func__);
+
 	serial = usb_serial_get_by_index(idx);
 	if (!serial)
 		return retval;
@@ -250,11 +252,11 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
 	int retval = 0;
 	int first = 0;
 
-	dbg("%s", __func__);
-
 	port = tty->driver_data;
 	serial = port->serial;
 
+	dbg("%s - port %d", __func__, port->number);
+
 	if (mutex_lock_interruptible(&port->mutex))
 		return -ERESTARTSYS;
 
@@ -315,6 +317,12 @@ static void serial_down(struct usb_serial_port *port)
 	if (port->console)
 		return;
 
+	/* Don't call the close method if the hardware hasn't been
+	 * initialized.
+	 */
+	if (!test_and_clear_bit(ASYNCB_INITIALIZED, &port->port.flags))
+		return;
+
 	mutex_lock(&port->mutex);
 	serial = port->serial;
 	owner = serial->type->driver.owner;
@@ -328,10 +336,11 @@ static void serial_down(struct usb_serial_port *port)
 static void serial_hangup(struct tty_struct *tty)
 {
 	struct usb_serial_port *port = tty->driver_data;
+
+	dbg("%s - port %d", __func__, port->number);
+
 	serial_down(port);
 	tty_port_hangup(&port->port);
-	/* We must not free port yet - the USB serial layer depends on it's
-	   continued existence */
 }
 
 static void serial_close(struct tty_struct *tty, struct file *filp)
@@ -340,6 +349,8 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
 
 	dbg("%s - port %d", __func__, port->number);
 
+	if (tty_hung_up_p(filp))
+		return;
 	if (tty_port_close_start(&port->port, tty, filp) == 0)
 		return;
 	serial_down(port);
@@ -368,6 +379,8 @@ static void serial_release(struct tty_struct *tty)
 	if (port->console)
 		return;
 
+	dbg("%s - port %d", __func__, port->number);
+
 	/* Standard shutdown processing */
 	tty_shutdown(tty);
 
-- 
1.6.4.2


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

* [PATCH 78/79] usb-serial: straighten out serial_open
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (76 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 77/79] usb-serial: add missing tests and debug lines Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-19 21:37 ` [PATCH 79/79] USB serial: update the console driver Greg Kroah-Hartman
  2009-09-30 10:09 ` [origin tree boot crash] Re: [GIT PATCH] TTY patches for 2.6.31-git Ingo Molnar
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1291) removes a bunch of code from serial_open(), things
that were rendered unnecessary by earlier patches.  A missing spinlock
is added to protect port->port.count, which needs to be incremented
even if the open fails but not if the tty has gotten a hangup.  The
test for whether the hardware has been initialized, based on the use
count, is replaced by a more transparent test of the
ASYNCB_INITIALIZED bit in the port flags.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/usb-serial.c |   59 ++++++++++++++------------------------
 1 files changed, 22 insertions(+), 37 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 9a32580..9d7ca48 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -245,55 +245,40 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
 	return retval;
 }
 
-static int serial_open (struct tty_struct *tty, struct file *filp)
+static int serial_open(struct tty_struct *tty, struct file *filp)
 {
-	struct usb_serial *serial;
-	struct usb_serial_port *port;
-	int retval = 0;
-	int first = 0;
-
-	port = tty->driver_data;
-	serial = port->serial;
+	struct usb_serial_port *port = tty->driver_data;
+	struct usb_serial *serial = port->serial;
+	int retval;
 
 	dbg("%s - port %d", __func__, port->number);
 
-	if (mutex_lock_interruptible(&port->mutex))
-		return -ERESTARTSYS;
-
-	++port->port.count;
+	spin_lock_irq(&port->port.lock);
+	if (!tty_hung_up_p(filp))
+		++port->port.count;
+	spin_unlock_irq(&port->port.lock);
 	tty_port_tty_set(&port->port, tty);
 
-	/* If the console is attached, the device is already open */
-	if (port->port.count == 1 && !port->console) {
-		first = 1;
+	/* Do the device-specific open only if the hardware isn't
+	 * already initialized.
+	 */
+	if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags)) {
+		if (mutex_lock_interruptible(&port->mutex))
+			return -ERESTARTSYS;
 		mutex_lock(&serial->disc_mutex);
-
-		/* only call the device specific open if this
-		 * is the first time the port is opened */
-		retval = serial->type->open(tty, port);
-		if (retval)
-			goto bailout_module_put;
+		if (serial->disconnected)
+			retval = -ENODEV;
+		else
+			retval = port->serial->type->open(tty, port);
 		mutex_unlock(&serial->disc_mutex);
+		mutex_unlock(&port->mutex);
+		if (retval)
+			return retval;
 		set_bit(ASYNCB_INITIALIZED, &port->port.flags);
 	}
-	mutex_unlock(&port->mutex);
+
 	/* Now do the correct tty layer semantics */
 	retval = tty_port_block_til_ready(&port->port, tty, filp);
-	if (retval == 0) {
-		if (!first)
-			usb_serial_put(serial);
-		return 0;
-	}
-	mutex_lock(&port->mutex);
-	if (first == 0)
-		goto bailout_mutex_unlock;
-	/* Undo the initial port actions */
-	mutex_lock(&serial->disc_mutex);
-bailout_module_put:
-	mutex_unlock(&serial->disc_mutex);
-bailout_mutex_unlock:
-	port->port.count = 0;
-	mutex_unlock(&port->mutex);
 	return retval;
 }
 
-- 
1.6.4.2


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

* [PATCH 79/79] USB serial: update the console driver
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (77 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 78/79] usb-serial: straighten out serial_open Greg Kroah-Hartman
@ 2009-09-19 21:37 ` Greg Kroah-Hartman
  2009-09-30 10:09 ` [origin tree boot crash] Re: [GIT PATCH] TTY patches for 2.6.31-git Ingo Molnar
  79 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2009-09-19 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Stern, stable, Greg Kroah-Hartman

From: Alan Stern <stern@rowland.harvard.edu>

This patch (as1292) modifies the USB serial console driver, to make it
compatible with the recent changes to the USB serial core.  The most
important change is that serial->disc_mutex now has to be unlocked
following a successful call to usb_serial_get_by_index().

Other less notable changes include:

	Use the requested port number instead of port 0 always.

	Prevent the serial device from being autosuspended.

	Use the ASYNCB_INITIALIZED flag bit to indicate when the
	port hardware has been initialized.

In spite of these changes, there's no question that the USB serial
console code is still a big hack.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/serial/console.c |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index be086e4..b22ac32 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 #include <linux/tty.h>
 #include <linux/console.h>
+#include <linux/serial.h>
 #include <linux/usb.h>
 #include <linux/usb/serial.h>
 
@@ -63,7 +64,7 @@ static int usb_console_setup(struct console *co, char *options)
 	char *s;
 	struct usb_serial *serial;
 	struct usb_serial_port *port;
-	int retval = 0;
+	int retval;
 	struct tty_struct *tty = NULL;
 	struct ktermios *termios = NULL, dummy;
 
@@ -116,13 +117,17 @@ static int usb_console_setup(struct console *co, char *options)
 		return -ENODEV;
 	}
 
-	port = serial->port[0];
+	retval = usb_autopm_get_interface(serial->interface);
+	if (retval)
+		goto error_get_interface;
+
+	port = serial->port[co->index - serial->minor];
 	tty_port_tty_set(&port->port, NULL);
 
 	info->port = port;
 
 	++port->port.count;
-	if (port->port.count == 1) {
+	if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags)) {
 		if (serial->type->set_termios) {
 			/*
 			 * allocate a fake tty so the driver can initialize
@@ -168,6 +173,7 @@ static int usb_console_setup(struct console *co, char *options)
 			kfree(termios);
 			kfree(tty);
 		}
+		set_bit(ASYNCB_INITIALIZED, &port->port.flags);
 	}
 	/* Now that any required fake tty operations are completed restore
 	 * the tty port count */
@@ -175,18 +181,22 @@ static int usb_console_setup(struct console *co, char *options)
 	/* The console is special in terms of closing the device so
 	 * indicate this port is now acting as a system console. */
 	port->console = 1;
-	retval = 0;
 
-out:
+	mutex_unlock(&serial->disc_mutex);
 	return retval;
-free_termios:
+
+ free_termios:
 	kfree(termios);
 	tty_port_tty_set(&port->port, NULL);
-free_tty:
+ free_tty:
 	kfree(tty);
-reset_open_count:
+ reset_open_count:
 	port->port.count = 0;
-	goto out;
+	usb_autopm_put_interface(serial->interface);
+ error_get_interface:
+	usb_serial_put(serial);
+	mutex_unlock(&serial->disc_mutex);
+	return retval;
 }
 
 static void usb_console_write(struct console *co,
-- 
1.6.4.2


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

* [origin tree boot crash] Re: [GIT PATCH] TTY patches for 2.6.31-git
  2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
                   ` (78 preceding siblings ...)
  2009-09-19 21:37 ` [PATCH 79/79] USB serial: update the console driver Greg Kroah-Hartman
@ 2009-09-30 10:09 ` Ingo Molnar
  2009-09-30 10:17   ` Alan Cox
  79 siblings, 1 reply; 86+ messages in thread
From: Ingo Molnar @ 2009-09-30 10:09 UTC (permalink / raw)
  To: Greg KH; +Cc: Linus Torvalds, Andrew Morton, linux-kernel

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


>       serial: use tty_port pointers in the core code

-tip testing found a weird serial code related crash on a testbox: the 
box does spontaneous reboot during the user-space portions of bootup. 
There's nothing in the serial log, but i've been able to bisect it to:

 | 46d57a449aa13d9c6adcc9d1dbc7b9a0ecfb69d8 is first bad commit
 | commit 46d57a449aa13d9c6adcc9d1dbc7b9a0ecfb69d8
 | Author: Alan Cox <alan@linux.intel.com>
 | Date:   Sat Sep 19 13:13:29 2009 -0700
 |
 |    serial: use tty_port pointers in the core code

A revert looks rather impossible due to how the changes are layered on 
each other. Can try any test-patch.

Here's the bisection log:

 # good: [74fca6a4] Linux 2.6.31
 # bad:  [17d857be] Linux 2.6.32-rc1
 # good: [5d1fe0c9] Staging: vt6656: Integrate vt6656 into build syste
 # bad:  [c720f565] Merge branch 'for_linus' of git://git.kernel.org/p
 # good: [a03fdb76] Merge branch 'timers-for-linus' of git://git.kerne
 # good: [3530c188] Merge branch 'for_linus' of git://git.kernel.org/p
 # good: [84d6ae43] V4L/DVB (13033): pt1: Don't use a deprecated DMA_B
 # bad:  [ebc79c4f] Merge git://git.kernel.org/pub/scm/linux/kernel/gi
 # bad:  [7bd032dc] USB serial: update the console driver
 # good: [4455e344] tty: USB can now use the shutdown method for kref 
 # bad:  [ee5aa7b8] n_tty: honor opost flag for echoes
 # bad:  [91312cdb] serial: move count into the tty_port version
 # good: [a509a7e4] tty: USB does not need the filp argument in the dr
 # good: [ebd2c8f6] serial: kill off uart_info
 # bad:  [46d57a44] serial: use tty_port pointers in the core code
 # good: [5e99df56] serial: Fold closing_* fields into the tty_port on

Config and a serial log up to the spontaneous reboot attached.

	Ingo

[-- Attachment #2: config --]
[-- Type: text/plain, Size: 62541 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32-rc2
# Wed Sep 30 12:02:40 2009
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_FAST_CMPXCHG_LOCAL=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ZONE_DMA32=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_TRAMPOLINE=y
# CONFIG_KTIME_SCALAR is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
# CONFIG_KERNEL_GZIP is not set
CONFIG_KERNEL_BZIP2=y
# CONFIG_KERNEL_LZMA is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
# CONFIG_TREE_PREEMPT_RCU is not set
# CONFIG_RCU_TRACE is not set
CONFIG_RCU_FANOUT=64
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=20
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_USER_SCHED=y
# CONFIG_CGROUP_SCHED is not set
# CONFIG_CGROUPS is not set
# CONFIG_SYSFS_DEPRECATED_V2 is not set
CONFIG_RELAY=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
# CONFIG_NET_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_EXTRA_PASS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
CONFIG_PERF_COUNTERS=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
CONFIG_SLUB_DEBUG=y
CONFIG_COMPAT_BRK=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_PROFILING=y
# CONFIG_OPROFILE is not set
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_API_DEBUG=y

#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_SLOW_WORK=y
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
# CONFIG_MODULES is not set
CONFIG_BLOCK=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLOCK_COMPAT=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
CONFIG_FREEZER=y

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_SMP is not set
CONFIG_X86_X2APIC=y
# CONFIG_SPARSE_IRQ is not set
# CONFIG_X86_MPPARSE is not set
# CONFIG_X86_EXTENDED_PLATFORM is not set
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_PARAVIRT_GUEST=y
# CONFIG_XEN is not set
CONFIG_KVM_CLOCK=y
CONFIG_KVM_GUEST=y
CONFIG_PARAVIRT=y
CONFIG_PARAVIRT_CLOCK=y
CONFIG_PARAVIRT_DEBUG=y
CONFIG_MEMTEST=y
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
CONFIG_GENERIC_CPU=y
CONFIG_X86_CPU=y
CONFIG_X86_L1_CACHE_BYTES=64
CONFIG_X86_INTERNODE_CACHE_BYTES=64
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_TSC=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=64
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
# CONFIG_X86_DS is not set
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
CONFIG_GART_IOMMU=y
CONFIG_CALGARY_IOMMU=y
CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
CONFIG_AMD_IOMMU=y
CONFIG_AMD_IOMMU_STATS=y
CONFIG_SWIOTLB=y
CONFIG_IOMMU_HELPER=y
CONFIG_IOMMU_API=y
CONFIG_NR_CPUS=1
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
# CONFIG_X86_MCE_AMD is not set
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
CONFIG_X86_THERMAL_VECTOR=y
# CONFIG_I8K is not set
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
# CONFIG_X86_CPU_DEBUG is not set
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_DIRECT_GBPAGES=y
CONFIG_ARCH_PROC_KCORE_TEXT=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set
# CONFIG_DISCONTIGMEM_MANUAL is not set
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_VMEMMAP=y

#
# Memory hotplug is currently incompatible with Software Suspend
#
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_HAVE_MLOCK=y
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
CONFIG_MEMORY_FAILURE=y
CONFIG_HWPOISON_INJECT=y
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
# CONFIG_X86_RESERVE_LOW_64K is not set
# CONFIG_MTRR is not set
# CONFIG_EFI is not set
CONFIG_SECCOMP=y
CONFIG_CC_STACKPROTECTOR_ALL=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
CONFIG_HZ_300=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=300
CONFIG_SCHED_HRTICK=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_KEXEC_JUMP=y
CONFIG_PHYSICAL_START=0x1000000
CONFIG_RELOCATABLE=y
CONFIG_PHYSICAL_ALIGN=0x1000000
CONFIG_COMPAT_VDSO=y
# CONFIG_CMDLINE_BOOL is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y

#
# Power management and ACPI options
#
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATION_NVS=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_RUNTIME=y
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS is not set
# CONFIG_ACPI_PROCFS_POWER is not set
CONFIG_ACPI_POWER_METER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
# CONFIG_ACPI_FAN is not set
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_DEBUG_FUNC_TRACE=y
CONFIG_ACPI_PCI_SLOT=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
CONFIG_ACPI_SBS=y
# CONFIG_SFI is not set

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y

#
# Memory power savings
#
# CONFIG_I7300_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_MMCONFIG is not set
CONFIG_PCI_DOMAINS=y
# CONFIG_DMAR is not set
CONFIG_INTR_REMAP=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_PCIEAER=y
CONFIG_PCIE_ECRC=y
CONFIG_PCIEAER_INJECT=y
CONFIG_PCIEASPM=y
CONFIG_PCIEASPM_DEBUG=y
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
# CONFIG_PCI_LEGACY is not set
CONFIG_PCI_DEBUG=y
CONFIG_PCI_STUB=y
CONFIG_HT_IRQ=y
# CONFIG_PCI_IOV is not set
CONFIG_ISA_DMA_API=y
CONFIG_K8_NB=y
# CONFIG_PCCARD is not set
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_FAKE=y
CONFIG_HOTPLUG_PCI_ACPI=y
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
CONFIG_HOTPLUG_PCI_CPCI=y
CONFIG_HOTPLUG_PCI_CPCI_ZT5550=y
# CONFIG_HOTPLUG_PCI_CPCI_GENERIC is not set
CONFIG_HOTPLUG_PCI_SHPC=y

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
# CONFIG_HAVE_AOUT is not set
CONFIG_BINFMT_MISC=y
CONFIG_IA32_EMULATION=y
CONFIG_IA32_AOUT=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
CONFIG_XFRM_SUB_POLICY=y
CONFIG_XFRM_MIGRATE=y
CONFIG_XFRM_STATISTICS=y
CONFIG_XFRM_IPCOMP=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
CONFIG_NET_IPIP=y
# CONFIG_NET_IPGRE is not set
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
CONFIG_INET_IPCOMP=y
CONFIG_INET_XFRM_TUNNEL=y
CONFIG_INET_TUNNEL=y
CONFIG_INET_XFRM_MODE_TRANSPORT=y
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
CONFIG_INET_XFRM_MODE_BEET=y
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
CONFIG_IPV6=y
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
CONFIG_INET6_AH=y
CONFIG_INET6_ESP=y
# CONFIG_INET6_IPCOMP is not set
CONFIG_IPV6_MIP6=y
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
CONFIG_INET6_XFRM_MODE_TUNNEL=y
CONFIG_INET6_XFRM_MODE_BEET=y
CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y
CONFIG_IPV6_SIT=y
CONFIG_IPV6_NDISC_NODETYPE=y
# CONFIG_IPV6_TUNNEL is not set
CONFIG_IPV6_MULTIPLE_TABLES=y
# CONFIG_IPV6_SUBTREES is not set
# CONFIG_IPV6_MROUTE is not set
CONFIG_NETLABEL=y
CONFIG_NETWORK_SECMARK=y
CONFIG_NETFILTER=y
CONFIG_NETFILTER_DEBUG=y
CONFIG_NETFILTER_ADVANCED=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
# CONFIG_NF_CONNTRACK is not set
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
CONFIG_NETFILTER_XT_TARGET_HL=y
CONFIG_NETFILTER_XT_TARGET_LED=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
CONFIG_NETFILTER_XT_TARGET_RATEEST=y
CONFIG_NETFILTER_XT_TARGET_TRACE=y
# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set
CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=y
# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
CONFIG_NETFILTER_XT_MATCH_DCCP=y
# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
CONFIG_NETFILTER_XT_MATCH_ESP=y
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
CONFIG_NETFILTER_XT_MATCH_HL=y
CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
CONFIG_NETFILTER_XT_MATCH_MAC=y
# CONFIG_NETFILTER_XT_MATCH_MARK is not set
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_RATEEST=y
CONFIG_NETFILTER_XT_MATCH_REALM=y
CONFIG_NETFILTER_XT_MATCH_RECENT=y
CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT=y
# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
CONFIG_NETFILTER_XT_MATCH_STRING=y
CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
CONFIG_NETFILTER_XT_MATCH_TIME=y
CONFIG_NETFILTER_XT_MATCH_U32=y
# CONFIG_NETFILTER_XT_MATCH_OSF is not set
CONFIG_IP_VS=y
CONFIG_IP_VS_IPV6=y
CONFIG_IP_VS_DEBUG=y
CONFIG_IP_VS_TAB_BITS=12

#
# IPVS transport protocol load balancing support
#
CONFIG_IP_VS_PROTO_TCP=y
# CONFIG_IP_VS_PROTO_UDP is not set
CONFIG_IP_VS_PROTO_AH_ESP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y

#
# IPVS scheduler
#
CONFIG_IP_VS_RR=y
CONFIG_IP_VS_WRR=y
CONFIG_IP_VS_LC=y
# CONFIG_IP_VS_WLC is not set
CONFIG_IP_VS_LBLC=y
CONFIG_IP_VS_LBLCR=y
# CONFIG_IP_VS_DH is not set
CONFIG_IP_VS_SH=y
# CONFIG_IP_VS_SED is not set
CONFIG_IP_VS_NQ=y

#
# IPVS application helper
#
CONFIG_IP_VS_FTP=y

#
# IP: Netfilter Configuration
#
# CONFIG_NF_DEFRAG_IPV4 is not set
CONFIG_IP_NF_QUEUE=y
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set

#
# IPv6: Netfilter Configuration
#
# CONFIG_IP6_NF_QUEUE is not set
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_MATCH_AH=y
# CONFIG_IP6_NF_MATCH_EUI64 is not set
# CONFIG_IP6_NF_MATCH_FRAG is not set
CONFIG_IP6_NF_MATCH_OPTS=y
CONFIG_IP6_NF_MATCH_HL=y
CONFIG_IP6_NF_MATCH_IPV6HEADER=y
# CONFIG_IP6_NF_MATCH_MH is not set
CONFIG_IP6_NF_MATCH_RT=y
# CONFIG_IP6_NF_TARGET_HL is not set
CONFIG_IP6_NF_TARGET_LOG=y
# CONFIG_IP6_NF_FILTER is not set
CONFIG_IP6_NF_MANGLE=y
CONFIG_IP6_NF_RAW=y
CONFIG_IP6_NF_SECURITY=y

#
# DECnet: Netfilter Configuration
#
CONFIG_DECNET_NF_GRABULATOR=y
CONFIG_IP_DCCP=y
CONFIG_INET_DCCP_DIAG=y

#
# DCCP CCIDs Configuration (EXPERIMENTAL)
#
# CONFIG_IP_DCCP_CCID2_DEBUG is not set
CONFIG_IP_DCCP_CCID3=y
CONFIG_IP_DCCP_CCID3_DEBUG=y
CONFIG_IP_DCCP_CCID3_RTO=100
CONFIG_IP_DCCP_TFRC_LIB=y
CONFIG_IP_DCCP_TFRC_DEBUG=y

#
# DCCP Kernel Hacking
#
CONFIG_IP_DCCP_DEBUG=y
CONFIG_IP_SCTP=y
CONFIG_SCTP_DBG_MSG=y
CONFIG_SCTP_DBG_OBJCNT=y
# CONFIG_SCTP_HMAC_NONE is not set
CONFIG_SCTP_HMAC_SHA1=y
# CONFIG_SCTP_HMAC_MD5 is not set
# CONFIG_RDS is not set
CONFIG_TIPC=y
CONFIG_TIPC_ADVANCED=y
CONFIG_TIPC_ZONES=3
CONFIG_TIPC_CLUSTERS=1
CONFIG_TIPC_NODES=255
CONFIG_TIPC_SLAVE_NODES=0
CONFIG_TIPC_PORTS=8191
CONFIG_TIPC_LOG=0
CONFIG_TIPC_DEBUG=y
CONFIG_ATM=y
CONFIG_ATM_CLIP=y
CONFIG_ATM_CLIP_NO_ICMP=y
CONFIG_ATM_LANE=y
# CONFIG_ATM_MPOA is not set
# CONFIG_ATM_BR2684 is not set
CONFIG_STP=y
CONFIG_GARP=y
# CONFIG_BRIDGE is not set
CONFIG_NET_DSA=y
# CONFIG_NET_DSA_TAG_DSA is not set
# CONFIG_NET_DSA_TAG_EDSA is not set
# CONFIG_NET_DSA_TAG_TRAILER is not set
# CONFIG_NET_DSA_MV88E6XXX is not set
# CONFIG_NET_DSA_MV88E6060 is not set
# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set
# CONFIG_NET_DSA_MV88E6131 is not set
# CONFIG_NET_DSA_MV88E6123_61_65 is not set
CONFIG_VLAN_8021Q=y
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_DECNET=y
CONFIG_DECNET_ROUTER=y
CONFIG_LLC=y
CONFIG_LLC2=y
# CONFIG_IPX is not set
CONFIG_ATALK=y
# CONFIG_DEV_APPLETALK is not set
CONFIG_X25=y
CONFIG_LAPB=y
CONFIG_ECONET=y
CONFIG_ECONET_AUNUDP=y
# CONFIG_ECONET_NATIVE is not set
CONFIG_WAN_ROUTER=y
CONFIG_PHONET=y
CONFIG_IEEE802154=y
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
CONFIG_NET_SCH_CBQ=y
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_ATM=y
# CONFIG_NET_SCH_PRIO is not set
# CONFIG_NET_SCH_MULTIQ is not set
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFQ=y
CONFIG_NET_SCH_TEQL=y
CONFIG_NET_SCH_TBF=y
CONFIG_NET_SCH_GRED=y
CONFIG_NET_SCH_DSMARK=y
# CONFIG_NET_SCH_NETEM is not set
CONFIG_NET_SCH_DRR=y
CONFIG_NET_SCH_INGRESS=y

#
# Classification
#
CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
CONFIG_NET_CLS_TCINDEX=y
# CONFIG_NET_CLS_ROUTE4 is not set
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_U32=y
CONFIG_CLS_U32_PERF=y
CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_RSVP=y
CONFIG_NET_CLS_RSVP6=y
CONFIG_NET_CLS_FLOW=y
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
# CONFIG_NET_EMATCH_CMP is not set
CONFIG_NET_EMATCH_NBYTE=y
CONFIG_NET_EMATCH_U32=y
# CONFIG_NET_EMATCH_META is not set
# CONFIG_NET_EMATCH_TEXT is not set
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y
# CONFIG_NET_ACT_GACT is not set
CONFIG_NET_ACT_MIRRED=y
CONFIG_NET_ACT_NAT=y
CONFIG_NET_ACT_PEDIT=y
CONFIG_NET_ACT_SIMP=y
CONFIG_NET_ACT_SKBEDIT=y
CONFIG_NET_CLS_IND=y
CONFIG_NET_SCH_FIFO=y
CONFIG_DCB=y

#
# Network testing
#
CONFIG_NET_PKTGEN=y
CONFIG_HAMRADIO=y

#
# Packet Radio protocols
#
CONFIG_AX25=y
CONFIG_AX25_DAMA_SLAVE=y
CONFIG_NETROM=y
CONFIG_ROSE=y

#
# AX.25 network device drivers
#
CONFIG_MKISS=y
# CONFIG_6PACK is not set
CONFIG_BPQETHER=y
CONFIG_BAYCOM_SER_FDX=y
CONFIG_BAYCOM_SER_HDX=y
# CONFIG_BAYCOM_PAR is not set
# CONFIG_YAM is not set
# CONFIG_CAN is not set
CONFIG_IRDA=y

#
# IrDA protocols
#
# CONFIG_IRLAN is not set
# CONFIG_IRNET is not set
CONFIG_IRCOMM=y
CONFIG_IRDA_ULTRA=y

#
# IrDA options
#
# CONFIG_IRDA_CACHE_LAST_LSAP is not set
# CONFIG_IRDA_FAST_RR is not set
CONFIG_IRDA_DEBUG=y

#
# Infrared-port device drivers
#

#
# SIR device drivers
#
CONFIG_IRTTY_SIR=y

#
# Dongle support
#
# CONFIG_DONGLE is not set
CONFIG_KINGSUN_DONGLE=y
CONFIG_KSDAZZLE_DONGLE=y
CONFIG_KS959_DONGLE=y

#
# FIR device drivers
#
# CONFIG_USB_IRDA is not set
# CONFIG_SIGMATEL_FIR is not set
# CONFIG_NSC_FIR is not set
# CONFIG_WINBOND_FIR is not set
CONFIG_SMC_IRCC_FIR=y
# CONFIG_ALI_FIR is not set
CONFIG_VLSI_FIR=y
CONFIG_VIA_FIR=y
CONFIG_MCS_FIR=y
# CONFIG_BT is not set
CONFIG_AF_RXRPC=y
CONFIG_AF_RXRPC_DEBUG=y
CONFIG_RXKAD=y
CONFIG_FIB_RULES=y
# CONFIG_WIRELESS is not set
CONFIG_WIMAX=y
CONFIG_WIMAX_DEBUG_LEVEL=8
CONFIG_RFKILL=y
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
CONFIG_DEBUG_DRIVER=y
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
CONFIG_PARPORT=y
# CONFIG_PARPORT_PC is not set
# CONFIG_PARPORT_GSC is not set
CONFIG_PARPORT_AX88796=y
# CONFIG_PARPORT_1284 is not set
CONFIG_PARPORT_NOT_PC=y
CONFIG_PNP=y
# CONFIG_PNP_DEBUG_MESSAGES is not set

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
CONFIG_BLK_CPQ_DA=y
# CONFIG_BLK_CPQ_CISS_DA is not set
CONFIG_BLK_DEV_DAC960=y
CONFIG_BLK_DEV_UMEM=y
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_SX8=y
CONFIG_BLK_DEV_UB=y
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_VIRTIO_BLK is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_MISC_DEVICES=y
CONFIG_IBM_ASM=y
CONFIG_PHANTOM=y
CONFIG_SGI_IOC4=y
CONFIG_TIFM_CORE=y
# CONFIG_TIFM_7XX1 is not set
CONFIG_ICS932S401=y
# CONFIG_ENCLOSURE_SERVICES is not set
CONFIG_HP_ILO=y
# CONFIG_DELL_LAPTOP is not set
CONFIG_ISL29003=y
CONFIG_C2PORT=y
# CONFIG_C2PORT_DURAMAR_2150 is not set

#
# EEPROM support
#
CONFIG_EEPROM_AT24=y
# CONFIG_EEPROM_AT25 is not set
# CONFIG_EEPROM_LEGACY is not set
CONFIG_EEPROM_MAX6875=y
# CONFIG_EEPROM_93CX6 is not set
CONFIG_CB710_CORE=y
CONFIG_CB710_DEBUG=y
CONFIG_CB710_DEBUG_ASSUMPTIONS=y
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set

#
# SCSI device support
#
CONFIG_RAID_ATTRS=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
CONFIG_SCSI_NETLINK=y
# CONFIG_SCSI_PROC_FS is not set

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_CHR_DEV_OSST=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=y
CONFIG_CHR_DEV_SCH=y
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_ISCSI_ATTRS=y
CONFIG_SCSI_SAS_ATTRS=y
CONFIG_SCSI_SAS_LIBSAS=y
# CONFIG_SCSI_SAS_ATA is not set
CONFIG_SCSI_SAS_HOST_SMP=y
CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_SCSI_DH=y
# CONFIG_SCSI_DH_RDAC is not set
CONFIG_SCSI_DH_HP_SW=y
# CONFIG_SCSI_DH_EMC is not set
CONFIG_SCSI_DH_ALUA=y
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_ACPI=y
CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=y
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y
CONFIG_SATA_SVW=y
CONFIG_ATA_PIIX=y
CONFIG_SATA_MV=y
CONFIG_SATA_NV=y
# CONFIG_PDC_ADMA is not set
CONFIG_SATA_QSTOR=y
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
CONFIG_SATA_SIL=y
# CONFIG_SATA_SIS is not set
CONFIG_SATA_ULI=y
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
CONFIG_SATA_INIC162X=y
CONFIG_PATA_ACPI=y
# CONFIG_PATA_ALI is not set
CONFIG_PATA_AMD=y
# CONFIG_PATA_ARTOP is not set
CONFIG_PATA_ATP867X=y
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
CONFIG_PATA_CMD64X=y
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_HPT366 is not set
CONFIG_PATA_HPT37X=y
CONFIG_PATA_HPT3X2N=y
# CONFIG_PATA_HPT3X3 is not set
CONFIG_PATA_IT821X=y
# CONFIG_PATA_IT8213 is not set
CONFIG_PATA_JMICRON=y
CONFIG_PATA_TRIFLEX=y
# CONFIG_PATA_MARVELL is not set
CONFIG_PATA_MPIIX=y
CONFIG_PATA_OLDPIIX=y
CONFIG_PATA_NETCELL=y
CONFIG_PATA_NINJA32=y
# CONFIG_PATA_NS87410 is not set
CONFIG_PATA_NS87415=y
CONFIG_PATA_OPTI=y
CONFIG_PATA_OPTIDMA=y
CONFIG_PATA_PDC_OLD=y
CONFIG_PATA_RADISYS=y
CONFIG_PATA_RDC=y
# CONFIG_PATA_RZ1000 is not set
CONFIG_PATA_SC1200=y
# CONFIG_PATA_SERVERWORKS is not set
CONFIG_PATA_PDC2027X=y
# CONFIG_PATA_SIL680 is not set
CONFIG_PATA_SIS=y
CONFIG_PATA_VIA=y
CONFIG_PATA_WINBOND=y
CONFIG_PATA_SCH=y
# CONFIG_MD is not set
CONFIG_FUSION=y
CONFIG_FUSION_SPI=y
CONFIG_FUSION_FC=y
CONFIG_FUSION_SAS=y
CONFIG_FUSION_MAX_SGE=128
CONFIG_FUSION_CTL=y
CONFIG_FUSION_LOGGING=y

#
# IEEE 1394 (FireWire) support
#

#
# You can enable one or both FireWire driver stacks.
#

#
# See the help texts for more information.
#
CONFIG_FIREWIRE=y
CONFIG_FIREWIRE_OHCI=y
CONFIG_FIREWIRE_OHCI_DEBUG=y
CONFIG_FIREWIRE_SBP2=y
CONFIG_FIREWIRE_NET=y
CONFIG_IEEE1394=y
# CONFIG_IEEE1394_OHCI1394 is not set
# CONFIG_IEEE1394_PCILYNX is not set
CONFIG_IEEE1394_SBP2=y
# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
CONFIG_IEEE1394_ETH1394=y
CONFIG_IEEE1394_RAWIO=y
CONFIG_IEEE1394_VERBOSEDEBUG=y
CONFIG_I2O=y
CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
CONFIG_I2O_EXT_ADAPTEC=y
CONFIG_I2O_EXT_ADAPTEC_DMA64=y
# CONFIG_I2O_CONFIG is not set
CONFIG_I2O_BUS=y
# CONFIG_I2O_BLOCK is not set
CONFIG_I2O_SCSI=y
CONFIG_I2O_PROC=y
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
CONFIG_IFB=y
CONFIG_DUMMY=y
CONFIG_BONDING=y
# CONFIG_MACVLAN is not set
CONFIG_EQUALIZER=y
# CONFIG_TUN is not set
# CONFIG_VETH is not set
CONFIG_NET_SB1000=y
# CONFIG_ARCNET is not set
CONFIG_PHYLIB=y

#
# MII PHY device drivers
#
CONFIG_MARVELL_PHY=y
CONFIG_DAVICOM_PHY=y
CONFIG_QSEMI_PHY=y
# CONFIG_LXT_PHY is not set
CONFIG_CICADA_PHY=y
CONFIG_VITESSE_PHY=y
CONFIG_SMSC_PHY=y
CONFIG_BROADCOM_PHY=y
CONFIG_ICPLUS_PHY=y
CONFIG_REALTEK_PHY=y
CONFIG_NATIONAL_PHY=y
# CONFIG_STE10XP is not set
# CONFIG_LSI_ET1011C_PHY is not set
# CONFIG_FIXED_PHY is not set
CONFIG_MDIO_BITBANG=y
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
CONFIG_HAPPYMEAL=y
CONFIG_SUNGEM=y
# CONFIG_CASSINI is not set
CONFIG_NET_VENDOR_3COM=y
CONFIG_VORTEX=y
CONFIG_TYPHOON=y
# CONFIG_ENC28J60 is not set
CONFIG_ETHOC=y
CONFIG_DNET=y
CONFIG_NET_TULIP=y
# CONFIG_DE2104X is not set
CONFIG_TULIP=y
CONFIG_TULIP_MWI=y
CONFIG_TULIP_MMIO=y
# CONFIG_TULIP_NAPI is not set
CONFIG_DE4X5=y
CONFIG_WINBOND_840=y
CONFIG_DM9102=y
CONFIG_ULI526X=y
# CONFIG_HP100 is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
CONFIG_AMD8111_ETH=y
CONFIG_ADAPTEC_STARFIRE=y
CONFIG_B44=y
CONFIG_B44_PCI_AUTOSELECT=y
CONFIG_B44_PCICORE_AUTOSELECT=y
CONFIG_B44_PCI=y
CONFIG_FORCEDETH=y
# CONFIG_FORCEDETH_NAPI is not set
CONFIG_E100=y
# CONFIG_FEALNX is not set
CONFIG_NATSEMI=y
# CONFIG_NE2K_PCI is not set
CONFIG_8139CP=y
CONFIG_8139TOO=y
# CONFIG_8139TOO_PIO is not set
CONFIG_8139TOO_TUNE_TWISTER=y
CONFIG_8139TOO_8129=y
CONFIG_8139_OLD_RX_RESET=y
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
CONFIG_EPIC100=y
# CONFIG_SMSC9420 is not set
CONFIG_SUNDANCE=y
CONFIG_SUNDANCE_MMIO=y
# CONFIG_TLAN is not set
CONFIG_KS8842=y
# CONFIG_KS8851 is not set
CONFIG_VIA_RHINE=y
# CONFIG_VIA_RHINE_MMIO is not set
# CONFIG_SC92031 is not set
CONFIG_NET_POCKET=y
CONFIG_ATP=y
CONFIG_DE600=y
# CONFIG_DE620 is not set
# CONFIG_ATL2 is not set
CONFIG_NETDEV_1000=y
CONFIG_ACENIC=y
# CONFIG_ACENIC_OMIT_TIGON_I is not set
# CONFIG_DL2K is not set
CONFIG_E1000=y
CONFIG_E1000E=y
# CONFIG_IP1000 is not set
CONFIG_IGB=y
CONFIG_IGB_DCA=y
CONFIG_IGBVF=y
CONFIG_NS83820=y
CONFIG_HAMACHI=y
CONFIG_YELLOWFIN=y
# CONFIG_R8169 is not set
CONFIG_SIS190=y
CONFIG_SKGE=y
CONFIG_SKGE_DEBUG=y
CONFIG_SKY2=y
CONFIG_SKY2_DEBUG=y
CONFIG_VIA_VELOCITY=y
CONFIG_TIGON3=y
# CONFIG_BNX2 is not set
# CONFIG_CNIC is not set
CONFIG_QLA3XXX=y
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
CONFIG_ATL1C=y
# CONFIG_JME is not set
# CONFIG_NETDEV_10000 is not set
CONFIG_TR=y
CONFIG_IBMOL=y
# CONFIG_3C359 is not set
# CONFIG_TMS380TR is not set
CONFIG_WLAN=y
CONFIG_WLAN_PRE80211=y
# CONFIG_STRIP is not set
# CONFIG_WLAN_80211 is not set

#
# WiMAX Wireless Broadband devices
#
CONFIG_WIMAX_I2400M=y
# CONFIG_WIMAX_I2400M_USB is not set
CONFIG_WIMAX_I2400M_SDIO=y
CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
CONFIG_USB_KAWETH=y
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
CONFIG_USB_HSO=y
CONFIG_USB_CDC_PHONET=y
# CONFIG_WAN is not set
CONFIG_ATM_DRIVERS=y
CONFIG_ATM_DUMMY=y
CONFIG_ATM_TCP=y
CONFIG_ATM_LANAI=y
# CONFIG_ATM_ENI is not set
# CONFIG_ATM_FIRESTREAM is not set
CONFIG_ATM_ZATM=y
CONFIG_ATM_ZATM_DEBUG=y
CONFIG_ATM_IDT77252=y
# CONFIG_ATM_IDT77252_DEBUG is not set
CONFIG_ATM_IDT77252_RCV_ALL=y
CONFIG_ATM_IDT77252_USE_SUNI=y
CONFIG_ATM_AMBASSADOR=y
CONFIG_ATM_AMBASSADOR_DEBUG=y
CONFIG_ATM_HORIZON=y
CONFIG_ATM_HORIZON_DEBUG=y
CONFIG_ATM_IA=y
# CONFIG_ATM_IA_DEBUG is not set
# CONFIG_ATM_FORE200E is not set
# CONFIG_ATM_HE is not set
CONFIG_ATM_SOLOS=y
CONFIG_IEEE802154_DRIVERS=y
CONFIG_IEEE802154_FAKEHARD=y
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
CONFIG_PLIP=y
CONFIG_PPP=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
# CONFIG_PPP_MPPE is not set
CONFIG_PPPOE=y
CONFIG_PPPOATM=y
CONFIG_PPPOL2TP=y
# CONFIG_SLIP is not set
CONFIG_SLHC=y
# CONFIG_NET_FC is not set
CONFIG_NETCONSOLE=y
CONFIG_NETCONSOLE_DYNAMIC=y
CONFIG_NETPOLL=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
CONFIG_VIRTIO_NET=y
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=y
CONFIG_INPUT_POLLDEV=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ADP5588=y
CONFIG_KEYBOARD_ATKBD=y
CONFIG_QT2160=y
CONFIG_KEYBOARD_LKKBD=y
CONFIG_KEYBOARD_LM8323=y
CONFIG_KEYBOARD_MAX7359=y
CONFIG_KEYBOARD_NEWTON=y
# CONFIG_KEYBOARD_OPENCORES is not set
CONFIG_KEYBOARD_STOWAWAY=y
CONFIG_KEYBOARD_SUNKBD=y
# CONFIG_KEYBOARD_TWL4030 is not set
CONFIG_KEYBOARD_XTKBD=y
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ADS7846 is not set
CONFIG_TOUCHSCREEN_AD7877=y
CONFIG_TOUCHSCREEN_AD7879_I2C=y
CONFIG_TOUCHSCREEN_AD7879=y
# CONFIG_TOUCHSCREEN_EETI is not set
CONFIG_TOUCHSCREEN_FUJITSU=y
CONFIG_TOUCHSCREEN_GUNZE=y
# CONFIG_TOUCHSCREEN_ELO is not set
CONFIG_TOUCHSCREEN_WACOM_W8001=y
# CONFIG_TOUCHSCREEN_MCS5000 is not set
CONFIG_TOUCHSCREEN_MTOUCH=y
CONFIG_TOUCHSCREEN_INEXIO=y
CONFIG_TOUCHSCREEN_MK712=y
CONFIG_TOUCHSCREEN_PENMOUNT=y
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
CONFIG_TOUCHSCREEN_TOUCHWIN=y
CONFIG_TOUCHSCREEN_USB_COMPOSITE=y
CONFIG_TOUCHSCREEN_USB_EGALAX=y
CONFIG_TOUCHSCREEN_USB_PANJIT=y
CONFIG_TOUCHSCREEN_USB_3M=y
CONFIG_TOUCHSCREEN_USB_ITM=y
CONFIG_TOUCHSCREEN_USB_ETURBO=y
CONFIG_TOUCHSCREEN_USB_GUNZE=y
CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
CONFIG_TOUCHSCREEN_USB_GOTOP=y
CONFIG_TOUCHSCREEN_USB_JASTEC=y
CONFIG_TOUCHSCREEN_USB_E2I=y
CONFIG_TOUCHSCREEN_TOUCHIT213=y
CONFIG_TOUCHSCREEN_TSC2007=y
CONFIG_TOUCHSCREEN_PCAP=y
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_CT82C710=y
# CONFIG_SERIO_PARKBD is not set
CONFIG_SERIO_PCIPS2=y
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
CONFIG_GAMEPORT=y
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
CONFIG_GAMEPORT_EMU10K1=y
# CONFIG_GAMEPORT_FM801 is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
# CONFIG_DEVKMEM is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y

#
# Non-8250 serial port support
#
CONFIG_SERIAL_MAX3100=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_CONSOLE_POLL=y
CONFIG_SERIAL_JSM=y
CONFIG_UNIX98_PTYS=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_PRINTER=y
CONFIG_LP_CONSOLE=y
CONFIG_PPDEV=y
CONFIG_HVC_DRIVER=y
CONFIG_VIRTIO_CONSOLE=y
# CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_HW_RANDOM_INTEL is not set
CONFIG_HW_RANDOM_AMD=y
CONFIG_HW_RANDOM_VIA=y
CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_NVRAM=y
# CONFIG_R3964 is not set
CONFIG_APPLICOM=y
CONFIG_MWAVE=y
CONFIG_PC8736x_GPIO=y
CONFIG_NSC_GPIO=y
CONFIG_RAW_DRIVER=y
CONFIG_MAX_RAW_DEVS=256
CONFIG_HPET=y
CONFIG_HPET_MMAP=y
# CONFIG_HANGCHECK_TIMER is not set
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS=y
CONFIG_TCG_NSC=y
CONFIG_TCG_ATMEL=y
# CONFIG_TCG_INFINEON is not set
CONFIG_TELCLOCK=y
CONFIG_DEVPORT=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set

#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_ALGOPCF=y
CONFIG_I2C_ALGOPCA=y

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
CONFIG_I2C_ALI15X3=y
CONFIG_I2C_AMD756=y
# CONFIG_I2C_AMD756_S4882 is not set
# CONFIG_I2C_AMD8111 is not set
CONFIG_I2C_I801=y
# CONFIG_I2C_ISCH is not set
CONFIG_I2C_PIIX4=y
CONFIG_I2C_NFORCE2=y
# CONFIG_I2C_NFORCE2_S4985 is not set
CONFIG_I2C_SIS5595=y
CONFIG_I2C_SIS630=y
CONFIG_I2C_SIS96X=y
CONFIG_I2C_VIA=y
# CONFIG_I2C_VIAPRO is not set

#
# ACPI drivers
#
CONFIG_I2C_SCMI=y

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_OCORES is not set
CONFIG_I2C_SIMTEC=y

#
# External I2C/SMBus adapter drivers
#
CONFIG_I2C_PARPORT=y
CONFIG_I2C_PARPORT_LIGHT=y
CONFIG_I2C_TAOS_EVM=y
CONFIG_I2C_TINY_USB=y

#
# Graphics adapter I2C/DDC channel drivers
#
CONFIG_I2C_VOODOO3=y

#
# Other I2C/SMBus bus drivers
#
CONFIG_I2C_PCA_PLATFORM=y

#
# Miscellaneous I2C Chip support
#
CONFIG_DS1682=y
CONFIG_SENSORS_TSL2550=y
CONFIG_I2C_DEBUG_CORE=y
CONFIG_I2C_DEBUG_ALGO=y
# CONFIG_I2C_DEBUG_BUS is not set
CONFIG_I2C_DEBUG_CHIP=y
CONFIG_SPI=y
CONFIG_SPI_DEBUG=y
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#
CONFIG_SPI_BITBANG=y
CONFIG_SPI_BUTTERFLY=y
CONFIG_SPI_LM70_LLP=y

#
# SPI Protocol Masters
#
CONFIG_SPI_SPIDEV=y
# CONFIG_SPI_TLE62X0 is not set

#
# PPS support
#
# CONFIG_PPS is not set
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
# CONFIG_GPIOLIB is not set
CONFIG_W1=y

#
# 1-wire Bus Masters
#
CONFIG_W1_MASTER_MATROX=y
CONFIG_W1_MASTER_DS2490=y
# CONFIG_W1_MASTER_DS2482 is not set

#
# 1-wire Slaves
#
CONFIG_W1_SLAVE_THERM=y
# CONFIG_W1_SLAVE_SMEM is not set
CONFIG_W1_SLAVE_DS2431=y
# CONFIG_W1_SLAVE_DS2433 is not set
CONFIG_W1_SLAVE_DS2760=y
CONFIG_W1_SLAVE_BQ27000=y
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
CONFIG_PDA_POWER=y
CONFIG_WM831X_POWER=y
CONFIG_BATTERY_DS2760=y
# CONFIG_BATTERY_DS2782 is not set
CONFIG_BATTERY_BQ27x00=y
CONFIG_BATTERY_MAX17040=y
CONFIG_HWMON=y
CONFIG_HWMON_VID=y
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
CONFIG_SENSORS_ABITUGURU3=y
CONFIG_SENSORS_AD7414=y
# CONFIG_SENSORS_AD7418 is not set
CONFIG_SENSORS_ADCXX=y
CONFIG_SENSORS_ADM1021=y
CONFIG_SENSORS_ADM1025=y
CONFIG_SENSORS_ADM1026=y
CONFIG_SENSORS_ADM1029=y
CONFIG_SENSORS_ADM1031=y
CONFIG_SENSORS_ADM9240=y
CONFIG_SENSORS_ADT7462=y
# CONFIG_SENSORS_ADT7470 is not set
CONFIG_SENSORS_ADT7473=y
# CONFIG_SENSORS_ADT7475 is not set
CONFIG_SENSORS_K8TEMP=y
CONFIG_SENSORS_ASB100=y
# CONFIG_SENSORS_ATXP1 is not set
CONFIG_SENSORS_DS1621=y
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
CONFIG_SENSORS_F75375S=y
CONFIG_SENSORS_FSCHMD=y
CONFIG_SENSORS_G760A=y
CONFIG_SENSORS_GL518SM=y
CONFIG_SENSORS_GL520SM=y
CONFIG_SENSORS_CORETEMP=y
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM63 is not set
CONFIG_SENSORS_LM70=y
CONFIG_SENSORS_LM75=y
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
CONFIG_SENSORS_LM83=y
CONFIG_SENSORS_LM85=y
# CONFIG_SENSORS_LM87 is not set
CONFIG_SENSORS_LM90=y
CONFIG_SENSORS_LM92=y
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4215 is not set
CONFIG_SENSORS_LTC4245=y
CONFIG_SENSORS_LM95241=y
CONFIG_SENSORS_MAX1111=y
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
CONFIG_SENSORS_PC87360=y
CONFIG_SENSORS_PC87427=y
# CONFIG_SENSORS_PCF8591 is not set
CONFIG_SENSORS_SIS5595=y
# CONFIG_SENSORS_DME1737 is not set
CONFIG_SENSORS_SMSC47M1=y
CONFIG_SENSORS_SMSC47M192=y
CONFIG_SENSORS_SMSC47B397=y
# CONFIG_SENSORS_ADS7828 is not set
CONFIG_SENSORS_THMC50=y
CONFIG_SENSORS_TMP401=y
CONFIG_SENSORS_TMP421=y
# CONFIG_SENSORS_VIA686A is not set
CONFIG_SENSORS_VT1211=y
CONFIG_SENSORS_VT8231=y
CONFIG_SENSORS_W83781D=y
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
CONFIG_SENSORS_W83793=y
CONFIG_SENSORS_W83L785TS=y
CONFIG_SENSORS_W83L786NG=y
CONFIG_SENSORS_W83627HF=y
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_WM831X is not set
CONFIG_SENSORS_HDAPS=y
# CONFIG_SENSORS_APPLESMC is not set

#
# ACPI drivers
#
CONFIG_SENSORS_ATK0110=y
CONFIG_SENSORS_LIS3LV02D=y
CONFIG_THERMAL=y
CONFIG_THERMAL_HWMON=y
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set

#
# Watchdog Device Drivers
#
CONFIG_SOFT_WATCHDOG=y
CONFIG_WM831X_WATCHDOG=y
CONFIG_TWL4030_WATCHDOG=y
CONFIG_ACQUIRE_WDT=y
# CONFIG_ADVANTECH_WDT is not set
CONFIG_ALIM1535_WDT=y
CONFIG_ALIM7101_WDT=y
# CONFIG_SC520_WDT is not set
# CONFIG_SBC_FITPC2_WATCHDOG is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_IBMASR is not set
# CONFIG_WAFER_WDT is not set
CONFIG_I6300ESB_WDT=y
# CONFIG_ITCO_WDT is not set
CONFIG_IT8712F_WDT=y
CONFIG_IT87_WDT=y
CONFIG_HP_WATCHDOG=y
CONFIG_SC1200_WDT=y
CONFIG_PC87413_WDT=y
CONFIG_60XX_WDT=y
CONFIG_SBC8360_WDT=y
# CONFIG_CPU5_WDT is not set
# CONFIG_SMSC_SCH311X_WDT is not set
CONFIG_SMSC37B787_WDT=y
# CONFIG_W83627HF_WDT is not set
CONFIG_W83697HF_WDT=y
CONFIG_W83697UG_WDT=y
CONFIG_W83877F_WDT=y
CONFIG_W83977F_WDT=y
# CONFIG_MACHZ_WDT is not set
CONFIG_SBC_EPX_C3_WATCHDOG=y

#
# PCI-based Watchdog Cards
#
CONFIG_PCIPCWATCHDOG=y
CONFIG_WDTPCI=y

#
# USB-based Watchdog Cards
#
CONFIG_USBPCWATCHDOG=y
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
CONFIG_SSB=y
CONFIG_SSB_SPROM=y
CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
# CONFIG_SSB_B43_PCI_BRIDGE is not set
CONFIG_SSB_SDIOHOST_POSSIBLE=y
CONFIG_SSB_SDIOHOST=y
CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_DRIVER_PCICORE=y

#
# Multifunction device drivers
#
CONFIG_MFD_CORE=y
CONFIG_MFD_SM501=y
# CONFIG_HTC_PASIC3 is not set
CONFIG_TWL4030_CORE=y
# CONFIG_MFD_TMIO is not set
# CONFIG_PMIC_DA903X is not set
CONFIG_MFD_WM8400=y
CONFIG_MFD_WM831X=y
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_MC13783 is not set
# CONFIG_AB3100_CORE is not set
CONFIG_EZX_PCAP=y
# CONFIG_REGULATOR is not set
CONFIG_MEDIA_SUPPORT=y

#
# Multimedia core support
#
# CONFIG_VIDEO_DEV is not set
CONFIG_DVB_CORE=y
CONFIG_VIDEO_MEDIA=y

#
# Multimedia drivers
#
CONFIG_MEDIA_TUNER=y
CONFIG_MEDIA_TUNER_CUSTOMISE=y
CONFIG_MEDIA_TUNER_SIMPLE=y
# CONFIG_MEDIA_TUNER_TDA8290 is not set
CONFIG_MEDIA_TUNER_TDA827X=y
# CONFIG_MEDIA_TUNER_TDA18271 is not set
CONFIG_MEDIA_TUNER_TDA9887=y
CONFIG_MEDIA_TUNER_TEA5761=y
# CONFIG_MEDIA_TUNER_TEA5767 is not set
# CONFIG_MEDIA_TUNER_MT20XX is not set
# CONFIG_MEDIA_TUNER_MT2060 is not set
# CONFIG_MEDIA_TUNER_MT2266 is not set
CONFIG_MEDIA_TUNER_MT2131=y
CONFIG_MEDIA_TUNER_QT1010=y
CONFIG_MEDIA_TUNER_XC2028=y
CONFIG_MEDIA_TUNER_XC5000=y
# CONFIG_MEDIA_TUNER_MXL5005S is not set
CONFIG_MEDIA_TUNER_MXL5007T=y
CONFIG_MEDIA_TUNER_MC44S803=y
CONFIG_VIDEO_IR=y
CONFIG_DVB_MAX_ADAPTERS=8
CONFIG_DVB_DYNAMIC_MINORS=y
CONFIG_DVB_CAPTURE_DRIVERS=y

#
# Supported SAA7146 based PCI Adapters
#
# CONFIG_TTPCI_EEPROM is not set
# CONFIG_DVB_BUDGET_CORE is not set

#
# Supported USB Adapters
#
CONFIG_DVB_USB=y
CONFIG_DVB_USB_DEBUG=y
CONFIG_DVB_USB_A800=y
CONFIG_DVB_USB_DIBUSB_MB=y
CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y
CONFIG_DVB_USB_DIBUSB_MC=y
# CONFIG_DVB_USB_DIB0700 is not set
CONFIG_DVB_USB_UMT_010=y
# CONFIG_DVB_USB_CXUSB is not set
# CONFIG_DVB_USB_M920X is not set
CONFIG_DVB_USB_GL861=y
# CONFIG_DVB_USB_AU6610 is not set
CONFIG_DVB_USB_DIGITV=y
CONFIG_DVB_USB_VP7045=y
# CONFIG_DVB_USB_VP702X is not set
CONFIG_DVB_USB_GP8PSK=y
# CONFIG_DVB_USB_NOVA_T_USB2 is not set
CONFIG_DVB_USB_TTUSB2=y
CONFIG_DVB_USB_DTT200U=y
CONFIG_DVB_USB_OPERA1=y
# CONFIG_DVB_USB_AF9005 is not set
# CONFIG_DVB_USB_DW2102 is not set
CONFIG_DVB_USB_CINERGY_T2=y
CONFIG_DVB_USB_ANYSEE=y
# CONFIG_DVB_USB_DTV5100 is not set
# CONFIG_DVB_USB_AF9015 is not set
# CONFIG_DVB_USB_CE6230 is not set
CONFIG_DVB_USB_FRIIO=y
CONFIG_DVB_TTUSB_BUDGET=y
CONFIG_DVB_TTUSB_DEC=y
# CONFIG_SMS_SIANO_MDTV is not set

#
# Supported FlexCopII (B2C2) Adapters
#
CONFIG_DVB_B2C2_FLEXCOP=y
# CONFIG_DVB_B2C2_FLEXCOP_PCI is not set
# CONFIG_DVB_B2C2_FLEXCOP_USB is not set
# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set

#
# Supported BT878 Adapters
#

#
# Supported Pluto2 Adapters
#
# CONFIG_DVB_PLUTO2 is not set

#
# Supported SDMC DM1105 Adapters
#
CONFIG_DVB_DM1105=y

#
# Supported FireWire (IEEE 1394) Adapters
#
CONFIG_DVB_FIREDTV=y
CONFIG_DVB_FIREDTV_IEEE1394=y
CONFIG_DVB_FIREDTV_INPUT=y

#
# Supported Earthsoft PT1 Adapters
#
CONFIG_DVB_PT1=y

#
# Supported DVB Frontends
#
# CONFIG_DVB_FE_CUSTOMISE is not set
CONFIG_DVB_CX24123=y
CONFIG_DVB_MT312=y
CONFIG_DVB_S5H1420=y
CONFIG_DVB_STV0288=y
CONFIG_DVB_STB6000=y
CONFIG_DVB_STV0299=y
CONFIG_DVB_TDA8083=y
CONFIG_DVB_TDA10086=y
CONFIG_DVB_TUNER_ITD1000=y
CONFIG_DVB_TUNER_CX24113=y
CONFIG_DVB_TDA826X=y
CONFIG_DVB_CX24116=y
CONFIG_DVB_SI21XX=y
CONFIG_DVB_CX22700=y
CONFIG_DVB_TDA1004X=y
CONFIG_DVB_NXT6000=y
CONFIG_DVB_MT352=y
CONFIG_DVB_ZL10353=y
CONFIG_DVB_DIB3000MB=y
CONFIG_DVB_DIB3000MC=y
CONFIG_DVB_VES1820=y
CONFIG_DVB_TDA10023=y
CONFIG_DVB_STV0297=y
CONFIG_DVB_NXT200X=y
CONFIG_DVB_BCM3510=y
CONFIG_DVB_LGDT330X=y
CONFIG_DVB_PLL=y
CONFIG_DVB_LNBP21=y
CONFIG_DVB_ISL6421=y
CONFIG_DAB=y
# CONFIG_USB_DABUSB is not set

#
# Graphics support
#
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
# CONFIG_AGP_INTEL is not set
CONFIG_AGP_SIS=y
CONFIG_AGP_VIA=y
CONFIG_VGA_ARB=y
CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_TTM=y
CONFIG_DRM_TDFX=y
CONFIG_DRM_R128=y
CONFIG_DRM_RADEON=y
CONFIG_DRM_MGA=y
# CONFIG_DRM_SIS is not set
CONFIG_DRM_VIA=y
CONFIG_DRM_SAVAGE=y
CONFIG_VGASTATE=y
CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_FB=y
CONFIG_FIRMWARE_EDID=y
CONFIG_FB_DDC=y
CONFIG_FB_BOOT_VESA_SUPPORT=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_FOREIGN_ENDIAN=y
# CONFIG_FB_BOTH_ENDIAN is not set
CONFIG_FB_BIG_ENDIAN=y
# CONFIG_FB_LITTLE_ENDIAN is not set
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_SVGALIB=y
# CONFIG_FB_MACMODES is not set
CONFIG_FB_BACKLIGHT=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y

#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
CONFIG_FB_PM2=y
# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
# CONFIG_FB_CYBER2000 is not set
CONFIG_FB_ARC=y
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_VESA is not set
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
CONFIG_FB_S1D13XXX=y
CONFIG_FB_NVIDIA=y
# CONFIG_FB_NVIDIA_I2C is not set
# CONFIG_FB_NVIDIA_DEBUG is not set
# CONFIG_FB_NVIDIA_BACKLIGHT is not set
CONFIG_FB_RIVA=y
# CONFIG_FB_RIVA_I2C is not set
# CONFIG_FB_RIVA_DEBUG is not set
CONFIG_FB_RIVA_BACKLIGHT=y
CONFIG_FB_LE80578=y
# CONFIG_FB_CARILLO_RANCH is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
CONFIG_FB_ATY128=y
CONFIG_FB_ATY128_BACKLIGHT=y
CONFIG_FB_ATY=y
# CONFIG_FB_ATY_CT is not set
# CONFIG_FB_ATY_GX is not set
CONFIG_FB_ATY_BACKLIGHT=y
CONFIG_FB_S3=y
CONFIG_FB_SAVAGE=y
CONFIG_FB_SAVAGE_I2C=y
CONFIG_FB_SAVAGE_ACCEL=y
CONFIG_FB_SIS=y
CONFIG_FB_SIS_300=y
CONFIG_FB_SIS_315=y
CONFIG_FB_VIA=y
CONFIG_FB_NEOMAGIC=y
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
CONFIG_FB_VOODOO1=y
CONFIG_FB_VT8623=y
CONFIG_FB_TRIDENT=y
CONFIG_FB_ARK=y
CONFIG_FB_PM3=y
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_GEODE is not set
CONFIG_FB_TMIO=y
CONFIG_FB_TMIO_ACCELL=y
CONFIG_FB_SM501=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
CONFIG_FB_MB862XX=y
# CONFIG_FB_MB862XX_PCI_GDC is not set
CONFIG_FB_BROADSHEET=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y
# CONFIG_LCD_LTV350QV is not set
# CONFIG_LCD_ILI9320 is not set
CONFIG_LCD_TDO24M=y
# CONFIG_LCD_VGG2432A4 is not set
CONFIG_LCD_PLATFORM=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GENERIC=y
# CONFIG_BACKLIGHT_PROGEAR is not set
# CONFIG_BACKLIGHT_CARILLO_RANCH is not set
CONFIG_BACKLIGHT_MBP_NVIDIA=y
CONFIG_BACKLIGHT_SAHARA=y
CONFIG_BACKLIGHT_WM831X=y

#
# Display device support
#
CONFIG_DISPLAY_SUPPORT=y

#
# Display hardware drivers
#

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_VGACON_SOFT_SCROLLBACK=y
CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HIDRAW=y

#
# USB Input Devices
#
CONFIG_USB_HID=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y

#
# Special HID drivers
#
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
CONFIG_HID_CYPRESS=y
CONFIG_HID_DRAGONRISE=y
CONFIG_DRAGONRISE_FF=y
CONFIG_HID_EZKEY=y
CONFIG_HID_KYE=y
CONFIG_HID_GYRATION=y
CONFIG_HID_TWINHAN=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_LOGITECH=y
CONFIG_LOGITECH_FF=y
CONFIG_LOGIRUMBLEPAD2_FF=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MONTEREY=y
CONFIG_HID_NTRIG=y
CONFIG_HID_PANTHERLORD=y
CONFIG_PANTHERLORD_FF=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
CONFIG_HID_SUNPLUS=y
CONFIG_HID_GREENASIA=y
# CONFIG_GREENASIA_FF is not set
CONFIG_HID_SMARTJOYPLUS=y
# CONFIG_SMARTJOYPLUS_FF is not set
CONFIG_HID_TOPSEED=y
CONFIG_HID_THRUSTMASTER=y
CONFIG_THRUSTMASTER_FF=y
CONFIG_HID_ZEROPLUS=y
CONFIG_ZEROPLUS_FF=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
CONFIG_USB_MON=y
CONFIG_USB_WUSB=y
# CONFIG_USB_WUSB_CBAF is not set

#
# USB Host Controller Drivers
#
CONFIG_USB_C67X00_HCD=y
# CONFIG_USB_XHCI_HCD is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_OXU210HP_HCD=y
CONFIG_USB_ISP116X_HCD=y
CONFIG_USB_ISP1760_HCD=y
# CONFIG_USB_ISP1362_HCD is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_SSB=y
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_U132_HCD is not set
CONFIG_USB_SL811_HCD=y
CONFIG_USB_R8A66597_HCD=y
# CONFIG_USB_WHCI_HCD is not set
CONFIG_USB_HWA_HCD=y

#
# USB Device Class drivers
#
CONFIG_USB_ACM=y
CONFIG_USB_PRINTER=y
CONFIG_USB_WDM=y
CONFIG_USB_TMC=y

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#

#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
CONFIG_USB_STORAGE_ISD200=y
CONFIG_USB_STORAGE_USBAT=y
# CONFIG_USB_STORAGE_SDDR09 is not set
CONFIG_USB_STORAGE_SDDR55=y
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
CONFIG_USB_STORAGE_ONETOUCH=y
# CONFIG_USB_STORAGE_KARMA is not set
CONFIG_USB_STORAGE_CYPRESS_ATACB=y
CONFIG_USB_LIBUSUAL=y

#
# USB Imaging devices
#
CONFIG_USB_MDC800=y
# CONFIG_USB_MICROTEK is not set

#
# USB port drivers
#
CONFIG_USB_USS720=y
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
CONFIG_USB_EMI62=y
CONFIG_USB_EMI26=y
CONFIG_USB_ADUTUX=y
# CONFIG_USB_SEVSEG is not set
CONFIG_USB_RIO500=y
# CONFIG_USB_LEGOTOWER is not set
CONFIG_USB_LCD=y
CONFIG_USB_BERRY_CHARGE=y
CONFIG_USB_LED=y
# CONFIG_USB_CYPRESS_CY7C63 is not set
CONFIG_USB_CYTHERM=y
CONFIG_USB_IDMOUSE=y
CONFIG_USB_FTDI_ELAN=y
CONFIG_USB_APPLEDISPLAY=y
CONFIG_USB_SISUSBVGA=y
# CONFIG_USB_SISUSBVGA_CON is not set
CONFIG_USB_LD=y
CONFIG_USB_TRANCEVIBRATOR=y
CONFIG_USB_IOWARRIOR=y
CONFIG_USB_TEST=y
CONFIG_USB_ISIGHTFW=y
CONFIG_USB_VST=y
CONFIG_USB_ATM=y
CONFIG_USB_SPEEDTOUCH=y
CONFIG_USB_CXACRU=y
# CONFIG_USB_UEAGLEATM is not set
# CONFIG_USB_XUSBATM is not set
# CONFIG_USB_GADGET is not set

#
# OTG and related infrastructure
#
# CONFIG_NOP_USB_XCEIV is not set
CONFIG_UWB=y
CONFIG_UWB_HWA=y
# CONFIG_UWB_WHCI is not set
# CONFIG_UWB_WLP is not set
# CONFIG_UWB_I1480U is not set
CONFIG_MMC=y
CONFIG_MMC_DEBUG=y
CONFIG_MMC_UNSAFE_RESUME=y

#
# MMC/SD/SDIO Card Drivers
#
# CONFIG_MMC_BLOCK is not set
# CONFIG_SDIO_UART is not set
CONFIG_MMC_TEST=y

#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_WBSD is not set
# CONFIG_MMC_AT91 is not set
# CONFIG_MMC_ATMELMCI is not set
CONFIG_MMC_TIFM_SD=y
# CONFIG_MMC_SPI is not set
CONFIG_MMC_CB710=y
CONFIG_MMC_VIA_SDMMC=y
CONFIG_MEMSTICK=y
CONFIG_MEMSTICK_DEBUG=y

#
# MemoryStick drivers
#
# CONFIG_MEMSTICK_UNSAFE_RESUME is not set
CONFIG_MSPRO_BLOCK=y

#
# MemoryStick Host Controller Drivers
#
# CONFIG_MEMSTICK_TIFM_MS is not set
# CONFIG_MEMSTICK_JMICRON_38X is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#
# CONFIG_LEDS_ALIX2 is not set
# CONFIG_LEDS_PCA9532 is not set
CONFIG_LEDS_LP3944=y
CONFIG_LEDS_CLEVO_MAIL=y
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_WM831X_STATUS is not set
# CONFIG_LEDS_DAC124S085 is not set
# CONFIG_LEDS_BD2802 is not set

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y

#
# iptables trigger is under Netfilter config (LED target)
#
CONFIG_ACCESSIBILITY=y
CONFIG_A11Y_BRAILLE_CONSOLE=y
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
# CONFIG_RTC_HCTOSYS is not set
CONFIG_RTC_DEBUG=y

#
# RTC interfaces
#
# CONFIG_RTC_INTF_SYSFS is not set
CONFIG_RTC_INTF_PROC=y
# CONFIG_RTC_INTF_DEV is not set
CONFIG_RTC_DRV_TEST=y

#
# I2C RTC drivers
#
CONFIG_RTC_DRV_DS1307=y
CONFIG_RTC_DRV_DS1374=y
CONFIG_RTC_DRV_DS1672=y
CONFIG_RTC_DRV_MAX6900=y
CONFIG_RTC_DRV_RS5C372=y
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
CONFIG_RTC_DRV_M41T80=y
CONFIG_RTC_DRV_M41T80_WDT=y
# CONFIG_RTC_DRV_TWL4030 is not set
CONFIG_RTC_DRV_S35390A=y
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
CONFIG_RTC_DRV_RX8025=y

#
# SPI RTC drivers
#
CONFIG_RTC_DRV_M41T94=y
# CONFIG_RTC_DRV_DS1305 is not set
# CONFIG_RTC_DRV_DS1390 is not set
CONFIG_RTC_DRV_MAX6902=y
CONFIG_RTC_DRV_R9701=y
CONFIG_RTC_DRV_RS5C348=y
CONFIG_RTC_DRV_DS3234=y
# CONFIG_RTC_DRV_PCF2123 is not set

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_DS1286 is not set
CONFIG_RTC_DRV_DS1511=y
CONFIG_RTC_DRV_DS1553=y
CONFIG_RTC_DRV_DS1742=y
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
CONFIG_RTC_DRV_M48T59=y
# CONFIG_RTC_DRV_BQ4802 is not set
CONFIG_RTC_DRV_V3020=y
CONFIG_RTC_DRV_WM831X=y

#
# on-CPU RTC drivers
#
CONFIG_RTC_DRV_PCAP=y
CONFIG_DMADEVICES=y

#
# DMA Devices
#
CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH=y
CONFIG_INTEL_IOATDMA=y
CONFIG_DMA_ENGINE=y

#
# DMA Clients
#
# CONFIG_NET_DMA is not set
CONFIG_ASYNC_TX_DMA=y
CONFIG_DMATEST=y
CONFIG_DCA=y
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set

#
# TI VLYNQ
#
# CONFIG_STAGING is not set
# CONFIG_X86_PLATFORM_DEVICES is not set

#
# Firmware Drivers
#
CONFIG_EDD=y
# CONFIG_EDD_OFF is not set
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DELL_RBU=y
CONFIG_DCDBAS=y
CONFIG_DMIID=y
CONFIG_ISCSI_IBFT_FIND=y
CONFIG_ISCSI_IBFT=y

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT2_FS_XIP=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4_FS is not set
CONFIG_FS_XIP=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=y
CONFIG_REISERFS_CHECK=y
CONFIG_REISERFS_PROC_INFO=y
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y
CONFIG_JFS_FS=y
# CONFIG_JFS_POSIX_ACL is not set
CONFIG_JFS_SECURITY=y
# CONFIG_JFS_DEBUG is not set
CONFIG_JFS_STATISTICS=y
CONFIG_FS_POSIX_ACL=y
CONFIG_XFS_FS=y
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
CONFIG_XFS_DEBUG=y
CONFIG_GFS2_FS=y
CONFIG_GFS2_FS_LOCKING_DLM=y
CONFIG_OCFS2_FS=y
CONFIG_OCFS2_FS_O2CB=y
CONFIG_OCFS2_FS_USERSPACE_CLUSTER=y
CONFIG_OCFS2_FS_STATS=y
CONFIG_OCFS2_DEBUG_MASKLOG=y
CONFIG_OCFS2_DEBUG_FS=y
CONFIG_OCFS2_FS_POSIX_ACL=y
CONFIG_BTRFS_FS=y
# CONFIG_BTRFS_FS_POSIX_ACL is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
# CONFIG_DNOTIFY is not set
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
CONFIG_PRINT_QUOTA_WARNING=y
CONFIG_QUOTA_TREE=y
CONFIG_QFMT_V1=y
# CONFIG_QFMT_V2 is not set
CONFIG_QUOTACTL=y
CONFIG_AUTOFS_FS=y
CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=y
# CONFIG_CUSE is not set

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
CONFIG_NTFS_FS=y
CONFIG_NTFS_DEBUG=y
CONFIG_NTFS_RW=y

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
# CONFIG_PROC_VMCORE is not set
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
# CONFIG_TMPFS is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_CONFIGFS_FS=y
# CONFIG_MISC_FILESYSTEMS is not set
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_EXPORTFS=y

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
# CONFIG_UNIXWARE_DISKLABEL is not set
CONFIG_LDM_PARTITION=y
CONFIG_LDM_DEBUG=y
CONFIG_SGI_PARTITION=y
CONFIG_ULTRIX_PARTITION=y
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
# CONFIG_EFI_PARTITION is not set
CONFIG_SYSV68_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
CONFIG_NLS_CODEPAGE_775=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_CODEPAGE_852=y
CONFIG_NLS_CODEPAGE_855=y
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
CONFIG_NLS_CODEPAGE_862=y
CONFIG_NLS_CODEPAGE_863=y
CONFIG_NLS_CODEPAGE_864=y
CONFIG_NLS_CODEPAGE_865=y
# CONFIG_NLS_CODEPAGE_866 is not set
CONFIG_NLS_CODEPAGE_869=y
CONFIG_NLS_CODEPAGE_936=y
CONFIG_NLS_CODEPAGE_950=y
CONFIG_NLS_CODEPAGE_932=y
CONFIG_NLS_CODEPAGE_949=y
CONFIG_NLS_CODEPAGE_874=y
CONFIG_NLS_ISO8859_8=y
# CONFIG_NLS_CODEPAGE_1250 is not set
CONFIG_NLS_CODEPAGE_1251=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
CONFIG_NLS_ISO8859_3=y
CONFIG_NLS_ISO8859_4=y
CONFIG_NLS_ISO8859_5=y
# CONFIG_NLS_ISO8859_6 is not set
CONFIG_NLS_ISO8859_7=y
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=y
CONFIG_NLS_KOI8_R=y
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y
CONFIG_DLM=y
CONFIG_DLM_DEBUG=y

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
# CONFIG_PRINTK_TIME is not set
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=2048
CONFIG_MAGIC_SYSRQ=y
# CONFIG_STRIP_ASM_SYMS is not set
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
CONFIG_HEADERS_CHECK=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SHIRQ=y
# CONFIG_DETECT_SOFTLOCKUP is not set
# CONFIG_DETECT_HUNG_TASK is not set
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
CONFIG_DEBUG_OBJECTS=y
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
CONFIG_DEBUG_OBJECTS_FREE=y
CONFIG_DEBUG_OBJECTS_TIMERS=y
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
CONFIG_SLUB_DEBUG_ON=y
CONFIG_SLUB_STATS=y
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=400
CONFIG_DEBUG_KMEMLEAK_TEST=y
CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_DEBUG_PI_LIST=y
CONFIG_RT_MUTEX_TESTER=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_PROVE_LOCKING=y
CONFIG_LOCKDEP=y
CONFIG_LOCK_STAT=y
# CONFIG_DEBUG_LOCKDEP is not set
CONFIG_TRACE_IRQFLAGS=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
CONFIG_DEBUG_VM=y
# CONFIG_DEBUG_VIRTUAL is not set
# CONFIG_DEBUG_WRITECOUNT is not set
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_LIST=y
CONFIG_DEBUG_SG=y
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
CONFIG_BOOT_PRINTK_DELAY=y
CONFIG_RCU_TORTURE_TEST=y
# CONFIG_RCU_TORTURE_TEST_RUNNABLE is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
# CONFIG_FAULT_INJECTION is not set
CONFIG_LATENCYTOP=y
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_TRACING_SUPPORT=y
# CONFIG_FTRACE is not set
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
CONFIG_FIREWIRE_OHCI_REMOTE_DMA=y
# CONFIG_BUILD_DOCSRC is not set
CONFIG_DYNAMIC_DEBUG=y
# CONFIG_DMA_API_DEBUG is not set
CONFIG_SAMPLES=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
# CONFIG_KGDB_TESTS is not set
CONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_KMEMCHECK is not set
CONFIG_STRICT_DEVMEM=y
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
CONFIG_EARLY_PRINTK_DBGP=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_X86_PTDUMP=y
CONFIG_DEBUG_RODATA=y
# CONFIG_DEBUG_RODATA_TEST is not set
CONFIG_IOMMU_DEBUG=y
CONFIG_IOMMU_STRESS=y
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
# CONFIG_IO_DELAY_0X80 is not set
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
CONFIG_IO_DELAY_NONE=y
CONFIG_DEFAULT_IO_DELAY_TYPE=3
CONFIG_DEBUG_BOOT_PARAMS=y
CONFIG_CPA_DEBUG=y
CONFIG_OPTIMIZE_INLINING=y

#
# Security options
#
CONFIG_KEYS=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
# CONFIG_SECURITY_NETWORK is not set
CONFIG_SECURITY_PATH=y
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
# CONFIG_SECURITY_ROOTPLUG is not set
CONFIG_SECURITY_TOMOYO=y
CONFIG_IMA=y
CONFIG_IMA_MEASURE_PCR_IDX=10
CONFIG_IMA_AUDIT=y
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
# CONFIG_CRYPTO_FIPS is not set
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_GF128MUL=y
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_AUTHENC=y

#
# Authenticated Encryption with Associated Data
#
CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_SEQIV=y

#
# Block modes
#
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_CTS=y
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_LRW is not set
CONFIG_CRYPTO_PCBC=y
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_FPU=y

#
# Hash modes
#
CONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_XCBC is not set
CONFIG_CRYPTO_VMAC=y

#
# Digest
#
CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_CRC32C_INTEL is not set
CONFIG_CRYPTO_GHASH=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_MICHAEL_MIC is not set
CONFIG_CRYPTO_RMD128=y
CONFIG_CRYPTO_RMD160=y
CONFIG_CRYPTO_RMD256=y
# CONFIG_CRYPTO_RMD320 is not set
CONFIG_CRYPTO_SHA1=y
# CONFIG_CRYPTO_SHA256 is not set
CONFIG_CRYPTO_SHA512=y
# CONFIG_CRYPTO_TGR192 is not set
CONFIG_CRYPTO_WP512=y

#
# Ciphers
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_X86_64=y
CONFIG_CRYPTO_AES_NI_INTEL=y
CONFIG_CRYPTO_ANUBIS=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_BLOWFISH=y
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
CONFIG_CRYPTO_CAST6=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_FCRYPT=y
CONFIG_CRYPTO_KHAZAD=y
CONFIG_CRYPTO_SALSA20=y
# CONFIG_CRYPTO_SALSA20_X86_64 is not set
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_SERPENT=y
CONFIG_CRYPTO_TEA=y
# CONFIG_CRYPTO_TWOFISH is not set
CONFIG_CRYPTO_TWOFISH_COMMON=y
CONFIG_CRYPTO_TWOFISH_X86_64=y

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
# CONFIG_CRYPTO_ZLIB is not set
# CONFIG_CRYPTO_LZO is not set

#
# Random Number Generation
#
CONFIG_CRYPTO_ANSI_CPRNG=y
# CONFIG_CRYPTO_HW is not set
CONFIG_HAVE_KVM=y
CONFIG_VIRTUALIZATION=y
# CONFIG_KVM is not set
CONFIG_VIRTIO=y
CONFIG_VIRTIO_RING=y
CONFIG_VIRTIO_PCI=y
# CONFIG_VIRTIO_BALLOON is not set
# CONFIG_BINARY_PRINTF is not set

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC_CCITT=y
CONFIG_CRC16=y
CONFIG_CRC_T10DIF=y
CONFIG_CRC_ITU_T=y
CONFIG_CRC32=y
CONFIG_CRC7=y
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=y
CONFIG_TEXTSEARCH_BM=y
CONFIG_TEXTSEARCH_FSM=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_NLATTR=y

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: crash.log --]
[-- Type: text/plain; charset=utf-8, Size: 270206 bytes --]

Linux version 2.6.32-rc2-dirty (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #92384 Wed Sep 30 11:54:59 CEST 2009
Command line: root=/dev/sda1 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 console=tty debug initcall_debug apic=verbose sysrq_always_enabled 5 ignore_loglevel
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  Centaur CentaurHauls
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003ff30000 (usable)
 BIOS-e820: 000000003ff30000 - 000000003ff40000 (ACPI data)
 BIOS-e820: 000000003ff40000 - 000000003fff0000 (ACPI NVS)
 BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved)
 BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
bootconsole [earlyser0] enabled
ERROR: earlyprintk= earlyser already used
debug: ignoring loglevel setting.
DMI 2.3 present.
last_pfn = 0x3ff30 max_arch_pfn = 0x400000000
e820 update range: 0000000000001000 - 0000000000006000 (usable) ==> (reserved)
Scanning 1 areas for low memory corruption
modified physical RAM map:
 modified: 0000000000000000 - 0000000000001000 (usable)
 modified: 0000000000001000 - 0000000000006000 (reserved)
 modified: 0000000000006000 - 000000000009fc00 (usable)
 modified: 000000000009fc00 - 00000000000a0000 (reserved)
 modified: 00000000000e4000 - 0000000000100000 (reserved)
 modified: 0000000000100000 - 000000003ff30000 (usable)
 modified: 000000003ff30000 - 000000003ff40000 (ACPI data)
 modified: 000000003ff40000 - 000000003fff0000 (ACPI NVS)
 modified: 000000003fff0000 - 0000000040000000 (reserved)
 modified: 00000000fff80000 - 0000000100000000 (reserved)
initial memory mapped : 0 - 20000000
init_memory_mapping: 0000000000000000-000000003ff30000
 0000000000 - 003fe00000 page 2M
 003fe00000 - 003ff30000 page 4k
kernel direct mapping tables up to 3ff30000 @ 8000-b000
ACPI: RSDP 00000000000fa8b0 00014 (v00 ACPIAM)
ACPI: RSDT 000000003ff30000 00030 (v01 A M I  OEMRSDT  01000415 MSFT 00000097)
ACPI: FACP 000000003ff30200 00081 (v01 A M I  OEMFACP  01000415 MSFT 00000097)
ACPI: DSDT 000000003ff303e0 036A8 (v01  K8V__ K8V__086 00000086 MSFT 0100000D)
ACPI: FACS 000000003ff40000 00040
ACPI: APIC 000000003ff30390 0004A (v01 A M I  OEMAPIC  01000415 MSFT 00000097)
ACPI: OEMB 000000003ff40040 0003F (v01 A M I  OEMBIOS  01000415 MSFT 00000097)
ACPI: Local APIC address 0xfee00000
(6 early reservations) ==> bootmem [0000000000 - 003ff30000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0000006000 - 0000008000]       TRAMPOLINE ==> [0000006000 - 0000008000]
  #2 [0001000000 - 00033027cc]    TEXT DATA BSS ==> [0001000000 - 00033027cc]
  #3 [000009fc00 - 0000100000]    BIOS reserved ==> [000009fc00 - 0000100000]
  #4 [0003303000 - 0003303290]              BRK ==> [0003303000 - 0003303290]
  #5 [0000008000 - 0000009000]          PGTABLE ==> [0000008000 - 0000009000]
 [ffffea0000000000-ffffea0000dfffff] PMD -> [ffff880003800000-ffff8800045fffff] on node 0
Zone PFN ranges:
  DMA      0x00000000 -> 0x00001000
  DMA32    0x00001000 -> 0x00100000
  Normal   0x00100000 -> 0x00100000
Movable zone start PFN for each node
early_node_map[3] active PFN ranges
    0: 0x00000000 -> 0x00000001
    0: 0x00000006 -> 0x0000009f
    0: 0x00000100 -> 0x0003ff30
On node 0 totalpages: 261834
  DMA zone: 56 pages used for memmap
  DMA zone: 100 pages reserved
  DMA zone: 3838 pages, LIFO batch:0
  DMA32 zone: 3526 pages used for memmap
  DMA32 zone: 254314 pages, LIFO batch:31
Looks like a VIA chipset. Disabling IOMMU. Override with iommu=allowed
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 1, version 3, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Using ACPI (MADT) for SMP configuration information
mapped APIC to ffffffffff5fc000 (fee00000)
mapped IOAPIC to ffffffffff5fb000 (fec00000)
nr_irqs_gsi: 24
PM: Registered nosave memory: 0000000000001000 - 0000000000006000
PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
PM: Registered nosave memory: 00000000000a0000 - 00000000000e4000
PM: Registered nosave memory: 00000000000e4000 - 0000000000100000
Allocating PCI resources starting at 40000000 (gap: 40000000:bff80000)
Booting paravirtualized kernel on bare hardware
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 258152
Kernel command line: root=/dev/sda1 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 console=tty debug initcall_debug apic=verbose sysrq_always_enabled 5 ignore_loglevel
debug: sysrq always enabled.
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Initializing CPU#0
Calgary: detecting Calgary via BIOS EBDA area
Calgary: Unable to locate Rio Grande table in EBDA - bailing!
Memory: 994888k/1047744k available (14358k kernel code, 408k absent, 51900k reserved, 8789k data, 800k init)
SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:288
Console: colour VGA+ 80x25
console [tty0] enabled, bootconsole disabled
console [ttyS0] enabled
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES:  8
... MAX_LOCK_DEPTH:          48
... MAX_LOCKDEP_KEYS:        8191
... CLASSHASH_SIZE:          4096
... MAX_LOCKDEP_ENTRIES:     16384
... MAX_LOCKDEP_CHAINS:      32768
... CHAINHASH_SIZE:          16384
 memory used by lock dependency info: 6367 kB
 per task-struct memory footprint: 2688 bytes
------------------------
| Locking API testsuite:
----------------------------------------------------------------------------
                                 | spin |wlock |rlock |mutex | wsem | rsem |
  --------------------------------------------------------------------------
                     A-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                 A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                    double unlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                  initialize held:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                 bad unlock order:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
  --------------------------------------------------------------------------
              recursive read-lock:             |  ok  |             |  ok  |
           recursive read-lock #2:             |  ok  |             |  ok  |
            mixed read-write-lock:             |  ok  |             |  ok  |
            mixed write-read-lock:             |  ok  |             |  ok  |
  --------------------------------------------------------------------------
     hard-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
     soft-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
     hard-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
     soft-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
       sirq-safe-A => hirqs-on/12:  ok  |  ok  |  ok  |
       sirq-safe-A => hirqs-on/21:  ok  |  ok  |  ok  |
         hard-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
         soft-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
         hard-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
         soft-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/123:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/123:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/132:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/132:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/213:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/213:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/231:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/231:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/312:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/312:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/321:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/321:  ok  |  ok  |  ok  |
      hard-irq read-recursion/123:  ok  |
      soft-irq read-recursion/123:  ok  |
      hard-irq read-recursion/132:  ok  |
      soft-irq read-recursion/132:  ok  |
      hard-irq read-recursion/213:  ok  |
      soft-irq read-recursion/213:  ok  |
      hard-irq read-recursion/231:  ok  |
      soft-irq read-recursion/231:  ok  |
      hard-irq read-recursion/312:  ok  |
      soft-irq read-recursion/312:  ok  |
      hard-irq read-recursion/321:  ok  |
      soft-irq read-recursion/321:  ok  |
-------------------------------------------------------
Good, all 218 testcases passed! |
---------------------------------
ODEBUG: 8 of 8 active objects replaced
Fast TSC calibration using PIT
Detected 2002.511 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 4006.89 BogoMIPS (lpj=6675036)
Security Framework initialized
TOMOYO Linux initialized
Mount-cache hash table entries: 256
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
tseg: 0000000000
mce: CPU supports 5 MCE banks
Performance Events: AMD PMU driver.
... version:                0
... bit width:              48
... generic registers:      4
... value mask:             0000ffffffffffff
... max period:             00007fffffffffff
... fixed-purpose events:   0
... event mask:             000000000000000f
CPU: AMD Athlon(tm) 64 Processor 3200+ stepping 08
ACPI: Core revision 20090903
calling  spawn_ksoftirqd+0x0/0x76 @ 1
initcall spawn_ksoftirqd+0x0/0x76 returned 0 after 0 usecs
calling  relay_init+0x0/0x33 @ 1
initcall relay_init+0x0/0x33 returned 0 after 0 usecs
Setting APIC routing to flat
enabled ExtINT on CPU#0
ENABLING IO-APIC IRQs
init IO_APIC IRQs
 1-0 (apicid-pin) not connected
IOAPIC[0]: Set routing entry (1-1 -> 0x31 -> IRQ 1 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-2 -> 0x30 -> IRQ 0 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-3 -> 0x33 -> IRQ 3 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-4 -> 0x34 -> IRQ 4 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-5 -> 0x35 -> IRQ 5 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-6 -> 0x36 -> IRQ 6 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-7 -> 0x37 -> IRQ 7 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-8 -> 0x38 -> IRQ 8 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-9 -> 0x39 -> IRQ 9 Mode:1 Active:1)
IOAPIC[0]: Set routing entry (1-10 -> 0x3a -> IRQ 10 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-11 -> 0x3b -> IRQ 11 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-12 -> 0x3c -> IRQ 12 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-13 -> 0x3d -> IRQ 13 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-14 -> 0x3e -> IRQ 14 Mode:0 Active:0)
IOAPIC[0]: Set routing entry (1-15 -> 0x3f -> IRQ 15 Mode:0 Active:0)
 1-16 1-17 1-18 1-19 1-20 1-21 1-22 1-23 (apicid-pin) not connected
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
Using local APIC timer interrupts.
calibrating APIC timer ...
... lapic delta = 1251504
... PM-Timer delta = 357928
... PM-Timer result ok
..... delta 1251504
..... mult: 53755192
..... calibration result: 667468
..... CPU clock speed is 2002.2020 MHz.
..... host bus clock speed is 200.0868 MHz.
device: 'platform': device_add
PM: Adding info for No Bus:platform
khelper used greatest stack depth: 5472 bytes left
bus: 'platform': registered
Registering sysdev class 'cpu'
calling  init_mmap_min_addr+0x0/0x46 @ 1
initcall init_mmap_min_addr+0x0/0x46 returned 0 after 0 usecs
calling  net_ns_init+0x0/0x154 @ 1
initcall net_ns_init+0x0/0x154 returned 0 after 0 usecs
calling  e820_mark_nvs_memory+0x0/0x77 @ 1
initcall e820_mark_nvs_memory+0x0/0x77 returned 0 after 0 usecs
calling  pci_reboot_init+0x0/0x40 @ 1
initcall pci_reboot_init+0x0/0x40 returned 0 after 0 usecs
calling  init_lapic_sysfs+0x0/0x54 @ 1
Registering sysdev class 'lapic'
Registering sys device of class 'lapic'
Registering sys device 'lapic0'
initcall init_lapic_sysfs+0x0/0x54 returned 0 after 9765 usecs
calling  sysctl_init+0x0/0x3d @ 1
initcall sysctl_init+0x0/0x3d returned 0 after 0 usecs
calling  ksysfs_init+0x0/0xeb @ 1
initcall ksysfs_init+0x0/0xeb returned 0 after 3255 usecs
calling  async_init+0x0/0x90 @ 1
initcall async_init+0x0/0x90 returned 0 after 0 usecs
calling  init_jiffies_clocksource+0x0/0x41 @ 1
initcall init_jiffies_clocksource+0x0/0x41 returned 0 after 0 usecs
calling  pm_init+0x0/0xa0 @ 1
initcall pm_init+0x0/0xa0 returned 0 after 3255 usecs
calling  pm_disk_init+0x0/0x44 @ 1
initcall pm_disk_init+0x0/0x44 returned 0 after 0 usecs
calling  swsusp_header_init+0x0/0x60 @ 1
initcall swsusp_header_init+0x0/0x60 returned 0 after 0 usecs
calling  init_zero_pfn+0x0/0x67 @ 1
initcall init_zero_pfn+0x0/0x67 returned 0 after 0 usecs
calling  filelock_init+0x0/0x63 @ 1
initcall filelock_init+0x0/0x63 returned 0 after 0 usecs
calling  init_misc_binfmt+0x0/0x6b @ 1
initcall init_misc_binfmt+0x0/0x6b returned 0 after 0 usecs
calling  init_script_binfmt+0x0/0x40 @ 1
initcall init_script_binfmt+0x0/0x40 returned 0 after 0 usecs
calling  init_elf_binfmt+0x0/0x40 @ 1
initcall init_elf_binfmt+0x0/0x40 returned 0 after 0 usecs
calling  init_compat_elf_binfmt+0x0/0x40 @ 1
initcall init_compat_elf_binfmt+0x0/0x40 returned 0 after 0 usecs
calling  debugfs_init+0x0/0x8b @ 1
initcall debugfs_init+0x0/0x8b returned 0 after 0 usecs
calling  securityfs_init+0x0/0x80 @ 1
initcall securityfs_init+0x0/0x80 returned 0 after 0 usecs
calling  random32_init+0x0/0xd8 @ 1
initcall random32_init+0x0/0xd8 returned 0 after 0 usecs
calling  cpuidle_init+0x0/0x4d @ 1
initcall cpuidle_init+0x0/0x4d returned 0 after 0 usecs
calling  virtio_init+0x0/0x60 @ 1
khelper used greatest stack depth: 5232 bytes left
bus: 'virtio': registered
initcall virtio_init+0x0/0x60 returned 0 after 6510 usecs
calling  sock_init+0x0/0x90 @ 1
initcall sock_init+0x0/0x90 returned 0 after 0 usecs
calling  netpoll_init+0x0/0x69 @ 1
initcall netpoll_init+0x0/0x69 returned 0 after 0 usecs
calling  netlink_proto_init+0x0/0x195 @ 1
NET: Registered protocol family 16
initcall netlink_proto_init+0x0/0x195 returned 0 after 3255 usecs
calling  bdi_class_init+0x0/0x68 @ 1
device class 'bdi': registering
initcall bdi_class_init+0x0/0x68 returned 0 after 3255 usecs
calling  kobject_uevent_init+0x0/0x7b @ 1
initcall kobject_uevent_init+0x0/0x7b returned 0 after 0 usecs
calling  pcibus_class_init+0x0/0x43 @ 1
device class 'pci_bus': registering
initcall pcibus_class_init+0x0/0x43 returned 0 after 6510 usecs
calling  pci_driver_init+0x0/0x40 @ 1
bus: 'pci': registered
initcall pci_driver_init+0x0/0x40 returned 0 after 3255 usecs
calling  lcd_class_init+0x0/0x80 @ 1
device class 'lcd': registering
initcall lcd_class_init+0x0/0x80 returned 0 after 3255 usecs
calling  backlight_class_init+0x0/0x93 @ 1
device class 'backlight': registering
initcall backlight_class_init+0x0/0x93 returned 0 after 3255 usecs
calling  video_output_class_init+0x0/0x45 @ 1
device class 'video_output': registering
initcall video_output_class_init+0x0/0x45 returned 0 after 3255 usecs
calling  tty_class_init+0x0/0x5f @ 1
device class 'tty': registering
initcall tty_class_init+0x0/0x5f returned 0 after 3255 usecs
calling  vtconsole_class_init+0x0/0xf1 @ 1
device class 'vtconsole': registering
device: 'vtcon0': device_add
PM: Adding info for No Bus:vtcon0
initcall vtconsole_class_init+0x0/0xf1 returned 0 after 9765 usecs
calling  spi_init+0x0/0xa9 @ 1
bus: 'spi': registered
device class 'spi_master': registering
initcall spi_init+0x0/0xa9 returned 0 after 6510 usecs
calling  i2c_init+0x0/0x92 @ 1
bus: 'i2c': registered
bus: 'i2c': add driver dummy
i2c-core: driver [dummy] registered
initcall i2c_init+0x0/0x92 returned 0 after 9765 usecs
calling  amd_postcore_init+0x0/0x77 @ 1
node 0 link 0: io port [1000, ffffff]
TOM: 0000000040000000 aka 1024M
node 0 link 0: mmio [a0000, bffff]
node 0 link 0: mmio [40000000, fe0bffff]
bus: [00,ff] on node 0 link 0
bus: 00 index 0 io port: [0, ffff]
bus: 00 index 1 mmio: [a0000, bffff]
bus: 00 index 2 mmio: [40000000, fcffffffff]
initcall amd_postcore_init+0x0/0x77 returned 0 after 26041 usecs
calling  arch_kdebugfs_init+0x0/0x250 @ 1
initcall arch_kdebugfs_init+0x0/0x250 returned 0 after 0 usecs
calling  ffh_cstate_init+0x0/0x5d @ 1
initcall ffh_cstate_init+0x0/0x5d returned -1 after 0 usecs
initcall ffh_cstate_init+0x0/0x5d returned with error code -1 
calling  acpi_pci_init+0x0/0x8b @ 1
ACPI: bus type pci registered
initcall acpi_pci_init+0x0/0x8b returned 0 after 3255 usecs
calling  dmi_id_init+0x0/0x336 @ 1
device class 'dmi': registering
device: 'id': device_add
PM: Adding info for No Bus:id
initcall dmi_id_init+0x0/0x336 returned 0 after 6510 usecs
calling  dma_bus_init+0x0/0x6b @ 1
device class 'dma': registering
initcall dma_bus_init+0x0/0x6b returned 0 after 3255 usecs
calling  dma_channel_table_init+0x0/0x145 @ 1
initcall dma_channel_table_init+0x0/0x145 returned 0 after 0 usecs
calling  dca_init+0x0/0x4d @ 1
dca service started, version 1.12.1
device class 'dca': registering
initcall dca_init+0x0/0x4d returned 0 after 6510 usecs
calling  pci_arch_init+0x0/0x80 @ 1
PCI: Using configuration type 1 for base access
initcall pci_arch_init+0x0/0x80 returned 0 after 3255 usecs
calling  topology_init+0x0/0x40 @ 1
Registering sys device of class 'cpu'
Registering sys device 'cpu0'
initcall topology_init+0x0/0x40 returned 0 after 6510 usecs
calling  param_sysfs_init+0x0/0x380 @ 1
initcall param_sysfs_init+0x0/0x380 returned 0 after 211588 usecs
calling  pm_sysrq_init+0x0/0x50 @ 1
initcall pm_sysrq_init+0x0/0x50 returned 0 after 0 usecs
calling  audit_watch_init+0x0/0x60 @ 1
initcall audit_watch_init+0x0/0x60 returned 0 after 0 usecs
calling  init_slow_work+0x0/0x63 @ 1
initcall init_slow_work+0x0/0x63 returned 0 after 0 usecs
calling  default_bdi_init+0x0/0xe3 @ 1
device: 'default': device_add
PM: Adding info for No Bus:default
initcall default_bdi_init+0x0/0xe3 returned 0 after 6510 usecs
calling  init_bio+0x0/0xfd @ 1
bio: create slab <bio-0> at 0
initcall init_bio+0x0/0xfd returned 0 after 3255 usecs
calling  fsnotify_init+0x0/0x3d @ 1
initcall fsnotify_init+0x0/0x3d returned 0 after 0 usecs
calling  fsnotify_notification_init+0x0/0x129 @ 1
initcall fsnotify_notification_init+0x0/0x129 returned 0 after 0 usecs
calling  cryptomgr_init+0x0/0x40 @ 1
initcall cryptomgr_init+0x0/0x40 returned 0 after 0 usecs
calling  blk_settings_init+0x0/0x53 @ 1
initcall blk_settings_init+0x0/0x53 returned 0 after 0 usecs
calling  blk_ioc_init+0x0/0x56 @ 1
initcall blk_ioc_init+0x0/0x56 returned 0 after 0 usecs
calling  blk_softirq_init+0x0/0x60 @ 1
initcall blk_softirq_init+0x0/0x60 returned 0 after 0 usecs
calling  blk_iopoll_setup+0x0/0x60 @ 1
initcall blk_iopoll_setup+0x0/0x60 returned 0 after 0 usecs
calling  genhd_device_init+0x0/0x8c @ 1
device class 'block': registering
initcall genhd_device_init+0x0/0x8c returned 0 after 3255 usecs
calling  blk_dev_integrity_init+0x0/0x53 @ 1
initcall blk_dev_integrity_init+0x0/0x53 returned 0 after 0 usecs
calling  pci_slot_init+0x0/0x80 @ 1
initcall pci_slot_init+0x0/0x80 returned 0 after 0 usecs
calling  fbmem_init+0x0/0xc3 @ 1
device class 'graphics': registering
initcall fbmem_init+0x0/0xc3 returned 0 after 3255 usecs
calling  acpi_init+0x0/0x288 @ 1
ACPI: EC: Look up EC in DSDT
ACPI: Executed 1 blocks of module-level executable AML code
ACPI: Interpreter enabled
ACPI: (supports S0 S1 S3 S4 S5)
ACPI: Using IOAPIC for interrupt routing
bus: 'acpi': registered
ACPI: Enumerating devices from [\]
device: 'LNXSYSTM:00': device_add
bus: 'acpi': add device LNXSYSTM:00
PM: Adding info for acpi:LNXSYSTM:00
acpi LNXSYSTM:00: __pm_runtime_idle()!
acpi LNXSYSTM:00: __pm_runtime_idle() returns -11!
device: 'LNXCPU:00': device_add
bus: 'acpi': add device LNXCPU:00
PM: Adding info for acpi:LNXCPU:00
acpi LNXCPU:00: __pm_runtime_idle()!
acpi LNXCPU:00: __pm_runtime_idle() returns -11!
device: 'LNXSYBUS:00': device_add
bus: 'acpi': add device LNXSYBUS:00
PM: Adding info for acpi:LNXSYBUS:00
acpi LNXSYBUS:00: __pm_runtime_idle()!
acpi LNXSYBUS:00: __pm_runtime_idle() returns -11!
device: 'PNP0A03:00': device_add
bus: 'acpi': add device PNP0A03:00
PM: Adding info for acpi:PNP0A03:00
acpi PNP0A03:00: __pm_runtime_idle()!
acpi PNP0A03:00: __pm_runtime_idle() returns -11!
device: 'device:00': device_add
bus: 'acpi': add device device:00
PM: Adding info for acpi:device:00
acpi device:00: __pm_runtime_idle()!
acpi device:00: __pm_runtime_idle() returns -11!
device: 'device:01': device_add
bus: 'acpi': add device device:01
PM: Adding info for acpi:device:01
acpi device:01: __pm_runtime_idle()!
acpi device:01: __pm_runtime_idle() returns -11!
device: 'device:02': device_add
bus: 'acpi': add device device:02
PM: Adding info for acpi:device:02
acpi device:02: __pm_runtime_idle()!
acpi device:02: __pm_runtime_idle() returns -11!
device: 'PNP0000:00': device_add
bus: 'acpi': add device PNP0000:00
PM: Adding info for acpi:PNP0000:00
acpi PNP0000:00: __pm_runtime_idle()!
acpi PNP0000:00: __pm_runtime_idle() returns -11!
device: 'PNP0200:00': device_add
bus: 'acpi': add device PNP0200:00
PM: Adding info for acpi:PNP0200:00
acpi PNP0200:00: __pm_runtime_idle()!
acpi PNP0200:00: __pm_runtime_idle() returns -11!
device: 'PNP0100:00': device_add
bus: 'acpi': add device PNP0100:00
PM: Adding info for acpi:PNP0100:00
acpi PNP0100:00: __pm_runtime_idle()!
acpi PNP0100:00: __pm_runtime_idle() returns -11!
device: 'PNP0B00:00': device_add
bus: 'acpi': add device PNP0B00:00
PM: Adding info for acpi:PNP0B00:00
acpi PNP0B00:00: __pm_runtime_idle()!
acpi PNP0B00:00: __pm_runtime_idle() returns -11!
device: 'PNP0800:00': device_add
bus: 'acpi': add device PNP0800:00
PM: Adding info for acpi:PNP0800:00
acpi PNP0800:00: __pm_runtime_idle()!
acpi PNP0800:00: __pm_runtime_idle() returns -11!
device: 'PNP0C04:00': device_add
bus: 'acpi': add device PNP0C04:00
PM: Adding info for acpi:PNP0C04:00
acpi PNP0C04:00: __pm_runtime_idle()!
acpi PNP0C04:00: __pm_runtime_idle() returns -11!
device: 'PNP0700:00': device_add
bus: 'acpi': add device PNP0700:00
PM: Adding info for acpi:PNP0700:00
acpi PNP0700:00: __pm_runtime_idle()!
acpi PNP0700:00: __pm_runtime_idle() returns -11!
device: 'PNP0400:00': device_add
bus: 'acpi': add device PNP0400:00
PM: Adding info for acpi:PNP0400:00
acpi PNP0400:00: __pm_runtime_idle()!
acpi PNP0400:00: __pm_runtime_idle() returns -11!
device: 'PNP0C02:00': device_add
bus: 'acpi': add device PNP0C02:00
PM: Adding info for acpi:PNP0C02:00
acpi PNP0C02:00: __pm_runtime_idle()!
acpi PNP0C02:00: __pm_runtime_idle() returns -11!
device: 'PNP0C02:01': device_add
bus: 'acpi': add device PNP0C02:01
PM: Adding info for acpi:PNP0C02:01
acpi PNP0C02:01: __pm_runtime_idle()!
acpi PNP0C02:01: __pm_runtime_idle() returns -11!
device: 'PNP0501:00': device_add
bus: 'acpi': add device PNP0501:00
PM: Adding info for acpi:PNP0501:00
acpi PNP0501:00: __pm_runtime_idle()!
acpi PNP0501:00: __pm_runtime_idle() returns -11!
device: 'PNP0501:01': device_add
bus: 'acpi': add device PNP0501:01
PM: Adding info for acpi:PNP0501:01
acpi PNP0501:01: __pm_runtime_idle()!
acpi PNP0501:01: __pm_runtime_idle() returns -11!
device: 'device:03': device_add
bus: 'acpi': add device device:03
PM: Adding info for acpi:device:03
acpi device:03: __pm_runtime_idle()!
acpi device:03: __pm_runtime_idle() returns -11!
device: 'device:04': device_add
bus: 'acpi': add device device:04
PM: Adding info for acpi:device:04
acpi device:04: __pm_runtime_idle()!
acpi device:04: __pm_runtime_idle() returns -11!
device: 'device:05': device_add
bus: 'acpi': add device device:05
PM: Adding info for acpi:device:05
acpi device:05: __pm_runtime_idle()!
acpi device:05: __pm_runtime_idle() returns -11!
device: 'device:06': device_add
bus: 'acpi': add device device:06
PM: Adding info for acpi:device:06
acpi device:06: __pm_runtime_idle()!
acpi device:06: __pm_runtime_idle() returns -11!
device: 'device:07': device_add
bus: 'acpi': add device device:07
PM: Adding info for acpi:device:07
acpi device:07: __pm_runtime_idle()!
acpi device:07: __pm_runtime_idle() returns -11!
device: 'device:08': device_add
bus: 'acpi': add device device:08
PM: Adding info for acpi:device:08
acpi device:08: __pm_runtime_idle()!
acpi device:08: __pm_runtime_idle() returns -11!
device: 'device:09': device_add
bus: 'acpi': add device device:09
PM: Adding info for acpi:device:09
acpi device:09: __pm_runtime_idle()!
acpi device:09: __pm_runtime_idle() returns -11!
device: 'device:0a': device_add
bus: 'acpi': add device device:0a
PM: Adding info for acpi:device:0a
acpi device:0a: __pm_runtime_idle()!
acpi device:0a: __pm_runtime_idle() returns -11!
device: 'device:0b': device_add
bus: 'acpi': add device device:0b
PM: Adding info for acpi:device:0b
acpi device:0b: __pm_runtime_idle()!
acpi device:0b: __pm_runtime_idle() returns -11!
device: 'device:0c': device_add
bus: 'acpi': add device device:0c
PM: Adding info for acpi:device:0c
acpi device:0c: __pm_runtime_idle()!
acpi device:0c: __pm_runtime_idle() returns -11!
device: 'device:0d': device_add
bus: 'acpi': add device device:0d
PM: Adding info for acpi:device:0d
acpi device:0d: __pm_runtime_idle()!
acpi device:0d: __pm_runtime_idle() returns -11!
device: 'device:0e': device_add
bus: 'acpi': add device device:0e
PM: Adding info for acpi:device:0e
acpi device:0e: __pm_runtime_idle()!
acpi device:0e: __pm_runtime_idle() returns -11!
device: 'device:0f': device_add
bus: 'acpi': add device device:0f
Clocksource tsc unstable (delta = 137536449 ns)
PM: Adding info for acpi:device:0f
acpi device:0f: __pm_runtime_idle()!
acpi device:0f: __pm_runtime_idle() returns -11!
device: 'device:10': device_add
bus: 'acpi': add device device:10
PM: Adding info for acpi:device:10
acpi device:10: __pm_runtime_idle()!
acpi device:10: __pm_runtime_idle() returns -11!
device: 'PNP0C01:00': device_add
bus: 'acpi': add device PNP0C01:00
PM: Adding info for acpi:PNP0C01:00
acpi PNP0C01:00: __pm_runtime_idle()!
acpi PNP0C01:00: __pm_runtime_idle() returns -11!
device: 'PNP0C0C:00': device_add
bus: 'acpi': add device PNP0C0C:00
PM: Adding info for acpi:PNP0C0C:00
acpi PNP0C0C:00: __pm_runtime_idle()!
acpi PNP0C0C:00: __pm_runtime_idle() returns -11!
device: 'PNP0C0F:00': device_add
bus: 'acpi': add device PNP0C0F:00
PM: Adding info for acpi:PNP0C0F:00
acpi PNP0C0F:00: __pm_runtime_idle()!
acpi PNP0C0F:00: __pm_runtime_idle() returns -11!
device: 'PNP0C0F:01': device_add
bus: 'acpi': add device PNP0C0F:01
PM: Adding info for acpi:PNP0C0F:01
acpi PNP0C0F:01: __pm_runtime_idle()!
acpi PNP0C0F:01: __pm_runtime_idle() returns -11!
device: 'PNP0C0F:02': device_add
bus: 'acpi': add device PNP0C0F:02
PM: Adding info for acpi:PNP0C0F:02
acpi PNP0C0F:02: __pm_runtime_idle()!
acpi PNP0C0F:02: __pm_runtime_idle() returns -11!
device: 'PNP0C0F:03': device_add
bus: 'acpi': add device PNP0C0F:03
PM: Adding info for acpi:PNP0C0F:03
acpi PNP0C0F:03: __pm_runtime_idle()!
acpi PNP0C0F:03: __pm_runtime_idle() returns -11!
device: 'PNP0C0F:04': device_add
bus: 'acpi': add device PNP0C0F:04
PM: Adding info for acpi:PNP0C0F:04
acpi PNP0C0F:04: __pm_runtime_idle()!
acpi PNP0C0F:04: __pm_runtime_idle() returns -11!
device: 'PNP0C0F:05': device_add
bus: 'acpi': add device PNP0C0F:05
PM: Adding info for acpi:PNP0C0F:05
acpi PNP0C0F:05: __pm_runtime_idle()!
acpi PNP0C0F:05: __pm_runtime_idle() returns -11!
device: 'PNP0C0F:06': device_add
bus: 'acpi': add device PNP0C0F:06
PM: Adding info for acpi:PNP0C0F:06
acpi PNP0C0F:06: __pm_runtime_idle()!
acpi PNP0C0F:06: __pm_runtime_idle() returns -11!
device: 'PNP0C0F:07': device_add
bus: 'acpi': add device PNP0C0F:07
PM: Adding info for acpi:PNP0C0F:07
acpi PNP0C0F:07: __pm_runtime_idle()!
acpi PNP0C0F:07: __pm_runtime_idle() returns -11!
device: 'PNP0C0E:00': device_add
bus: 'acpi': add device PNP0C0E:00
PM: Adding info for acpi:PNP0C0E:00
acpi PNP0C0E:00: __pm_runtime_idle()!
acpi PNP0C0E:00: __pm_runtime_idle() returns -11!
device: 'LNXTHERM:00': device_add
bus: 'acpi': add device LNXTHERM:00
PM: Adding info for acpi:LNXTHERM:00
acpi LNXTHERM:00: __pm_runtime_idle()!
acpi LNXTHERM:00: __pm_runtime_idle() returns -11!
device: 'LNXPWRBN:00': device_add
bus: 'acpi': add device LNXPWRBN:00
PM: Adding info for acpi:LNXPWRBN:00
acpi LNXPWRBN:00: __pm_runtime_idle()!
acpi LNXPWRBN:00: __pm_runtime_idle() returns -11!
bus: 'acpi': add driver ec
bus: 'acpi': add driver power
initcall acpi_init+0x0/0x288 returned 0 after 996092 usecs
calling  dock_init+0x0/0xb4 @ 1
ACPI: No dock devices found.
initcall dock_init+0x0/0xb4 returned 0 after 3255 usecs
calling  acpi_pci_root_init+0x0/0x4f @ 1
bus: 'acpi': add driver pci_root
bus: 'acpi': driver_probe_device: matched device PNP0A03:00 with driver pci_root
bus: 'acpi': really_probe: probing driver pci_root with device PNP0A03:00
ACPI: PCI Root Bridge [PCI0] (0000:00)
device: 'pci0000:00': device_add
PM: Adding info for No Bus:pci0000:00
device: '0000:00': device_add
PM: Adding info for No Bus:0000:00
PCI: Scanning bus 0000:00
pci 0000:00:00.0: found [1106:3188] class 000600 header type 00
pci 0000:00:00.0: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:00.0: reg 10 32bit mmio pref: [0xf8000000-0xfbffffff]
pci 0000:00:00.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:00.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:01.0: found [1106:b188] class 000604 header type 01
pci 0000:00:01.0: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:01.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:01.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:01.0: supports D1
pci 0000:00:07.0: found [1106:3044] class 000c00 header type 00
pci 0000:00:07.0: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:07.0: reg 10 32bit mmio: [0xfde00000-0xfde007ff]
pci 0000:00:07.0: reg 14 io port: [0xec00-0xec7f]
pci 0000:00:07.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:07.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:07.0: supports D2
pci 0000:00:07.0: PME# supported from D2 D3hot D3cold
pci 0000:00:07.0: PME# disabled
pci 0000:00:0a.0: found [10b7:1700] class 000200 header type 00
pci 0000:00:0a.0: reg 10 32bit mmio: [0xfd900000-0xfd903fff]
pci 0000:00:0a.0: reg 14 io port: [0xb000-0xb0ff]
pci 0000:00:0a.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:0a.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:0a.0: supports D1 D2
pci 0000:00:0a.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:0a.0: PME# disabled
pci 0000:00:0d.0: found [109e:036e] class 000400 header type 00
pci 0000:00:0d.0: reg 10 32bit mmio pref: [0xf7e00000-0xf7e00fff]
pci 0000:00:0d.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:0d.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:0d.1: found [109e:0878] class 000480 header type 00
pci 0000:00:0d.1: reg 10 32bit mmio pref: [0xf7f00000-0xf7f00fff]
pci 0000:00:0d.1: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:0d.1: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:0f.0: found [1106:3149] class 000104 header type 00
pci 0000:00:0f.0: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:0f.0: reg 10 io port: [0xe800-0xe807]
pci 0000:00:0f.0: reg 14 io port: [0xe400-0xe403]
pci 0000:00:0f.0: reg 18 io port: [0xe000-0xe007]
pci 0000:00:0f.0: reg 1c io port: [0xd800-0xd803]
pci 0000:00:0f.0: reg 20 io port: [0xd400-0xd40f]
pci 0000:00:0f.0: reg 24 io port: [0xd000-0xd0ff]
pci 0000:00:0f.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:0f.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:0f.1: found [1106:0571] class 000101 header type 00
pci 0000:00:0f.1: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:0f.1: reg 20 io port: [0xfc00-0xfc0f]
pci 0000:00:0f.1: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:0f.1: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:10.0: found [1106:3038] class 000c03 header type 00
pci 0000:00:10.0: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:10.0: reg 20 io port: [0xb400-0xb41f]
pci 0000:00:10.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:10.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:10.0: supports D1 D2
pci 0000:00:10.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:10.0: PME# disabled
pci 0000:00:10.1: found [1106:3038] class 000c03 header type 00
pci 0000:00:10.1: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:10.1: reg 20 io port: [0xb800-0xb81f]
pci 0000:00:10.1: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:10.1: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:10.1: supports D1 D2
pci 0000:00:10.1: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:10.1: PME# disabled
pci 0000:00:10.2: found [1106:3038] class 000c03 header type 00
pci 0000:00:10.2: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:10.2: reg 20 io port: [0xc000-0xc01f]
pci 0000:00:10.2: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:10.2: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:10.2: supports D1 D2
pci 0000:00:10.2: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:10.2: PME# disabled
pci 0000:00:10.3: found [1106:3038] class 000c03 header type 00
pci 0000:00:10.3: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:10.3: reg 20 io port: [0xc400-0xc41f]
pci 0000:00:10.3: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:10.3: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:10.3: supports D1 D2
pci 0000:00:10.3: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:10.3: PME# disabled
pci 0000:00:10.4: found [1106:3104] class 000c03 header type 00
pci 0000:00:10.4: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:10.4: reg 10 32bit mmio: [0xfdf00000-0xfdf000ff]
pci 0000:00:10.4: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:10.4: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:10.4: supports D1 D2
pci 0000:00:10.4: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:10.4: PME# disabled
pci 0000:00:11.0: found [1106:3227] class 000601 header type 00
pci 0000:00:11.0: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:11.0: calling vt8237_force_enable_hpet+0x0/0x1a0
HPET not enabled in BIOS. You might try hpet=force boot option
pci 0000:00:11.0: calling asus_hides_ac97_lpc+0x0/0x120
pci 0000:00:11.0: Enabled onboard AC97/MC97 devices
pci 0000:00:11.0: calling quirk_via_bridge+0x0/0xe0
pci 0000:00:11.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:11.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:11.0: calling pci_fixup_msi_k8t_onboard_sound+0x0/0x107
pci 0000:00:11.5: found [1106:3059] class 000401 header type 00
pci 0000:00:11.5: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:11.5: reg 10 io port: [0xc800-0xc8ff]
pci 0000:00:11.5: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:11.5: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:11.5: supports D1 D2
pci 0000:00:11.6: found [1106:3068] class 000780 header type 00
pci 0000:00:11.6: calling quirk_no_ata_d3+0x0/0x42
pci 0000:00:11.6: reg 10 io port: [0x00-0xff]
pci 0000:00:11.6: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:11.6: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:18.0: found [1022:1100] class 000600 header type 00
pci 0000:00:18.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:18.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:18.1: found [1022:1101] class 000600 header type 00
pci 0000:00:18.1: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:18.1: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:18.2: found [1022:1102] class 000600 header type 00
pci 0000:00:18.2: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:18.2: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:00:18.3: found [1022:1103] class 000600 header type 00
pci 0000:00:18.3: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:00:18.3: calling quirk_usb_early_handoff+0x0/0x720
PCI: Fixups for bus 0000:00
pci 0000:00:01.0: scanning behind bridge, config 010100, pass 0
PCI: Scanning bus 0000:01
pci 0000:01:00.0: found [1002:5964] class 000300 header type 00
pci 0000:01:00.0: calling quirk_no_ata_d3+0x0/0x42
pci 0000:01:00.0: reg 10 32bit mmio pref: [0xe8000000-0xefffffff]
pci 0000:01:00.0: reg 14 io port: [0xa000-0xa0ff]
pci 0000:01:00.0: reg 18 32bit mmio: [0xfd800000-0xfd80ffff]
pci 0000:01:00.0: reg 30 32bit mmio pref: [0xfd700000-0xfd71ffff]
pci 0000:01:00.0: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:01:00.0: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:01:00.0: supports D1 D2
pci 0000:01:00.1: found [1002:5d44] class 000380 header type 00
pci 0000:01:00.1: calling quirk_no_ata_d3+0x0/0x42
pci 0000:01:00.1: reg 10 32bit mmio pref: [0xe0000000-0xe7ffffff]
pci 0000:01:00.1: reg 14 32bit mmio: [0xfd600000-0xfd60ffff]
pci 0000:01:00.1: calling quirk_resource_alignment+0x0/0x1e4
pci 0000:01:00.1: calling quirk_usb_early_handoff+0x0/0x720
pci 0000:01:00.1: supports D1 D2
PCI: Fixups for bus 0000:01
pci 0000:00:01.0: bridge io port: [0xa000-0xafff]
pci 0000:00:01.0: bridge 32bit mmio: [0xfd300000-0xfd8fffff]
pci 0000:00:01.0: bridge 32bit mmio pref: [0xd7b00000-0xf7afffff]
PCI: Bus scan for 0000:01 returning with max=01
pci 0000:00:01.0: scanning behind bridge, config 010100, pass 1
PCI: Bus scan for 0000:00 returning with max=01
pci_bus 0000:00: on NUMA node 0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
device: '0000:00:00.0': device_add
bus: 'pci': add device 0000:00:00.0
PM: Adding info for pci:0000:00:00.0
pci 0000:00:00.0: __pm_runtime_idle()!
pci 0000:00:00.0: __pm_runtime_idle() returns -11!
device: '0000:00:01.0': device_add
bus: 'pci': add device 0000:00:01.0
PM: Adding info for pci:0000:00:01.0
pci 0000:00:01.0: __pm_runtime_idle()!
pci 0000:00:01.0: __pm_runtime_idle() returns -11!
device: '0000:00:07.0': device_add
bus: 'pci': add device 0000:00:07.0
PM: Adding info for pci:0000:00:07.0
pci 0000:00:07.0: __pm_runtime_idle()!
pci 0000:00:07.0: __pm_runtime_idle() returns -11!
device: '0000:00:0a.0': device_add
bus: 'pci': add device 0000:00:0a.0
PM: Adding info for pci:0000:00:0a.0
pci 0000:00:0a.0: __pm_runtime_idle()!
pci 0000:00:0a.0: __pm_runtime_idle() returns -11!
device: '0000:00:0d.0': device_add
bus: 'pci': add device 0000:00:0d.0
PM: Adding info for pci:0000:00:0d.0
pci 0000:00:0d.0: __pm_runtime_idle()!
pci 0000:00:0d.0: __pm_runtime_idle() returns -11!
device: '0000:00:0d.1': device_add
bus: 'pci': add device 0000:00:0d.1
PM: Adding info for pci:0000:00:0d.1
pci 0000:00:0d.1: __pm_runtime_idle()!
pci 0000:00:0d.1: __pm_runtime_idle() returns -11!
device: '0000:00:0f.0': device_add
bus: 'pci': add device 0000:00:0f.0
PM: Adding info for pci:0000:00:0f.0
pci 0000:00:0f.0: __pm_runtime_idle()!
pci 0000:00:0f.0: __pm_runtime_idle() returns -11!
device: '0000:00:0f.1': device_add
bus: 'pci': add device 0000:00:0f.1
PM: Adding info for pci:0000:00:0f.1
pci 0000:00:0f.1: __pm_runtime_idle()!
pci 0000:00:0f.1: __pm_runtime_idle() returns -11!
device: '0000:00:10.0': device_add
bus: 'pci': add device 0000:00:10.0
PM: Adding info for pci:0000:00:10.0
pci 0000:00:10.0: __pm_runtime_idle()!
pci 0000:00:10.0: __pm_runtime_idle() returns -11!
device: '0000:00:10.1': device_add
bus: 'pci': add device 0000:00:10.1
PM: Adding info for pci:0000:00:10.1
pci 0000:00:10.1: __pm_runtime_idle()!
pci 0000:00:10.1: __pm_runtime_idle() returns -11!
device: '0000:00:10.2': device_add
bus: 'pci': add device 0000:00:10.2
PM: Adding info for pci:0000:00:10.2
pci 0000:00:10.2: __pm_runtime_idle()!
pci 0000:00:10.2: __pm_runtime_idle() returns -11!
device: '0000:00:10.3': device_add
bus: 'pci': add device 0000:00:10.3
PM: Adding info for pci:0000:00:10.3
pci 0000:00:10.3: __pm_runtime_idle()!
pci 0000:00:10.3: __pm_runtime_idle() returns -11!
device: '0000:00:10.4': device_add
bus: 'pci': add device 0000:00:10.4
PM: Adding info for pci:0000:00:10.4
pci 0000:00:10.4: __pm_runtime_idle()!
pci 0000:00:10.4: __pm_runtime_idle() returns -11!
device: '0000:00:11.0': device_add
bus: 'pci': add device 0000:00:11.0
PM: Adding info for pci:0000:00:11.0
pci 0000:00:11.0: __pm_runtime_idle()!
pci 0000:00:11.0: __pm_runtime_idle() returns -11!
device: '0000:00:11.5': device_add
bus: 'pci': add device 0000:00:11.5
PM: Adding info for pci:0000:00:11.5
pci 0000:00:11.5: __pm_runtime_idle()!
pci 0000:00:11.5: __pm_runtime_idle() returns -11!
device: '0000:00:11.6': device_add
bus: 'pci': add device 0000:00:11.6
PM: Adding info for pci:0000:00:11.6
pci 0000:00:11.6: __pm_runtime_idle()!
pci 0000:00:11.6: __pm_runtime_idle() returns -11!
device: '0000:00:18.0': device_add
bus: 'pci': add device 0000:00:18.0
PM: Adding info for pci:0000:00:18.0
pci 0000:00:18.0: __pm_runtime_idle()!
pci 0000:00:18.0: __pm_runtime_idle() returns -11!
device: '0000:00:18.1': device_add
bus: 'pci': add device 0000:00:18.1
PM: Adding info for pci:0000:00:18.1
pci 0000:00:18.1: __pm_runtime_idle()!
pci 0000:00:18.1: __pm_runtime_idle() returns -11!
device: '0000:00:18.2': device_add
bus: 'pci': add device 0000:00:18.2
PM: Adding info for pci:0000:00:18.2
pci 0000:00:18.2: __pm_runtime_idle()!
pci 0000:00:18.2: __pm_runtime_idle() returns -11!
device: '0000:00:18.3': device_add
bus: 'pci': add device 0000:00:18.3
PM: Adding info for pci:0000:00:18.3
pci 0000:00:18.3: __pm_runtime_idle()!
pci 0000:00:18.3: __pm_runtime_idle() returns -11!
device: '0000:01:00.0': device_add
bus: 'pci': add device 0000:01:00.0
PM: Adding info for pci:0000:01:00.0
pci 0000:01:00.0: __pm_runtime_idle()!
pci 0000:01:00.0: __pm_runtime_idle() returns -11!
device: '0000:01:00.1': device_add
bus: 'pci': add device 0000:01:00.1
PM: Adding info for pci:0000:01:00.1
pci 0000:01:00.1: __pm_runtime_idle()!
pci 0000:01:00.1: __pm_runtime_idle() returns -11!
device: '0000:01': device_add
PM: Adding info for No Bus:0000:01
driver: 'PNP0A03:00': driver_bound: bound to device 'pci_root'
bus: 'acpi': really_probe: bound device PNP0A03:00 to driver pci_root
pci_root PNP0A03:00: __pm_runtime_idle()!
pci_root PNP0A03:00: __pm_runtime_idle() returns -11!
initcall acpi_pci_root_init+0x0/0x4f returned 0 after 1022133 usecs
calling  acpi_pci_link_init+0x0/0x6a @ 1
bus: 'acpi': add driver pci_link
bus: 'acpi': driver_probe_device: matched device PNP0C0F:00 with driver pci_link
bus: 'acpi': really_probe: probing driver pci_link with device PNP0C0F:00
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 10 *11 14 15)
driver: 'PNP0C0F:00': driver_bound: bound to device 'pci_link'
bus: 'acpi': really_probe: bound device PNP0C0F:00 to driver pci_link
pci_link PNP0C0F:00: __pm_runtime_idle()!
pci_link PNP0C0F:00: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device PNP0C0F:01 with driver pci_link
bus: 'acpi': really_probe: probing driver pci_link with device PNP0C0F:01
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 *10 11 14 15)
driver: 'PNP0C0F:01': driver_bound: bound to device 'pci_link'
bus: 'acpi': really_probe: bound device PNP0C0F:01 to driver pci_link
pci_link PNP0C0F:01: __pm_runtime_idle()!
pci_link PNP0C0F:01: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device PNP0C0F:02 with driver pci_link
bus: 'acpi': really_probe: probing driver pci_link with device PNP0C0F:02
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 7 10 11 14 15)
driver: 'PNP0C0F:02': driver_bound: bound to device 'pci_link'
bus: 'acpi': really_probe: bound device PNP0C0F:02 to driver pci_link
pci_link PNP0C0F:02: __pm_runtime_idle()!
pci_link PNP0C0F:02: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device PNP0C0F:03 with driver pci_link
bus: 'acpi': really_probe: probing driver pci_link with device PNP0C0F:03
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
driver: 'PNP0C0F:03': driver_bound: bound to device 'pci_link'
bus: 'acpi': really_probe: bound device PNP0C0F:03 to driver pci_link
pci_link PNP0C0F:03: __pm_runtime_idle()!
pci_link PNP0C0F:03: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device PNP0C0F:04 with driver pci_link
bus: 'acpi': really_probe: probing driver pci_link with device PNP0C0F:04
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
driver: 'PNP0C0F:04': driver_bound: bound to device 'pci_link'
bus: 'acpi': really_probe: bound device PNP0C0F:04 to driver pci_link
pci_link PNP0C0F:04: __pm_runtime_idle()!
pci_link PNP0C0F:04: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device PNP0C0F:05 with driver pci_link
bus: 'acpi': really_probe: probing driver pci_link with device PNP0C0F:05
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
driver: 'PNP0C0F:05': driver_bound: bound to device 'pci_link'
bus: 'acpi': really_probe: bound device PNP0C0F:05 to driver pci_link
pci_link PNP0C0F:05: __pm_runtime_idle()!
pci_link PNP0C0F:05: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device PNP0C0F:06 with driver pci_link
bus: 'acpi': really_probe: probing driver pci_link with device PNP0C0F:06
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
driver: 'PNP0C0F:06': driver_bound: bound to device 'pci_link'
bus: 'acpi': really_probe: bound device PNP0C0F:06 to driver pci_link
pci_link PNP0C0F:06: __pm_runtime_idle()!
pci_link PNP0C0F:06: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device PNP0C0F:07 with driver pci_link
bus: 'acpi': really_probe: probing driver pci_link with device PNP0C0F:07
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
driver: 'PNP0C0F:07': driver_bound: bound to device 'pci_link'
bus: 'acpi': really_probe: bound device PNP0C0F:07 to driver pci_link
pci_link PNP0C0F:07: __pm_runtime_idle()!
pci_link PNP0C0F:07: __pm_runtime_idle() returns -11!
initcall acpi_pci_link_init+0x0/0x6a returned 0 after 195312 usecs
calling  pnp_init+0x0/0x3d @ 1
bus: 'pnp': registered
initcall pnp_init+0x0/0x3d returned 0 after 3255 usecs
calling  misc_init+0x0/0xde @ 1
device class 'misc': registering
initcall misc_init+0x0/0xde returned 0 after 3255 usecs
calling  vga_arb_device_init+0x0/0xb3 @ 1
device: 'vga_arbiter': device_add
PM: Adding info for No Bus:vga_arbiter
vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
vgaarb: loaded
initcall vga_arb_device_init+0x0/0xb3 returned 0 after 13020 usecs
calling  tifm_init+0x0/0xad @ 1
bus: 'tifm': registered
device class 'tifm_adapter': registering
initcall tifm_init+0x0/0xad returned 0 after 6510 usecs
calling  wm8400_module_init+0x0/0x5b @ 1
bus: 'i2c': add driver WM8400
i2c-core: driver [WM8400] registered
initcall wm8400_module_init+0x0/0x5b returned 0 after 6510 usecs
calling  wm831x_i2c_init+0x0/0x60 @ 1
bus: 'i2c': add driver wm831x
i2c-core: driver [wm831x] registered
initcall wm831x_i2c_init+0x0/0x60 returned 0 after 6510 usecs
calling  twl4030_init+0x0/0x40 @ 1
bus: 'i2c': add driver twl4030
i2c-core: driver [twl4030] registered
initcall twl4030_init+0x0/0x40 returned 0 after 6510 usecs
calling  ezx_pcap_init+0x0/0x40 @ 1
bus: 'spi': add driver ezx-pcap
initcall ezx_pcap_init+0x0/0x40 returned 0 after 3255 usecs
calling  init_scsi+0x0/0xb8 @ 1
device class 'scsi_host': registering
bus: 'scsi': registered
device class 'scsi_device': registering
SCSI subsystem initialized
initcall init_scsi+0x0/0xb8 returned 0 after 13020 usecs
calling  ata_init+0x0/0x440 @ 1
libata version 3.00 loaded.
initcall ata_init+0x0/0x440 returned 0 after 3255 usecs
calling  phy_init+0x0/0x65 @ 1
device class 'mdio_bus': registering
bus: 'mdio_bus': registered
bus: 'mdio_bus': add driver Generic PHY
initcall phy_init+0x0/0x65 returned 0 after 9765 usecs
calling  usb_init+0x0/0x1e9 @ 1
bus: 'usb': registered
bus: 'usb': add driver usbfs
usbcore: registered new interface driver usbfs
device class 'usb_device': registering
bus: 'usb': add driver hub
usbcore: registered new interface driver hub
bus: 'usb': add driver usb
usbcore: registered new device driver usb
initcall usb_init+0x0/0x1e9 returned 0 after 22786 usecs
calling  serio_init+0x0/0xc0 @ 1
bus: 'serio': registered
initcall serio_init+0x0/0xc0 returned 0 after 3255 usecs
calling  gameport_init+0x0/0xc0 @ 1
bus: 'gameport': registered
initcall gameport_init+0x0/0xc0 returned 0 after 3255 usecs
calling  input_init+0x0/0x173 @ 1
device class 'input': registering
initcall input_init+0x0/0x173 returned 0 after 3255 usecs
calling  rtc_init+0x0/0x87 @ 1
device class 'rtc': registering
initcall rtc_init+0x0/0x87 returned 0 after 3255 usecs
calling  init_dvbdev+0x0/0x100 @ 1
device class 'dvb': registering
initcall init_dvbdev+0x0/0x100 returned 0 after 3255 usecs
calling  power_supply_class_init+0x0/0x60 @ 1
device class 'power_supply': registering
initcall power_supply_class_init+0x0/0x60 returned 0 after 3255 usecs
calling  hwmon_init+0x0/0x145 @ 1
device class 'hwmon': registering
initcall hwmon_init+0x0/0x145 returned 0 after 3255 usecs
calling  thermal_init+0x0/0x83 @ 1
device class 'thermal': registering
initcall thermal_init+0x0/0x83 returned 0 after 3255 usecs
calling  mmc_init+0x0/0xa0 @ 1
bus: 'mmc': registered
device class 'mmc_host': registering
bus: 'sdio': registered
initcall mmc_init+0x0/0xa0 returned 0 after 6510 usecs
calling  leds_init+0x0/0x70 @ 1
device class 'leds': registering
initcall leds_init+0x0/0x70 returned 0 after 3255 usecs
calling  pci_subsys_init+0x0/0x170 @ 1
PCI: Using ACPI for IRQ routing
initcall pci_subsys_init+0x0/0x170 returned 0 after 3255 usecs
calling  proto_init+0x0/0x3b @ 1
initcall proto_init+0x0/0x3b returned 0 after 0 usecs
calling  net_dev_init+0x0/0x19f @ 1
device class 'net': registering
device: 'lo': device_add
PM: Adding info for No Bus:lo
initcall net_dev_init+0x0/0x19f returned 0 after 9765 usecs
calling  neigh_init+0x0/0x9d @ 1
initcall neigh_init+0x0/0x9d returned 0 after 0 usecs
calling  fib_rules_init+0x0/0xd8 @ 1
initcall fib_rules_init+0x0/0xd8 returned 0 after 0 usecs
calling  pktsched_init+0x0/0x100 @ 1
initcall pktsched_init+0x0/0x100 returned 0 after 0 usecs
calling  tc_filter_init+0x0/0x80 @ 1
initcall tc_filter_init+0x0/0x80 returned 0 after 0 usecs
calling  tc_action_init+0x0/0x80 @ 1
initcall tc_action_init+0x0/0x80 returned 0 after 0 usecs
calling  genl_init+0x0/0xc3 @ 1
initcall genl_init+0x0/0xc3 returned 0 after 0 usecs
calling  cipso_v4_init+0x0/0xac @ 1
initcall cipso_v4_init+0x0/0xac returned 0 after 0 usecs
calling  wanrouter_init+0x0/0x7d @ 1
Sangoma WANPIPE Router v1.1 (c) 1995-2000 Sangoma Technologies Inc.
initcall wanrouter_init+0x0/0x7d returned 0 after 3255 usecs
calling  irda_init+0x0/0x100 @ 1
irda_init()
NET: Registered protocol family 23
initcall irda_init+0x0/0x100 returned 0 after 3255 usecs
calling  atm_init+0x0/0xe0 @ 1
NET: Registered protocol family 8
NET: Registered protocol family 20
device class 'atm': registering
initcall atm_init+0x0/0xe0 returned 0 after 9765 usecs
calling  netlbl_init+0x0/0xb5 @ 1
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
initcall netlbl_init+0x0/0xb5 returned 0 after 13020 usecs
calling  rfkill_init+0x0/0xa5 @ 1
device class 'rfkill': registering
device: 'rfkill': device_add
PM: Adding info for No Bus:rfkill
initcall rfkill_init+0x0/0xa5 returned 0 after 9765 usecs
calling  wpan_phy_class_init+0x0/0x45 @ 1
device class 'ieee802154': registering
initcall wpan_phy_class_init+0x0/0x45 returned 0 after 3255 usecs
calling  sysctl_init+0x0/0x6f @ 1
initcall sysctl_init+0x0/0x6f returned 0 after 0 usecs
calling  pci_iommu_init+0x0/0x58 @ 1
bus: 'pci': add driver agpgart-amd64
bus: 'pci': driver_probe_device: matched device 0000:00:00.0 with driver agpgart-amd64
bus: 'pci': really_probe: probing driver agpgart-amd64 with device 0000:00:00.0
agpgart-amd64 0000:00:00.0: AGP bridge [1106/3188]
device: 'agpgart': device_add
PM: Adding info for No Bus:agpgart
agpgart-amd64 0000:00:00.0: AGP aperture is 64M @ 0xf8000000
driver: '0000:00:00.0': driver_bound: bound to device 'agpgart-amd64'
bus: 'pci': really_probe: bound device 0000:00:00.0 to driver agpgart-amd64
agpgart-amd64 0000:00:00.0: __pm_runtime_idle()!
agpgart-amd64 0000:00:00.0: __pm_runtime_idle() returns -11!
initcall pci_iommu_init+0x0/0x58 returned 0 after 35807 usecs
calling  print_all_ICs+0x0/0x5a0 @ 1

printing PIC contents
... PIC  IMR: ffff
... PIC  IRR: 0001
... PIC  ISR: 0000
... PIC ELCR: 0e20
printing local APIC contents on CPU#0/0:
... APIC ID:      00000000 (0)
... APIC VERSION: 00040010
... APIC TASKPRI: 00000000 (00)
... APIC ARBPRI: 000000e0 (e0)
... APIC PROCPRI: 00000000
... APIC LDR: 01000000
... APIC DFR: ffffffff
... APIC SPIV: 000001ff
... APIC ISR field:
0000000000000000000000000000000000000000000000000000000000000000
... APIC TMR field:
0000000000000000000000000000000000000000000000000000000000000000
... APIC IRR field:
0000000000000000000000000000000000000000000000000000000000008000
... APIC ESR: 00000000
... APIC ICR: 00000000
... APIC ICR2: 00000000
... APIC LVTT: 000200ef
... APIC LVTPC: 00000400
... APIC LVT0: 00010700
... APIC LVT1: 00000400
... APIC LVTERR: 000000fe
... APIC TMICT: 0000a2f4
... APIC TMCCT: 000046b0
... APIC TDCR: 00000003

number of MP IRQ sources: 15.
number of IO-APIC #1 registers: 24.
testing the IO APIC.......................

IO APIC #1......
.... register #00: 02000000
.......    : physical APIC id: 02
.......    : Delivery Type: 0
.......    : LTS          : 0
.... register #01: 00178003
.......     : max redirection entries: 0017
.......     : PRQ implemented: 1
.......     : IO APIC version: 0003
.... IRQ redirection table:
 NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:   
 00 000 1    0    0   0   0    0    0    00
 01 001 0    0    0   0   0    1    1    31
 02 001 0    0    0   0   0    1    1    30
 03 001 0    0    0   0   0    1    1    33
 04 001 0    0    0   0   0    1    1    34
 05 001 0    0    0   0   0    1    1    35
 06 001 0    0    0   0   0    1    1    36
 07 001 0    0    0   0   0    1    1    37
 08 001 0    0    0   0   0    1    1    38
 09 001 0    1    0   1   0    1    1    39
 0a 001 0    0    0   0   0    1    1    3A
 0b 001 0    0    0   0   0    1    1    3B
 0c 001 0    0    0   0   0    1    1    3C
 0d 001 0    0    0   0   0    1    1    3D
 0e 001 0    0    0   0   0    1    1    3E
 0f 001 0    0    0   0   0    1    1    3F
 10 000 1    0    0   0   0    0    0    00
 11 000 1    0    0   0   0    0    0    00
 12 000 1    0    0   0   0    0    0    00
 13 000 1    0    0   0   0    0    0    00
 14 000 1    0    0   0   0    0    0    00
 15 000 1    0    0   0   0    0    0    00
 16 000 1    0    0   0   0    0    0    00
 17 000 1    0    0   0   0    0    0    00
IRQ to pin mappings:
IRQ0 -> 0:2
IRQ1 -> 0:1
IRQ3 -> 0:3
IRQ4 -> 0:4
IRQ5 -> 0:5
IRQ6 -> 0:6
IRQ7 -> 0:7
IRQ8 -> 0:8
IRQ9 -> 0:9
IRQ10 -> 0:10
IRQ11 -> 0:11
IRQ12 -> 0:12
IRQ13 -> 0:13
IRQ14 -> 0:14
IRQ15 -> 0:15
.................................... done.
initcall print_all_ICs+0x0/0x5a0 returned 0 after 175780 usecs
calling  hpet_late_init+0x0/0x238 @ 1
initcall hpet_late_init+0x0/0x238 returned -19 after 0 usecs
calling  clocksource_done_booting+0x0/0x65 @ 1
Switching to clocksource jiffies
initcall clocksource_done_booting+0x0/0x65 returned 0 after 3255 usecs
calling  init_pipe_fs+0x0/0x74 @ 1
initcall init_pipe_fs+0x0/0x74 returned 0 after 0 usecs
calling  eventpoll_init+0x0/0x120 @ 1
initcall eventpoll_init+0x0/0x120 returned 0 after 0 usecs
calling  anon_inode_init+0x0/0x166 @ 1
initcall anon_inode_init+0x0/0x166 returned 0 after 0 usecs
calling  tomoyo_initerface_init+0x0/0x185 @ 1
initcall tomoyo_initerface_init+0x0/0x185 returned 0 after 0 usecs
calling  blk_scsi_ioctl_init+0x0/0x2ae @ 1
initcall blk_scsi_ioctl_init+0x0/0x2ae returned 0 after 0 usecs
calling  acpi_event_init+0x0/0xa7 @ 1
initcall acpi_event_init+0x0/0xa7 returned 0 after 0 usecs
calling  pnpacpi_init+0x0/0xb5 @ 1
pnp: PnP ACPI init
device: 'pnp0': device_add
PM: Adding info for No Bus:pnp0
ACPI: bus type pnp registered
device: '00:00': device_add
bus: 'pnp': add device 00:00
PM: Adding info for pnp:00:00
pnp 00:00: __pm_runtime_idle()!
pnp 00:00: __pm_runtime_idle() returns -11!
device: '00:01': device_add
bus: 'pnp': add device 00:01
PM: Adding info for pnp:00:01
pnp 00:01: __pm_runtime_idle()!
pnp 00:01: __pm_runtime_idle() returns -11!
IOAPIC[0]: Set routing entry (1-8 -> 0x38 -> IRQ 8 Mode:0 Active:0)
device: '00:02': device_add
bus: 'pnp': add device 00:02
PM: Adding info for pnp:00:02
pnp 00:02: __pm_runtime_idle()!
pnp 00:02: __pm_runtime_idle() returns -11!
device: '00:03': device_add
bus: 'pnp': add device 00:03
PM: Adding info for pnp:00:03
pnp 00:03: __pm_runtime_idle()!
pnp 00:03: __pm_runtime_idle() returns -11!
IOAPIC[0]: Set routing entry (1-13 -> 0x3d -> IRQ 13 Mode:0 Active:0)
device: '00:04': device_add
bus: 'pnp': add device 00:04
PM: Adding info for pnp:00:04
pnp 00:04: __pm_runtime_idle()!
pnp 00:04: __pm_runtime_idle() returns -11!
IOAPIC[0]: Set routing entry (1-6 -> 0x36 -> IRQ 6 Mode:0 Active:0)
device: '00:05': device_add
bus: 'pnp': add device 00:05
PM: Adding info for pnp:00:05
pnp 00:05: __pm_runtime_idle()!
pnp 00:05: __pm_runtime_idle() returns -11!
IOAPIC[0]: Set routing entry (1-7 -> 0x37 -> IRQ 7 Mode:0 Active:0)
device: '00:06': device_add
bus: 'pnp': add device 00:06
PM: Adding info for pnp:00:06
pnp 00:06: __pm_runtime_idle()!
pnp 00:06: __pm_runtime_idle() returns -11!
pnp 00:07: io resource (0x10-0x1f) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x22-0x3f) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x44-0x5f) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x62-0x63) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x65-0x6f) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x72-0x7f) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x80-0x80) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x84-0x86) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x88-0x88) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x8c-0x8e) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0x90-0x9f) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0xa2-0xbf) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
pnp 00:07: io resource (0xe0-0xef) overlaps 0000:00:11.6 BAR 0 (0x0-0xff), disabling
device: '00:07': device_add
bus: 'pnp': add device 00:07
PM: Adding info for pnp:00:07
pnp 00:07: __pm_runtime_idle()!
pnp 00:07: __pm_runtime_idle() returns -11!
device: '00:08': device_add
bus: 'pnp': add device 00:08
PM: Adding info for pnp:00:08
pnp 00:08: __pm_runtime_idle()!
pnp 00:08: __pm_runtime_idle() returns -11!
IOAPIC[0]: Set routing entry (1-3 -> 0x33 -> IRQ 3 Mode:0 Active:0)
device: '00:09': device_add
bus: 'pnp': add device 00:09
PM: Adding info for pnp:00:09
pnp 00:09: __pm_runtime_idle()!
pnp 00:09: __pm_runtime_idle() returns -11!
IOAPIC[0]: Set routing entry (1-4 -> 0x34 -> IRQ 4 Mode:0 Active:0)
device: '00:0a': device_add
bus: 'pnp': add device 00:0a
PM: Adding info for pnp:00:0a
pnp 00:0a: __pm_runtime_idle()!
pnp 00:0a: __pm_runtime_idle() returns -11!
device: '00:0b': device_add
bus: 'pnp': add device 00:0b
PM: Adding info for pnp:00:0b
pnp 00:0b: __pm_runtime_idle()!
pnp 00:0b: __pm_runtime_idle() returns -11!
pnp: PnP ACPI: found 12 devices
ACPI: ACPI bus type pnp unregistered
initcall pnpacpi_init+0x0/0xb5 returned 0 after 296223 usecs
calling  pnp_system_init+0x0/0x40 @ 1
bus: 'pnp': add driver system
bus: 'pnp': driver_probe_device: matched device 00:07 with driver system
bus: 'pnp': really_probe: probing driver system with device 00:07
system 00:07: ioport range 0x295-0x296 has been reserved
system 00:07: ioport range 0x3e1-0x3e7 has been reserved
system 00:07: ioport range 0x4d0-0x4d1 has been reserved
system 00:07: ioport range 0x800-0x87f has been reserved
system 00:07: ioport range 0x400-0x41f has been reserved
driver: '00:07': driver_bound: bound to device 'system'
bus: 'pnp': really_probe: bound device 00:07 to driver system
system 00:07: __pm_runtime_idle()!
system 00:07: __pm_runtime_idle() returns -11!
bus: 'pnp': driver_probe_device: matched device 00:08 with driver system
bus: 'pnp': really_probe: probing driver system with device 00:08
system 00:08: iomem range 0xfec00000-0xfec00fff could not be reserved
system 00:08: iomem range 0xfee00000-0xfee00fff has been reserved
system 00:08: iomem range 0xfff80000-0xffffffff has been reserved
driver: '00:08': driver_bound: bound to device 'system'
bus: 'pnp': really_probe: bound device 00:08 to driver system
system 00:08: __pm_runtime_idle()!
system 00:08: __pm_runtime_idle() returns -11!
bus: 'pnp': driver_probe_device: matched device 00:0b with driver system
bus: 'pnp': really_probe: probing driver system with device 00:0b
system 00:0b: iomem range 0x0-0x9ffff could not be reserved
system 00:0b: iomem range 0xc0000-0xdffff has been reserved
system 00:0b: iomem range 0xe0000-0xfffff could not be reserved
system 00:0b: iomem range 0x100000-0x3ffeffff could not be reserved
driver: '00:0b': driver_bound: bound to device 'system'
bus: 'pnp': really_probe: bound device 00:0b to driver system
system 00:0b: __pm_runtime_idle()!
system 00:0b: __pm_runtime_idle() returns -11!
initcall pnp_system_init+0x0/0x40 returned 0 after 91145 usecs
calling  chr_dev_init+0x0/0x100 @ 1
device class 'mem': registering
device: 'mem': device_add
PM: Adding info for No Bus:mem
device: 'null': device_add
PM: Adding info for No Bus:null
device: 'port': device_add
PM: Adding info for No Bus:port
device: 'zero': device_add
PM: Adding info for No Bus:zero
device: 'full': device_add
PM: Adding info for No Bus:full
device: 'random': device_add
PM: Adding info for No Bus:random
device: 'urandom': device_add
PM: Adding info for No Bus:urandom
device: 'kmsg': device_add
PM: Adding info for No Bus:kmsg
device: 'oldmem': device_add
PM: Adding info for No Bus:oldmem
initcall chr_dev_init+0x0/0x100 returned 0 after 58593 usecs
calling  firmware_class_init+0x0/0xa3 @ 1
device class 'firmware': registering
initcall firmware_class_init+0x0/0xa3 returned 0 after 6510 usecs
calling  ieee1394_init+0x0/0x2c4 @ 1
bus: 'ieee1394': registered
device class 'ieee1394_host': registering
device class 'ieee1394_protocol': registering
device class 'ieee1394_node': registering
device class 'ieee1394': registering
bus: 'ieee1394': add driver nodemgr
initcall ieee1394_init+0x0/0x2c4 returned 0 after 22786 usecs
calling  init_acpi_pm_clocksource+0x0/0x12f @ 1
Switching to clocksource acpi_pm
initcall init_acpi_pm_clocksource+0x0/0x12f returned 0 after 6512 usecs
Switched to high resolution mode on CPU 0
calling  ssb_modinit+0x0/0x8c @ 1
bus: 'ssb': registered
initcall ssb_modinit+0x0/0x8c returned 0 after 2535 usecs
calling  pcibios_assign_resources+0x0/0x9c @ 1
pci 0000:00:11.6: BAR 0: got res [0x1000-0x10ff] bus [0x1000-0x10ff] flags 0x20101
pci 0000:00:11.6: BAR 0: moved to bus [0x1000-0x10ff] flags 0x20101
pci 0000:00:01.0: PCI bridge, secondary bus 0000:01
pci 0000:00:01.0:   IO window: 0xa000-0xafff
pci 0000:00:01.0:   MEM window: 0xfd300000-0xfd8fffff
pci 0000:00:01.0:   PREFETCH window: 0xd7b00000-0xf7afffff
pci 0000:00:01.0: calling quirk_via_vlink+0x0/0x120
pci 0000:00:01.0: setting latency timer to 64
pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffffffffffff]
pci_bus 0000:01: resource 0 io:  [0xa000-0xafff]
pci_bus 0000:01: resource 1 mem: [0xfd300000-0xfd8fffff]
pci_bus 0000:01: resource 2 pref mem [0xd7b00000-0xf7afffff]
initcall pcibios_assign_resources+0x0/0x9c returned 0 after 65097 usecs
calling  sysctl_core_init+0x0/0x65 @ 1
initcall sysctl_core_init+0x0/0x65 returned 0 after 40 usecs
calling  inet_init+0x0/0x2cc @ 1
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 6, 262144 bytes)
TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
TCP bind hash table entries: 32768 (order: 9, 2359296 bytes)
TCP: Hash tables configured (established 131072 bind 32768)
TCP reno registered
initcall inet_init+0x0/0x2cc returned 0 after 34272 usecs
calling  af_unix_init+0x0/0x82 @ 1
NET: Registered protocol family 1
initcall af_unix_init+0x0/0x82 returned 0 after 3092 usecs
calling  populate_rootfs+0x0/0x14b @ 1
initcall populate_rootfs+0x0/0x14b returned 0 after 824 usecs
calling  calgary_fixup_tce_spaces+0x0/0x129 @ 1
initcall calgary_fixup_tce_spaces+0x0/0x129 returned -19 after 1 usecs
calling  i8259A_init_sysfs+0x0/0x50 @ 1
Registering sysdev class 'i8259'
Registering sys device of class 'i8259'
Registering sys device 'i82590'
initcall i8259A_init_sysfs+0x0/0x50 returned 0 after 10452 usecs
calling  vsyscall_init+0x0/0xcf @ 1
initcall vsyscall_init+0x0/0xcf returned 0 after 10 usecs
calling  sbf_init+0x0/0x140 @ 1
initcall sbf_init+0x0/0x140 returned 0 after 0 usecs
calling  i8237A_init_sysfs+0x0/0x50 @ 1
Registering sysdev class 'i8237'
Registering sys device of class 'i8237'
Registering sys device 'i82370'
initcall i8237A_init_sysfs+0x0/0x50 returned 0 after 10225 usecs
calling  add_rtc_cmos+0x0/0xfe @ 1
initcall add_rtc_cmos+0x0/0xfe returned 0 after 2 usecs
calling  cache_sysfs_init+0x0/0x245 @ 1
initcall cache_sysfs_init+0x0/0x245 returned 0 after 1696 usecs
calling  mce_init_device+0x0/0x26c @ 1
Registering sysdev class 'machinecheck'
Registering sys device of class 'machinecheck'
Registering sys device 'machinecheck0'
device: 'mcelog': device_add
PM: Adding info for No Bus:mcelog
initcall mce_init_device+0x0/0x26c returned 0 after 18496 usecs
calling  thermal_throttle_init_device+0x0/0x70 @ 1
initcall thermal_throttle_init_device+0x0/0x70 returned 0 after 0 usecs
calling  msr_init+0x0/0x108 @ 1
device class 'msr': registering
device: 'msr0': device_add
PM: Adding info for No Bus:msr0
initcall msr_init+0x0/0x108 returned 0 after 9152 usecs
calling  cpuid_init+0x0/0x10f @ 1
device class 'cpuid': registering
device: 'cpu0': device_add
PM: Adding info for No Bus:cpu0
initcall cpuid_init+0x0/0x10f returned 0 after 9323 usecs
calling  ioapic_init_sysfs+0x0/0xf3 @ 1
Registering sysdev class 'ioapic'
Registering sys device of class 'ioapic'
Registering sys device 'ioapic0'
initcall ioapic_init_sysfs+0x0/0xf3 returned 0 after 10416 usecs
calling  add_pcspkr+0x0/0x5c @ 1
Registering platform device 'pcspkr'. Parent at platform
device: 'pcspkr': device_add
bus: 'platform': add device pcspkr
PM: Adding info for platform:pcspkr
platform pcspkr: __pm_runtime_idle()!
platform pcspkr: __pm_runtime_idle() returns -11!
initcall add_pcspkr+0x0/0x5c returned 0 after 22224 usecs
calling  microcode_init+0x0/0x141 @ 1
microcode: no support for this CPU vendor
initcall microcode_init+0x0/0x141 returned -19 after 3706 usecs
calling  start_periodic_check_for_corruption+0x0/0x70 @ 1
Scanning for low memory corruption every 60 seconds
initcall start_periodic_check_for_corruption+0x0/0x70 returned 0 after 4554 usecs
calling  audit_classes_init+0x0/0xe0 @ 1
initcall audit_classes_init+0x0/0xe0 returned 0 after 58 usecs
calling  start_pageattr_test+0x0/0x80 @ 1
initcall start_pageattr_test+0x0/0x80 returned 0 after 171 usecs
calling  pt_dump_init+0x0/0x60 @ 1
initcall pt_dump_init+0x0/0x60 returned 0 after 27 usecs
calling  crypto_fpu_module_init+0x0/0x40 @ 1
initcall crypto_fpu_module_init+0x0/0x40 returned 0 after 67 usecs
calling  aes_init+0x0/0x40 @ 1
initcall aes_init+0x0/0x40 returned 0 after 331 usecs
calling  init+0x0/0x3d @ 1
initcall init+0x0/0x3d returned 0 after 336 usecs
calling  aesni_init+0x0/0x173 @ 1
Intel AES-NI instructions are not detected.
initcall aesni_init+0x0/0x173 returned -19 after 3874 usecs
calling  init_vdso_vars+0x0/0x268 @ 1
initcall init_vdso_vars+0x0/0x268 returned 0 after 31 usecs
calling  ia32_binfmt_init+0x0/0x3c @ 1
initcall ia32_binfmt_init+0x0/0x3c returned 0 after 10 usecs
calling  sysenter_setup+0x0/0x3a3 @ 1
initcall sysenter_setup+0x0/0x3a3 returned 0 after 5 usecs
calling  init_aout_binfmt+0x0/0x40 @ 1
initcall init_aout_binfmt+0x0/0x40 returned 0 after 1 usecs
calling  init_sched_debug_procfs+0x0/0x53 @ 1
initcall init_sched_debug_procfs+0x0/0x53 returned 0 after 31 usecs
calling  proc_schedstat_init+0x0/0x50 @ 1
initcall proc_schedstat_init+0x0/0x50 returned 0 after 22 usecs
calling  proc_execdomains_init+0x0/0x50 @ 1
initcall proc_execdomains_init+0x0/0x50 returned 0 after 21 usecs
calling  ioresources_init+0x0/0x65 @ 1
initcall ioresources_init+0x0/0x65 returned 0 after 40 usecs
calling  uid_cache_init+0x0/0xb5 @ 1
initcall uid_cache_init+0x0/0xb5 returned 0 after 24 usecs
calling  init_posix_timers+0x0/0x1bd @ 1
initcall init_posix_timers+0x0/0x1bd returned 0 after 13 usecs
calling  init_posix_cpu_timers+0x0/0x113 @ 1
initcall init_posix_cpu_timers+0x0/0x113 returned 0 after 1 usecs
calling  nsproxy_cache_init+0x0/0x5b @ 1
initcall nsproxy_cache_init+0x0/0x5b returned 0 after 11 usecs
calling  create_proc_profile+0x0/0x80 @ 1
initcall create_proc_profile+0x0/0x80 returned 0 after 0 usecs
calling  timekeeping_init_device+0x0/0x4d @ 1
Registering sysdev class 'timekeeping'
Registering sys device of class 'timekeeping'
Registering sys device 'timekeeping0'
initcall timekeeping_init_device+0x0/0x4d returned 0 after 11639 usecs
calling  init_clocksource_sysfs+0x0/0x7d @ 1
Registering sysdev class 'clocksource'
Registering sys device of class 'clocksource'
Registering sys device 'clocksource0'
initcall init_clocksource_sysfs+0x0/0x7d returned 0 after 11659 usecs
calling  init_timer_list_procfs+0x0/0x5b @ 1
initcall init_timer_list_procfs+0x0/0x5b returned 0 after 24 usecs
calling  init_tstats_procfs+0x0/0x53 @ 1
initcall init_tstats_procfs+0x0/0x53 returned 0 after 22 usecs
calling  lockdep_proc_init+0x0/0xa5 @ 1
initcall lockdep_proc_init+0x0/0xa5 returned 0 after 84 usecs
calling  futex_init+0x0/0xfb @ 1
initcall futex_init+0x0/0xfb returned 0 after 39 usecs
calling  init_rttest+0x0/0x1a0 @ 1
Registering sysdev class 'rttest'
Registering sys device of class 'rttest'
Registering sys device 'rttest0'
Registering sys device of class 'rttest'
Registering sys device 'rttest1'
Registering sys device of class 'rttest'
Registering sys device 'rttest2'
Registering sys device of class 'rttest'
Registering sys device 'rttest3'
Registering sys device of class 'rttest'
Registering sys device 'rttest4'
Registering sys device of class 'rttest'
Registering sys device 'rttest5'
Registering sys device of class 'rttest'
Registering sys device 'rttest6'
Registering sys device of class 'rttest'
Registering sys device 'rttest7'
Initializing RT-Tester: OK
initcall init_rttest+0x0/0x1a0 returned 0 after 63140 usecs
calling  proc_dma_init+0x0/0x50 @ 1
initcall proc_dma_init+0x0/0x50 returned 0 after 24 usecs
calling  kallsyms_init+0x0/0x50 @ 1
initcall kallsyms_init+0x0/0x50 returned 0 after 25 usecs
calling  snapshot_device_init+0x0/0x40 @ 1
device: 'snapshot': device_add
PM: Adding info for No Bus:snapshot
initcall snapshot_device_init+0x0/0x40 returned 0 after 6462 usecs
calling  crash_save_vmcoreinfo_init+0x0/0x4d2 @ 1
initcall crash_save_vmcoreinfo_init+0x0/0x4d2 returned 0 after 21 usecs
calling  crash_notes_memory_init+0x0/0x63 @ 1
initcall crash_notes_memory_init+0x0/0x63 returned 0 after 7 usecs
calling  pid_namespaces_init+0x0/0x54 @ 1
initcall pid_namespaces_init+0x0/0x54 returned 0 after 13 usecs
calling  ikconfig_init+0x0/0x60 @ 1
initcall ikconfig_init+0x0/0x60 returned 0 after 22 usecs
calling  audit_init+0x0/0x191 @ 1
audit: initializing netlink socket (disabled)
type=2000 audit(1254304040.465:1): initialized
initcall audit_init+0x0/0x191 returned 0 after 8293 usecs
calling  audit_tree_init+0x0/0x77 @ 1
initcall audit_tree_init+0x0/0x77 returned 0 after 9 usecs
calling  rcu_torture_init+0x0/0x6c0 @ 1
rcu-torture:--- Start of test: nreaders=2 nfakewriters=4 stat_interval=0 verbose=0 test_no_idle_hz=0 shuffle_interval=3 stutter=5 irqreader=1
initcall rcu_torture_init+0x0/0x6c0 returned 0 after 13069 usecs
calling  utsname_sysctl_init+0x0/0x40 @ 1
initcall utsname_sysctl_init+0x0/0x40 returned 0 after 11 usecs
calling  init_lstats_procfs+0x0/0x4d @ 1
initcall init_lstats_procfs+0x0/0x4d returned 0 after 23 usecs
calling  perf_event_sysfs_init+0x0/0x45 @ 1
initcall perf_event_sysfs_init+0x0/0x45 returned 0 after 36 usecs
calling  init_per_zone_wmark_min+0x0/0x9c @ 1
initcall init_per_zone_wmark_min+0x0/0x9c returned 0 after 31 usecs
calling  kswapd_init+0x0/0x45 @ 1
initcall kswapd_init+0x0/0x45 returned 0 after 2157 usecs
calling  setup_vmstat+0x0/0xa5 @ 1
initcall setup_vmstat+0x0/0xa5 returned 0 after 85 usecs
calling  mm_sysfs_init+0x0/0x50 @ 1
initcall mm_sysfs_init+0x0/0x50 returned 0 after 37 usecs
calling  proc_vmalloc_init+0x0/0x50 @ 1
initcall proc_vmalloc_init+0x0/0x50 returned 0 after 22 usecs
calling  procswaps_init+0x0/0x53 @ 1
initcall procswaps_init+0x0/0x53 returned 0 after 21 usecs
calling  ksm_init+0x0/0x180 @ 1
initcall ksm_init+0x0/0x180 returned 0 after 250 usecs
calling  slab_proc_init+0x0/0x50 @ 1
initcall slab_proc_init+0x0/0x50 returned 0 after 24 usecs
calling  slab_sysfs_init+0x0/0x123 @ 1
initcall slab_sysfs_init+0x0/0x123 returned 0 after 85301 usecs
calling  pfn_inject_init+0x0/0xa0 @ 1
initcall pfn_inject_init+0x0/0xa0 returned 0 after 48 usecs
calling  kmemleak_test_init+0x0/0x2ce @ 1
Kmemleak testing
kmemleak: kmalloc(32) = ffff88003ebb89c0
kmemleak: kmalloc(32) = ffff88003ebb8a28
kmemleak: kmalloc(1024) = ffff88003f25ef50
kmemleak: kmalloc(1024) = ffff88003f25f398
kmemleak: kmalloc(2048) = ffff88003f2739f8
kmemleak: kmalloc(2048) = ffff88003f274240
kmemleak: kmalloc(4096) = ffff88003eb51048
kmemleak: kmalloc(4096) = ffff88003eb52090
kmemleak: kmem_cache_alloc(files_cachep) = ffff88003fab6300
kmemleak: kmem_cache_alloc(files_cachep) = ffff88003fab6900
kmemleak: vmalloc(64) = ffffc90000020000
kmemleak: vmalloc(64) = ffffc90000023000
kmemleak: vmalloc(64) = ffffc90000026000
kmemleak: vmalloc(64) = ffffc90000029000
kmemleak: vmalloc(64) = ffffc9000002c000
kmemleak: kmalloc(sizeof(*elem)) = ffff88003eb59918
kmemleak: kmalloc(sizeof(*elem)) = ffff88003eb59b60
kmemleak: kmalloc(sizeof(*elem)) = ffff88003eb59da8
kmemleak: kmalloc(sizeof(*elem)) = ffff88003ee14000
kmemleak: kmalloc(sizeof(*elem)) = ffff88003ee14248
kmemleak: kmalloc(sizeof(*elem)) = ffff88003ee14490
kmemleak: kmalloc(sizeof(*elem)) = ffff88003ee146d8
kmemleak: kmalloc(sizeof(*elem)) = ffff88003ee14920
kmemleak: kmalloc(sizeof(*elem)) = ffff88003ee14b68
kmemleak: kmalloc(sizeof(*elem)) = ffff88003ee14db0
kmemleak: kmalloc(129) = ffff88003f223318
initcall kmemleak_test_init+0x0/0x2ce returned 0 after 109704 usecs
calling  fasync_init+0x0/0x57 @ 1
initcall fasync_init+0x0/0x57 returned 0 after 1089 usecs
calling  proc_filesystems_init+0x0/0x4d @ 1
initcall proc_filesystems_init+0x0/0x4d returned 0 after 31 usecs
calling  inotify_setup+0x0/0x37 @ 1
initcall inotify_setup+0x0/0x37 returned 0 after 0 usecs
calling  inotify_user_setup+0x0/0xed @ 1
initcall inotify_user_setup+0x0/0xed returned 0 after 1728 usecs
calling  aio_setup+0x0/0xd0 @ 1
initcall aio_setup+0x0/0xd0 returned 0 after 1821 usecs
calling  proc_locks_init+0x0/0x4d @ 1
initcall proc_locks_init+0x0/0x4d returned 0 after 25 usecs
calling  init_sys32_ioctl+0x0/0xb5 @ 1
initcall init_sys32_ioctl+0x0/0xb5 returned 0 after 16 usecs
calling  init_mbcache+0x0/0x40 @ 1
initcall init_mbcache+0x0/0x40 returned 0 after 3 usecs
calling  dquot_init+0x0/0x140 @ 1
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
initcall dquot_init+0x0/0x140 returned 0 after 8607 usecs
calling  init_v1_quota_format+0x0/0x40 @ 1
initcall init_v1_quota_format+0x0/0x40 returned 0 after 20 usecs
calling  proc_cmdline_init+0x0/0x50 @ 1
initcall proc_cmdline_init+0x0/0x50 returned 0 after 25 usecs
calling  proc_cpuinfo_init+0x0/0x50 @ 1
initcall proc_cpuinfo_init+0x0/0x50 returned 0 after 22 usecs
calling  proc_devices_init+0x0/0x50 @ 1
initcall proc_devices_init+0x0/0x50 returned 0 after 22 usecs
calling  proc_interrupts_init+0x0/0x50 @ 1
initcall proc_interrupts_init+0x0/0x50 returned 0 after 22 usecs
calling  proc_loadavg_init+0x0/0x50 @ 1
initcall proc_loadavg_init+0x0/0x50 returned 0 after 23 usecs
calling  proc_meminfo_init+0x0/0x50 @ 1
initcall proc_meminfo_init+0x0/0x50 returned 0 after 22 usecs
calling  proc_stat_init+0x0/0x50 @ 1
initcall proc_stat_init+0x0/0x50 returned 0 after 23 usecs
calling  proc_uptime_init+0x0/0x50 @ 1
initcall proc_uptime_init+0x0/0x50 returned 0 after 27 usecs
calling  proc_version_init+0x0/0x50 @ 1
initcall proc_version_init+0x0/0x50 returned 0 after 22 usecs
calling  proc_softirqs_init+0x0/0x4d @ 1
initcall proc_softirqs_init+0x0/0x4d returned 0 after 22 usecs
calling  proc_kcore_init+0x0/0xc0 @ 1
initcall proc_kcore_init+0x0/0xc0 returned 0 after 65 usecs
calling  proc_kmsg_init+0x0/0x50 @ 1
initcall proc_kmsg_init+0x0/0x50 returned 0 after 27 usecs
calling  proc_page_init+0x0/0x70 @ 1
initcall proc_page_init+0x0/0x70 returned 0 after 43 usecs
calling  configfs_init+0x0/0xf9 @ 1
initcall configfs_init+0x0/0xf9 returned 0 after 813 usecs
calling  init_devpts_fs+0x0/0x7a @ 1
initcall init_devpts_fs+0x0/0x7a returned 0 after 254 usecs
calling  init_dlm+0x0/0xd6 @ 1
device: 'dlm-control': device_add
PM: Adding info for No Bus:dlm-control
device: 'dlm-monitor': device_add
PM: Adding info for No Bus:dlm-monitor
device: 'dlm_plock': device_add
PM: Adding info for No Bus:dlm_plock
DLM (built Sep 30 2009 11:54:39) installed
initcall init_dlm+0x0/0xd6 returned 0 after 26082 usecs
calling  init_reiserfs_fs+0x0/0xb8 @ 1
initcall init_reiserfs_fs+0x0/0xb8 returned 0 after 817 usecs
calling  init_ext3_fs+0x0/0x95 @ 1
initcall init_ext3_fs+0x0/0x95 returned 0 after 1679 usecs
calling  init_ext2_fs+0x0/0x95 @ 1
initcall init_ext2_fs+0x0/0x95 returned 0 after 1724 usecs
calling  journal_init+0x0/0xd3 @ 1
initcall journal_init+0x0/0xd3 returned 0 after 3139 usecs
calling  journal_init+0x0/0xe3 @ 1
initcall journal_init+0x0/0xe3 returned 0 after 3684 usecs
calling  init_ramfs_fs+0x0/0x3d @ 1
initcall init_ramfs_fs+0x0/0x3d returned 0 after 3 usecs
calling  init_nls_cp775+0x0/0x40 @ 1
initcall init_nls_cp775+0x0/0x40 returned 0 after 31 usecs
calling  init_nls_cp850+0x0/0x40 @ 1
initcall init_nls_cp850+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp852+0x0/0x40 @ 1
initcall init_nls_cp852+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp855+0x0/0x40 @ 1
initcall init_nls_cp855+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp862+0x0/0x40 @ 1
initcall init_nls_cp862+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp863+0x0/0x40 @ 1
initcall init_nls_cp863+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp864+0x0/0x40 @ 1
initcall init_nls_cp864+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp865+0x0/0x40 @ 1
initcall init_nls_cp865+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp869+0x0/0x40 @ 1
initcall init_nls_cp869+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp874+0x0/0x40 @ 1
initcall init_nls_cp874+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp932+0x0/0x40 @ 1
initcall init_nls_cp932+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_euc_jp+0x0/0x80 @ 1
initcall init_nls_euc_jp+0x0/0x80 returned 0 after 1 usecs
calling  init_nls_cp936+0x0/0x40 @ 1
initcall init_nls_cp936+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp949+0x0/0x40 @ 1
initcall init_nls_cp949+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp950+0x0/0x40 @ 1
initcall init_nls_cp950+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp1251+0x0/0x40 @ 1
initcall init_nls_cp1251+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_ascii+0x0/0x40 @ 1
initcall init_nls_ascii+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_iso8859_1+0x0/0x40 @ 1
initcall init_nls_iso8859_1+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_iso8859_3+0x0/0x40 @ 1
initcall init_nls_iso8859_3+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_iso8859_4+0x0/0x40 @ 1
initcall init_nls_iso8859_4+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_iso8859_5+0x0/0x40 @ 1
initcall init_nls_iso8859_5+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_iso8859_7+0x0/0x40 @ 1
initcall init_nls_iso8859_7+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_cp1255+0x0/0x40 @ 1
initcall init_nls_cp1255+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_iso8859_15+0x0/0x40 @ 1
initcall init_nls_iso8859_15+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_koi8_r+0x0/0x40 @ 1
initcall init_nls_koi8_r+0x0/0x40 returned 0 after 1 usecs
calling  init_nls_utf8+0x0/0x4d @ 1
initcall init_nls_utf8+0x0/0x4d returned 0 after 1 usecs
calling  init_ntfs_fs+0x0/0x273 @ 1
NTFS driver 2.1.29 [Flags: R/W DEBUG].
initcall init_ntfs_fs+0x0/0x273 returned 0 after 7523 usecs
calling  init_autofs_fs+0x0/0x3d @ 1
initcall init_autofs_fs+0x0/0x3d returned 0 after 2 usecs
calling  init_autofs4_fs+0x0/0x53 @ 1
initcall init_autofs4_fs+0x0/0x53 returned -16 after 1 usecs
initcall init_autofs4_fs+0x0/0x53 returned with error code -16 
calling  fuse_init+0x0/0x190 @ 1
fuse init (API version 7.13)
device: 'fuse': device_add
PM: Adding info for No Bus:fuse
initcall fuse_init+0x0/0x190 returned 0 after 10385 usecs
calling  init_udf_fs+0x0/0x93 @ 1
initcall init_udf_fs+0x0/0x93 returned 0 after 748 usecs
calling  init_jfs_fs+0x0/0x1ff @ 1
JFS: nTxBlock = 7776, nTxLock = 62214
initcall init_jfs_fs+0x0/0x1ff returned 0 after 12330 usecs
calling  init_xfs_fs+0x0/0xe3 @ 1
SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, debug enabled
khelper used greatest stack depth: 4752 bytes left
SGI XFS Quota Management subsystem
initcall init_xfs_fs+0x0/0xe3 returned 0 after 30733 usecs
calling  ocfs2_init+0x0/0x367 @ 1
OCFS2 1.5.0
initcall ocfs2_init+0x0/0x367 returned 0 after 4695 usecs
calling  ocfs2_stack_glue_init+0x0/0xc0 @ 1
initcall ocfs2_stack_glue_init+0x0/0xc0 returned 0 after 75 usecs
calling  o2cb_stack_init+0x0/0x40 @ 1
ocfs2: Registered cluster interface o2cb
initcall o2cb_stack_init+0x0/0x40 returned 0 after 3623 usecs
calling  ocfs2_user_plugin_init+0x0/0x90 @ 1
device: 'ocfs2_control': device_add
PM: Adding info for No Bus:ocfs2_control
ocfs2: Registered cluster interface user
initcall ocfs2_user_plugin_init+0x0/0x90 returned 0 after 11075 usecs
calling  init_o2nm+0x0/0xe0 @ 1
OCFS2 Node Manager 1.5.0
initcall init_o2nm+0x0/0xe0 returned 0 after 8930 usecs
calling  dlm_init+0x0/0x29c @ 1
OCFS2 DLM 1.5.0
initcall dlm_init+0x0/0x29c returned 0 after 5014 usecs
calling  init_dlmfs_fs+0x0/0x114 @ 1
OCFS2 DLMFS 1.5.0
OCFS2 User DLM kernel interface loaded
initcall init_dlmfs_fs+0x0/0x114 returned 0 after 6276 usecs
calling  init_btrfs_fs+0x0/0xdc @ 1
device: 'btrfs-control': device_add
PM: Adding info for No Bus:btrfs-control
Btrfs loaded
initcall init_btrfs_fs+0x0/0xdc returned 0 after 14943 usecs
calling  init_gfs2_fs+0x0/0x230 @ 1
Slow work thread pool: Starting up
Slow work thread pool: Ready
GFS2 (built Sep 30 2009 11:54:51) installed
initcall init_gfs2_fs+0x0/0x230 returned 0 after 15081 usecs
calling  ipc_init+0x0/0x4d @ 1
msgmni has been set to 1944
initcall ipc_init+0x0/0x4d returned 0 after 2625 usecs
calling  ipc_sysctl_init+0x0/0x3d @ 1
initcall ipc_sysctl_init+0x0/0x3d returned 0 after 13 usecs
calling  init_mqueue_fs+0x0/0xf3 @ 1
initcall init_mqueue_fs+0x0/0xf3 returned 0 after 1069 usecs
calling  key_proc_init+0x0/0x5a @ 1
initcall key_proc_init+0x0/0x5a returned 0 after 25 usecs
calling  crypto_wq_init+0x0/0x60 @ 1
initcall crypto_wq_init+0x0/0x60 returned 0 after 106 usecs
calling  crypto_algapi_init+0x0/0x40 @ 1
initcall crypto_algapi_init+0x0/0x40 returned 0 after 25 usecs
calling  skcipher_module_init+0x0/0x43 @ 1
initcall skcipher_module_init+0x0/0x43 returned 0 after 0 usecs
calling  chainiv_module_init+0x0/0x40 @ 1
initcall chainiv_module_init+0x0/0x40 returned 0 after 6 usecs
calling  eseqiv_module_init+0x0/0x40 @ 1
initcall eseqiv_module_init+0x0/0x40 returned 0 after 3 usecs
calling  seqiv_module_init+0x0/0x40 @ 1
initcall seqiv_module_init+0x0/0x40 returned 0 after 3 usecs
calling  hmac_module_init+0x0/0x40 @ 1
initcall hmac_module_init+0x0/0x40 returned 0 after 3 usecs
calling  vmac_module_init+0x0/0x3d @ 1
initcall vmac_module_init+0x0/0x3d returned 0 after 3 usecs
calling  crypto_null_mod_init+0x0/0xa3 @ 1
alg: No test for cipher_null (cipher_null-generic)
alg: No test for ecb(cipher_null) (ecb-cipher_null)
alg: No test for digest_null (digest_null-generic)
alg: No test for compress_null (compress_null-generic)
initcall crypto_null_mod_init+0x0/0xa3 returned 0 after 19117 usecs
calling  md4_mod_init+0x0/0x40 @ 1
initcall md4_mod_init+0x0/0x40 returned 0 after 214 usecs
calling  md5_mod_init+0x0/0x40 @ 1
initcall md5_mod_init+0x0/0x40 returned 0 after 204 usecs
calling  rmd128_mod_init+0x0/0x40 @ 1
initcall rmd128_mod_init+0x0/0x40 returned 0 after 208 usecs
calling  rmd160_mod_init+0x0/0x40 @ 1
initcall rmd160_mod_init+0x0/0x40 returned 0 after 216 usecs
calling  rmd256_mod_init+0x0/0x40 @ 1
initcall rmd256_mod_init+0x0/0x40 returned 0 after 213 usecs
calling  sha1_generic_mod_init+0x0/0x3d @ 1
initcall sha1_generic_mod_init+0x0/0x3d returned 0 after 202 usecs
calling  sha512_generic_mod_init+0x0/0x73 @ 1
initcall sha512_generic_mod_init+0x0/0x73 returned 0 after 412 usecs
calling  wp512_mod_init+0x0/0xa0 @ 1
initcall wp512_mod_init+0x0/0xa0 returned 0 after 710 usecs
calling  crypto_cbc_module_init+0x0/0x40 @ 1
initcall crypto_cbc_module_init+0x0/0x40 returned 0 after 3 usecs
calling  crypto_pcbc_module_init+0x0/0x40 @ 1
initcall crypto_pcbc_module_init+0x0/0x40 returned 0 after 3 usecs
calling  crypto_cts_module_init+0x0/0x40 @ 1
initcall crypto_cts_module_init+0x0/0x40 returned 0 after 3 usecs
calling  crypto_module_init+0x0/0x3d @ 1
initcall crypto_module_init+0x0/0x3d returned 0 after 3 usecs
calling  crypto_ctr_module_init+0x0/0x67 @ 1
initcall crypto_ctr_module_init+0x0/0x67 returned 0 after 5 usecs
calling  crypto_gcm_module_init+0x0/0xb1 @ 1
initcall crypto_gcm_module_init+0x0/0xb1 returned 0 after 15 usecs
calling  crypto_ccm_module_init+0x0/0x85 @ 1
initcall crypto_ccm_module_init+0x0/0x85 returned 0 after 8 usecs
calling  cryptd_init+0x0/0xcc @ 1
initcall cryptd_init+0x0/0xcc returned 0 after 9 usecs
calling  des_generic_mod_init+0x0/0x6a @ 1
initcall des_generic_mod_init+0x0/0x6a returned 0 after 482 usecs
calling  fcrypt_mod_init+0x0/0x40 @ 1
alg: No test for fcrypt (fcrypt-generic)
initcall fcrypt_mod_init+0x0/0x40 returned 0 after 3869 usecs
calling  blowfish_mod_init+0x0/0x3d @ 1
initcall blowfish_mod_init+0x0/0x3d returned 0 after 882 usecs
calling  serpent_mod_init+0x0/0x73 @ 1
initcall serpent_mod_init+0x0/0x73 returned 0 after 490 usecs
calling  aes_init+0x0/0x40 @ 1
initcall aes_init+0x0/0x40 returned 0 after 252 usecs
calling  cast6_mod_init+0x0/0x40 @ 1
initcall cast6_mod_init+0x0/0x40 returned 0 after 224 usecs
calling  arc4_init+0x0/0x40 @ 1
initcall arc4_init+0x0/0x40 returned 0 after 220 usecs
calling  tea_mod_init+0x0/0xa0 @ 1
initcall tea_mod_init+0x0/0xa0 returned 0 after 764 usecs
calling  khazad_mod_init+0x0/0x40 @ 1
initcall khazad_mod_init+0x0/0x40 returned 0 after 289 usecs
calling  anubis_mod_init+0x0/0x40 @ 1
initcall anubis_mod_init+0x0/0x40 returned 0 after 277 usecs
calling  salsa20_generic_mod_init+0x0/0x40 @ 1
initcall salsa20_generic_mod_init+0x0/0x40 returned 0 after 152 usecs
calling  deflate_mod_init+0x0/0x40 @ 1
initcall deflate_mod_init+0x0/0x40 returned 0 after 653 usecs
calling  crc32c_mod_init+0x0/0x40 @ 1
initcall crc32c_mod_init+0x0/0x40 returned 0 after 308 usecs
calling  crypto_authenc_module_init+0x0/0x40 @ 1
initcall crypto_authenc_module_init+0x0/0x40 returned 0 after 4 usecs
calling  krng_mod_init+0x0/0x40 @ 1
alg: No test for stdrng (krng)
initcall krng_mod_init+0x0/0x40 returned 0 after 2996 usecs
calling  prng_mod_init+0x0/0x40 @ 1
initcall prng_mod_init+0x0/0x40 returned 0 after 9996 usecs
calling  ghash_mod_init+0x0/0x40 @ 1
alg: No test for ghash (ghash-generic)
initcall ghash_mod_init+0x0/0x40 returned 0 after 3657 usecs
calling  proc_genhd_init+0x0/0x65 @ 1
initcall proc_genhd_init+0x0/0x65 returned 0 after 53 usecs
calling  noop_init+0x0/0x40 @ 1
io scheduler noop registered
initcall noop_init+0x0/0x40 returned 0 after 2623 usecs
calling  as_init+0x0/0x40 @ 1
io scheduler anticipatory registered (default)
initcall as_init+0x0/0x40 returned 0 after 4130 usecs
calling  deadline_init+0x0/0x40 @ 1
io scheduler deadline registered
initcall deadline_init+0x0/0x40 returned 0 after 2944 usecs
calling  cfq_init+0x0/0xcd @ 1
io scheduler cfq registered
initcall cfq_init+0x0/0xcd returned 0 after 4641 usecs
calling  debug_objects_init_debugfs+0x0/0x91 @ 1
initcall debug_objects_init_debugfs+0x0/0x91 returned 0 after 51 usecs
calling  libcrc32c_mod_init+0x0/0x53 @ 1
initcall libcrc32c_mod_init+0x0/0x53 returned 0 after 11 usecs
calling  init_kmp+0x0/0x40 @ 1
initcall init_kmp+0x0/0x40 returned 0 after 16 usecs
calling  init_bm+0x0/0x40 @ 1
initcall init_bm+0x0/0x40 returned 0 after 1 usecs
calling  init_fsm+0x0/0x40 @ 1
initcall init_fsm+0x0/0x40 returned 0 after 1 usecs
calling  dynamic_debug_init+0x0/0x180 @ 1
initcall dynamic_debug_init+0x0/0x180 returned 0 after 2487 usecs
calling  pci_init+0x0/0x6c @ 1
agpgart-amd64 0000:00:00.0: calling via_no_dac+0x0/0x7d
agpgart-amd64 0000:00:00.0: calling quirk_cardbus_legacy+0x0/0x60
agpgart-amd64 0000:00:00.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:01.0: calling via_no_dac+0x0/0x7d
pci 0000:00:01.0: disabling DAC on VIA PCI bridge
pci 0000:00:01.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:01.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:07.0: calling via_no_dac+0x0/0x7d
pci 0000:00:07.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:07.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:0a.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:0a.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:0d.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:0d.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:0d.1: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:0d.1: calling pci_fixup_video+0x0/0xf1
pci 0000:00:0f.0: calling via_no_dac+0x0/0x7d
pci 0000:00:0f.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:0f.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:0f.1: calling via_no_dac+0x0/0x7d
pci 0000:00:0f.1: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:0f.1: calling pci_fixup_video+0x0/0xf1
pci 0000:00:10.0: calling via_no_dac+0x0/0x7d
pci 0000:00:10.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:10.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:10.1: calling via_no_dac+0x0/0x7d
pci 0000:00:10.1: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:10.1: calling pci_fixup_video+0x0/0xf1
pci 0000:00:10.2: calling via_no_dac+0x0/0x7d
pci 0000:00:10.2: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:10.2: calling pci_fixup_video+0x0/0xf1
pci 0000:00:10.3: calling via_no_dac+0x0/0x7d
pci 0000:00:10.3: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:10.3: calling pci_fixup_video+0x0/0xf1
pci 0000:00:10.4: calling via_no_dac+0x0/0x7d
pci 0000:00:10.4: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:10.4: calling pci_fixup_video+0x0/0xf1
pci 0000:00:11.0: calling via_no_dac+0x0/0x7d
pci 0000:00:11.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:11.0: calling quirk_via_vt8237_bypass_apic_deassert+0x0/0xb0
pci 0000:00:11.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:11.5: calling via_no_dac+0x0/0x7d
pci 0000:00:11.5: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:11.5: calling pci_fixup_video+0x0/0xf1
pci 0000:00:11.6: calling via_no_dac+0x0/0x7d
pci 0000:00:11.6: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:11.6: calling pci_fixup_video+0x0/0xf1
pci 0000:00:18.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:18.0: calling pci_fixup_video+0x0/0xf1
pci 0000:00:18.1: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:18.1: calling pci_fixup_video+0x0/0xf1
pci 0000:00:18.2: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:18.2: calling pci_fixup_video+0x0/0xf1
pci 0000:00:18.3: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:00:18.3: calling pci_fixup_video+0x0/0xf1
pci 0000:01:00.0: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:01:00.0: calling pci_fixup_video+0x0/0xf1
pci 0000:01:00.0: Boot video device
pci 0000:01:00.1: calling quirk_cardbus_legacy+0x0/0x60
pci 0000:01:00.1: calling pci_fixup_video+0x0/0xf1
initcall pci_init+0x0/0x6c returned 0 after 275374 usecs
calling  pci_proc_init+0x0/0x93 @ 1
initcall pci_proc_init+0x0/0x93 returned 0 after 871 usecs
calling  pcie_portdrv_init+0x0/0x81 @ 1
bus: 'pci_express': registered
bus: 'pci': add driver pcieport-driver
bus: 'pci': driver_probe_device: matched device 0000:00:01.0 with driver pcieport-driver
bus: 'pci': really_probe: probing driver pcieport-driver with device 0000:00:01.0
pci 0000:00:01.0: __pm_runtime_idle()!
pci 0000:00:01.0: __pm_runtime_idle() returns -11!
initcall pcie_portdrv_init+0x0/0x81 returned 0 after 30192 usecs
calling  aer_service_init+0x0/0x60 @ 1
bus: 'pci_express': add driver aer
initcall aer_service_init+0x0/0x60 returned 0 after 3499 usecs
calling  aer_inject_init+0x0/0x40 @ 1
device: 'aer_inject': device_add
PM: Adding info for No Bus:aer_inject
initcall aer_inject_init+0x0/0x40 returned 0 after 6800 usecs
calling  pci_hotplug_init+0x0/0x74 @ 1
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
initcall pci_hotplug_init+0x0/0x74 returned 0 after 4213 usecs
calling  pcied_init+0x0/0xb0 @ 1
bus: 'pci_express': add driver pciehp_dummy
bus: 'pci_express': remove driver pciehp_dummy
driver: 'pciehp_dummy': driver_release
bus: 'pci_express': add driver pciehp
pciehp: PCI Express Hot Plug Controller Driver version: 0.4
initcall pcied_init+0x0/0xb0 returned 0 after 21614 usecs
calling  acpiphp_init+0x0/0x90 @ 1
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
initcall acpiphp_init+0x0/0x90 returned -19 after 7050 usecs
calling  zt5550_init+0x0/0xa5 @ 1
cpcihp_zt5550: ZT5550 CompactPCI Hot Plug Driver version: 0.2
bus: 'pci': add driver zt5550_hc
initcall zt5550_init+0x0/0xa5 returned 0 after 8777 usecs
calling  shpcd_init+0x0/0x8b @ 1
bus: 'pci': add driver shpchp
bus: 'pci': driver_probe_device: matched device 0000:00:01.0 with driver shpchp
bus: 'pci': really_probe: probing driver shpchp with device 0000:00:01.0
pci 0000:00:01.0: __pm_runtime_idle()!
pci 0000:00:01.0: __pm_runtime_idle() returns -11!
shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
initcall shpcd_init+0x0/0x8b returned 0 after 29903 usecs
calling  init_legacy+0x0/0x6b @ 1
initcall init_legacy+0x0/0x6b returned 0 after 1116 usecs
calling  pci_stub_init+0x0/0x168 @ 1
bus: 'pci': add driver pci-stub
pci-stub: invalid id string ""
initcall pci_stub_init+0x0/0x168 returned 0 after 6186 usecs
calling  fb_console_init+0x0/0x15e @ 1
device: 'fbcon': device_add
PM: Adding info for No Bus:fbcon
initcall fb_console_init+0x0/0x15e returned 0 after 6124 usecs
calling  platform_lcd_init+0x0/0x40 @ 1
bus: 'platform': add driver platform-lcd
initcall platform_lcd_init+0x0/0x40 returned 0 after 4010 usecs
calling  tdo24m_init+0x0/0x3d @ 1
bus: 'spi': add driver tdo24m
initcall tdo24m_init+0x0/0x3d returned 0 after 3074 usecs
calling  genericbl_init+0x0/0x40 @ 1
bus: 'platform': add driver generic-bl
initcall genericbl_init+0x0/0x40 returned 0 after 3831 usecs
calling  mbp_init+0x0/0x130 @ 1
initcall mbp_init+0x0/0x130 returned -19 after 3 usecs
calling  kb3886_init+0x0/0x70 @ 1
initcall kb3886_init+0x0/0x70 returned -19 after 1 usecs
calling  wm831x_backlight_init+0x0/0x3d @ 1
bus: 'platform': add driver wm831x-backlight
initcall wm831x_backlight_init+0x0/0x3d returned 0 after 4347 usecs
calling  display_class_init+0x0/0xa5 @ 1
device class 'display': registering
initcall display_class_init+0x0/0xa5 returned 0 after 3573 usecs
calling  arcfb_init+0x0/0x9d @ 1
initcall arcfb_init+0x0/0x9d returned -6 after 0 usecs
initcall arcfb_init+0x0/0x9d returned with error code -6 
calling  pm2fb_init+0x0/0x155 @ 1
bus: 'pci': add driver pm2fb
initcall pm2fb_init+0x0/0x155 returned 0 after 3035 usecs
calling  pm3fb_init+0x0/0x114 @ 1
bus: 'pci': add driver pm3fb
initcall pm3fb_init+0x0/0x114 returned 0 after 3026 usecs
calling  rivafb_init+0x0/0x1aa @ 1
bus: 'pci': add driver rivafb
initcall rivafb_init+0x0/0x1aa returned 0 after 3122 usecs
calling  nvidiafb_init+0x0/0x29b @ 1
bus: 'pci': add driver nvidiafb
initcall nvidiafb_init+0x0/0x29b returned 0 after 3286 usecs
calling  atyfb_init+0x0/0x215 @ 1
bus: 'pci': add driver atyfb
initcall atyfb_init+0x0/0x215 returned 0 after 3169 usecs
calling  aty128fb_init+0x0/0x14e @ 1
bus: 'pci': add driver aty128fb
initcall aty128fb_init+0x0/0x14e returned 0 after 3319 usecs
calling  sisfb_init+0x0/0x848 @ 1
bus: 'pci': add driver sisfb
initcall sisfb_init+0x0/0x848 returned 0 after 3058 usecs
calling  viafb_init+0x0/0x41a @ 1
VIA Graphics Intergration Chipset framebuffer 2.4 initializing
bus: 'pci': add driver viafb
initcall viafb_init+0x0/0x41a returned 0 after 8509 usecs
calling  savagefb_init+0x0/0x9d @ 1
bus: 'pci': add driver savagefb
initcall savagefb_init+0x0/0x9d returned 0 after 3291 usecs
calling  neofb_init+0x0/0x16e @ 1
bus: 'pci': add driver neofb
initcall neofb_init+0x0/0x16e returned 0 after 3028 usecs
calling  vt8623fb_init+0x0/0xa8 @ 1
bus: 'pci': add driver vt8623fb
initcall vt8623fb_init+0x0/0xa8 returned 0 after 3277 usecs
calling  tridentfb_init+0x0/0x21d @ 1
bus: 'pci': add driver tridentfb
initcall tridentfb_init+0x0/0x21d returned 0 after 3368 usecs
calling  vmlfb_init+0x0/0xc6 @ 1
vmlfb: initializing
bus: 'pci': add driver vmlfb
initcall vmlfb_init+0x0/0xc6 returned 0 after 4873 usecs
calling  s3fb_init+0x0/0x111 @ 1
bus: 'pci': add driver s3fb
initcall s3fb_init+0x0/0x111 returned 0 after 2941 usecs
calling  arkfb_init+0x0/0xa7 @ 1
bus: 'pci': add driver arkfb
initcall arkfb_init+0x0/0xa7 returned 0 after 3133 usecs
calling  sstfb_init+0x0/0x1ee @ 1
bus: 'pci': add driver sstfb
initcall sstfb_init+0x0/0x1ee returned 0 after 3032 usecs
calling  tmiofb_init+0x0/0x92 @ 1
bus: 'platform': add driver tmio-fb
initcall tmiofb_init+0x0/0x92 returned 0 after 3597 usecs
calling  broadsheetfb_init+0x0/0x40 @ 1
bus: 'platform': add driver broadsheetfb
initcall broadsheetfb_init+0x0/0x40 returned 0 after 4013 usecs
calling  s1d13xxxfb_init+0x0/0x60 @ 1
bus: 'platform': add driver s1d13xxxfb
initcall s1d13xxxfb_init+0x0/0x60 returned 0 after 3833 usecs
calling  sm501fb_init+0x0/0x3d @ 1
bus: 'platform': add driver sm501-fb
initcall sm501fb_init+0x0/0x3d returned 0 after 3669 usecs
calling  mb862xxfb_init+0x0/0x32 @ 1
initcall mb862xxfb_init+0x0/0x32 returned -19 after 0 usecs
calling  acpi_reserve_resources+0x0/0x112 @ 1
initcall acpi_reserve_resources+0x0/0x112 returned 0 after 26 usecs
calling  irqrouter_init_sysfs+0x0/0x5f @ 1
Registering sysdev class 'irqrouter'
Registering sys device of class 'irqrouter'
Registering sys device 'irqrouter0'
initcall irqrouter_init_sysfs+0x0/0x5f returned 0 after 11173 usecs
calling  acpi_ac_init+0x0/0x4f @ 1
bus: 'acpi': add driver ac
initcall acpi_ac_init+0x0/0x4f returned 0 after 2851 usecs
calling  acpi_button_init+0x0/0x7d @ 1
bus: 'acpi': add driver button
bus: 'acpi': driver_probe_device: matched device PNP0C0C:00 with driver button
bus: 'acpi': really_probe: probing driver button with device PNP0C0C:00
device: 'input0': device_add
PM: Adding info for No Bus:input0
input: Power Button as /class/input/input0
ACPI: Power Button [PWRB]
driver: 'PNP0C0C:00': driver_bound: bound to device 'button'
bus: 'acpi': really_probe: bound device PNP0C0C:00 to driver button
button PNP0C0C:00: __pm_runtime_idle()!
button PNP0C0C:00: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device PNP0C0E:00 with driver button
bus: 'acpi': really_probe: probing driver button with device PNP0C0E:00
device: 'input1': device_add
PM: Adding info for No Bus:input1
input: Sleep Button as /class/input/input1
ACPI: Sleep Button [SLPB]
driver: 'PNP0C0E:00': driver_bound: bound to device 'button'
bus: 'acpi': really_probe: bound device PNP0C0E:00 to driver button
button PNP0C0E:00: __pm_runtime_idle()!
button PNP0C0E:00: __pm_runtime_idle() returns -11!
bus: 'acpi': driver_probe_device: matched device LNXPWRBN:00 with driver button
bus: 'acpi': really_probe: probing driver button with device LNXPWRBN:00
device: 'input2': device_add
PM: Adding info for No Bus:input2
input: Power Button as /class/input/input2
ACPI: Power Button [PWRF]
driver: 'LNXPWRBN:00': driver_bound: bound to device 'button'
bus: 'acpi': really_probe: bound device LNXPWRBN:00 to driver button
button LNXPWRBN:00: __pm_runtime_idle()!
button LNXPWRBN:00: __pm_runtime_idle() returns -11!
initcall acpi_button_init+0x0/0x7d returned 0 after 139266 usecs
calling  acpi_video_init+0x0/0x3e @ 1
bus: 'acpi': add driver video
initcall acpi_video_init+0x0/0x3e returned 0 after 3130 usecs
calling  acpi_pci_slot_init+0x0/0x47 @ 1
initcall acpi_pci_slot_init+0x0/0x47 returned 0 after 2189 usecs
calling  acpi_processor_init+0x0/0x95 @ 1
bus: 'acpi': add driver processor
bus: 'acpi': driver_probe_device: matched device LNXCPU:00 with driver processor
bus: 'acpi': really_probe: probing driver processor with device LNXCPU:00
ACPI: processor limited to max C-state 1
device: 'cooling_device0': device_add
PM: Adding info for No Bus:cooling_device0
processor LNXCPU:00: registered as cooling_device0
driver: 'LNXCPU:00': driver_bound: bound to device 'processor'
bus: 'acpi': really_probe: bound device LNXCPU:00 to driver processor
processor LNXCPU:00: __pm_runtime_idle()!
processor LNXCPU:00: __pm_runtime_idle() returns -11!
initcall acpi_processor_init+0x0/0x95 returned 0 after 53318 usecs
calling  acpi_container_init+0x0/0x65 @ 1
bus: 'acpi': add driver container
initcall acpi_container_init+0x0/0x65 returned 0 after 70878 usecs
calling  acpi_thermal_init+0x0/0xa2 @ 1
bus: 'acpi': add driver thermal
bus: 'acpi': driver_probe_device: matched device LNXTHERM:00 with driver thermal
bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:00
acpi LNXTHERM:00: __pm_runtime_idle()!
acpi LNXTHERM:00: __pm_runtime_idle() returns -11!
initcall acpi_thermal_init+0x0/0xa2 returned 0 after 24815 usecs
calling  acpi_battery_init+0x0/0x3d @ 1
initcall acpi_battery_init+0x0/0x3d returned 0 after 45 usecs
calling  acpi_smb_hc_init+0x0/0x3f @ 1
bus: 'acpi': add driver smbus_hc
calling  1_acpi_battery_init_async+0x0/0x42 @ 926
bus: 'acpi': add driver battery
initcall 1_acpi_battery_init_async+0x0/0x42 returned 0 after 3256 usecs
initcall acpi_smb_hc_init+0x0/0x3f returned 0 after 17600 usecs
calling  acpi_sbs_init+0x0/0x4f @ 1
bus: 'acpi': add driver sbs
initcall acpi_sbs_init+0x0/0x4f returned 0 after 2931 usecs
calling  acpi_power_meter_init+0x0/0x5c @ 1
bus: 'acpi': add driver power_meter
initcall acpi_power_meter_init+0x0/0x5c returned 0 after 3598 usecs
calling  rand_initialize+0x0/0x60 @ 1
initcall rand_initialize+0x0/0x60 returned 0 after 30 usecs
calling  tty_init+0x0/0x126 @ 1
device: 'tty': device_add
PM: Adding info for No Bus:tty
device: 'console': device_add
PM: Adding info for No Bus:console
device: 'tty0': device_add
PM: Adding info for No Bus:tty0
device class 'vc': registering
device: 'vcs': device_add
PM: Adding info for No Bus:vcs
device: 'vcsa': device_add
PM: Adding info for No Bus:vcsa
device: 'vcs1': device_add
PM: Adding info for No Bus:vcs1
device: 'vcsa1': device_add
PM: Adding info for No Bus:vcsa1
device: 'tty1': device_add
PM: Adding info for No Bus:tty1
device: 'tty2': device_add
PM: Adding info for No Bus:tty2
device: 'tty3': device_add
PM: Adding info for No Bus:tty3
device: 'tty4': device_add
PM: Adding info for No Bus:tty4
device: 'tty5': device_add
PM: Adding info for No Bus:tty5
device: 'tty6': device_add
PM: Adding info for No Bus:tty6
device: 'tty7': device_add
PM: Adding info for No Bus:tty7
device: 'tty8': device_add
PM: Adding info for No Bus:tty8
device: 'tty9': device_add
PM: Adding info for No Bus:tty9
device: 'tty10': device_add
PM: Adding info for No Bus:tty10
device: 'tty11': device_add
PM: Adding info for No Bus:tty11
device: 'tty12': device_add
PM: Adding info for No Bus:tty12
device: 'tty13': device_add
PM: Adding info for No Bus:tty13
device: 'tty14': device_add
PM: Adding info for No Bus:tty14
device: 'tty15': device_add
PM: Adding info for No Bus:tty15
device: 'tty16': device_add
PM: Adding info for No Bus:tty16
device: 'tty17': device_add
PM: Adding info for No Bus:tty17
device: 'tty18': device_add
PM: Adding info for No Bus:tty18
device: 'tty19': device_add
PM: Adding info for No Bus:tty19
device: 'tty20': device_add
PM: Adding info for No Bus:tty20
device: 'tty21': device_add
PM: Adding info for No Bus:tty21
device: 'tty22': device_add
PM: Adding info for No Bus:tty22
device: 'tty23': device_add
PM: Adding info for No Bus:tty23
device: 'tty24': device_add
PM: Adding info for No Bus:tty24
device: 'tty25': device_add
PM: Adding info for No Bus:tty25
device: 'tty26': device_add
PM: Adding info for No Bus:tty26
device: 'tty27': device_add
PM: Adding info for No Bus:tty27
device: 'tty28': device_add
PM: Adding info for No Bus:tty28
device: 'tty29': device_add
PM: Adding info for No Bus:tty29
device: 'tty30': device_add
PM: Adding info for No Bus:tty30
device: 'tty31': device_add
PM: Adding info for No Bus:tty31
device: 'tty32': device_add
PM: Adding info for No Bus:tty32
device: 'tty33': device_add
PM: Adding info for No Bus:tty33
device: 'tty34': device_add
PM: Adding info for No Bus:tty34
device: 'tty35': device_add
PM: Adding info for No Bus:tty35
device: 'tty36': device_add
PM: Adding info for No Bus:tty36
device: 'tty37': device_add
PM: Adding info for No Bus:tty37
device: 'tty38': device_add
PM: Adding info for No Bus:tty38
device: 'tty39': device_add
PM: Adding info for No Bus:tty39
device: 'tty40': device_add
PM: Adding info for No Bus:tty40
device: 'tty41': device_add
PM: Adding info for No Bus:tty41
device: 'tty42': device_add
PM: Adding info for No Bus:tty42
device: 'tty43': device_add
PM: Adding info for No Bus:tty43
device: 'tty44': device_add
PM: Adding info for No Bus:tty44
device: 'tty45': device_add
PM: Adding info for No Bus:tty45
device: 'tty46': device_add
PM: Adding info for No Bus:tty46
device: 'tty47': device_add
PM: Adding info for No Bus:tty47
device: 'tty48': device_add
PM: Adding info for No Bus:tty48
device: 'tty49': device_add
PM: Adding info for No Bus:tty49
device: 'tty50': device_add
PM: Adding info for No Bus:tty50
device: 'tty51': device_add
PM: Adding info for No Bus:tty51
device: 'tty52': device_add
PM: Adding info for No Bus:tty52
device: 'tty53': device_add
PM: Adding info for No Bus:tty53
device: 'tty54': device_add
PM: Adding info for No Bus:tty54
device: 'tty55': device_add
PM: Adding info for No Bus:tty55
device: 'tty56': device_add
PM: Adding info for No Bus:tty56
device: 'tty57': device_add
PM: Adding info for No Bus:tty57
device: 'tty58': device_add
PM: Adding info for No Bus:tty58
device: 'tty59': device_add
PM: Adding info for No Bus:tty59
device: 'tty60': device_add
PM: Adding info for No Bus:tty60
device: 'tty61': device_add
PM: Adding info for No Bus:tty61
device: 'tty62': device_add
PM: Adding info for No Bus:tty62
device: 'tty63': device_add
PM: Adding info for No Bus:tty63
initcall tty_init+0x0/0x126 returned 0 after 424370 usecs
calling  pty_init+0x0/0x72d @ 1
device: 'ptyp0': device_add
PM: Adding info for No Bus:ptyp0
device: 'ptyp1': device_add
PM: Adding info for No Bus:ptyp1
device: 'ptyp2': device_add
PM: Adding info for No Bus:ptyp2
device: 'ptyp3': device_add
PM: Adding info for No Bus:ptyp3
device: 'ptyp4': device_add
PM: Adding info for No Bus:ptyp4
device: 'ptyp5': device_add
PM: Adding info for No Bus:ptyp5
device: 'ptyp6': device_add
PM: Adding info for No Bus:ptyp6
device: 'ptyp7': device_add
PM: Adding info for No Bus:ptyp7
device: 'ptyp8': device_add
PM: Adding info for No Bus:ptyp8
device: 'ptyp9': device_add
PM: Adding info for No Bus:ptyp9
device: 'ptypa': device_add
PM: Adding info for No Bus:ptypa
device: 'ptypb': device_add
PM: Adding info for No Bus:ptypb
device: 'ptypc': device_add
PM: Adding info for No Bus:ptypc
device: 'ptypd': device_add
PM: Adding info for No Bus:ptypd
device: 'ptype': device_add
PM: Adding info for No Bus:ptype
device: 'ptypf': device_add
PM: Adding info for No Bus:ptypf
device: 'ptyq0': device_add
PM: Adding info for No Bus:ptyq0
device: 'ptyq1': device_add
PM: Adding info for No Bus:ptyq1
device: 'ptyq2': device_add
PM: Adding info for No Bus:ptyq2
device: 'ptyq3': device_add
PM: Adding info for No Bus:ptyq3
device: 'ptyq4': device_add
PM: Adding info for No Bus:ptyq4
device: 'ptyq5': device_add
PM: Adding info for No Bus:ptyq5
device: 'ptyq6': device_add
PM: Adding info for No Bus:ptyq6
device: 'ptyq7': device_add
PM: Adding info for No Bus:ptyq7
device: 'ptyq8': device_add
PM: Adding info for No Bus:ptyq8
device: 'ptyq9': device_add
PM: Adding info for No Bus:ptyq9
device: 'ptyqa': device_add
PM: Adding info for No Bus:ptyqa
device: 'ptyqb': device_add
PM: Adding info for No Bus:ptyqb
device: 'ptyqc': device_add
PM: Adding info for No Bus:ptyqc
device: 'ptyqd': device_add
PM: Adding info for No Bus:ptyqd
device: 'ptyqe': device_add
PM: Adding info for No Bus:ptyqe
device: 'ptyqf': device_add
PM: Adding info for No Bus:ptyqf
device: 'ptyr0': device_add
PM: Adding info for No Bus:ptyr0
device: 'ptyr1': device_add
PM: Adding info for No Bus:ptyr1
device: 'ptyr2': device_add
PM: Adding info for No Bus:ptyr2
device: 'ptyr3': device_add
PM: Adding info for No Bus:ptyr3
device: 'ptyr4': device_add
PM: Adding info for No Bus:ptyr4
device: 'ptyr5': device_add
PM: Adding info for No Bus:ptyr5
device: 'ptyr6': device_add
PM: Adding info for No Bus:ptyr6
device: 'ptyr7': device_add
PM: Adding info for No Bus:ptyr7
device: 'ptyr8': device_add
PM: Adding info for No Bus:ptyr8
device: 'ptyr9': device_add
PM: Adding info for No Bus:ptyr9
device: 'ptyra': device_add
PM: Adding info for No Bus:ptyra
device: 'ptyrb': device_add
PM: Adding info for No Bus:ptyrb
device: 'ptyrc': device_add
PM: Adding info for No Bus:ptyrc
device: 'ptyrd': device_add
PM: Adding info for No Bus:ptyrd
device: 'ptyre': device_add
PM: Adding info for No Bus:ptyre
device: 'ptyrf': device_add
PM: Adding info for No Bus:ptyrf
device: 'ptys0': device_add
PM: Adding info for No Bus:ptys0
device: 'ptys1': device_add
PM: Adding info for No Bus:ptys1
device: 'ptys2': device_add
PM: Adding info for No Bus:ptys2
device: 'ptys3': device_add
PM: Adding info for No Bus:ptys3
device: 'ptys4': device_add
PM: Adding info for No Bus:ptys4
device: 'ptys5': device_add
PM: Adding info for No Bus:ptys5
device: 'ptys6': device_add
PM: Adding info for No Bus:ptys6
device: 'ptys7': device_add
PM: Adding info for No Bus:ptys7
device: 'ptys8': device_add
PM: Adding info for No Bus:ptys8
device: 'ptys9': device_add
PM: Adding info for No Bus:ptys9
device: 'ptysa': device_add
PM: Adding info for No Bus:ptysa
device: 'ptysb': device_add
PM: Adding info for No Bus:ptysb
device: 'ptysc': device_add
PM: Adding info for No Bus:ptysc
device: 'ptysd': device_add
PM: Adding info for No Bus:ptysd
device: 'ptyse': device_add
PM: Adding info for No Bus:ptyse
device: 'ptysf': device_add
PM: Adding info for No Bus:ptysf
device: 'ptyt0': device_add
PM: Adding info for No Bus:ptyt0
device: 'ptyt1': device_add
PM: Adding info for No Bus:ptyt1
device: 'ptyt2': device_add
PM: Adding info for No Bus:ptyt2
device: 'ptyt3': device_add
PM: Adding info for No Bus:ptyt3
device: 'ptyt4': device_add
PM: Adding info for No Bus:ptyt4
device: 'ptyt5': device_add
PM: Adding info for No Bus:ptyt5
device: 'ptyt6': device_add
PM: Adding info for No Bus:ptyt6
device: 'ptyt7': device_add
PM: Adding info for No Bus:ptyt7
device: 'ptyt8': device_add
PM: Adding info for No Bus:ptyt8
device: 'ptyt9': device_add
PM: Adding info for No Bus:ptyt9
device: 'ptyta': device_add
PM: Adding info for No Bus:ptyta
device: 'ptytb': device_add
PM: Adding info for No Bus:ptytb
device: 'ptytc': device_add
PM: Adding info for No Bus:ptytc
device: 'ptytd': device_add
PM: Adding info for No Bus:ptytd
device: 'ptyte': device_add
PM: Adding info for No Bus:ptyte
device: 'ptytf': device_add
PM: Adding info for No Bus:ptytf
device: 'ptyu0': device_add
PM: Adding info for No Bus:ptyu0
device: 'ptyu1': device_add
PM: Adding info for No Bus:ptyu1
device: 'ptyu2': device_add
PM: Adding info for No Bus:ptyu2
device: 'ptyu3': device_add
PM: Adding info for No Bus:ptyu3
device: 'ptyu4': device_add
PM: Adding info for No Bus:ptyu4
device: 'ptyu5': device_add
PM: Adding info for No Bus:ptyu5
device: 'ptyu6': device_add
PM: Adding info for No Bus:ptyu6
device: 'ptyu7': device_add
PM: Adding info for No Bus:ptyu7
device: 'ptyu8': device_add
PM: Adding info for No Bus:ptyu8
device: 'ptyu9': device_add
PM: Adding info for No Bus:ptyu9
device: 'ptyua': device_add
PM: Adding info for No Bus:ptyua
device: 'ptyub': device_add
PM: Adding info for No Bus:ptyub
device: 'ptyuc': device_add
PM: Adding info for No Bus:ptyuc
device: 'ptyud': device_add
PM: Adding info for No Bus:ptyud
device: 'ptyue': device_add
PM: Adding info for No Bus:ptyue
device: 'ptyuf': device_add
PM: Adding info for No Bus:ptyuf
device: 'ptyv0': device_add
PM: Adding info for No Bus:ptyv0
device: 'ptyv1': device_add
PM: Adding info for No Bus:ptyv1
device: 'ptyv2': device_add
PM: Adding info for No Bus:ptyv2
device: 'ptyv3': device_add
PM: Adding info for No Bus:ptyv3
device: 'ptyv4': device_add
PM: Adding info for No Bus:ptyv4
device: 'ptyv5': device_add
PM: Adding info for No Bus:ptyv5
device: 'ptyv6': device_add
PM: Adding info for No Bus:ptyv6
device: 'ptyv7': device_add
PM: Adding info for No Bus:ptyv7
device: 'ptyv8': device_add
PM: Adding info for No Bus:ptyv8
device: 'ptyv9': device_add
PM: Adding info for No Bus:ptyv9
device: 'ptyva': device_add
PM: Adding info for No Bus:ptyva
device: 'ptyvb': device_add
PM: Adding info for No Bus:ptyvb
device: 'ptyvc': device_add
PM: Adding info for No Bus:ptyvc
device: 'ptyvd': device_add
PM: Adding info for No Bus:ptyvd
device: 'ptyve': device_add
PM: Adding info for No Bus:ptyve
device: 'ptyvf': device_add
PM: Adding info for No Bus:ptyvf
device: 'ptyw0': device_add
PM: Adding info for No Bus:ptyw0
device: 'ptyw1': device_add
PM: Adding info for No Bus:ptyw1
device: 'ptyw2': device_add
PM: Adding info for No Bus:ptyw2
device: 'ptyw3': device_add
PM: Adding info for No Bus:ptyw3
device: 'ptyw4': device_add
PM: Adding info for No Bus:ptyw4
device: 'ptyw5': device_add
PM: Adding info for No Bus:ptyw5
device: 'ptyw6': device_add
PM: Adding info for No Bus:ptyw6
device: 'ptyw7': device_add
PM: Adding info for No Bus:ptyw7
device: 'ptyw8': device_add
PM: Adding info for No Bus:ptyw8
device: 'ptyw9': device_add
PM: Adding info for No Bus:ptyw9
device: 'ptywa': device_add
PM: Adding info for No Bus:ptywa
device: 'ptywb': device_add
PM: Adding info for No Bus:ptywb
device: 'ptywc': device_add
PM: Adding info for No Bus:ptywc
device: 'ptywd': device_add
PM: Adding info for No Bus:ptywd
device: 'ptywe': device_add
PM: Adding info for No Bus:ptywe
device: 'ptywf': device_add
PM: Adding info for No Bus:ptywf
device: 'ptyx0': device_add
PM: Adding info for No Bus:ptyx0
device: 'ptyx1': device_add
PM: Adding info for No Bus:ptyx1
device: 'ptyx2': device_add
PM: Adding info for No Bus:ptyx2
device: 'ptyx3': device_add
PM: Adding info for No Bus:ptyx3
device: 'ptyx4': device_add
PM: Adding info for No Bus:ptyx4
device: 'ptyx5': device_add
PM: Adding info for No Bus:ptyx5
device: 'ptyx6': device_add
PM: Adding info for No Bus:ptyx6
device: 'ptyx7': device_add
PM: Adding info for No Bus:ptyx7
device: 'ptyx8': device_add
PM: Adding info for No Bus:ptyx8
device: 'ptyx9': device_add
PM: Adding info for No Bus:ptyx9
device: 'ptyxa': device_add
PM: Adding info for No Bus:ptyxa
device: 'ptyxb': device_add
PM: Adding info for No Bus:ptyxb
device: 'ptyxc': device_add
PM: Adding info for No Bus:ptyxc
device: 'ptyxd': device_add
PM: Adding info for No Bus:ptyxd
device: 'ptyxe': device_add
PM: Adding info for No Bus:ptyxe
device: 'ptyxf': device_add
PM: Adding info for No Bus:ptyxf
device: 'ptyy0': device_add
PM: Adding info for No Bus:ptyy0
device: 'ptyy1': device_add
PM: Adding info for No Bus:ptyy1
device: 'ptyy2': device_add
PM: Adding info for No Bus:ptyy2
device: 'ptyy3': device_add
PM: Adding info for No Bus:ptyy3
device: 'ptyy4': device_add
PM: Adding info for No Bus:ptyy4
device: 'ptyy5': device_add
PM: Adding info for No Bus:ptyy5
device: 'ptyy6': device_add
PM: Adding info for No Bus:ptyy6
device: 'ptyy7': device_add
PM: Adding info for No Bus:ptyy7
device: 'ptyy8': device_add
PM: Adding info for No Bus:ptyy8
device: 'ptyy9': device_add
PM: Adding info for No Bus:ptyy9
device: 'ptyya': device_add
PM: Adding info for No Bus:ptyya
device: 'ptyyb': device_add
PM: Adding info for No Bus:ptyyb
device: 'ptyyc': device_add
PM: Adding info for No Bus:ptyyc
device: 'ptyyd': device_add
PM: Adding info for No Bus:ptyyd
device: 'ptyye': device_add
PM: Adding info for No Bus:ptyye
device: 'ptyyf': device_add
PM: Adding info for No Bus:ptyyf
device: 'ptyz0': device_add
PM: Adding info for No Bus:ptyz0
device: 'ptyz1': device_add
PM: Adding info for No Bus:ptyz1
device: 'ptyz2': device_add
PM: Adding info for No Bus:ptyz2
device: 'ptyz3': device_add
PM: Adding info for No Bus:ptyz3
device: 'ptyz4': device_add
PM: Adding info for No Bus:ptyz4
device: 'ptyz5': device_add
PM: Adding info for No Bus:ptyz5
device: 'ptyz6': device_add
PM: Adding info for No Bus:ptyz6
device: 'ptyz7': device_add
PM: Adding info for No Bus:ptyz7
device: 'ptyz8': device_add
PM: Adding info for No Bus:ptyz8
device: 'ptyz9': device_add
PM: Adding info for No Bus:ptyz9
device: 'ptyza': device_add
PM: Adding info for No Bus:ptyza
device: 'ptyzb': device_add
PM: Adding info for No Bus:ptyzb
device: 'ptyzc': device_add
PM: Adding info for No Bus:ptyzc
device: 'ptyzd': device_add
PM: Adding info for No Bus:ptyzd
device: 'ptyze': device_add
PM: Adding info for No Bus:ptyze
device: 'ptyzf': device_add
PM: Adding info for No Bus:ptyzf
device: 'ptya0': device_add
PM: Adding info for No Bus:ptya0
device: 'ptya1': device_add
PM: Adding info for No Bus:ptya1
device: 'ptya2': device_add
PM: Adding info for No Bus:ptya2
device: 'ptya3': device_add
PM: Adding info for No Bus:ptya3
device: 'ptya4': device_add
PM: Adding info for No Bus:ptya4
device: 'ptya5': device_add
PM: Adding info for No Bus:ptya5
device: 'ptya6': device_add
PM: Adding info for No Bus:ptya6
device: 'ptya7': device_add
PM: Adding info for No Bus:ptya7
device: 'ptya8': device_add
PM: Adding info for No Bus:ptya8
device: 'ptya9': device_add
PM: Adding info for No Bus:ptya9
device: 'ptyaa': device_add
PM: Adding info for No Bus:ptyaa
device: 'ptyab': device_add
PM: Adding info for No Bus:ptyab
device: 'ptyac': device_add
PM: Adding info for No Bus:ptyac
device: 'ptyad': device_add
PM: Adding info for No Bus:ptyad
device: 'ptyae': device_add
PM: Adding info for No Bus:ptyae
device: 'ptyaf': device_add
PM: Adding info for No Bus:ptyaf
device: 'ptyb0': device_add
PM: Adding info for No Bus:ptyb0
device: 'ptyb1': device_add
PM: Adding info for No Bus:ptyb1
device: 'ptyb2': device_add
PM: Adding info for No Bus:ptyb2
device: 'ptyb3': device_add
PM: Adding info for No Bus:ptyb3
device: 'ptyb4': device_add
PM: Adding info for No Bus:ptyb4
device: 'ptyb5': device_add
PM: Adding info for No Bus:ptyb5
device: 'ptyb6': device_add
PM: Adding info for No Bus:ptyb6
device: 'ptyb7': device_add
PM: Adding info for No Bus:ptyb7
device: 'ptyb8': device_add
PM: Adding info for No Bus:ptyb8
device: 'ptyb9': device_add
PM: Adding info for No Bus:ptyb9
device: 'ptyba': device_add
PM: Adding info for No Bus:ptyba
device: 'ptybb': device_add
PM: Adding info for No Bus:ptybb
device: 'ptybc': device_add
PM: Adding info for No Bus:ptybc
device: 'ptybd': device_add
PM: Adding info for No Bus:ptybd
device: 'ptybe': device_add
PM: Adding info for No Bus:ptybe
device: 'ptybf': device_add
PM: Adding info for No Bus:ptybf
device: 'ptyc0': device_add
PM: Adding info for No Bus:ptyc0
device: 'ptyc1': device_add
PM: Adding info for No Bus:ptyc1
device: 'ptyc2': device_add
PM: Adding info for No Bus:ptyc2
device: 'ptyc3': device_add
PM: Adding info for No Bus:ptyc3
device: 'ptyc4': device_add
PM: Adding info for No Bus:ptyc4
device: 'ptyc5': device_add
PM: Adding info for No Bus:ptyc5
device: 'ptyc6': device_add
PM: Adding info for No Bus:ptyc6
device: 'ptyc7': device_add
PM: Adding info for No Bus:ptyc7
device: 'ptyc8': device_add
PM: Adding info for No Bus:ptyc8
device: 'ptyc9': device_add
PM: Adding info for No Bus:ptyc9
device: 'ptyca': device_add
PM: Adding info for No Bus:ptyca
device: 'ptycb': device_add
PM: Adding info for No Bus:ptycb
device: 'ptycc': device_add
PM: Adding info for No Bus:ptycc
device: 'ptycd': device_add
PM: Adding info for No Bus:ptycd
device: 'ptyce': device_add
PM: Adding info for No Bus:ptyce
device: 'ptycf': device_add
PM: Adding info for No Bus:ptycf
device: 'ptyd0': device_add
PM: Adding info for No Bus:ptyd0
device: 'ptyd1': device_add
PM: Adding info for No Bus:ptyd1
device: 'ptyd2': device_add
PM: Adding info for No Bus:ptyd2
device: 'ptyd3': device_add
PM: Adding info for No Bus:ptyd3
device: 'ptyd4': device_add
PM: Adding info for No Bus:ptyd4
device: 'ptyd5': device_add
PM: Adding info for No Bus:ptyd5
device: 'ptyd6': device_add
PM: Adding info for No Bus:ptyd6
device: 'ptyd7': device_add
PM: Adding info for No Bus:ptyd7
device: 'ptyd8': device_add
PM: Adding info for No Bus:ptyd8
device: 'ptyd9': device_add
PM: Adding info for No Bus:ptyd9
device: 'ptyda': device_add
PM: Adding info for No Bus:ptyda
device: 'ptydb': device_add
PM: Adding info for No Bus:ptydb
device: 'ptydc': device_add
PM: Adding info for No Bus:ptydc
device: 'ptydd': device_add
PM: Adding info for No Bus:ptydd
device: 'ptyde': device_add
PM: Adding info for No Bus:ptyde
device: 'ptydf': device_add
PM: Adding info for No Bus:ptydf
device: 'ptye0': device_add
PM: Adding info for No Bus:ptye0
device: 'ptye1': device_add
PM: Adding info for No Bus:ptye1
device: 'ptye2': device_add
PM: Adding info for No Bus:ptye2
device: 'ptye3': device_add
PM: Adding info for No Bus:ptye3
device: 'ptye4': device_add
PM: Adding info for No Bus:ptye4
device: 'ptye5': device_add
PM: Adding info for No Bus:ptye5
device: 'ptye6': device_add
PM: Adding info for No Bus:ptye6
device: 'ptye7': device_add
PM: Adding info for No Bus:ptye7
device: 'ptye8': device_add
PM: Adding info for No Bus:ptye8
device: 'ptye9': device_add
PM: Adding info for No Bus:ptye9
device: 'ptyea': device_add
PM: Adding info for No Bus:ptyea
device: 'ptyeb': device_add
PM: Adding info for No Bus:ptyeb
device: 'ptyec': device_add
PM: Adding info for No Bus:ptyec
device: 'ptyed': device_add
PM: Adding info for No Bus:ptyed
device: 'ptyee': device_add
PM: Adding info for No Bus:ptyee
device: 'ptyef': device_add
PM: Adding info for No Bus:ptyef
device: 'ttyp0': device_add
PM: Adding info for No Bus:ttyp0
device: 'ttyp1': device_add
PM: Adding info for No Bus:ttyp1
device: 'ttyp2': device_add
PM: Adding info for No Bus:ttyp2
device: 'ttyp3': device_add
PM: Adding info for No Bus:ttyp3
device: 'ttyp4': device_add
PM: Adding info for No Bus:ttyp4
device: 'ttyp5': device_add
PM: Adding info for No Bus:ttyp5
device: 'ttyp6': device_add
PM: Adding info for No Bus:ttyp6
device: 'ttyp7': device_add
PM: Adding info for No Bus:ttyp7
device: 'ttyp8': device_add
PM: Adding info for No Bus:ttyp8
device: 'ttyp9': device_add
PM: Adding info for No Bus:ttyp9
device: 'ttypa': device_add
PM: Adding info for No Bus:ttypa
device: 'ttypb': device_add
PM: Adding info for No Bus:ttypb
device: 'ttypc': device_add
PM: Adding info for No Bus:ttypc
device: 'ttypd': device_add
PM: Adding info for No Bus:ttypd
device: 'ttype': device_add
PM: Adding info for No Bus:ttype
device: 'ttypf': device_add
PM: Adding info for No Bus:ttypf
device: 'ttyq0': device_add
PM: Adding info for No Bus:ttyq0
device: 'ttyq1': device_add
PM: Adding info for No Bus:ttyq1
device: 'ttyq2': device_add
PM: Adding info for No Bus:ttyq2
device: 'ttyq3': device_add
PM: Adding info for No Bus:ttyq3
device: 'ttyq4': device_add
PM: Adding info for No Bus:ttyq4
device: 'ttyq5': device_add
PM: Adding info for No Bus:ttyq5
device: 'ttyq6': device_add
PM: Adding info for No Bus:ttyq6
device: 'ttyq7': device_add
PM: Adding info for No Bus:ttyq7
device: 'ttyq8': device_add
PM: Adding info for No Bus:ttyq8
device: 'ttyq9': device_add
PM: Adding info for No Bus:ttyq9
device: 'ttyqa': device_add
PM: Adding info for No Bus:ttyqa
device: 'ttyqb': device_add
PM: Adding info for No Bus:ttyqb
device: 'ttyqc': device_add
PM: Adding info for No Bus:ttyqc
device: 'ttyqd': device_add
PM: Adding info for No Bus:ttyqd
device: 'ttyqe': device_add
PM: Adding info for No Bus:ttyqe
device: 'ttyqf': device_add
PM: Adding info for No Bus:ttyqf
device: 'ttyr0': device_add
PM: Adding info for No Bus:ttyr0
device: 'ttyr1': device_add
PM: Adding info for No Bus:ttyr1
device: 'ttyr2': device_add
PM: Adding info for No Bus:ttyr2
device: 'ttyr3': device_add
PM: Adding info for No Bus:ttyr3
device: 'ttyr4': device_add
PM: Adding info for No Bus:ttyr4
device: 'ttyr5': device_add
PM: Adding info for No Bus:ttyr5
device: 'ttyr6': device_add
PM: Adding info for No Bus:ttyr6
device: 'ttyr7': device_add
PM: Adding info for No Bus:ttyr7
device: 'ttyr8': device_add
PM: Adding info for No Bus:ttyr8
device: 'ttyr9': device_add
PM: Adding info for No Bus:ttyr9
device: 'ttyra': device_add
PM: Adding info for No Bus:ttyra
device: 'ttyrb': device_add
PM: Adding info for No Bus:ttyrb
device: 'ttyrc': device_add
PM: Adding info for No Bus:ttyrc
device: 'ttyrd': device_add
PM: Adding info for No Bus:ttyrd
device: 'ttyre': device_add
PM: Adding info for No Bus:ttyre
device: 'ttyrf': device_add
PM: Adding info for No Bus:ttyrf
device: 'ttys0': device_add
PM: Adding info for No Bus:ttys0
device: 'ttys1': device_add
PM: Adding info for No Bus:ttys1
device: 'ttys2': device_add
PM: Adding info for No Bus:ttys2
device: 'ttys3': device_add
PM: Adding info for No Bus:ttys3
device: 'ttys4': device_add
PM: Adding info for No Bus:ttys4
device: 'ttys5': device_add
PM: Adding info for No Bus:ttys5
device: 'ttys6': device_add
PM: Adding info for No Bus:ttys6
device: 'ttys7': device_add
PM: Adding info for No Bus:ttys7
device: 'ttys8': device_add
PM: Adding info for No Bus:ttys8
device: 'ttys9': device_add
PM: Adding info for No Bus:ttys9
device: 'ttysa': device_add
PM: Adding info for No Bus:ttysa
device: 'ttysb': device_add
PM: Adding info for No Bus:ttysb
device: 'ttysc': device_add
PM: Adding info for No Bus:ttysc
device: 'ttysd': device_add
PM: Adding info for No Bus:ttysd
device: 'ttyse': device_add
PM: Adding info for No Bus:ttyse
device: 'ttysf': device_add
PM: Adding info for No Bus:ttysf
device: 'ttyt0': device_add
PM: Adding info for No Bus:ttyt0
device: 'ttyt1': device_add
PM: Adding info for No Bus:ttyt1
device: 'ttyt2': device_add
PM: Adding info for No Bus:ttyt2
device: 'ttyt3': device_add
PM: Adding info for No Bus:ttyt3
device: 'ttyt4': device_add
PM: Adding info for No Bus:ttyt4
device: 'ttyt5': device_add
PM: Adding info for No Bus:ttyt5
device: 'ttyt6': device_add
PM: Adding info for No Bus:ttyt6
device: 'ttyt7': device_add
PM: Adding info for No Bus:ttyt7
device: 'ttyt8': device_add
PM: Adding info for No Bus:ttyt8
device: 'ttyt9': device_add
PM: Adding info for No Bus:ttyt9
device: 'ttyta': device_add
PM: Adding info for No Bus:ttyta
device: 'ttytb': device_add
PM: Adding info for No Bus:ttytb
device: 'ttytc': device_add
PM: Adding info for No Bus:ttytc
device: 'ttytd': device_add
PM: Adding info for No Bus:ttytd
device: 'ttyte': device_add
PM: Adding info for No Bus:ttyte
device: 'ttytf': device_add
PM: Adding info for No Bus:ttytf
device: 'ttyu0': device_add
PM: Adding info for No Bus:ttyu0
device: 'ttyu1': device_add
PM: Adding info for No Bus:ttyu1
device: 'ttyu2': device_add
PM: Adding info for No Bus:ttyu2
device: 'ttyu3': device_add
PM: Adding info for No Bus:ttyu3
device: 'ttyu4': device_add
PM: Adding info for No Bus:ttyu4
device: 'ttyu5': device_add
PM: Adding info for No Bus:ttyu5
device: 'ttyu6': device_add
PM: Adding info for No Bus:ttyu6
device: 'ttyu7': device_add
PM: Adding info for No Bus:ttyu7
device: 'ttyu8': device_add
PM: Adding info for No Bus:ttyu8
device: 'ttyu9': device_add
PM: Adding info for No Bus:ttyu9
device: 'ttyua': device_add
PM: Adding info for No Bus:ttyua
device: 'ttyub': device_add
PM: Adding info for No Bus:ttyub
device: 'ttyuc': device_add
PM: Adding info for No Bus:ttyuc
device: 'ttyud': device_add
PM: Adding info for No Bus:ttyud
device: 'ttyue': device_add
PM: Adding info for No Bus:ttyue
device: 'ttyuf': device_add
PM: Adding info for No Bus:ttyuf
device: 'ttyv0': device_add
PM: Adding info for No Bus:ttyv0
device: 'ttyv1': device_add
PM: Adding info for No Bus:ttyv1
device: 'ttyv2': device_add
PM: Adding info for No Bus:ttyv2
device: 'ttyv3': device_add
PM: Adding info for No Bus:ttyv3
device: 'ttyv4': device_add
PM: Adding info for No Bus:ttyv4
device: 'ttyv5': device_add
PM: Adding info for No Bus:ttyv5
device: 'ttyv6': device_add
PM: Adding info for No Bus:ttyv6
device: 'ttyv7': device_add
PM: Adding info for No Bus:ttyv7
device: 'ttyv8': device_add
PM: Adding info for No Bus:ttyv8
device: 'ttyv9': device_add
PM: Adding info for No Bus:ttyv9
device: 'ttyva': device_add
PM: Adding info for No Bus:ttyva
device: 'ttyvb': device_add
PM: Adding info for No Bus:ttyvb
device: 'ttyvc': device_add
PM: Adding info for No Bus:ttyvc
device: 'ttyvd': device_add
PM: Adding info for No Bus:ttyvd
device: 'ttyve': device_add
PM: Adding info for No Bus:ttyve
device: 'ttyvf': device_add
PM: Adding info for No Bus:ttyvf
device: 'ttyw0': device_add
PM: Adding info for No Bus:ttyw0
device: 'ttyw1': device_add
PM: Adding info for No Bus:ttyw1
device: 'ttyw2': device_add
PM: Adding info for No Bus:ttyw2
device: 'ttyw3': device_add
PM: Adding info for No Bus:ttyw3
device: 'ttyw4': device_add
PM: Adding info for No Bus:ttyw4
device: 'ttyw5': device_add
PM: Adding info for No Bus:ttyw5
device: 'ttyw6': device_add
PM: Adding info for No Bus:ttyw6
device: 'ttyw7': device_add
PM: Adding info for No Bus:ttyw7
device: 'ttyw8': device_add
PM: Adding info for No Bus:ttyw8
device: 'ttyw9': device_add
PM: Adding info for No Bus:ttyw9
device: 'ttywa': device_add
PM: Adding info for No Bus:ttywa
device: 'ttywb': device_add
PM: Adding info for No Bus:ttywb
device: 'ttywc': device_add
PM: Adding info for No Bus:ttywc
device: 'ttywd': device_add
PM: Adding info for No Bus:ttywd
device: 'ttywe': device_add
PM: Adding info for No Bus:ttywe
device: 'ttywf': device_add
PM: Adding info for No Bus:ttywf
device: 'ttyx0': device_add
PM: Adding info for No Bus:ttyx0
device: 'ttyx1': device_add
PM: Adding info for No Bus:ttyx1
device: 'ttyx2': device_add
PM: Adding info for No Bus:ttyx2
device: 'ttyx3': device_add
PM: Adding info for No Bus:ttyx3
device: 'ttyx4': device_add
PM: Adding info for No Bus:ttyx4
device: 'ttyx5': device_add
PM: Adding info for No Bus:ttyx5
device: 'ttyx6': device_add
PM: Adding info for No Bus:ttyx6
device: 'ttyx7': device_add
PM: Adding info for No Bus:ttyx7
device: 'ttyx8': device_add
PM: Adding info for No Bus:ttyx8
device: 'ttyx9': device_add
PM: Adding info for No Bus:ttyx9
device: 'ttyxa': device_add
PM: Adding info for No Bus:ttyxa
device: 'ttyxb': device_add
PM: Adding info for No Bus:ttyxb
device: 'ttyxc': device_add
PM: Adding info for No Bus:ttyxc
device: 'ttyxd': device_add
PM: Adding info for No Bus:ttyxd
device: 'ttyxe': device_add
PM: Adding info for No Bus:ttyxe
device: 'ttyxf': device_add
PM: Adding info for No Bus:ttyxf
device: 'ttyy0': device_add
PM: Adding info for No Bus:ttyy0
device: 'ttyy1': device_add
PM: Adding info for No Bus:ttyy1
device: 'ttyy2': device_add
PM: Adding info for No Bus:ttyy2
device: 'ttyy3': device_add
PM: Adding info for No Bus:ttyy3
device: 'ttyy4': device_add
PM: Adding info for No Bus:ttyy4
device: 'ttyy5': device_add
PM: Adding info for No Bus:ttyy5
device: 'ttyy6': device_add
PM: Adding info for No Bus:ttyy6
device: 'ttyy7': device_add
PM: Adding info for No Bus:ttyy7
device: 'ttyy8': device_add
PM: Adding info for No Bus:ttyy8
device: 'ttyy9': device_add
PM: Adding info for No Bus:ttyy9
device: 'ttyya': device_add
PM: Adding info for No Bus:ttyya
device: 'ttyyb': device_add
PM: Adding info for No Bus:ttyyb
device: 'ttyyc': device_add
PM: Adding info for No Bus:ttyyc
device: 'ttyyd': device_add
PM: Adding info for No Bus:ttyyd
device: 'ttyye': device_add
PM: Adding info for No Bus:ttyye
device: 'ttyyf': device_add
PM: Adding info for No Bus:ttyyf
device: 'ttyz0': device_add
PM: Adding info for No Bus:ttyz0
device: 'ttyz1': device_add
PM: Adding info for No Bus:ttyz1
device: 'ttyz2': device_add
PM: Adding info for No Bus:ttyz2
device: 'ttyz3': device_add
PM: Adding info for No Bus:ttyz3
device: 'ttyz4': device_add
PM: Adding info for No Bus:ttyz4
device: 'ttyz5': device_add
PM: Adding info for No Bus:ttyz5
device: 'ttyz6': device_add
PM: Adding info for No Bus:ttyz6
device: 'ttyz7': device_add
PM: Adding info for No Bus:ttyz7
device: 'ttyz8': device_add
PM: Adding info for No Bus:ttyz8
device: 'ttyz9': device_add
PM: Adding info for No Bus:ttyz9
device: 'ttyza': device_add
PM: Adding info for No Bus:ttyza
device: 'ttyzb': device_add
PM: Adding info for No Bus:ttyzb
device: 'ttyzc': device_add
PM: Adding info for No Bus:ttyzc
device: 'ttyzd': device_add
PM: Adding info for No Bus:ttyzd
device: 'ttyze': device_add
PM: Adding info for No Bus:ttyze
device: 'ttyzf': device_add
PM: Adding info for No Bus:ttyzf
device: 'ttya0': device_add
PM: Adding info for No Bus:ttya0
device: 'ttya1': device_add
PM: Adding info for No Bus:ttya1
device: 'ttya2': device_add
PM: Adding info for No Bus:ttya2
device: 'ttya3': device_add
PM: Adding info for No Bus:ttya3
device: 'ttya4': device_add
PM: Adding info for No Bus:ttya4
device: 'ttya5': device_add
PM: Adding info for No Bus:ttya5
device: 'ttya6': device_add
PM: Adding info for No Bus:ttya6
device: 'ttya7': device_add
PM: Adding info for No Bus:ttya7
device: 'ttya8': device_add
PM: Adding info for No Bus:ttya8
device: 'ttya9': device_add
PM: Adding info for No Bus:ttya9
device: 'ttyaa': device_add
PM: Adding info for No Bus:ttyaa
device: 'ttyab': device_add
PM: Adding info for No Bus:ttyab
device: 'ttyac': device_add
PM: Adding info for No Bus:ttyac
device: 'ttyad': device_add
PM: Adding info for No Bus:ttyad
device: 'ttyae': device_add
PM: Adding info for No Bus:ttyae
device: 'ttyaf': device_add
PM: Adding info for No Bus:ttyaf
device: 'ttyb0': device_add
PM: Adding info for No Bus:ttyb0
device: 'ttyb1': device_add
PM: Adding info for No Bus:ttyb1
device: 'ttyb2': device_add
PM: Adding info for No Bus:ttyb2
device: 'ttyb3': device_add
PM: Adding info for No Bus:ttyb3
device: 'ttyb4': device_add
PM: Adding info for No Bus:ttyb4
device: 'ttyb5': device_add
PM: Adding info for No Bus:ttyb5
device: 'ttyb6': device_add
PM: Adding info for No Bus:ttyb6
device: 'ttyb7': device_add
PM: Adding info for No Bus:ttyb7
device: 'ttyb8': device_add
PM: Adding info for No Bus:ttyb8
device: 'ttyb9': device_add
PM: Adding info for No Bus:ttyb9
device: 'ttyba': device_add
PM: Adding info for No Bus:ttyba
device: 'ttybb': device_add
PM: Adding info for No Bus:ttybb
device: 'ttybc': device_add
PM: Adding info for No Bus:ttybc
device: 'ttybd': device_add
PM: Adding info for No Bus:ttybd
device: 'ttybe': device_add
PM: Adding info for No Bus:ttybe
device: 'ttybf': device_add
PM: Adding info for No Bus:ttybf
device: 'ttyc0': device_add
PM: Adding info for No Bus:ttyc0
device: 'ttyc1': device_add
PM: Adding info for No Bus:ttyc1
device: 'ttyc2': device_add
PM: Adding info for No Bus:ttyc2
device: 'ttyc3': device_add
PM: Adding info for No Bus:ttyc3
device: 'ttyc4': device_add
PM: Adding info for No Bus:ttyc4
device: 'ttyc5': device_add
PM: Adding info for No Bus:ttyc5
device: 'ttyc6': device_add
PM: Adding info for No Bus:ttyc6
device: 'ttyc7': device_add
PM: Adding info for No Bus:ttyc7
device: 'ttyc8': device_add
PM: Adding info for No Bus:ttyc8
device: 'ttyc9': device_add
PM: Adding info for No Bus:ttyc9
device: 'ttyca': device_add
PM: Adding info for No Bus:ttyca
device: 'ttycb': device_add
PM: Adding info for No Bus:ttycb
device: 'ttycc': device_add
PM: Adding info for No Bus:ttycc
device: 'ttycd': device_add
PM: Adding info for No Bus:ttycd
device: 'ttyce': device_add
PM: Adding info for No Bus:ttyce
device: 'ttycf': device_add
PM: Adding info for No Bus:ttycf
device: 'ttyd0': device_add
PM: Adding info for No Bus:ttyd0
device: 'ttyd1': device_add
PM: Adding info for No Bus:ttyd1
device: 'ttyd2': device_add
PM: Adding info for No Bus:ttyd2
device: 'ttyd3': device_add
PM: Adding info for No Bus:ttyd3
device: 'ttyd4': device_add
PM: Adding info for No Bus:ttyd4
device: 'ttyd5': device_add
PM: Adding info for No Bus:ttyd5
device: 'ttyd6': device_add
PM: Adding info for No Bus:ttyd6
device: 'ttyd7': device_add
PM: Adding info for No Bus:ttyd7
device: 'ttyd8': device_add
PM: Adding info for No Bus:ttyd8
device: 'ttyd9': device_add
PM: Adding info for No Bus:ttyd9
device: 'ttyda': device_add
PM: Adding info for No Bus:ttyda
device: 'ttydb': device_add
PM: Adding info for No Bus:ttydb
device: 'ttydc': device_add
PM: Adding info for No Bus:ttydc
device: 'ttydd': device_add
PM: Adding info for No Bus:ttydd
device: 'ttyde': device_add
PM: Adding info for No Bus:ttyde
device: 'ttydf': device_add
PM: Adding info for No Bus:ttydf
device: 'ttye0': device_add
PM: Adding info for No Bus:ttye0
device: 'ttye1': device_add
PM: Adding info for No Bus:ttye1
device: 'ttye2': device_add
PM: Adding info for No Bus:ttye2
device: 'ttye3': device_add
PM: Adding info for No Bus:ttye3
device: 'ttye4': device_add
PM: Adding info for No Bus:ttye4
device: 'ttye5': device_add
PM: Adding info for No Bus:ttye5
device: 'ttye6': device_add
PM: Adding info for No Bus:ttye6
device: 'ttye7': device_add
PM: Adding info for No Bus:ttye7
device: 'ttye8': device_add
PM: Adding info for No Bus:ttye8
device: 'ttye9': device_add
PM: Adding info for No Bus:ttye9
device: 'ttyea': device_add
PM: Adding info for No Bus:ttyea
device: 'ttyeb': device_add
PM: Adding info for No Bus:ttyeb
device: 'ttyec': device_add
PM: Adding info for No Bus:ttyec
device: 'ttyed': device_add
PM: Adding info for No Bus:ttyed
device: 'ttyee': device_add
PM: Adding info for No Bus:ttyee
device: 'ttyef': device_add
PM: Adding info for No Bus:ttyef
device: 'ptmx': device_add
PM: Adding info for No Bus:ptmx
initcall pty_init+0x0/0x72d returned 0 after 3112055 usecs
calling  sysrq_init+0x0/0x53 @ 1
initcall sysrq_init+0x0/0x53 returned 0 after 34 usecs
calling  init+0x0/0x3d @ 1
bus: 'virtio': add driver virtio_console
initcall init+0x0/0x3d returned 0 after 4020 usecs
calling  raw_init+0x0/0x10d @ 1
device class 'raw': registering
device: 'rawctl': device_add
PM: Adding info for No Bus:rawctl
initcall raw_init+0x0/0x10d returned 0 after 9547 usecs
calling  lp_init_module+0x0/0x2ce @ 1
device class 'printer': registering
lp: driver loaded but no devices found
initcall lp_init_module+0x0/0x2ce returned 0 after 7176 usecs
calling  applicom_init+0x0/0x55d @ 1
Applicom driver: $Id: ac.c,v 1.30 2000/03/22 16:03:57 dwmw2 Exp $
ac.o: No PCI boards found.
ac.o: For an ISA board you must supply memory and irq parameters.
initcall applicom_init+0x0/0x55d returned -6 after 13929 usecs
initcall applicom_init+0x0/0x55d returned with error code -6 
calling  hpet_init+0x0/0x90 @ 1
device: 'hpet': device_add
PM: Adding info for No Bus:hpet
bus: 'acpi': add driver hpet
initcall hpet_init+0x0/0x90 returned 0 after 8971 usecs
calling  nvram_init+0x0/0xa8 @ 1
device: 'nvram': device_add
PM: Adding info for No Bus:nvram
Non-volatile memory driver v1.3
initcall nvram_init+0x0/0xa8 returned 0 after 9005 usecs
calling  mod_init+0x0/0xe6 @ 1
initcall mod_init+0x0/0xe6 returned -19 after 314 usecs
calling  mod_init+0x0/0x75 @ 1
initcall mod_init+0x0/0x75 returned -19 after 0 usecs
calling  init+0x0/0x75 @ 1
bus: 'virtio': add driver virtio_rng
initcall init+0x0/0x75 returned 0 after 3689 usecs
calling  ppdev_init+0x0/0xf0 @ 1
device class 'ppdev': registering
ppdev: user-space parallel port driver
initcall ppdev_init+0x0/0xf0 returned 0 after 7029 usecs
calling  pc8736x_gpio_init+0x0/0x42b @ 1
Registering platform device 'pc8736x_gpio.0'. Parent at platform
device: 'pc8736x_gpio.0': device_add
bus: 'platform': add device pc8736x_gpio.0
PM: Adding info for platform:pc8736x_gpio.0
platform pc8736x_gpio.0: __pm_runtime_idle()!
platform pc8736x_gpio.0: __pm_runtime_idle() returns -11!
platform pc8736x_gpio.0: NatSemi pc8736x GPIO Driver Initializing
platform pc8736x_gpio.0: no device found
PM: Removing info for platform:pc8736x_gpio.0
bus: 'platform': remove device pc8736x_gpio.0
initcall pc8736x_gpio_init+0x0/0x42b returned -19 after 44218 usecs
calling  nsc_gpio_init+0x0/0x3d @ 1
nsc_gpio initializing
initcall nsc_gpio_init+0x0/0x3d returned 0 after 2013 usecs
calling  tlclk_init+0x0/0x20e @ 1
telclk_interrup = 0xf non-mcpbl0010 hw.
initcall tlclk_init+0x0/0x20e returned -6 after 3643 usecs
initcall tlclk_init+0x0/0x20e returned with error code -6 
calling  mwave_init+0x0/0x2b5 @ 1
smapi::smapi_init, ERROR invalid usSmapiID
mwave: tp3780i::tp3780I_InitializeBoardData: Error: SMAPI is not available on this machine
mwave: mwavedd::mwave_init: Error: Failed to initialize board data
mwave: mwavedd::mwave_init: Error: Failed to initialize
initcall mwave_init+0x0/0x2b5 returned -5 after 22400 usecs
initcall mwave_init+0x0/0x2b5 returned with error code -5 
calling  agp_init+0x0/0x51 @ 1
Linux agpgart interface v0.103
initcall agp_init+0x0/0x51 returned 0 after 2774 usecs
calling  agp_sis_init+0x0/0x60 @ 1
bus: 'pci': add driver agpgart-sis
initcall agp_sis_init+0x0/0x60 returned 0 after 3548 usecs
calling  agp_via_init+0x0/0x55 @ 1
bus: 'pci': add driver agpgart-via
initcall agp_via_init+0x0/0x55 returned 0 after 3538 usecs
calling  init_tis+0x0/0xbe @ 1
bus: 'pnp': add driver tpm_tis
initcall init_tis+0x0/0xbe returned 0 after 3178 usecs
calling  init_nsc+0x0/0x7a7 @ 1
initcall init_nsc+0x0/0x7a7 returned -19 after 9 usecs
calling  init_atmel+0x0/0x1b6 @ 1
bus: 'platform': add driver tpm_atmel
bus: 'platform': remove driver tpm_atmel
driver: 'tpm_atmel': driver_release
initcall init_atmel+0x0/0x1b6 returned -19 after 11186 usecs
calling  drm_core_init+0x0/0x170 @ 1
device class 'drm': registering
[drm] Initialized drm 1.1.0 20060810
initcall drm_core_init+0x0/0x170 returned 0 after 6754 usecs
calling  ttm_init+0x0/0xa0 @ 1
device: 'ttm': device_add
PM: Adding info for No Bus:ttm
initcall ttm_init+0x0/0xa0 returned 0 after 5580 usecs
calling  tdfx_init+0x0/0x40 @ 1
initcall tdfx_init+0x0/0x40 returned 0 after 139 usecs
calling  r128_init+0x0/0x50 @ 1
initcall r128_init+0x0/0x50 returned 0 after 844 usecs
calling  radeon_init+0x0/0x100 @ 1
[drm] radeon defaulting to userspace modesetting.
IOAPIC[0]: Set routing entry (1-16 -> 0x49 -> IRQ 16 Mode:1 Active:1)
pci 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
device: 'card0': device_add
PM: Adding info for No Bus:card0
[drm] Initialized radeon 1.31.0 20080528 for 0000:01:00.0 on minor 0
initcall radeon_init+0x0/0x100 returned 0 after 37303 usecs
calling  mga_init+0x0/0x50 @ 1
initcall mga_init+0x0/0x50 returned 0 after 91 usecs
calling  savage_init+0x0/0x50 @ 1
initcall savage_init+0x0/0x50 returned 0 after 527 usecs
calling  via_init+0x0/0x4d @ 1
initcall via_init+0x0/0x4d returned 0 after 213 usecs
calling  serial8250_init+0x0/0x185 @ 1
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
Registering platform device 'serial8250'. Parent at platform
device: 'serial8250': device_add
bus: 'platform': add device serial8250
PM: Adding info for platform:serial8250
platform serial8250: __pm_runtime_idle()!
platform serial8250: __pm_runtime_idle() returns -11!
async_waiting @ 1
async_continuing @ 1 after 9 usec
async_waiting @ 1
async_continuing @ 1 after 1 usec
ÿserial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
device: 'ttyS0': device_add
PM: Adding info for No Bus:ttyS0
async_waiting @ 1
async_continuing @ 1 after 1 usec
async_waiting @ 1
async_continuing @ 1 after 1 usec
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
device: 'ttyS1': device_add
PM: Adding info for No Bus:ttyS1
device: 'ttyS2': device_add
PM: Adding info for No Bus:ttyS2
device: 'ttyS3': device_add
PM: Adding info for No Bus:ttyS3
bus: 'platform': add driver serial8250
bus: 'platform': driver_probe_device: matched device serial8250 with driver serial8250
bus: 'platform': really_probe: probing driver serial8250 with device serial8250
driver: 'serial8250': driver_bound: bound to device 'serial8250'
bus: 'platform': really_probe: bound device serial8250 to driver serial8250
serial8250 serial8250: __pm_runtime_idle()!
serial8250 serial8250: __pm_runtime_idle() returns -11!
initcall serial8250_init+0x0/0x185 returned 0 after 615785 usecs
calling  serial8250_pnp_init+0x0/0x40 @ 1
bus: 'pnp': add driver serial
bus: 'pnp': driver_probe_device: matched device 00:09 with driver serial
bus: 'pnp': really_probe: probing driver serial with device 00:09
device: 'ttyS1': device_unregister
PM: Removing info for No Bus:ttyS1
device: 'ttyS1': device_create_release
00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
device: 'ttyS1': device_add
PM: Adding info for No Bus:ttyS1
driver: '00:09': driver_bound: bound to device 'serial'
bus: 'pnp': really_probe: bound device 00:09 to driver serial
serial 00:09: __pm_runtime_idle()!
serial 00:09: __pm_runtime_idle() returns -11!
bus: 'pnp': driver_probe_device: matched device 00:0a with driver serial
bus: 'pnp': really_probe: probing driver serial with device 00:0a
device: 'ttyS0': device_unregister
PM: Removing info for No Bus:ttyS0
device: 'ttyS0': device_create_release
00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
device: 'ttyS0': device_add
PM: Adding info for No Bus:ttyS0
driver: '00:0a': driver_bound: bound to device 'serial'
bus: 'pnp': really_probe: bound device 00:0a to driver serial
serial 00:0a: __pm_runtime_idle()!
serial 00:0a: __pm_runtime_idle() returns -11!
initcall serial8250_pnp_init+0x0/0x40 returned 0 after 105398 usecs
calling  serial8250_pci_init+0x0/0x50 @ 1
bus: 'pci': add driver serial
initcall serial8250_pci_init+0x0/0x50 returned 0 after 3138 usecs
calling  max3100_init+0x0/0x3d @ 1
bus: 'spi': add driver max3100
initcall max3100_init+0x0/0x3d returned 0 after 3159 usecs
calling  jsm_init_module+0x0/0x73 @ 1
bus: 'pci': add driver jsm
initcall jsm_init_module+0x0/0x73 returned 0 after 3092 usecs
calling  init_kgdboc+0x0/0x50 @ 1
initcall init_kgdboc+0x0/0x50 returned 0 after 1 usecs
calling  parport_default_proc_register+0x0/0x50 @ 1
initcall parport_default_proc_register+0x0/0x50 returned 0 after 15 usecs
calling  parport_ax88796_init+0x0/0x40 @ 1
bus: 'platform': add driver ax88796-pp
initcall parport_ax88796_init+0x0/0x40 returned 0 after 3842 usecs
calling  loop_init+0x0/0x1f5 @ 1
device: 'loop0': device_add
PM: Adding info for No Bus:loop0
device: '7:0': device_add
PM: Adding info for No Bus:7:0
device: 'loop1': device_add
PM: Adding info for No Bus:loop1
device: '7:1': device_add
PM: Adding info for No Bus:7:1
device: 'loop2': device_add
PM: Adding info for No Bus:loop2
device: '7:2': device_add
PM: Adding info for No Bus:7:2
device: 'loop3': device_add
PM: Adding info for No Bus:loop3
device: '7:3': device_add
PM: Adding info for No Bus:7:3
device: 'loop4': device_add
PM: Adding info for No Bus:loop4
device: '7:4': device_add
PM: Adding info for No Bus:7:4
device: 'loop5': device_add
PM: Adding info for No Bus:loop5
device: '7:5': device_add
PM: Adding info for No Bus:7:5
device: 'loop6': device_add
PM: Adding info for No Bus:loop6
device: '7:6': device_add
PM: Adding info for No Bus:7:6
device: 'loop7': device_add
PM: Adding info for No Bus:loop7
device: '7:7': device_add
PM: Adding info for No Bus:7:7
loop: module loaded
initcall loop_init+0x0/0x1f5 returned 0 after 99100 usecs
calling  cpqarray_init+0x0/0x2ef @ 1
Compaq SMART2 Driver (v 2.6.0)
bus: 'pci': add driver cpqarray
bus: 'pci': remove driver cpqarray
driver: 'cpqarray': driver_release
initcall cpqarray_init+0x0/0x2ef returned -19 after 12922 usecs
calling  DAC960_init_module+0x0/0x7c @ 1
bus: 'pci': add driver DAC960
device: 'dac960_gam': device_add
PM: Adding info for No Bus:dac960_gam
initcall DAC960_init_module+0x0/0x7c returned 0 after 10269 usecs
calling  mm_init+0x0/0x200 @ 1
bus: 'pci': add driver umem
MM: desc_per_page = 128
initcall mm_init+0x0/0x200 returned 0 after 5167 usecs
calling  nbd_init+0x0/0x3c0 @ 1
nbd: registered device at major 43
device: 'nbd0': device_add
PM: Adding info for No Bus:nbd0
device: '43:0': device_add
PM: Adding info for No Bus:43:0
device: 'nbd1': device_add
PM: Adding info for No Bus:nbd1
device: '43:1': device_add
PM: Adding info for No Bus:43:1
device: 'nbd2': device_add
PM: Adding info for No Bus:nbd2
device: '43:2': device_add
PM: Adding info for No Bus:43:2
device: 'nbd3': device_add
PM: Adding info for No Bus:nbd3
device: '43:3': device_add
PM: Adding info for No Bus:43:3
device: 'nbd4': device_add
PM: Adding info for No Bus:nbd4
device: '43:4': device_add
PM: Adding info for No Bus:43:4
device: 'nbd5': device_add
PM: Adding info for No Bus:nbd5
device: '43:5': device_add
PM: Adding info for No Bus:43:5
device: 'nbd6': device_add
PM: Adding info for No Bus:nbd6
device: '43:6': device_add
PM: Adding info for No Bus:43:6
device: 'nbd7': device_add
PM: Adding info for No Bus:nbd7
device: '43:7': device_add
PM: Adding info for No Bus:43:7
device: 'nbd8': device_add
PM: Adding info for No Bus:nbd8
device: '43:8': device_add
PM: Adding info for No Bus:43:8
device: 'nbd9': device_add
PM: Adding info for No Bus:nbd9
device: '43:9': device_add
PM: Adding info for No Bus:43:9
device: 'nbd10': device_add
PM: Adding info for No Bus:nbd10
device: '43:10': device_add
PM: Adding info for No Bus:43:10
device: 'nbd11': device_add
PM: Adding info for No Bus:nbd11
device: '43:11': device_add
PM: Adding info for No Bus:43:11
device: 'nbd12': device_add
PM: Adding info for No Bus:nbd12
device: '43:12': device_add
PM: Adding info for No Bus:43:12
device: 'nbd13': device_add
PM: Adding info for No Bus:nbd13
device: '43:13': device_add
PM: Adding info for No Bus:43:13
device: 'nbd14': device_add
PM: Adding info for No Bus:nbd14
device: '43:14': device_add
PM: Adding info for No Bus:43:14
device: 'nbd15': device_add
PM: Adding info for No Bus:nbd15
device: '43:15': device_add
PM: Adding info for No Bus:43:15
initcall nbd_init+0x0/0x3c0 returned 0 after 201823 usecs
calling  carm_init+0x0/0x50 @ 1
bus: 'pci': add driver sx8
initcall carm_init+0x0/0x50 returned 0 after 2873 usecs
calling  ub_init+0x0/0xc0 @ 1
bus: 'usb': add driver ub
usbcore: registered new interface driver ub
initcall ub_init+0x0/0xc0 returned 0 after 6794 usecs
calling  ibmasm_init+0x0/0xa0 @ 1
bus: 'pci': add driver ibmasm
ibmasm: IBM ASM Service Processor Driver version 1.0 loaded
initcall ibmasm_init+0x0/0xa0 returned 0 after 8488 usecs
calling  ics932s401_init+0x0/0x3d @ 1
bus: 'i2c': add driver ics932s401
i2c-core: driver [ics932s401] registered
initcall ics932s401_init+0x0/0x3d returned 0 after 7163 usecs
calling  phantom_init+0x0/0x13a @ 1
device class 'phantom': registering
bus: 'pci': add driver phantom
Phantom Linux Driver, version n0.9.8, init OK
initcall phantom_init+0x0/0x13a returned 0 after 11568 usecs
calling  ioc4_init+0x0/0x50 @ 1
bus: 'pci': add driver IOC4
initcall ioc4_init+0x0/0x50 returned 0 after 2943 usecs
calling  ilo_init+0x0/0xbc @ 1
device class 'iLO': registering
bus: 'pci': add driver hpilo
initcall ilo_init+0x0/0xbc returned 0 after 6382 usecs
calling  isl29003_init+0x0/0x3d @ 1
bus: 'i2c': add driver isl29003
i2c-core: driver [isl29003] registered
initcall isl29003_init+0x0/0x3d returned 0 after 6805 usecs
calling  c2port_init+0x0/0x83 @ 1
Silicon Labs C2 port support v. 0.51.0 - (C) 2007 Rodolfo Giometti
device class 'c2port': registering
initcall c2port_init+0x0/0x83 returned 0 after 9309 usecs
calling  at24_init+0x0/0x60 @ 1
bus: 'i2c': add driver at24
i2c-core: driver [at24] registered
initcall at24_init+0x0/0x60 returned 0 after 6146 usecs
calling  max6875_init+0x0/0x40 @ 1
bus: 'i2c': add driver max6875
i2c-core: driver [max6875] registered
initcall max6875_init+0x0/0x40 returned 0 after 6643 usecs
calling  cb710_init_module+0x0/0x50 @ 1
bus: 'pci': add driver cb710
initcall cb710_init_module+0x0/0x50 returned 0 after 3037 usecs
calling  sm501_base_init+0x0/0x55 @ 1
bus: 'platform': add driver sm501
bus: 'pci': add driver sm501
initcall sm501_base_init+0x0/0x55 returned 0 after 6635 usecs
calling  raid_init+0x0/0x40 @ 1
device class 'raid_devices': registering
initcall raid_init+0x0/0x40 returned 0 after 3983 usecs
calling  spi_transport_init+0x0/0xb0 @ 1
device class 'spi_transport': registering
device class 'spi_host': registering
initcall spi_transport_init+0x0/0xb0 returned 0 after 7886 usecs
calling  fc_transport_init+0x0/0x80 @ 1
device class 'fc_host': registering
device class 'fc_vports': registering
device class 'fc_remote_ports': registering
device class 'fc_transport': registering
initcall fc_transport_init+0x0/0x80 returned 0 after 15913 usecs
calling  iscsi_transport_init+0x0/0x182 @ 1
Loading iSCSI transport class v2.0-870.
device class 'iscsi_transport': registering
device class 'iscsi_endpoint': registering
device class 'iscsi_host': registering
device class 'iscsi_connection': registering
device class 'iscsi_session': registering
initcall iscsi_transport_init+0x0/0x182 returned 0 after 24739 usecs
calling  sas_transport_init+0x0/0xe6 @ 1
device class 'sas_host': registering
device class 'sas_phy': registering
device class 'sas_port': registering
device class 'sas_device': registering
device class 'sas_end_device': registering
device class 'sas_expander': registering
initcall sas_transport_init+0x0/0xe6 returned 0 after 23391 usecs
calling  sas_class_init+0x0/0x58 @ 1
initcall sas_class_init+0x0/0x58 returned 0 after 804 usecs
calling  scsi_dh_init+0x0/0x70 @ 1
initcall scsi_dh_init+0x0/0x70 returned 0 after 2 usecs
calling  hp_sw_init+0x0/0x3d @ 1
hp_sw: device handler registered
initcall hp_sw_init+0x0/0x3d returned 0 after 2962 usecs
calling  alua_init+0x0/0x63 @ 1
alua: device handler registered
initcall alua_init+0x0/0x63 returned 0 after 2860 usecs
calling  ahc_linux_init+0x0/0xa0 @ 1
bus: 'pci': add driver aic7xxx
initcall ahc_linux_init+0x0/0xa0 returned 0 after 3250 usecs
calling  init_st+0x0/0x1e8 @ 1
st: Version 20081215, fixed bufsize 32768, s/g segs 256
device class 'scsi_tape': registering
bus: 'scsi': add driver st
initcall init_st+0x0/0x1e8 returned 0 after 11613 usecs
calling  init_osst+0x0/0x17b @ 1
osst :I: Tape driver with OnStream support version 0.99.4
osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
device class 'onstream_tape': registering
bus: 'scsi': add driver osst
initcall init_osst+0x0/0x17b returned 0 after 17613 usecs
calling  init_sd+0x0/0x152 @ 1
device class 'scsi_disk': registering
bus: 'scsi': add driver sd
initcall init_sd+0x0/0x152 returned 0 after 6831 usecs
calling  init_sr+0x0/0x71 @ 1
bus: 'scsi': add driver sr
initcall init_sr+0x0/0x71 returned 0 after 2837 usecs
calling  init_sg+0x0/0xfd @ 1
device class 'scsi_generic': registering
initcall init_sg+0x0/0xfd returned 0 after 4035 usecs
calling  init_ch_module+0x0/0xf0 @ 1
SCSI Media Changer driver v0.25 
device class 'scsi_changer': registering
bus: 'scsi': add driver ch
initcall init_ch_module+0x0/0xf0 returned 0 after 10006 usecs
calling  ahci_init+0x0/0x50 @ 1
bus: 'pci': add driver ahci
initcall ahci_init+0x0/0x50 returned 0 after 3000 usecs
calling  k2_sata_init+0x0/0x50 @ 1
bus: 'pci': add driver sata_svw
initcall k2_sata_init+0x0/0x50 returned 0 after 3320 usecs
calling  piix_init+0x0/0x60 @ 1
bus: 'pci': add driver ata_piix
initcall piix_init+0x0/0x60 returned 0 after 3294 usecs
calling  qs_ata_init+0x0/0x50 @ 1
bus: 'pci': add driver sata_qstor
initcall qs_ata_init+0x0/0x50 returned 0 after 3565 usecs
calling  sil_init+0x0/0x50 @ 1
bus: 'pci': add driver sata_sil
initcall sil_init+0x0/0x50 returned 0 after 3286 usecs
calling  nv_init+0x0/0x50 @ 1
bus: 'pci': add driver sata_nv
initcall nv_init+0x0/0x50 returned 0 after 3210 usecs
calling  uli_init+0x0/0x45 @ 1
bus: 'pci': add driver sata_uli
initcall uli_init+0x0/0x45 returned 0 after 3285 usecs
calling  mv_init+0x0/0x7b @ 1
bus: 'pci': add driver sata_mv
bus: 'platform': add driver sata_mv
initcall mv_init+0x0/0x7b returned 0 after 6894 usecs
calling  inic_init+0x0/0x50 @ 1
bus: 'pci': add driver sata_inic162x
initcall inic_init+0x0/0x50 returned 0 after 3725 usecs
calling  amd_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_amd
initcall amd_init+0x0/0x50 returned 0 after 3299 usecs
calling  atp867x_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_atp867x
initcall atp867x_init+0x0/0x50 returned 0 after 3636 usecs
calling  cmd64x_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_cmd64x
initcall cmd64x_init+0x0/0x50 returned 0 after 3538 usecs
calling  hpt37x_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_hpt37x
initcall hpt37x_init+0x0/0x50 returned 0 after 3540 usecs
calling  hpt3x2n_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_hpt3x2n
initcall hpt3x2n_init+0x0/0x50 returned 0 after 3749 usecs
calling  it821x_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_it821x
initcall it821x_init+0x0/0x50 returned 0 after 3543 usecs
calling  jmicron_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_jmicron
initcall jmicron_init+0x0/0x50 returned 0 after 3621 usecs
calling  netcell_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_netcell
initcall netcell_init+0x0/0x50 returned 0 after 3625 usecs
calling  ninja32_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_ninja32
initcall ninja32_init+0x0/0x50 returned 0 after 3626 usecs
calling  ns87415_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_ns87415
initcall ns87415_init+0x0/0x50 returned 0 after 3630 usecs
calling  opti_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_opti
initcall opti_init+0x0/0x50 returned 0 after 3375 usecs
calling  optidma_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_optidma
initcall optidma_init+0x0/0x50 returned 0 after 3627 usecs
calling  mpiix_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_mpiix
initcall mpiix_init+0x0/0x50 returned 0 after 3573 usecs
calling  oldpiix_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_oldpiix
initcall oldpiix_init+0x0/0x50 returned 0 after 3629 usecs
calling  pdc2027x_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_pdc2027x
initcall pdc2027x_init+0x0/0x50 returned 0 after 3713 usecs
calling  pdc202xx_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_pdc202xx_old
initcall pdc202xx_init+0x0/0x50 returned 0 after 4051 usecs
calling  radisys_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_radisys
initcall radisys_init+0x0/0x50 returned 0 after 3746 usecs
calling  rdc_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_rdc
initcall rdc_init+0x0/0x50 returned 0 after 3765 usecs
calling  sc1200_init+0x0/0x50 @ 1
bus: 'pci': add driver sc1200
initcall sc1200_init+0x0/0x50 returned 0 after 3120 usecs
calling  via_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_via
bus: 'pci': driver_probe_device: matched device 0000:00:0f.1 with driver pata_via
bus: 'pci': really_probe: probing driver pata_via with device 0000:00:0f.1
pata_via 0000:00:0f.1: version 0.3.4
IOAPIC[0]: Set routing entry (1-20 -> 0x51 -> IRQ 20 Mode:1 Active:1)
pata_via 0000:00:0f.1: PCI INT A -> GSI 20 (level, low) -> IRQ 20
pata_via 0000:00:0f.1: calling quirk_via_vlink+0x0/0x120
scsi0 : pata_via
device: 'host0': device_add
PM: Adding info for No Bus:host0
device: 'host0': device_add
PM: Adding info for No Bus:host0
scsi1 : pata_via
device: 'host1': device_add
PM: Adding info for No Bus:host1
device: 'host1': device_add
PM: Adding info for No Bus:host1
ata1: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xfc00 irq 14
ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xfc08 irq 15
driver: '0000:00:0f.1': driver_bound: bound to device 'pata_via'
bus: 'pci': really_probe: bound device 0000:00:0f.1 to driver pata_via
pata_via 0000:00:0f.1: __pm_runtime_idle()!
pata_via 0000:00:0f.1: __pm_runtime_idle() returns -11!
calling  2_async_port_probe+0x0/0x110 @ 1684
calling  3_async_port_probe+0x0/0x110 @ 1685
async_waiting @ 1685
initcall via_init+0x0/0x50 returned 0 after 245345 usecs
calling  sl82c105_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_sl82c105
initcall sl82c105_init+0x0/0x50 returned 0 after 3736 usecs
calling  sis_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_sis
initcall sis_init+0x0/0x50 returned 0 after 3366 usecs
calling  triflex_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_triflex
initcall triflex_init+0x0/0x50 returned 0 after 3616 usecs
calling  sch_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_sch
initcall sch_init+0x0/0x50 returned 0 after 3366 usecs
calling  pacpi_init+0x0/0x50 @ 1
bus: 'pci': add driver pata_acpi
initcall pacpi_init+0x0/0x50 returned 0 after 3372 usecs
calling  butterfly_init+0x0/0x40 @ 1
initcall butterfly_init+0x0/0x40 returned 0 after 2 usecs
calling  init_spi_lm70llp+0x0/0x3d @ 1
initcall init_spi_lm70llp+0x0/0x3d returned 0 after 1 usecs
calling  spidev_init+0x0/0xe3 @ 1
device class 'spidev': registering
bus: 'spi': add driver spidev
initcall spidev_init+0x0/0xe3 returned 0 after 6672 usecs
calling  e1000_init_module+0x0/0xab @ 1
Intel(R) PRO/1000 Network Driver - version 7.3.21-k3-NAPI
Copyright (c) 1999-2006 Intel Corporation.
bus: 'pci': add driver e1000
initcall e1000_init_module+0x0/0xab returned 0 after 11882 usecs
calling  e1000_init_module+0x0/0x95 @ 1
e1000e: Intel(R) PRO/1000 Network Driver - 1.0.2-k2
e1000e: Copyright (c) 1999-2008 Intel Corporation.
bus: 'pci': add driver e1000e
initcall e1000_init_module+0x0/0x95 returned 0 after 12158 usecs
calling  igb_init_module+0x0/0x8d @ 1
Intel(R) Gigabit Ethernet Network Driver - version 1.3.16-k2
Copyright (c) 2007-2009 Intel Corporation.
bus: 'pci': add driver igb
async_waiting @ 1684
async_continuing @ 1684 after 1 usec
initcall 2_async_port_probe+0x0/0x110 returned 0 after 175371 usecs
async_continuing @ 1685 after 174580 usec
initcall igb_init_module+0x0/0x8d returned 0 after 38116 usecs
calling  igbvf_init_module+0x0/0x93 @ 1
Intel(R) Virtual Function Network Driver - version 1.0.0-k0
Copyright (c) 2009 Intel Corporation.
bus: 'pci': add driver igbvf
initcall igbvf_init_module+0x0/0x93 returned 0 after 11630 usecs
calling  bonding_init+0x0/0xa50 @ 1
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)
bonding: Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failures! see bonding.txt for details.
device: 'bond0': device_add
PM: Adding info for No Bus:bond0
initcall bonding_init+0x0/0xa50 returned 0 after 27796 usecs
calling  atl1c_init_module+0x0/0x50 @ 1
bus: 'pci': add driver atl1c
initcall atl1c_init_module+0x0/0x50 returned 0 after 3160 usecs
calling  plip_init+0x0/0x97 @ 1
initcall plip_init+0x0/0x97 returned 0 after 2 usecs
calling  happy_meal_probe+0x0/0x50 @ 1
bus: 'pci': add driver hme
initcall happy_meal_probe+0x0/0x50 returned 0 after 2961 usecs
calling  gem_init+0x0/0x45 @ 1
bus: 'pci': add driver gem
initcall gem_init+0x0/0x45 returned 0 after 2861 usecs
calling  vortex_init+0x0/0xeb @ 1
bus: 'pci': add driver 3c59x
initcall vortex_init+0x0/0xeb returned 0 after 3032 usecs
calling  typhoon_init+0x0/0x45 @ 1
bus: 'pci': add driver typhoon
initcall typhoon_init+0x0/0x45 returned 0 after 3205 usecs
calling  e100_init_module+0x0/0x8b @ 1
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
bus: 'pci': add driver e100
initcall e100_init_module+0x0/0x8b returned 0 after 11795 usecs
calling  epic_init+0x0/0x50 @ 1
bus: 'pci': add driver epic100
initcall epic_init+0x0/0x50 returned 0 after 14590 usecs
calling  sis190_init_module+0x0/0x50 @ 1
bus: 'pci': add driver sis190
initcall sis190_init_module+0x0/0x50 returned 0 after 3532 usecs
calling  yellowfin_init+0x0/0x50 @ 1
bus: 'pci': add driver yellowfin
initcall yellowfin_init+0x0/0x50 returned 0 after 3511 usecs
calling  acenic_init+0x0/0x50 @ 1
bus: 'pci': add driver acenic
initcall acenic_init+0x0/0x50 returned 0 after 3641 usecs
calling  natsemi_init_mod+0x0/0x50 @ 1
bus: 'pci': add driver natsemi
ata2.01: ATA-6: HDS722525VLAT80, V36OA60A, max UDMA/100
ata2.01: 488397168 sectors, multi 16: LBA48 
initcall natsemi_init_mod+0x0/0x50 returned 0 after 12314 usecs
calling  ns83820_init+0x0/0x60 @ 1
ns83820.c: National Semiconductor DP83820 10/100/1000 driver.
bus: 'pci': add driver ns83820
initcall ns83820_init+0x0/0x60 returned 0 after 8754 usecs
calling  tg3_init+0x0/0x45 @ 1
bus: 'pci': add driver tg3
initcall tg3_init+0x0/0x45 returned 0 after 3117 usecs
calling  skge_init_module+0x0/0x8b @ 1
bus: 'pci': add driver skge
bus: 'pci': driver_probe_device: matched device 0000:00:0a.0 with driver skge
bus: 'pci': really_probe: probing driver skge with device 0000:00:0a.0
IOAPIC[0]: Set routing entry (1-17 -> 0x59 -> IRQ 17 Mode:1 Active:1)
skge 0000:00:0a.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
skge 0000:00:0a.0: PCI: Disallowing DAC for device
skge 1.13 addr 0xfd900000 irq 17 chip Yukon rev 1
device: 'eth0': device_add
PM: Adding info for No Bus:eth0
skge eth0: addr 00:0c:6e:b3:3d:c6
driver: '0000:00:0a.0': driver_bound: bound to device 'skge'
bus: 'pci': really_probe: bound device 0000:00:0a.0 to driver skge
skge 0000:00:0a.0: __pm_runtime_idle()!
skge 0000:00:0a.0: __pm_runtime_idle() returns -11!
initcall skge_init_module+0x0/0x8b returned 0 after 66030 usecs
calling  sky2_init_module+0x0/0x90 @ 1
sky2 driver version 1.25
bus: 'pci': add driver sky2
ata2.01: configured for UDMA/100
async_waiting @ 1685
async_continuing @ 1685 after 1 usec
scsi 1:0:1:0: Direct-Access     ATA      HDS722525VLAT80  V36O PQ: 0 ANSI: 5
device: 'target1:0:1': device_add
PM: Adding info for No Bus:target1:0:1
device: '1:0:1:0': device_add
bus: 'scsi': add device 1:0:1:0
PM: Adding info for scsi:1:0:1:0
initcall sky2_init_module+0x0/0x90 returned 0 after 36829 usecs
calling  ks8842_init+0x0/0x3d @ 1
bus: 'platform': add driver ks8842
initcall ks8842_init+0x0/0x3d returned 0 after 3657 usecs
calling  rhine_init+0x0/0x94 @ 1
bus: 'pci': add driver via-rhine
bus: 'scsi': driver_probe_device: matched device 1:0:1:0 with driver st
bus: 'scsi': really_probe: probing driver st with device 1:0:1:0
bus: 'scsi': driver_probe_device: matched device 1:0:1:0 with driver osst
bus: 'scsi': really_probe: probing driver osst with device 1:0:1:0
bus: 'scsi': driver_probe_device: matched device 1:0:1:0 with driver sd
bus: 'scsi': really_probe: probing driver sd with device 1:0:1:0
device: '1:0:1:0': device_add
PM: Adding info for No Bus:1:0:1:0
initcall rhine_init+0x0/0x94 returned 0 after 46279 usecs
calling  velocity_init_module+0x0/0x6f @ 1
bus: 'pci': add driver via-velocity
initcall velocity_init_module+0x0/0x6f returned 0 after 3753 usecs
calling  starfire_init+0x0/0x50 @ 1
bus: 'pci': add driver starfire
initcall starfire_init+0x0/0x50 returned 0 after 3272 usecs
calling  marvell_init+0x0/0x9d @ 1
bus: 'mdio_bus': add driver Marvell 88E1101
driver: '1:0:1:0': driver_bound: bound to device 'sd'
bus: 'scsi': really_probe: bound device 1:0:1:0 to driver sd
sd 1:0:1:0: __pm_runtime_idle()!
sd 1:0:1:0: __pm_runtime_idle() returns -11!
device: '1:0:1:0': device_add
PM: Adding info for No Bus:1:0:1:0
calling  4_sd_probe_async+0x0/0x240 @ 1684
sd 1:0:1:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
bus: 'mdio_bus': add driver Marvell 88E1112
bus: 'mdio_bus': add driver Marvell 88E1111
sd 1:0:1:0: [sda] Write Protect is off
sd 1:0:1:0: [sda] Mode Sense: 00 3a 00 00
bus: 'mdio_bus': add driver Marvell 88E1118
sd 1:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
device: 'sda': device_add
PM: Adding info for No Bus:sda
bus: 'mdio_bus': add driver Marvell 88E1121R
bus: 'mdio_bus': add driver Marvell 88E1145
device: 'sg0': device_add
PM: Adding info for No Bus:sg0
bus: 'mdio_bus': add driver Marvell 88E1240
sd 1:0:1:0: Attached scsi generic sg0 type 0
initcall 3_async_port_probe+0x0/0x110 returned 0 after 750551 usecs
 sda:initcall marvell_init+0x0/0x9d returned 0 after 104299 usecs
calling  davicom_init+0x0/0x85 @ 1
bus: 'mdio_bus': add driver Davicom DM9161E
 sda1 sda2
bus: 'mdio_bus': add driver Davicom DM9161A
bus: 'mdio_bus': add driver Davicom DM9131
initcall davicom_init+0x0/0x85 returned 0 after 14226 usecs
calling  cicada_init+0x0/0x6e @ 1
bus: 'mdio_bus': add driver Cicada Cis8204
device: 'sda1': device_add
PM: Adding info for No Bus:sda1
device: 'sda2': device_add
PM: Adding info for No Bus:sda2
bus: 'mdio_bus': add driver Cicada Cis8201
initcall cicada_init+0x0/0x6e returned 0 after 20231 usecs
calling  qs6612_init+0x0/0x3d @ 1
bus: 'mdio_bus': add driver QS6612
initcall qs6612_init+0x0/0x3d returned 0 after 3842 usecs
calling  smsc_init+0x0/0xc8 @ 1
bus: 'mdio_bus': add driver SMSC LAN83C185
bus: 'mdio_bus': add driver SMSC LAN8187
device: '8:0': device_add
PM: Adding info for No Bus:8:0
bus: 'mdio_bus': add driver SMSC LAN8700
sd 1:0:1:0: [sda] Attached SCSI disk
initcall 4_sd_probe_async+0x0/0x240 returned 0 after 168202 usecs
bus: 'mdio_bus': add driver SMSC LAN911x Internal PHY
bus: 'mdio_bus': add driver SMSC LAN8710/LAN8720
initcall smsc_init+0x0/0xc8 returned 0 after 39520 usecs
calling  vsc82xx_init+0x0/0x67 @ 1
bus: 'mdio_bus': add driver Vitesse VSC8244
bus: 'mdio_bus': add driver Vitesse VSC8221
initcall vsc82xx_init+0x0/0x67 returned 0 after 8607 usecs
calling  broadcom_init+0x0/0x174 @ 1
bus: 'mdio_bus': add driver Broadcom BCM5411
bus: 'mdio_bus': add driver Broadcom BCM5421
bus: 'mdio_bus': add driver Broadcom BCM5461
bus: 'mdio_bus': add driver Broadcom BCM5464
bus: 'mdio_bus': add driver Broadcom BCM5481
bus: 'mdio_bus': add driver Broadcom BCM5482
bus: 'mdio_bus': add driver Broadcom BCM50610
bus: 'mdio_bus': add driver Broadcom BCM50610M
bus: 'mdio_bus': add driver Broadcom BCM57780
bus: 'mdio_bus': add driver Broadcom BCMAC131
initcall broadcom_init+0x0/0x174 returned 0 after 44813 usecs
calling  ip175c_init+0x0/0x40 @ 1
bus: 'mdio_bus': add driver ICPlus IP175C
initcall ip175c_init+0x0/0x40 returned 0 after 4078 usecs
calling  realtek_init+0x0/0x40 @ 1
bus: 'mdio_bus': add driver RTL821x Gigabit Ethernet
initcall realtek_init+0x0/0x40 returned 0 after 5015 usecs
calling  ns_init+0x0/0x40 @ 1
bus: 'mdio_bus': add driver NatSemi DP83865
initcall ns_init+0x0/0x40 returned 0 after 4255 usecs
calling  sundance_init+0x0/0x50 @ 1
bus: 'pci': add driver sundance
initcall sundance_init+0x0/0x50 returned 0 after 3305 usecs
calling  hamachi_init+0x0/0x50 @ 1
bus: 'pci': add driver hamachi
initcall hamachi_init+0x0/0x50 returned 0 after 3198 usecs
calling  net_olddevs_init+0x0/0xcb @ 1
initcall net_olddevs_init+0x0/0xcb returned 0 after 5 usecs
calling  sb1000_init+0x0/0x3d @ 1
bus: 'pnp': add driver sb1000
initcall sb1000_init+0x0/0x3d returned 0 after 3082 usecs
calling  b44_init+0x0/0x93 @ 1
bus: 'pci': add driver b44
bus: 'ssb': add driver b44
initcall b44_init+0x0/0x93 returned 0 after 5796 usecs
calling  init_nic+0x0/0x50 @ 1
bus: 'pci': add driver forcedeth
initcall init_nic+0x0/0x50 returned 0 after 3381 usecs
calling  ql3xxx_init_module+0x0/0x45 @ 1
bus: 'pci': add driver qla3xxx
initcall ql3xxx_init_module+0x0/0x45 returned 0 after 3195 usecs
calling  ppp_init+0x0/0x117 @ 1
PPP generic driver version 2.4.2
device class 'ppp': registering
device: 'ppp': device_add
PM: Adding info for No Bus:ppp
initcall ppp_init+0x0/0x117 returned 0 after 12170 usecs
calling  ppp_async_init+0x0/0x5e @ 1
initcall ppp_async_init+0x0/0x5e returned 0 after 1 usecs
calling  ppp_sync_init+0x0/0x5e @ 1
initcall ppp_sync_init+0x0/0x5e returned 0 after 1 usecs
calling  deflate_init+0x0/0x63 @ 1
PPP Deflate Compression module registered
initcall deflate_init+0x0/0x63 returned 0 after 3740 usecs
calling  bsdcomp_init+0x0/0x5e @ 1
PPP BSD Compression module registered
initcall bsdcomp_init+0x0/0x5e returned 0 after 3385 usecs
calling  pppox_init+0x0/0x3d @ 1
NET: Registered protocol family 24
initcall pppox_init+0x0/0x3d returned 0 after 3113 usecs
calling  pppoe_init+0x0/0xbf @ 1
initcall pppoe_init+0x0/0xbf returned 0 after 54 usecs
calling  pppol2tp_init+0x0/0xa8 @ 1
PPPoL2TP kernel driver, V1.0
initcall pppol2tp_init+0x0/0xa8 returned 0 after 2631 usecs
calling  dummy_init_module+0x0/0x120 @ 1
device: 'dummy0': device_add
PM: Adding info for No Bus:dummy0
initcall dummy_init_module+0x0/0x120 returned 0 after 6917 usecs
calling  ifb_init_module+0x0/0x11d @ 1
device: 'ifb0': device_add
PM: Adding info for No Bus:ifb0
device: 'ifb1': device_add
PM: Adding info for No Bus:ifb1
initcall ifb_init_module+0x0/0x11d returned 0 after 12726 usecs
calling  de600_init+0x0/0x3a3 @ 1
eth%d: D-Link DE-600 pocket adapter: not at I/O 0x378.
initcall de600_init+0x0/0x3a3 returned -19 after 4918 usecs
calling  cp_init+0x0/0x50 @ 1
bus: 'pci': add driver 8139cp
initcall cp_init+0x0/0x50 returned 0 after 3161 usecs
calling  rtl8139_init_module+0x0/0x50 @ 1
bus: 'pci': add driver 8139too
initcall rtl8139_init_module+0x0/0x50 returned 0 after 3200 usecs
calling  atp_init_module+0x0/0xd8 @ 1
atp.c:v1.09=ac 2002/10/01 Donald Becker <becker@scyld.com>
initcall atp_init_module+0x0/0xd8 returned -19 after 5175 usecs
calling  eql_init_module+0x0/0x89 @ 1
Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)
device: 'eql': device_add
PM: Adding info for No Bus:eql
initcall eql_init_module+0x0/0x89 returned 0 after 13355 usecs
calling  amd8111e_init+0x0/0x50 @ 1
bus: 'pci': add driver amd8111e
initcall amd8111e_init+0x0/0x50 returned 0 after 3295 usecs
calling  ethoc_init+0x0/0x40 @ 1
bus: 'platform': add driver ethoc
initcall ethoc_init+0x0/0x40 returned 0 after 3411 usecs
calling  dnet_init+0x0/0x40 @ 1
bus: 'platform': add driver dnet
initcall dnet_init+0x0/0x40 returned 0 after 3327 usecs
calling  olympic_pci_init+0x0/0x50 @ 1
bus: 'pci': add driver olympic
initcall olympic_pci_init+0x0/0x50 returned 0 after 3193 usecs
calling  kaweth_init+0x0/0x45 @ 1
bus: 'usb': add driver kaweth
usbcore: registered new interface driver kaweth
initcall kaweth_init+0x0/0x45 returned 0 after 7409 usecs
calling  hso_init+0x0/0x21b @ 1
hso: drivers/net/usb/hso.c: 1.2 Option Wireless
bus: 'usb': add driver hso
usbcore: registered new interface driver hso
initcall hso_init+0x0/0x21b returned 0 after 11185 usecs
calling  usbpn_init+0x0/0x50 @ 1
bus: 'usb': add driver cdc_phonet
usbcore: registered new interface driver cdc_phonet
initcall usbpn_init+0x0/0x50 returned 0 after 8571 usecs
calling  dmfe_init_module+0x0/0x120 @ 1
dmfe: Davicom DM9xxx net driver, version 1.36.4 (2002-01-17)
bus: 'pci': add driver dmfe
initcall dmfe_init_module+0x0/0x120 returned 0 after 8254 usecs
calling  w840_init+0x0/0x60 @ 1
winbond-840.c:v1.01-e (2.4 port) Sep-11-2006  Donald Becker <becker@scyld.com>
  http://www.scyld.com/network/drivers.html
bus: 'pci': add driver winbond-840
initcall w840_init+0x0/0x60 returned 0 after 14254 usecs
calling  tulip_init+0x0/0x60 @ 1
bus: 'pci': add driver tulip
initcall tulip_init+0x0/0x60 returned 0 after 3028 usecs
calling  de4x5_module_init+0x0/0x50 @ 1
bus: 'pci': add driver de4x5
initcall de4x5_module_init+0x0/0x50 returned 0 after 3026 usecs
calling  uli526x_init_module+0x0/0xd0 @ 1
uli526x: ULi M5261/M5263 net driver, version 0.9.3 (2005-7-29)
bus: 'pci': add driver uli526x
initcall uli526x_init_module+0x0/0xd0 returned 0 after 8676 usecs
calling  mkiss_init_driver+0x0/0x6a @ 1
mkiss: AX.25 Multikiss, Hans Albas PE1AYX
initcall mkiss_init_driver+0x0/0x6a returned 0 after 3705 usecs
calling  bpq_init_driver+0x0/0x8c @ 1
AX.25: bpqether driver version 004
initcall bpq_init_driver+0x0/0x8c returned 0 after 3148 usecs
calling  init_baycomserfdx+0x0/0x135 @ 1
baycom_ser_fdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA
baycom_ser_fdx: version 0.10 compiled 11:54:34 Sep 30 2009
device: 'bcsf0': device_add
PM: Adding info for No Bus:bcsf0
device: 'bcsf1': device_add
PM: Adding info for No Bus:bcsf1
device: 'bcsf2': device_add
PM: Adding info for No Bus:bcsf2
device: 'bcsf3': device_add
PM: Adding info for No Bus:bcsf3
initcall init_baycomserfdx+0x0/0x135 returned 0 after 36496 usecs
calling  hdlcdrv_init_driver+0x0/0x50 @ 1
hdlcdrv: (C) 1996-2000 Thomas Sailer HB9JNX/AE4WA
hdlcdrv: version 0.8 compiled 11:54:34 Sep 30 2009
initcall hdlcdrv_init_driver+0x0/0x50 returned 0 after 8850 usecs
calling  init_baycomserhdx+0x0/0x118 @ 1
baycom_ser_hdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA
baycom_ser_hdx: version 0.10 compiled 11:54:35 Sep 30 2009
device: 'bcsh0': device_add
PM: Adding info for No Bus:bcsh0
device: 'bcsh1': device_add
PM: Adding info for No Bus:bcsh1
device: 'bcsh2': device_add
PM: Adding info for No Bus:bcsh2
device: 'bcsh3': device_add
PM: Adding info for No Bus:bcsh3
initcall init_baycomserhdx+0x0/0x118 returned 0 after 36455 usecs
calling  smsc_ircc_init+0x0/0x69c @ 1
bus: 'platform': add driver smsc-ircc2
bus: 'platform': remove driver smsc-ircc2
driver: 'smsc-ircc2': driver_release
initcall smsc_ircc_init+0x0/0x69c returned -19 after 11922 usecs
calling  vlsi_mod_init+0x0/0x180 @ 1
bus: 'pci': add driver vlsi_ir
initcall vlsi_mod_init+0x0/0x180 returned 0 after 3238 usecs
calling  via_ircc_init+0x0/0x90 @ 1
bus: 'pci': add driver via-ircc
initcall via_ircc_init+0x0/0x90 returned 0 after 3282 usecs
calling  mcs_init+0x0/0x80 @ 1
bus: 'usb': add driver mcs7780
usbcore: registered new interface driver mcs7780
initcall mcs_init+0x0/0x80 returned 0 after 7574 usecs
calling  irtty_sir_init+0x0/0x69 @ 1
initcall irtty_sir_init+0x0/0x69 returned 0 after 1 usecs
calling  sir_wq_init+0x0/0x67 @ 1
initcall sir_wq_init+0x0/0x67 returned 0 after 107 usecs
calling  kingsun_init+0x0/0x50 @ 1
bus: 'usb': add driver kingsun-sir
usbcore: registered new interface driver kingsun-sir
initcall kingsun_init+0x0/0x50 returned 0 after 8205 usecs
calling  ksdazzle_init+0x0/0x50 @ 1
bus: 'usb': add driver ksdazzle-sir
usbcore: registered new interface driver ksdazzle-sir
initcall ksdazzle_init+0x0/0x50 returned 0 after 8438 usecs
calling  ks959_init+0x0/0x50 @ 1
bus: 'usb': add driver ks959-sir
usbcore: registered new interface driver ks959-sir
initcall ks959_init+0x0/0x50 returned 0 after 7886 usecs
calling  init_netconsole+0x0/0x293 @ 1
console [netcon0] enabled
netconsole: network logging started
initcall init_netconsole+0x0/0x293 returned 0 after 5601 usecs
calling  init+0x0/0x40 @ 1
bus: 'virtio': add driver virtio_net
initcall init+0x0/0x40 returned 0 after 3684 usecs
calling  i2400m_driver_init+0x0/0x30 @ 1
initcall i2400m_driver_init+0x0/0x30 returned 0 after 0 usecs
calling  i2400ms_driver_init+0x0/0x40 @ 1
bus: 'sdio': add driver i2400m_sdio
async/1 used greatest stack depth: 4632 bytes left
initcall i2400ms_driver_init+0x0/0x40 returned 0 after 8176 usecs
calling  zatm_init_module+0x0/0x45 @ 1
bus: 'pci': add driver zatm
initcall zatm_init_module+0x0/0x45 returned 0 after 2948 usecs
calling  uPD98402_module_init+0x0/0x2d @ 1
initcall uPD98402_module_init+0x0/0x2d returned 0 after 0 usecs
calling  amb_module_init+0x0/0x210 @ 1
Madge ATM Ambassador driver version 1.2.4
amb: debug bitmap is 0
bus: 'pci': add driver amb
initcall amb_module_init+0x0/0x210 returned 0 after 8762 usecs
calling  hrz_module_init+0x0/0x101 @ 1
Madge ATM Horizon [Ultra] driver version 1.2.1
hrz: debug bitmap is 0
bus: 'pci': add driver horizon
initcall hrz_module_init+0x0/0x101 returned 0 after 9430 usecs
calling  ia_module_init+0x0/0x8d @ 1
bus: 'pci': add driver ia
initcall ia_module_init+0x0/0x8d returned 0 after 2786 usecs
calling  idt77252_init+0x0/0x70 @ 1
idt77252_init: at ffffffff826dd600
bus: 'pci': add driver idt77252
initcall idt77252_init+0x0/0x70 returned 0 after 6398 usecs
calling  solos_pci_init+0x0/0x55 @ 1
Solos PCI Driver Version 0.07
bus: 'pci': add driver solos
async/0 used greatest stack depth: 4080 bytes left
initcall solos_pci_init+0x0/0x55 returned 0 after 10336 usecs
calling  adummy_init+0x0/0xdb @ 1
adummy: version 1.0
device: 'adummy0': device_add
PM: Adding info for No Bus:adummy0
initcall adummy_init+0x0/0xdb returned 0 after 8473 usecs
calling  atmtcp_init+0x0/0x3d @ 1
initcall atmtcp_init+0x0/0x3d returned 0 after 18 usecs
calling  lanai_module_init+0x0/0x63 @ 1
bus: 'pci': add driver lanai
initcall lanai_module_init+0x0/0x63 returned 0 after 3025 usecs
calling  i2o_iop_init+0x0/0x7a @ 1
I2O subsystem v1.325
i2o: max drivers = 8
bus: 'i2o': registered
bus: 'i2o': add driver exec-osm
bus: 'pci': add driver PCI_I2O
initcall i2o_iop_init+0x0/0x7a returned 0 after 13266 usecs
calling  i2o_bus_init+0x0/0x6a @ 1
I2O Bus Adapter OSM v1.317
bus: 'i2o': add driver bus-osm
initcall i2o_bus_init+0x0/0x6a returned 0 after 5695 usecs
calling  i2o_scsi_init+0x0/0x79 @ 1
I2O SCSI Peripheral OSM v1.316
bus: 'i2o': add driver scsi-osm
initcall i2o_scsi_init+0x0/0x79 returned 0 after 6027 usecs
calling  i2o_proc_init+0x0/0x236 @ 1
I2O ProcFS OSM v1.316
bus: 'i2o': add driver proc-osm
initcall i2o_proc_init+0x0/0x236 returned 0 after 5275 usecs
calling  fusion_init+0x0/0x165 @ 1
Fusion MPT base driver 3.04.12
Copyright (c) 1999-2008 LSI Corporation
initcall fusion_init+0x0/0x165 returned 0 after 6382 usecs
calling  mptspi_init+0x0/0x102 @ 1
Fusion MPT SPI Host driver 3.04.12
bus: 'pci': add driver mptspi
initcall mptspi_init+0x0/0x102 returned 0 after 6248 usecs
calling  mptfc_init+0x0/0x11f @ 1
Fusion MPT FC Host driver 3.04.12
bus: 'pci': add driver mptfc
initcall mptfc_init+0x0/0x11f returned 0 after 6115 usecs
calling  mptsas_init+0x0/0x130 @ 1
Fusion MPT SAS Host driver 3.04.12
bus: 'pci': add driver mptsas
initcall mptsas_init+0x0/0x130 returned 0 after 6261 usecs
calling  mptctl_init+0x0/0x154 @ 1
Fusion MPT misc device (ioctl) driver 3.04.12
device: 'mptctl': device_add
PM: Adding info for No Bus:mptctl
mptctl: Registered with Fusion MPT base driver
mptctl: /dev/mptctl @ (major,minor=10,220)
initcall mptctl_init+0x0/0x154 returned 0 after 18304 usecs
calling  fw_core_init+0x0/0xc0 @ 1
bus: 'firewire': registered
initcall fw_core_init+0x0/0xc0 returned 0 after 3148 usecs
calling  fw_ohci_init+0x0/0x50 @ 1
bus: 'pci': add driver firewire_ohci
bus: 'pci': driver_probe_device: matched device 0000:00:07.0 with driver firewire_ohci
bus: 'pci': really_probe: probing driver firewire_ohci with device 0000:00:07.0
firewire_ohci 0000:00:07.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
firewire_ohci 0000:00:07.0: calling quirk_via_vlink+0x0/0x120
firewire_ohci: Added fw-ohci device 0000:00:07.0, OHCI version 1.0
driver: '0000:00:07.0': driver_bound: bound to device 'firewire_ohci'
bus: 'pci': really_probe: bound device 0000:00:07.0 to driver firewire_ohci
firewire_ohci 0000:00:07.0: __pm_runtime_idle()!
firewire_ohci 0000:00:07.0: __pm_runtime_idle() returns -11!
initcall fw_ohci_init+0x0/0x50 returned 0 after 129247 usecs
calling  sbp2_init+0x0/0x6d @ 1
bus: 'firewire': add driver sbp2
initcall sbp2_init+0x0/0x6d returned 0 after 3530 usecs
calling  fwnet_init+0x0/0xa3 @ 1
bus: 'firewire': add driver net
initcall fwnet_init+0x0/0xa3 returned 0 after 7906 usecs
calling  init_raw1394+0x0/0x116 @ 1
device: 'raw1394': device_add
PM: Adding info for No Bus:raw1394
ieee1394: raw1394: /dev/raw1394 device initialized
bus: 'ieee1394': add driver raw1394
initcall init_raw1394+0x0/0x116 returned 0 after 14551 usecs
calling  sbp2_module_init+0x0/0xa0 @ 1
bus: 'ieee1394': add driver sbp2
initcall sbp2_module_init+0x0/0xa0 returned 0 after 3456 usecs
calling  ether1394_init_module+0x0/0x96 @ 1
bus: 'ieee1394': add driver eth1394
initcall ether1394_init_module+0x0/0x96 returned 0 after 4511 usecs
calling  cdrom_init+0x0/0x9b @ 1
initcall cdrom_init+0x0/0x9b returned 0 after 14 usecs
calling  uwb_subsys_init+0x0/0x80 @ 1
device class 'uwb_rc': registering
initcall uwb_subsys_init+0x0/0x80 returned 0 after 3562 usecs
calling  hwarc_driver_init+0x0/0x50 @ 1
bus: 'usb': add driver hwa-rc
usbcore: registered new interface driver hwa-rc
initcall hwarc_driver_init+0x0/0x50 returned 0 after 7480 usecs
calling  mon_init+0x0/0x14d @ 1
device class 'usbmon': registering
device: 'usbmon0': device_add
PM: Adding info for No Bus:usbmon0
initcall mon_init+0x0/0x14d returned 0 after 10069 usecs
calling  ehci_hcd_init+0x0/0xf0 @ 1
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
bus: 'pci': add driver ehci_hcd
bus: 'pci': driver_probe_device: matched device 0000:00:10.4 with driver ehci_hcd
bus: 'pci': really_probe: probing driver ehci_hcd with device 0000:00:10.4
IOAPIC[0]: Set routing entry (1-21 -> 0x61 -> IRQ 21 Mode:1 Active:1)
ehci_hcd 0000:00:10.4: PCI INT C -> GSI 21 (level, low) -> IRQ 21
ehci_hcd 0000:00:10.4: calling quirk_via_vlink+0x0/0x120
ehci_hcd 0000:00:10.4: EHCI Host Controller
device: 'usbmon1': device_add
PM: Adding info for No Bus:usbmon1
ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:10.4: irq 21, io mem 0xfdf00000
ehci_hcd 0000:00:10.4: USB 2.0 started, EHCI 1.00
device: 'usb1': device_add
bus: 'usb': add device usb1
PM: Adding info for usb:usb1
bus: 'usb': driver_probe_device: matched device usb1 with driver usb
bus: 'usb': really_probe: probing driver usb with device usb1
usb usb1: configuration #1 chosen from 1 choice
device: '1-0:1.0': device_add
bus: 'usb': add device 1-0:1.0
PM: Adding info for usb:1-0:1.0
bus: 'usb': driver_probe_device: matched device 1-0:1.0 with driver hub
bus: 'usb': really_probe: probing driver hub with device 1-0:1.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
driver: '1-0:1.0': driver_bound: bound to device 'hub'
bus: 'usb': really_probe: bound device 1-0:1.0 to driver hub
hub 1-0:1.0: __pm_runtime_idle()!
hub 1-0:1.0: __pm_runtime_idle() returns -11!
device: 'ep_81': device_add
PM: Adding info for No Bus:ep_81
device: 'usbdev1.1': device_add
PM: Adding info for No Bus:usbdev1.1
driver: 'usb1': driver_bound: bound to device 'usb'
bus: 'usb': really_probe: bound device usb1 to driver usb
usb usb1: __pm_runtime_idle()!
usb usb1: __pm_runtime_idle() returns -11!
device: 'ep_00': device_add
PM: Adding info for No Bus:ep_00
driver: '0000:00:10.4': driver_bound: bound to device 'ehci_hcd'
bus: 'pci': really_probe: bound device 0000:00:10.4 to driver ehci_hcd
ehci_hcd 0000:00:10.4: __pm_runtime_idle()!
ehci_hcd 0000:00:10.4: __pm_runtime_idle() returns -11!
initcall ehci_hcd_init+0x0/0xf0 returned 0 after 197960 usecs
calling  oxu_module_init+0x0/0x40 @ 1
bus: 'platform': add driver oxu210hp-hcd
initcall oxu_module_init+0x0/0x40 returned 0 after 4018 usecs
calling  isp116x_init+0x0/0x70 @ 1
116x: driver isp116x-hcd, 03 Nov 2005
bus: 'platform': add driver isp116x-hcd
initcall isp116x_init+0x0/0x70 returned 0 after 7722 usecs
calling  ohci_hcd_mod_init+0x0/0x120 @ 1
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
bus: 'pci': add driver ohci_hcd
bus: 'ssb': add driver ohci_hcd
bus: 'platform': add driver sm501-usb
initcall ohci_hcd_mod_init+0x0/0x120 returned 0 after 15429 usecs
calling  uhci_hcd_init+0x0/0x100 @ 1
uhci_hcd: USB Universal Host Controller Interface driver
bus: 'pci': add driver uhci_hcd
bus: 'pci': driver_probe_device: matched device 0000:00:10.0 with driver uhci_hcd
bus: 'pci': really_probe: probing driver uhci_hcd with device 0000:00:10.0
uhci_hcd 0000:00:10.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.0: calling quirk_via_vlink+0x0/0x120
uhci_hcd 0000:00:10.0: UHCI Host Controller
device: 'usbmon2': device_add
PM: Adding info for No Bus:usbmon2
uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:10.0: irq 21, io base 0x0000b400
device: 'usb2': device_add
bus: 'usb': add device usb2
PM: Adding info for usb:usb2
device: 'fw0': device_add
bus: 'firewire': add device fw0
PM: Adding info for firewire:fw0
bus: 'usb': driver_probe_device: matched device usb2 with driver usb
bus: 'usb': really_probe: probing driver usb with device usb2
usb usb2: configuration #1 chosen from 1 choice
device: '2-0:1.0': device_add
bus: 'usb': add device 2-0:1.0
PM: Adding info for usb:2-0:1.0
firewire fw0: __pm_runtime_idle()!
firewire fw0: __pm_runtime_idle() returns -11!
device: 'fw0.0': device_add
bus: 'firewire': add device fw0.0
PM: Adding info for firewire:fw0.0
bus: 'firewire': driver_probe_device: matched device fw0.0 with driver net
bus: 'firewire': really_probe: probing driver net with device fw0.0
device: 'firewire0': device_add
PM: Adding info for No Bus:firewire0
bus: 'usb': driver_probe_device: matched device 2-0:1.0 with driver hub
bus: 'usb': really_probe: probing driver hub with device 2-0:1.0
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
driver: '2-0:1.0': driver_bound: bound to device 'hub'
bus: 'usb': really_probe: bound device 2-0:1.0 to driver hub
hub 2-0:1.0: __pm_runtime_idle()!
hub 2-0:1.0: __pm_runtime_idle() returns -11!
device: 'ep_81': device_add
PM: Adding info for No Bus:ep_81
device: 'usbdev2.1': device_add
PM: Adding info for No Bus:usbdev2.1
firewire_net: firewire0: IPv4 over FireWire on device 00e0180000330efd
driver: 'fw0.0': driver_bound: bound to device 'net'
bus: 'firewire': really_probe: bound device fw0.0 to driver net
net fw0.0: __pm_runtime_idle()!
net fw0.0: __pm_runtime_idle() returns -11!
firewire_core: created device fw0: GUID 00e0180000330efd, S400
driver: 'usb2': driver_bound: bound to device 'usb'
bus: 'usb': really_probe: bound device usb2 to driver usb
usb usb2: __pm_runtime_idle()!
usb usb2: __pm_runtime_idle() returns -11!
device: 'ep_00': device_add
PM: Adding info for No Bus:ep_00
driver: '0000:00:10.0': driver_bound: bound to device 'uhci_hcd'
bus: 'pci': really_probe: bound device 0000:00:10.0 to driver uhci_hcd
uhci_hcd 0000:00:10.0: __pm_runtime_idle()!
uhci_hcd 0000:00:10.0: __pm_runtime_idle() returns -11!
bus: 'pci': driver_probe_device: matched device 0000:00:10.1 with driver uhci_hcd
bus: 'pci': really_probe: probing driver uhci_hcd with device 0000:00:10.1
uhci_hcd 0000:00:10.1: PCI INT A -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.1: calling quirk_via_vlink+0x0/0x120
uhci_hcd 0000:00:10.1: UHCI Host Controller
device: 'usbmon3': device_add
PM: Adding info for No Bus:usbmon3
uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:10.1: irq 21, io base 0x0000b800
device: 'usb3': device_add
bus: 'usb': add device usb3
PM: Adding info for usb:usb3
bus: 'usb': driver_probe_device: matched device usb3 with driver usb
bus: 'usb': really_probe: probing driver usb with device usb3
usb usb3: configuration #1 chosen from 1 choice
device: '3-0:1.0': device_add
bus: 'usb': add device 3-0:1.0
PM: Adding info for usb:3-0:1.0
bus: 'usb': driver_probe_device: matched device 3-0:1.0 with driver hub
bus: 'usb': really_probe: probing driver hub with device 3-0:1.0
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
driver: '3-0:1.0': driver_bound: bound to device 'hub'
bus: 'usb': really_probe: bound device 3-0:1.0 to driver hub
hub 3-0:1.0: __pm_runtime_idle()!
hub 3-0:1.0: __pm_runtime_idle() returns -11!
device: 'ep_81': device_add
PM: Adding info for No Bus:ep_81
device: 'usbdev3.1': device_add
PM: Adding info for No Bus:usbdev3.1
driver: 'usb3': driver_bound: bound to device 'usb'
bus: 'usb': really_probe: bound device usb3 to driver usb
usb usb3: __pm_runtime_idle()!
usb usb3: __pm_runtime_idle() returns -11!
device: 'ep_00': device_add
PM: Adding info for No Bus:ep_00
driver: '0000:00:10.1': driver_bound: bound to device 'uhci_hcd'
bus: 'pci': really_probe: bound device 0000:00:10.1 to driver uhci_hcd
uhci_hcd 0000:00:10.1: __pm_runtime_idle()!
uhci_hcd 0000:00:10.1: __pm_runtime_idle() returns -11!
bus: 'pci': driver_probe_device: matched device 0000:00:10.2 with driver uhci_hcd
bus: 'pci': really_probe: probing driver uhci_hcd with device 0000:00:10.2
uhci_hcd 0000:00:10.2: PCI INT B -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.2: calling quirk_via_vlink+0x0/0x120
uhci_hcd 0000:00:10.2: UHCI Host Controller
device: 'usbmon4': device_add
PM: Adding info for No Bus:usbmon4
uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:10.2: irq 21, io base 0x0000c000
device: 'usb4': device_add
bus: 'usb': add device usb4
PM: Adding info for usb:usb4
bus: 'usb': driver_probe_device: matched device usb4 with driver usb
bus: 'usb': really_probe: probing driver usb with device usb4
usb usb4: configuration #1 chosen from 1 choice
device: '4-0:1.0': device_add
bus: 'usb': add device 4-0:1.0
PM: Adding info for usb:4-0:1.0
bus: 'usb': driver_probe_device: matched device 4-0:1.0 with driver hub
bus: 'usb': really_probe: probing driver hub with device 4-0:1.0
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
driver: '4-0:1.0': driver_bound: bound to device 'hub'
bus: 'usb': really_probe: bound device 4-0:1.0 to driver hub
hub 4-0:1.0: __pm_runtime_idle()!
hub 4-0:1.0: __pm_runtime_idle() returns -11!
device: 'ep_81': device_add
PM: Adding info for No Bus:ep_81
device: 'usbdev4.1': device_add
PM: Adding info for No Bus:usbdev4.1
driver: 'usb4': driver_bound: bound to device 'usb'
bus: 'usb': really_probe: bound device usb4 to driver usb
usb usb4: __pm_runtime_idle()!
usb usb4: __pm_runtime_idle() returns -11!
device: 'ep_00': device_add
PM: Adding info for No Bus:ep_00
driver: '0000:00:10.2': driver_bound: bound to device 'uhci_hcd'
bus: 'pci': really_probe: bound device 0000:00:10.2 to driver uhci_hcd
uhci_hcd 0000:00:10.2: __pm_runtime_idle()!
uhci_hcd 0000:00:10.2: __pm_runtime_idle() returns -11!
bus: 'pci': driver_probe_device: matched device 0000:00:10.3 with driver uhci_hcd
bus: 'pci': really_probe: probing driver uhci_hcd with device 0000:00:10.3
uhci_hcd 0000:00:10.3: PCI INT B -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.3: calling quirk_via_vlink+0x0/0x120
uhci_hcd 0000:00:10.3: UHCI Host Controller
device: 'usbmon5': device_add
PM: Adding info for No Bus:usbmon5
uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:10.3: irq 21, io base 0x0000c400
device: 'usb5': device_add
bus: 'usb': add device usb5
PM: Adding info for usb:usb5
bus: 'usb': driver_probe_device: matched device usb5 with driver usb
bus: 'usb': really_probe: probing driver usb with device usb5
usb usb5: configuration #1 chosen from 1 choice
device: '5-0:1.0': device_add
bus: 'usb': add device 5-0:1.0
PM: Adding info for usb:5-0:1.0
bus: 'usb': driver_probe_device: matched device 5-0:1.0 with driver hub
bus: 'usb': really_probe: probing driver hub with device 5-0:1.0
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
driver: '5-0:1.0': driver_bound: bound to device 'hub'
bus: 'usb': really_probe: bound device 5-0:1.0 to driver hub
hub 5-0:1.0: __pm_runtime_idle()!
hub 5-0:1.0: __pm_runtime_idle() returns -11!
device: 'ep_81': device_add
PM: Adding info for No Bus:ep_81
device: 'usbdev5.1': device_add
PM: Adding info for No Bus:usbdev5.1
driver: 'usb5': driver_bound: bound to device 'usb'
bus: 'usb': really_probe: bound device usb5 to driver usb
usb usb5: __pm_runtime_idle()!
usb usb5: __pm_runtime_idle() returns -11!
device: 'ep_00': device_add
PM: Adding info for No Bus:ep_00
driver: '0000:00:10.3': driver_bound: bound to device 'uhci_hcd'
bus: 'pci': really_probe: bound device 0000:00:10.3 to driver uhci_hcd
uhci_hcd 0000:00:10.3: __pm_runtime_idle()!
uhci_hcd 0000:00:10.3: __pm_runtime_idle() returns -11!
initcall uhci_hcd_init+0x0/0x100 returned 0 after 763391 usecs
calling  sl811h_init+0x0/0x70 @ 1
sl811: driver sl811-hcd, 19 May 2005
bus: 'platform': add driver sl811-hcd
initcall sl811h_init+0x0/0x70 returned 0 after 7037 usecs
calling  r8a66597_init+0x0/0x6a @ 1
r8a66597_hcd: driver r8a66597_hcd, 2009-05-26
bus: 'platform': add driver r8a66597_hcd
initcall r8a66597_init+0x0/0x6a returned 0 after 8274 usecs
calling  isp1760_init+0x0/0x90 @ 1
bus: 'platform': add driver isp1760
bus: 'pci': add driver isp1760
initcall isp1760_init+0x0/0x90 returned 0 after 8722 usecs
calling  hwahc_driver_init+0x0/0x50 @ 1
bus: 'usb': add driver hwa-hc
usbcore: registered new interface driver hwa-hc
initcall hwahc_driver_init+0x0/0x50 returned 0 after 7450 usecs
calling  c67x00_init+0x0/0x40 @ 1
bus: 'platform': add driver c67x00
initcall c67x00_init+0x0/0x40 returned 0 after 3501 usecs
calling  wusbcore_init+0x0/0xa0 @ 1
initcall wusbcore_init+0x0/0xa0 returned 0 after 110 usecs
calling  acm_init+0x0/0x170 @ 1
bus: 'usb': add driver cdc_acm
usbcore: registered new interface driver cdc_acm
cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
initcall acm_init+0x0/0x170 returned 0 after 14697 usecs
calling  usblp_init+0x0/0x50 @ 1
bus: 'usb': add driver usblp
usbcore: registered new interface driver usblp
initcall usblp_init+0x0/0x50 returned 0 after 7266 usecs
calling  wdm_init+0x0/0x45 @ 1
bus: 'usb': add driver cdc_wdm
usbcore: registered new interface driver cdc_wdm
initcall wdm_init+0x0/0x45 returned 0 after 7598 usecs
calling  usbtmc_init+0x0/0x6b @ 1
bus: 'usb': add driver usbtmc
usbcore: registered new interface driver usbtmc
initcall usbtmc_init+0x0/0x6b returned 0 after 7432 usecs
calling  usb_stor_init+0x0/0x7d @ 1
Initializing USB Mass Storage driver...
bus: 'usb': add driver usb-storage
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
initcall usb_stor_init+0x0/0x7d returned 0 after 15125 usecs
calling  usb_usual_init+0x0/0x73 @ 1
bus: 'usb': add driver libusual
usbcore: registered new interface driver libusual
initcall usb_usual_init+0x0/0x73 returned 0 after 8007 usecs
calling  cypress_init+0x0/0x50 @ 1
bus: 'usb': add driver ums-cypress
usbcore: registered new interface driver ums-cypress
initcall cypress_init+0x0/0x50 returned 0 after 8276 usecs
calling  isd200_init+0x0/0x50 @ 1
bus: 'usb': add driver ums-isd200
usbcore: registered new interface driver ums-isd200
initcall isd200_init+0x0/0x50 returned 0 after 8101 usecs
calling  onetouch_init+0x0/0x50 @ 1
bus: 'usb': add driver ums-onetouch
usbcore: registered new interface driver ums-onetouch
initcall onetouch_init+0x0/0x50 returned 0 after 8436 usecs
calling  sddr55_init+0x0/0x50 @ 1
bus: 'usb': add driver ums-sddr55
usbcore: registered new interface driver ums-sddr55
initcall sddr55_init+0x0/0x50 returned 0 after 8102 usecs
calling  usbat_init+0x0/0x45 @ 1
bus: 'usb': add driver ums-usbat
usbcore: registered new interface driver ums-usbat
initcall usbat_init+0x0/0x45 returned 0 after 7931 usecs
calling  usb_mdc800_init+0x0/0x2db @ 1
bus: 'usb': add driver mdc800
usbcore: registered new interface driver mdc800
mdc800: v0.7.5 (30/10/2000):USB Driver for Mustek MDC800 Digital Camera
initcall usb_mdc800_init+0x0/0x2db returned 0 after 13727 usecs
calling  adu_init+0x0/0xbe @ 1
bus: 'usb': add driver adutux
usbcore: registered new interface driver adutux
adutux adutux (see www.ontrak.net) v0.0.13
adutux is an experimental driver. Use at your own risk
initcall adu_init+0x0/0xbe returned 0 after 16027 usecs
calling  appledisplay_init+0x0/0x82 @ 1
bus: 'usb': add driver appledisplay
usbcore: registered new interface driver appledisplay
initcall appledisplay_init+0x0/0x82 returned 0 after 8591 usecs
calling  berry_init+0x0/0x45 @ 1
bus: 'usb': add driver berry_charge
usbcore: registered new interface driver berry_charge
initcall berry_init+0x0/0x45 returned 0 after 8450 usecs
calling  usb_cytherm_init+0x0/0x7b @ 1
bus: 'usb': add driver cytherm
usbcore: registered new interface driver cytherm
cytherm: v1.0:Cypress USB Thermometer driver
initcall usb_cytherm_init+0x0/0x7b returned 0 after 11534 usecs
calling  emi26_init+0x0/0x45 @ 1
bus: 'usb': add driver emi26 - firmware loader
usbcore: registered new interface driver emi26 - firmware loader
initcall emi26_init+0x0/0x45 returned 0 after 10319 usecs
calling  emi62_init+0x0/0x60 @ 1
bus: 'usb': add driver emi62 - firmware loader
usbcore: registered new interface driver emi62 - firmware loader
initcall emi62_init+0x0/0x60 returned 0 after 10326 usecs
calling  ftdi_elan_init+0x0/0x193 @ 1
driver ftdi-elan built at 11:54:45 on Sep 30 2009
bus: 'usb': add driver ftdi-elan
usbcore: registered new interface driver ftdi-elan
initcall ftdi_elan_init+0x0/0x193 returned 0 after 12713 usecs
calling  usb_idmouse_init+0x0/0x78 @ 1
idmouse: 0.6:Siemens ID Mouse FingerTIP Sensor Driver
bus: 'usb': add driver idmouse
usbcore: registered new interface driver idmouse
initcall usb_idmouse_init+0x0/0x78 returned 0 after 12326 usecs
calling  iowarrior_init+0x0/0x50 @ 1
bus: 'usb': add driver iowarrior
usbcore: registered new interface driver iowarrior
initcall iowarrior_init+0x0/0x50 returned 0 after 7897 usecs
calling  isight_firmware_init+0x0/0x45 @ 1
bus: 'usb': add driver isight_firmware
usbcore: registered new interface driver isight_firmware
initcall isight_firmware_init+0x0/0x45 returned 0 after 8958 usecs
calling  usb_lcd_init+0x0/0x62 @ 1
bus: 'usb': add driver usblcd
usbcore: registered new interface driver usblcd
initcall usb_lcd_init+0x0/0x62 returned 0 after 7412 usecs
calling  ld_usb_init+0x0/0x62 @ 1
bus: 'usb': add driver ldusb
usbcore: registered new interface driver ldusb
initcall ld_usb_init+0x0/0x62 returned 0 after 7257 usecs
calling  usb_led_init+0x0/0x62 @ 1
bus: 'usb': add driver usbled
usbcore: registered new interface driver usbled
initcall usb_led_init+0x0/0x62 returned 0 after 7432 usecs
calling  usb_rio_init+0x0/0x65 @ 1
bus: 'usb': add driver rio500
usbcore: registered new interface driver rio500
rio500: v1.1:USB Rio 500 driver
initcall usb_rio_init+0x0/0x65 returned 0 after 10284 usecs
calling  usbtest_init+0x0/0x83 @ 1
bus: 'usb': add driver usbtest
usbcore: registered new interface driver usbtest
initcall usbtest_init+0x0/0x83 returned 0 after 7611 usecs
calling  tv_init+0x0/0x70 @ 1
bus: 'usb': add driver trancevibrator
usbcore: registered new interface driver trancevibrator
trancevibrator: v1.1:PlayStation 2 Trance Vibrator driver
initcall tv_init+0x0/0x70 returned 0 after 13845 usecs
calling  uss720_init+0x0/0x8a @ 1
bus: 'usb': add driver uss720
usbcore: registered new interface driver uss720
uss720: v0.6:USB Parport Cable driver for Cables using the Lucent Technologies USS720 Chip
uss720: NOTE: this is a special purpose driver to allow nonstandard
uss720: protocols (eg. bitbang) over USS720 usb to parallel cables
uss720: If you just want to connect to a printer, use usblp instead
initcall uss720_init+0x0/0x8a returned 0 after 33008 usecs
calling  vstusb_init+0x0/0x73 @ 1
bus: 'usb': add driver vstusb
usbcore: registered new interface driver vstusb
initcall vstusb_init+0x0/0x73 returned 0 after 7453 usecs
calling  usb_sisusb_init+0x0/0x50 @ 1
bus: 'usb': add driver sisusb
usbcore: registered new interface driver sisusb
initcall usb_sisusb_init+0x0/0x50 returned 0 after 7397 usecs
calling  cxacru_init+0x0/0x50 @ 1
bus: 'usb': add driver cxacru
usbcore: registered new interface driver cxacru
initcall cxacru_init+0x0/0x50 returned 0 after 7432 usecs
calling  speedtch_usb_init+0x0/0x50 @ 1
bus: 'usb': add driver speedtch
usbcore: registered new interface driver speedtch
initcall speedtch_usb_init+0x0/0x50 returned 0 after 7754 usecs
calling  usbatm_usb_init+0x0/0x80 @ 1
initcall usbatm_usb_init+0x0/0x80 returned 0 after 0 usecs
calling  i8042_init+0x0/0x49b @ 1
bus: 'pnp': add driver i8042 kbd
bus: 'pnp': add driver i8042 aux
bus: 'pnp': remove driver i8042 kbd
driver: 'i8042 kbd': driver_release
bus: 'pnp': remove driver i8042 aux
driver: 'i8042 aux': driver_release
PNP: No PS/2 controller found. Probing ports directly.
Registering platform device 'i8042'. Parent at platform
device: 'i8042': device_add
bus: 'platform': add device i8042
PM: Adding info for platform:i8042
platform i8042: __pm_runtime_idle()!
platform i8042: __pm_runtime_idle() returns -11!
bus: 'platform': add driver i8042
bus: 'platform': driver_probe_device: matched device i8042 with driver i8042
bus: 'platform': really_probe: probing driver i8042 with device i8042
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
driver: 'i8042': driver_bound: bound to device 'i8042'
bus: 'platform': really_probe: bound device i8042 to driver i8042
i8042 i8042: __pm_runtime_idle()!
i8042 i8042: __pm_runtime_idle() returns -11!
device: 'serio0': device_add
bus: 'serio': add device serio0
PM: Adding info for serio:serio0
serio serio0: __pm_runtime_idle()!
serio serio0: __pm_runtime_idle() returns -11!
device: 'serio1': device_add
bus: 'serio': add device serio1
PM: Adding info for serio:serio1
initcall i8042_init+0x0/0x49b returned 0 after 114468 usecs
calling  serport_init+0x0/0x5c @ 1
initcall serport_init+0x0/0x5c returned 0 after 1 usecs
calling  ct82c710_init+0x0/0x1ec @ 1
initcall ct82c710_init+0x0/0x1ec returned -19 after 8 usecs
calling  pcips2_init+0x0/0x50 @ 1
bus: 'pci': add driver pcips2
serio serio1: __pm_runtime_idle()!
serio serio1: __pm_runtime_idle() returns -11!
initcall pcips2_init+0x0/0x50 returned 0 after 10621 usecs
calling  emu_init+0x0/0x50 @ 1
bus: 'pci': add driver Emu10k1_gameport
initcall emu_init+0x0/0x50 returned 0 after 3961 usecs
calling  mousedev_init+0x0/0xbd @ 1
device: 'mice': device_add
PM: Adding info for No Bus:mice
device: 'psaux': device_add
PM: Adding info for No Bus:psaux
mice: PS/2 mouse device common for all mice
initcall mousedev_init+0x0/0xbd returned 0 after 16143 usecs
calling  joydev_init+0x0/0x40 @ 1
initcall joydev_init+0x0/0x40 returned 0 after 3 usecs
calling  evdev_init+0x0/0x40 @ 1
device: 'event0': device_add
PM: Adding info for No Bus:event0
device: 'event1': device_add
PM: Adding info for No Bus:event1
device: 'event2': device_add
PM: Adding info for No Bus:event2
initcall evdev_init+0x0/0x40 returned 0 after 19358 usecs
calling  adp5588_init+0x0/0x40 @ 1
bus: 'i2c': add driver adp5588_keys
i2c-core: driver [adp5588_keys] registered
initcall adp5588_init+0x0/0x40 returned 0 after 7489 usecs
calling  atkbd_init+0x0/0x58 @ 1
bus: 'serio': add driver atkbd
initcall atkbd_init+0x0/0x58 returned 0 after 3197 usecs
calling  lkkbd_init+0x0/0x50 @ 1
bus: 'serio': add driver lkkbd
bus: 'serio': driver_probe_device: matched device serio0 with driver atkbd
bus: 'serio': really_probe: probing driver atkbd with device serio0
initcall lkkbd_init+0x0/0x50 returned 0 after 16090 usecs
calling  lm8323_init+0x0/0x40 @ 1
bus: 'i2c': add driver lm8323
i2c-core: driver [lm8323] registered
initcall lm8323_init+0x0/0x40 returned 0 after 6538 usecs
calling  max7359_init+0x0/0x40 @ 1
bus: 'i2c': add driver max7359
i2c-core: driver [max7359] registered
initcall max7359_init+0x0/0x40 returned 0 after 6643 usecs
calling  nkbd_init+0x0/0x50 @ 1
bus: 'serio': add driver newtonkbd
serio serio0: __pm_runtime_idle()!
serio serio0: __pm_runtime_idle() returns -11!
bus: 'serio': driver_probe_device: matched device serio1 with driver atkbd
bus: 'serio': really_probe: probing driver atkbd with device serio1
initcall nkbd_init+0x0/0x50 returned 0 after 23556 usecs
calling  skbd_init+0x0/0x50 @ 1
bus: 'serio': add driver stowaway
initcall skbd_init+0x0/0x50 returned 0 after 3441 usecs
calling  sunkbd_init+0x0/0x50 @ 1
bus: 'serio': add driver sunkbd
initcall sunkbd_init+0x0/0x50 returned 0 after 3297 usecs
calling  xtkbd_init+0x0/0x50 @ 1
bus: 'serio': add driver xtkbd
initcall xtkbd_init+0x0/0x50 returned 0 after 3195 usecs
calling  ad7877_init+0x0/0x40 @ 1
bus: 'spi': add driver ad7877
serio serio1: __pm_runtime_idle()!
serio serio1: __pm_runtime_idle() returns -11!
initcall ad7877_init+0x0/0x40 returned 0 after 10646 usecs
calling  ad7879_init+0x0/0x40 @ 1
bus: 'i2c': add driver ad7879
i2c-core: driver [ad7879] registered
initcall ad7879_init+0x0/0x40 returned 0 after 6430 usecs
calling  gunze_init+0x0/0x50 @ 1
bus: 'serio': add driver gunze
initcall gunze_init+0x0/0x50 returned 0 after 3180 usecs
calling  fujitsu_init+0x0/0x50 @ 1
bus: 'serio': add driver fujitsu_ts
initcall fujitsu_init+0x0/0x50 returned 0 after 3647 usecs
calling  inexio_init+0x0/0x50 @ 1
bus: 'serio': add driver inexio
initcall inexio_init+0x0/0x50 returned 0 after 3286 usecs
calling  mtouch_init+0x0/0x45 @ 1
bus: 'serio': add driver mtouch
initcall mtouch_init+0x0/0x45 returned 0 after 3295 usecs
calling  mk712_init+0x0/0x21b @ 1
mk712: device not present
initcall mk712_init+0x0/0x21b returned -19 after 2357 usecs
calling  usbtouch_init+0x0/0x50 @ 1
bus: 'usb': add driver usbtouchscreen
usbcore: registered new interface driver usbtouchscreen
initcall usbtouch_init+0x0/0x50 returned 0 after 8808 usecs
calling  pm_init+0x0/0x50 @ 1
bus: 'serio': add driver penmountlpc
initcall pm_init+0x0/0x50 returned 0 after 3698 usecs
calling  touchit213_init+0x0/0x50 @ 1
bus: 'serio': add driver touchit213
initcall touchit213_init+0x0/0x50 returned 0 after 3633 usecs
calling  tw_init+0x0/0x50 @ 1
bus: 'serio': add driver touchwin
initcall tw_init+0x0/0x50 returned 0 after 3583 usecs
calling  tsc2007_init+0x0/0x40 @ 1
bus: 'i2c': add driver tsc2007
i2c-core: driver [tsc2007] registered
initcall tsc2007_init+0x0/0x40 returned 0 after 6645 usecs
calling  w8001_init+0x0/0x50 @ 1
bus: 'serio': add driver w8001
initcall w8001_init+0x0/0x50 returned 0 after 3298 usecs
calling  pcap_ts_init+0x0/0x40 @ 1
bus: 'platform': add driver pcap-ts
initcall pcap_ts_init+0x0/0x40 returned 0 after 3600 usecs
calling  cmos_init+0x0/0x93 @ 1
Driver 'rtc_cmos' needs updating - please use bus_type methods
bus: 'pnp': add driver rtc_cmos
bus: 'pnp': driver_probe_device: matched device 00:02 with driver rtc_cmos
bus: 'pnp': really_probe: probing driver rtc_cmos with device 00:02
rtc_cmos 00:02: RTC can wake from S4
device: 'rtc0': device_add
PM: Adding info for No Bus:rtc0
rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
rtc0: alarms up to one year, y3k, 114 bytes nvram
driver: '00:02': driver_bound: bound to device 'rtc_cmos'
bus: 'pnp': really_probe: bound device 00:02 to driver rtc_cmos
rtc_cmos 00:02: __pm_runtime_idle()!
rtc_cmos 00:02: __pm_runtime_idle() returns -11!
initcall cmos_init+0x0/0x93 returned 0 after 58099 usecs
calling  ds1307_init+0x0/0x40 @ 1
bus: 'i2c': add driver rtc-ds1307
i2c-core: driver [rtc-ds1307] registered
initcall ds1307_init+0x0/0x40 returned 0 after 7151 usecs
calling  ds1374_init+0x0/0x40 @ 1
bus: 'i2c': add driver rtc-ds1374
i2c-core: driver [rtc-ds1374] registered
initcall ds1374_init+0x0/0x40 returned 0 after 7141 usecs
calling  ds1511_rtc_init+0x0/0x40 @ 1
bus: 'platform': add driver ds1511
initcall ds1511_rtc_init+0x0/0x40 returned 0 after 3621 usecs
calling  ds1553_init+0x0/0x40 @ 1
bus: 'platform': add driver rtc-ds1553
initcall ds1553_init+0x0/0x40 returned 0 after 3842 usecs
calling  ds1672_init+0x0/0x40 @ 1
bus: 'i2c': add driver rtc-ds1672
i2c-core: driver [rtc-ds1672] registered
initcall ds1672_init+0x0/0x40 returned 0 after 7142 usecs
calling  ds1742_init+0x0/0x40 @ 1
bus: 'platform': add driver rtc-ds1742
initcall ds1742_init+0x0/0x40 returned 0 after 3851 usecs
calling  ds3234_init+0x0/0x40 @ 1
bus: 'spi': add driver ds3234
initcall ds3234_init+0x0/0x40 returned 0 after 3080 usecs
calling  m41t80_rtc_init+0x0/0x40 @ 1
bus: 'i2c': add driver rtc-m41t80
i2c-core: driver [rtc-m41t80] registered
initcall m41t80_rtc_init+0x0/0x40 returned 0 after 7151 usecs
calling  m41t94_init+0x0/0x40 @ 1
bus: 'spi': add driver rtc-m41t94
initcall m41t94_init+0x0/0x40 returned 0 after 3414 usecs
calling  m48t59_rtc_init+0x0/0x40 @ 1
bus: 'platform': add driver rtc-m48t59
initcall m48t59_rtc_init+0x0/0x40 returned 0 after 3840 usecs
calling  max6900_init+0x0/0x40 @ 1
bus: 'i2c': add driver rtc-max6900
i2c-core: driver [rtc-max6900] registered
initcall max6900_init+0x0/0x40 returned 0 after 7324 usecs
calling  max6902_init+0x0/0x40 @ 1
bus: 'spi': add driver rtc-max6902
initcall max6902_init+0x0/0x40 returned 0 after 3508 usecs
calling  rtc_pcap_init+0x0/0x50 @ 1
bus: 'platform': add driver pcap-rtc
bus: 'platform': remove driver pcap-rtc
driver: 'pcap-rtc': driver_release
initcall rtc_pcap_init+0x0/0x50 returned -19 after 10942 usecs
calling  r9701_init+0x0/0x40 @ 1
bus: 'spi': add driver rtc-r9701
initcall r9701_init+0x0/0x40 returned 0 after 3456 usecs
calling  rs5c348_init+0x0/0x40 @ 1
bus: 'spi': add driver rtc-rs5c348
initcall rs5c348_init+0x0/0x40 returned 0 after 3495 usecs
calling  rs5c372_init+0x0/0x40 @ 1
bus: 'i2c': add driver rtc-rs5c372
i2c-core: driver [rtc-rs5c372] registered
initcall rs5c372_init+0x0/0x40 returned 0 after 7296 usecs
calling  rx8025_init+0x0/0x40 @ 1
bus: 'i2c': add driver rtc-rx8025
i2c-core: driver [rtc-rx8025] registered
initcall rx8025_init+0x0/0x40 returned 0 after 7214 usecs
calling  s35390a_rtc_init+0x0/0x3d @ 1
bus: 'i2c': add driver rtc-s35390a
i2c-core: driver [rtc-s35390a] registered
initcall s35390a_rtc_init+0x0/0x3d returned 0 after 7322 usecs
calling  test_init+0x0/0xf3 @ 1
bus: 'platform': add driver rtc-test
Registering platform device 'rtc-test.0'. Parent at platform
device: 'rtc-test.0': device_add
bus: 'platform': add device rtc-test.0
PM: Adding info for platform:rtc-test.0
bus: 'platform': driver_probe_device: matched device rtc-test.0 with driver rtc-test
bus: 'platform': really_probe: probing driver rtc-test with device rtc-test.0
device: 'rtc1': device_add
PM: Adding info for No Bus:rtc1
rtc-test rtc-test.0: rtc core: registered test as rtc1
driver: 'rtc-test.0': driver_bound: bound to device 'rtc-test'
bus: 'platform': really_probe: bound device rtc-test.0 to driver rtc-test
rtc-test rtc-test.0: __pm_runtime_idle()!
rtc-test rtc-test.0: __pm_runtime_idle() returns -11!
Registering platform device 'rtc-test.1'. Parent at platform
device: 'rtc-test.1': device_add
bus: 'platform': add device rtc-test.1
PM: Adding info for platform:rtc-test.1
bus: 'platform': driver_probe_device: matched device rtc-test.1 with driver rtc-test
bus: 'platform': really_probe: probing driver rtc-test with device rtc-test.1
device: 'rtc2': device_add
PM: Adding info for No Bus:rtc2
rtc-test rtc-test.1: rtc core: registered test as rtc2
driver: 'rtc-test.1': driver_bound: bound to device 'rtc-test'
bus: 'platform': really_probe: bound device rtc-test.1 to driver rtc-test
rtc-test rtc-test.1: __pm_runtime_idle()!
rtc-test rtc-test.1: __pm_runtime_idle() returns -11!
initcall test_init+0x0/0xf3 returned 0 after 125909 usecs
calling  v3020_init+0x0/0x40 @ 1
bus: 'platform': add driver v3020
initcall v3020_init+0x0/0x40 returned 0 after 3416 usecs
calling  wm831x_rtc_init+0x0/0x40 @ 1
bus: 'platform': add driver wm831x-rtc
initcall wm831x_rtc_init+0x0/0x40 returned 0 after 3838 usecs
calling  i2c_dev_init+0x0/0xe3 @ 1
i2c /dev entries driver
device class 'i2c-dev': registering
bus: 'i2c': add driver dev_driver
i2c-core: driver [dev_driver] registered
initcall i2c_dev_init+0x0/0xe3 returned 0 after 13042 usecs
calling  acpi_smbus_cmi_init+0x0/0x40 @ 1
bus: 'acpi': add driver cmi
initcall acpi_smbus_cmi_init+0x0/0x40 returned 0 after 3060 usecs
calling  i2c_ali15x3_init+0x0/0x50 @ 1
bus: 'pci': add driver ali15x3_smbus
initcall i2c_ali15x3_init+0x0/0x50 returned 0 after 3750 usecs
calling  amd756_init+0x0/0x50 @ 1
bus: 'pci': add driver amd756_smbus
initcall amd756_init+0x0/0x50 returned 0 after 3629 usecs
calling  i2c_i801_init+0x0/0x50 @ 1
bus: 'pci': add driver i801_smbus
initcall i2c_i801_init+0x0/0x50 returned 0 after 3458 usecs
calling  nforce2_init+0x0/0x50 @ 1
bus: 'pci': add driver nForce2_smbus
initcall nforce2_init+0x0/0x50 returned 0 after 3710 usecs
calling  i2c_piix4_init+0x0/0x50 @ 1
bus: 'pci': add driver piix4_smbus
initcall i2c_piix4_init+0x0/0x50 returned 0 after 3544 usecs
calling  i2c_sis5595_init+0x0/0x50 @ 1
bus: 'pci': add driver sis5595_smbus
initcall i2c_sis5595_init+0x0/0x50 returned 0 after 3705 usecs
calling  i2c_sis630_init+0x0/0x50 @ 1
bus: 'pci': add driver sis630_smbus
initcall i2c_sis630_init+0x0/0x50 returned 0 after 3621 usecs
calling  i2c_sis96x_init+0x0/0x50 @ 1
bus: 'pci': add driver sis96x_smbus
initcall i2c_sis96x_init+0x0/0x50 returned 0 after 3980 usecs
calling  i2c_vt586b_init+0x0/0x50 @ 1
bus: 'pci': add driver vt586b_smbus
initcall i2c_vt586b_init+0x0/0x50 returned 0 after 3636 usecs
calling  i2c_adap_simtec_init+0x0/0x3d @ 1
bus: 'platform': add driver simtec-i2c
initcall i2c_adap_simtec_init+0x0/0x3d returned 0 after 3844 usecs
calling  i2c_parport_init+0x0/0x70 @ 1
i2c-parport: adapter type unspecified
initcall i2c_parport_init+0x0/0x70 returned -19 after 3367 usecs
calling  i2c_parport_init+0x0/0x193 @ 1
i2c-parport-light: adapter type unspecified
initcall i2c_parport_init+0x0/0x193 returned -19 after 3874 usecs
calling  taos_init+0x0/0x50 @ 1
bus: 'serio': add driver taos-evm
initcall taos_init+0x0/0x50 returned 0 after 3447 usecs
calling  usb_i2c_tiny_usb_init+0x0/0x50 @ 1
bus: 'usb': add driver i2c-tiny-usb
usbcore: registered new interface driver i2c-tiny-usb
initcall usb_i2c_tiny_usb_init+0x0/0x50 returned 0 after 8473 usecs
calling  i2c_voodoo3_init+0x0/0x50 @ 1
bus: 'pci': add driver voodoo3_smbus
initcall i2c_voodoo3_init+0x0/0x50 returned 0 after 3718 usecs
calling  i2c_pca_pf_init+0x0/0x40 @ 1
bus: 'platform': add driver i2c-pca-platform
initcall i2c_pca_pf_init+0x0/0x40 returned 0 after 4362 usecs
calling  ds1682_init+0x0/0x40 @ 1
bus: 'i2c': add driver ds1682
i2c-core: driver [ds1682] registered
initcall ds1682_init+0x0/0x40 returned 0 after 6469 usecs
calling  tsl2550_init+0x0/0x40 @ 1
bus: 'i2c': add driver tsl2550
i2c-core: driver [tsl2550] registered
initcall tsl2550_init+0x0/0x40 returned 0 after 6648 usecs
calling  ttusb_dec_init+0x0/0x6b @ 1
bus: 'usb': add driver ttusb-dec
usbcore: registered new interface driver ttusb-dec
initcall ttusb_dec_init+0x0/0x6b returned 0 after 7935 usecs
calling  ttusb_init+0x0/0x6b @ 1
bus: 'usb': add driver ttusb
usbcore: registered new interface driver ttusb
initcall ttusb_init+0x0/0x6b returned 0 after 7258 usecs
calling  flexcop_module_init+0x0/0x40 @ 1
b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully
initcall flexcop_module_init+0x0/0x40 returned 0 after 7285 usecs
calling  vp7045_usb_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_vp7045
usbcore: registered new interface driver dvb_usb_vp7045
initcall vp7045_usb_module_init+0x0/0x62 returned 0 after 8778 usecs
calling  gp8psk_usb_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_gp8psk
usbcore: registered new interface driver dvb_usb_gp8psk
initcall gp8psk_usb_module_init+0x0/0x62 returned 0 after 8791 usecs
calling  dtt200u_usb_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_dtt200u
usbcore: registered new interface driver dvb_usb_dtt200u
initcall dtt200u_usb_module_init+0x0/0x62 returned 0 after 8942 usecs
calling  a800_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_a800
usbcore: registered new interface driver dvb_usb_a800
initcall a800_module_init+0x0/0x62 returned 0 after 8445 usecs
calling  dibusb_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_dibusb_mb
usbcore: registered new interface driver dvb_usb_dibusb_mb
initcall dibusb_module_init+0x0/0x62 returned 0 after 9297 usecs
calling  dibusb_mc_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_dibusb_mc
usbcore: registered new interface driver dvb_usb_dibusb_mc
initcall dibusb_mc_module_init+0x0/0x62 returned 0 after 9303 usecs
calling  umt_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_umt_010
usbcore: registered new interface driver dvb_usb_umt_010
initcall umt_module_init+0x0/0x62 returned 0 after 8955 usecs
calling  gl861_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_gl861
usbcore: registered new interface driver dvb_usb_gl861
initcall gl861_module_init+0x0/0x62 returned 0 after 8621 usecs
calling  digitv_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_digitv
usbcore: registered new interface driver dvb_usb_digitv
initcall digitv_module_init+0x0/0x62 returned 0 after 8781 usecs
calling  ttusb2_module_init+0x0/0x62 @ 1
bus: 'usb': add driver dvb_usb_ttusb2
usbcore: registered new interface driver dvb_usb_ttusb2
initcall ttusb2_module_init+0x0/0x62 returned 0 after 8777 usecs
calling  opera1_module_init+0x0/0x62 @ 1
bus: 'usb': add driver opera1
usbcore: registered new interface driver opera1
initcall opera1_module_init+0x0/0x62 returned 0 after 7427 usecs
calling  anysee_module_init+0x0/0x69 @ 1
bus: 'usb': add driver dvb_usb_anysee
usbcore: registered new interface driver dvb_usb_anysee
initcall anysee_module_init+0x0/0x69 returned 0 after 8783 usecs
calling  cinergyt2_usb_init+0x0/0x62 @ 1
bus: 'usb': add driver cinergyT2
usbcore: registered new interface driver cinergyT2
initcall cinergyt2_usb_init+0x0/0x62 returned 0 after 7931 usecs
calling  friio_module_init+0x0/0x69 @ 1
bus: 'usb': add driver dvb_usb_friio
usbcore: registered new interface driver dvb_usb_friio
initcall friio_module_init+0x0/0x69 returned 0 after 8608 usecs
calling  dm1105_init+0x0/0x50 @ 1
bus: 'pci': add driver dm1105
initcall dm1105_init+0x0/0x50 returned 0 after 3118 usecs
calling  pt1_init+0x0/0x50 @ 1
bus: 'pci': add driver earth-pt1
initcall pt1_init+0x0/0x50 returned 0 after 3370 usecs
calling  fdtv_init+0x0/0x3d @ 1
bus: 'ieee1394': add driver firedtv
initcall fdtv_init+0x0/0x3d returned 0 after 3620 usecs
calling  w1_init+0x0/0xd0 @ 1
Driver for 1-wire Dallas network protocol.
bus: 'w1': registered
bus: 'w1': add driver w1_master_driver
bus: 'w1': add driver w1_slave_driver
initcall w1_init+0x0/0xd0 returned 0 after 14074 usecs
calling  matrox_w1_init+0x0/0x50 @ 1
bus: 'pci': add driver matrox_w1
initcall matrox_w1_init+0x0/0x50 returned 0 after 3502 usecs
calling  ds_init+0x0/0x70 @ 1
bus: 'usb': add driver DS9490R
usbcore: registered new interface driver DS9490R
initcall ds_init+0x0/0x70 returned 0 after 7587 usecs
calling  w1_therm_init+0x0/0x80 @ 1
initcall w1_therm_init+0x0/0x80 returned 0 after 53 usecs
calling  w1_f2d_init+0x0/0x40 @ 1
initcall w1_f2d_init+0x0/0x40 returned 0 after 1 usecs
calling  w1_ds2760_init+0x0/0x60 @ 1
1-Wire driver for the DS2760 battery monitor  chip  - (c) 2004-2005, Szabolcs Gyurko
initcall w1_ds2760_init+0x0/0x60 returned 0 after 7380 usecs
calling  w1_bq27000_init+0x0/0x50 @ 1
initcall w1_bq27000_init+0x0/0x50 returned 0 after 1 usecs
calling  pda_power_init+0x0/0x40 @ 1
bus: 'platform': add driver pda-power
initcall pda_power_init+0x0/0x40 returned 0 after 3765 usecs
calling  wm831x_power_init+0x0/0x40 @ 1
bus: 'platform': add driver wm831x-power
initcall wm831x_power_init+0x0/0x40 returned 0 after 4012 usecs
calling  ds2760_battery_init+0x0/0x3d @ 1
bus: 'platform': add driver ds2760-battery
initcall ds2760_battery_init+0x0/0x3d returned 0 after 4182 usecs
calling  bq27x00_battery_init+0x0/0x63 @ 1
bus: 'i2c': add driver bq27200-battery
i2c-core: driver [bq27200-battery] registered
initcall bq27x00_battery_init+0x0/0x63 returned 0 after 8481 usecs
calling  max17040_init+0x0/0x40 @ 1
bus: 'i2c': add driver max17040
i2c-core: driver [max17040] registered
initcall max17040_init+0x0/0x40 returned 0 after 6814 usecs
calling  atk0110_init+0x0/0x5b @ 1
bus: 'acpi': add driver ATK0110
initcall atk0110_init+0x0/0x5b returned 0 after 3280 usecs
calling  asb100_init+0x0/0x40 @ 1
bus: 'i2c': add driver asb100
i2c-core: driver [asb100] registered
initcall asb100_init+0x0/0x40 returned 0 after 6484 usecs
calling  sensors_w83627hf_init+0x0/0x1ab @ 1
w83627hf: Found W83697HF chip at 0x290
bus: 'platform': add driver w83627hf
Registering platform device 'w83627hf.656'. Parent at platform
device: 'w83627hf.656': device_add
bus: 'platform': add device w83627hf.656
PM: Adding info for platform:w83627hf.656
bus: 'platform': driver_probe_device: matched device w83627hf.656 with driver w83627hf
bus: 'platform': really_probe: probing driver w83627hf with device w83627hf.656
device: 'hwmon0': device_add
PM: Adding info for No Bus:hwmon0
driver: 'w83627hf.656': driver_bound: bound to device 'w83627hf'
bus: 'platform': really_probe: bound device w83627hf.656 to driver w83627hf
w83627hf w83627hf.656: __pm_runtime_idle()!
w83627hf w83627hf.656: __pm_runtime_idle() returns -11!
initcall sensors_w83627hf_init+0x0/0x1ab returned 0 after 66608 usecs
calling  sensors_w83793_init+0x0/0x40 @ 1
bus: 'i2c': add driver w83793
i2c-core: driver [w83793] registered
initcall sensors_w83793_init+0x0/0x40 returned 0 after 6490 usecs
calling  sensors_w83781d_init+0x0/0x40 @ 1
bus: 'i2c': add driver w83781d
i2c-core: driver [w83781d] registered
initcall sensors_w83781d_init+0x0/0x40 returned 0 after 6647 usecs
calling  abituguru3_init+0x0/0x300 @ 1
initcall abituguru3_init+0x0/0x300 returned -19 after 0 usecs
calling  ad7414_init+0x0/0x40 @ 1
bus: 'i2c': add driver ad7414
i2c-core: driver [ad7414] registered
initcall ad7414_init+0x0/0x40 returned 0 after 6477 usecs
calling  init_adcxx+0x0/0x40 @ 1
bus: 'spi': add driver adcxx
initcall init_adcxx+0x0/0x40 returned 0 after 2993 usecs
calling  sensors_adm1021_init+0x0/0x40 @ 1
bus: 'i2c': add driver adm1021
i2c-core: driver [adm1021] registered
initcall sensors_adm1021_init+0x0/0x40 returned 0 after 6635 usecs
calling  sensors_adm1025_init+0x0/0x40 @ 1
bus: 'i2c': add driver adm1025
i2c-core: driver [adm1025] registered
initcall sensors_adm1025_init+0x0/0x40 returned 0 after 6645 usecs
calling  sm_adm1026_init+0x0/0x40 @ 1
bus: 'i2c': add driver adm1026
i2c-core: driver [adm1026] registered
initcall sm_adm1026_init+0x0/0x40 returned 0 after 6648 usecs
calling  sensors_adm1029_init+0x0/0x40 @ 1
bus: 'i2c': add driver adm1029
i2c-core: driver [adm1029] registered
initcall sensors_adm1029_init+0x0/0x40 returned 0 after 6645 usecs
calling  sensors_adm1031_init+0x0/0x40 @ 1
bus: 'i2c': add driver adm1031
i2c-core: driver [adm1031] registered
initcall sensors_adm1031_init+0x0/0x40 returned 0 after 6647 usecs
calling  sensors_adm9240_init+0x0/0x40 @ 1
bus: 'i2c': add driver adm9240
i2c-core: driver [adm9240] registered
initcall sensors_adm9240_init+0x0/0x40 returned 0 after 6638 usecs
calling  adt7462_init+0x0/0x40 @ 1
bus: 'i2c': add driver adt7462
i2c-core: driver [adt7462] registered
initcall adt7462_init+0x0/0x40 returned 0 after 6646 usecs
calling  adt7473_init+0x0/0x40 @ 1
bus: 'i2c': add driver adt7473
i2c-core: driver [adt7473] registered
initcall adt7473_init+0x0/0x40 returned 0 after 6646 usecs
calling  coretemp_init+0x0/0x230 @ 1
initcall coretemp_init+0x0/0x230 returned -19 after 0 usecs
calling  ds1621_init+0x0/0x40 @ 1
bus: 'i2c': add driver ds1621
i2c-core: driver [ds1621] registered
initcall ds1621_init+0x0/0x40 returned 0 after 6479 usecs
calling  sensors_f75375_init+0x0/0x40 @ 1
bus: 'i2c': add driver f75375
i2c-core: driver [f75375] registered
initcall sensors_f75375_init+0x0/0x40 returned 0 after 6479 usecs
calling  fschmd_init+0x0/0x40 @ 1
bus: 'i2c': add driver fschmd
i2c-core: driver [fschmd] registered
initcall fschmd_init+0x0/0x40 returned 0 after 6641 usecs
calling  g760a_init+0x0/0x40 @ 1
bus: 'i2c': add driver g760a
i2c-core: driver [g760a] registered
initcall g760a_init+0x0/0x40 returned 0 after 6299 usecs
calling  sensors_gl518sm_init+0x0/0x40 @ 1
bus: 'i2c': add driver gl518sm
i2c-core: driver [gl518sm] registered
initcall sensors_gl518sm_init+0x0/0x40 returned 0 after 6626 usecs
calling  sensors_gl520sm_init+0x0/0x3d @ 1
bus: 'i2c': add driver gl520sm
i2c-core: driver [gl520sm] registered
initcall sensors_gl520sm_init+0x0/0x3d returned 0 after 6639 usecs
calling  hdaps_init+0x0/0x25d @ 1
hdaps: supported laptop not found!
hdaps: driver init failed (ret=-19)!
initcall hdaps_init+0x0/0x25d returned -19 after 6397 usecs
calling  k8temp_init+0x0/0x45 @ 1
bus: 'pci': add driver k8temp
bus: 'pci': driver_probe_device: matched device 0000:00:18.3 with driver k8temp
bus: 'pci': really_probe: probing driver k8temp with device 0000:00:18.3
device: 'hwmon1': device_add
PM: Adding info for No Bus:hwmon1
driver: '0000:00:18.3': driver_bound: bound to device 'k8temp'
bus: 'pci': really_probe: bound device 0000:00:18.3 to driver k8temp
k8temp 0000:00:18.3: __pm_runtime_idle()!
k8temp 0000:00:18.3: __pm_runtime_idle() returns -11!
initcall k8temp_init+0x0/0x45 returned 0 after 42672 usecs
calling  lis3lv02d_init_module+0x0/0x6b @ 1
bus: 'acpi': add driver lis3lv02d
lis3lv02d driver loaded.
initcall lis3lv02d_init_module+0x0/0x6b returned 0 after 5821 usecs
calling  init_lm70+0x0/0x40 @ 1
bus: 'spi': add driver lm70
initcall init_lm70+0x0/0x40 returned 0 after 2910 usecs
calling  sensors_lm75_init+0x0/0x40 @ 1
bus: 'i2c': add driver lm75
i2c-core: driver [lm75] registered
initcall sensors_lm75_init+0x0/0x40 returned 0 after 6140 usecs
calling  sensors_lm83_init+0x0/0x40 @ 1
bus: 'i2c': add driver lm83
i2c-core: driver [lm83] registered
initcall sensors_lm83_init+0x0/0x40 returned 0 after 6127 usecs
calling  sm_lm85_init+0x0/0x40 @ 1
bus: 'i2c': add driver lm85
i2c-core: driver [lm85] registered
initcall sm_lm85_init+0x0/0x40 returned 0 after 6141 usecs
calling  sensors_lm90_init+0x0/0x40 @ 1
bus: 'i2c': add driver lm90
i2c-core: driver [lm90] registered
initcall sensors_lm90_init+0x0/0x40 returned 0 after 6204 usecs
calling  sensors_lm92_init+0x0/0x40 @ 1
bus: 'i2c': add driver lm92
i2c-core: driver [lm92] registered
initcall sensors_lm92_init+0x0/0x40 returned 0 after 6134 usecs
calling  sensors_lm95241_init+0x0/0x40 @ 1
bus: 'i2c': add driver lm95241
i2c-core: driver [lm95241] registered
initcall sensors_lm95241_init+0x0/0x40 returned 0 after 6619 usecs
calling  ltc4245_init+0x0/0x40 @ 1
bus: 'i2c': add driver ltc4245
i2c-core: driver [ltc4245] registered
initcall ltc4245_init+0x0/0x40 returned 0 after 6646 usecs
calling  max1111_init+0x0/0x40 @ 1
bus: 'spi': add driver max1111
initcall max1111_init+0x0/0x40 returned 0 after 3164 usecs
calling  pc87360_init+0x0/0x1f0 @ 1
pc87360: PC8736x not detected, module not inserted.
initcall pc87360_init+0x0/0x1f0 returned -19 after 4559 usecs
calling  pc87427_init+0x0/0x178 @ 1
initcall pc87427_init+0x0/0x178 returned -19 after 10 usecs
calling  sm_sis5595_init+0x0/0x50 @ 1
bus: 'pci': add driver sis5595
initcall sm_sis5595_init+0x0/0x50 returned 0 after 3207 usecs
calling  smsc47b397_init+0x0/0x20f @ 1
initcall smsc47b397_init+0x0/0x20f returned -19 after 5 usecs
calling  sm_smsc47m1_init+0x0/0x2c1 @ 1
initcall sm_smsc47m1_init+0x0/0x2c1 returned -19 after 4 usecs
calling  smsc47m192_init+0x0/0x40 @ 1
bus: 'i2c': add driver smsc47m192
i2c-core: driver [smsc47m192] registered
initcall smsc47m192_init+0x0/0x40 returned 0 after 7164 usecs
calling  sm_thmc50_init+0x0/0x40 @ 1
bus: 'i2c': add driver thmc50
i2c-core: driver [thmc50] registered
initcall sm_thmc50_init+0x0/0x40 returned 0 after 6481 usecs
calling  tmp401_init+0x0/0x40 @ 1
bus: 'i2c': add driver tmp401
i2c-core: driver [tmp401] registered
initcall tmp401_init+0x0/0x40 returned 0 after 6954 usecs
calling  tmp421_init+0x0/0x40 @ 1
bus: 'i2c': add driver tmp421
i2c-core: driver [tmp421] registered
initcall tmp421_init+0x0/0x40 returned 0 after 6479 usecs
calling  vt1211_init+0x0/0x1b8 @ 1
initcall vt1211_init+0x0/0x1b8 returned -19 after 12 usecs
calling  sm_vt8231_init+0x0/0x50 @ 1
bus: 'pci': add driver vt8231
initcall sm_vt8231_init+0x0/0x50 returned 0 after 3127 usecs
calling  sensors_w83l785ts_init+0x0/0x40 @ 1
bus: 'i2c': add driver w83l785ts
i2c-core: driver [w83l785ts] registered
initcall sensors_w83l785ts_init+0x0/0x40 returned 0 after 6996 usecs
calling  sensors_w83l786ng_init+0x0/0x3d @ 1
bus: 'i2c': add driver w83l786ng
i2c-core: driver [w83l786ng] registered
initcall sensors_w83l786ng_init+0x0/0x3d returned 0 after 6995 usecs
calling  pcipcwd_init_module+0x0/0x70 @ 1
bus: 'pci': add driver pcwd_pci
initcall pcipcwd_init_module+0x0/0x70 returned 0 after 3292 usecs
calling  wdtpci_init+0x0/0x45 @ 1
bus: 'pci': add driver wdt_pci
initcall wdtpci_init+0x0/0x45 returned 0 after 3201 usecs
calling  usb_pcwd_init+0x0/0x70 @ 1
bus: 'usb': add driver pcwd_usb
usbcore: registered new interface driver pcwd_usb
pcwd_usb: Berkshire USB-PC Watchdog driver v1.02
initcall usb_pcwd_init+0x0/0x70 returned 0 after 12152 usecs
calling  twl4030_wdt_init+0x0/0x3d @ 1
bus: 'platform': add driver twl4030_wdt
initcall twl4030_wdt_init+0x0/0x3d returned 0 after 3935 usecs
calling  acq_init+0x0/0x8b @ 1
WDT driver for Acquire single board computer initialising.
bus: 'platform': add driver acquirewdt
Registering platform device 'acquirewdt'. Parent at platform
device: 'acquirewdt': device_add
bus: 'platform': add device acquirewdt
PM: Adding info for platform:acquirewdt
bus: 'platform': driver_probe_device: matched device acquirewdt with driver acquirewdt
bus: 'platform': really_probe: probing driver acquirewdt with device acquirewdt
acquirewdt: I/O address 0x0043 already in use
acquirewdt: probe of acquirewdt failed with error -5
platform acquirewdt: __pm_runtime_idle()!
platform acquirewdt: __pm_runtime_idle() returns -11!
initcall acq_init+0x0/0x8b returned 0 after 56671 usecs
calling  watchdog_init+0x0/0x1aa @ 1
initcall watchdog_init+0x0/0x1aa returned -19 after 46 usecs
calling  alim7101_wdt_init+0x0/0x1f5 @ 1
alim7101_wdt: Steve Hill <steve@navaho.co.uk>.
alim7101_wdt: ALi M7101 PMU not present - WDT not set
initcall alim7101_wdt_init+0x0/0x1f5 returned -16 after 8876 usecs
initcall alim7101_wdt_init+0x0/0x1f5 returned with error code -16 
calling  watchdog_init+0x0/0x8e @ 1
i6300ESB timer: Intel 6300ESB WatchDog Timer Driver v0.04
bus: 'platform': add driver i6300ESB timer
Registering platform device 'i6300ESB timer'. Parent at platform
device: 'i6300ESB timer': device_add
bus: 'platform': add device i6300ESB timer
PM: Adding info for platform:i6300ESB timer
bus: 'platform': driver_probe_device: matched device i6300ESB timer with driver i6300ESB timer
bus: 'platform': really_probe: probing driver i6300ESB timer with device i6300ESB timer
platform i6300ESB timer: __pm_runtime_idle()!
platform i6300ESB timer: __pm_runtime_idle() returns -11!
initcall watchdog_init+0x0/0x8e returned 0 after 51604 usecs
calling  it8712f_wdt_init+0x0/0x263 @ 1
initcall it8712f_wdt_init+0x0/0x263 returned -19 after 53 usecs
calling  it87_wdt_init+0x0/0x610 @ 1
IT87 WDT: no device
initcall it87_wdt_init+0x0/0x610 returned -19 after 1863 usecs
calling  hpwdt_init+0x0/0x50 @ 1
bus: 'pci': add driver hpwdt
initcall hpwdt_init+0x0/0x50 returned 0 after 3049 usecs
calling  sc1200wdt_init+0x0/0x1a4 @ 1
sc1200wdt: build 20020303
bus: 'pnp': add driver scl200wdt
sc1200wdt: io parameter must be specified
bus: 'pnp': remove driver scl200wdt
driver: 'scl200wdt': driver_release
initcall sc1200wdt_init+0x0/0x1a4 returned -22 after 16399 usecs
initcall sc1200wdt_init+0x0/0x1a4 returned with error code -22 
calling  pc87413_init+0x0/0xb7 @ 1
pc87413 WDT: Version 1.1 at io 0x2E
device: 'watchdog': device_add
PM: Adding info for No Bus:watchdog
pc87413 WDT: initialized. timeout=1 min 
initcall pc87413_init+0x0/0xb7 returned 0 after 13539 usecs
calling  sbc60xxwdt_init+0x0/0x1c5 @ 1
sbc60xxwdt: cannot register miscdev on minor=130 (err=-16)
initcall sbc60xxwdt_init+0x0/0x1c5 returned -16 after 5160 usecs
initcall sbc60xxwdt_init+0x0/0x1c5 returned with error code -16 
calling  sbc8360_init+0x0/0x1e4 @ 1
sbc8360: failed to register misc device
initcall sbc8360_init+0x0/0x1e4 returned -16 after 3559 usecs
initcall sbc8360_init+0x0/0x1e4 returned with error code -16 
calling  wb_smsc_wdt_init+0x0/0x1fc @ 1
SMsC 37B787 watchdog component driver 1.1 initialising...
smsc37b787_wdt: Unable to register miscdev on minor 130
initcall wb_smsc_wdt_init+0x0/0x1fc returned -16 after 10984 usecs
initcall wb_smsc_wdt_init+0x0/0x1fc returned with error code -16 
calling  wdt_init+0x0/0x240 @ 1
w83697hf/hg WDT: WDT driver for W83697HF/HG initializing
w83697hf/hg WDT: Looking for watchdog at address 0x2e
w83697hf/hg WDT: watchdog found at address 0x2e
w83697hf/hg WDT: cannot register miscdev on minor=130 (err=-16)
initcall wdt_init+0x0/0x240 returned -16 after 19544 usecs
initcall wdt_init+0x0/0x240 returned with error code -16 
calling  wdt_init+0x0/0x200 @ 1
WDT driver for the Winbond(TM) W83697UG/UF Super I/O chip initialising.
w83697ug/uf WDT: No W83697UG/UF could be found
initcall wdt_init+0x0/0x200 returned -19 after 10390 usecs
calling  w83877f_wdt_init+0x0/0x19e @ 1
w83877f_wdt: cannot register miscdev on minor=130 (err=-16)
initcall w83877f_wdt_init+0x0/0x19e returned -16 after 5259 usecs
initcall w83877f_wdt_init+0x0/0x19e returned with error code -16 
calling  w83977f_wdt_init+0x0/0x196 @ 1
W83977F WDT: W83977F WDT driver, v1.00
W83977F WDT: cannot register miscdev on minor=130 (err=-16)
initcall w83977f_wdt_init+0x0/0x196 returned -16 after 8697 usecs
initcall w83977f_wdt_init+0x0/0x196 returned with error code -16 
calling  watchdog_init+0x0/0xdc @ 1
epx_c3: cannot register miscdev on minor=130 (err=-16)
initcall watchdog_init+0x0/0xdc returned -16 after 4820 usecs
initcall watchdog_init+0x0/0xdc returned with error code -16 
calling  wm831x_wdt_init+0x0/0x3d @ 1
bus: 'platform': add driver wm831x-watchdog
initcall wm831x_wdt_init+0x0/0x3d returned 0 after 4267 usecs
calling  watchdog_init+0x0/0xe3 @ 1
SoftDog: cannot register miscdev on minor=130 (err=-16)
initcall watchdog_init+0x0/0xe3 returned -16 after 4889 usecs
initcall watchdog_init+0x0/0xe3 returned with error code -16 
calling  init_ladder+0x0/0x40 @ 1
cpuidle: using governor ladder
initcall init_ladder+0x0/0x40 returned 0 after 2794 usecs
calling  init_menu+0x0/0x40 @ 1
cpuidle: using governor menu
initcall init_menu+0x0/0x40 returned 0 after 2598 usecs
calling  mmc_test_init+0x0/0x40 @ 1
bus: 'mmc': add driver mmc_test
initcall mmc_test_init+0x0/0x40 returned 0 after 3252 usecs
calling  tifm_sd_init+0x0/0x40 @ 1
bus: 'tifm': add driver tifm_sd
initcall tifm_sd_init+0x0/0x40 returned 0 after 3298 usecs
calling  cb710_mmc_init_module+0x0/0x40 @ 1
bus: 'platform': add driver cb710-mmc
initcall cb710_mmc_init_module+0x0/0x40 returned 0 after 3763 usecs
calling  via_sd_drv_init+0x0/0x60 @ 1
via_sdmmc: VIA SD/MMC Card Reader driver (C) 2008 VIA Technologies, Inc.
bus: 'pci': add driver via_sdmmc
initcall via_sd_drv_init+0x0/0x60 returned 0 after 9719 usecs
calling  memstick_init+0x0/0xad @ 1
bus: 'memstick': registered
device class 'memstick_host': registering
initcall memstick_init+0x0/0xad returned 0 after 7328 usecs
calling  mspro_block_init+0x0/0xa3 @ 1
bus: 'memstick': add driver mspro_block
initcall mspro_block_init+0x0/0xa3 returned 0 after 3932 usecs
calling  lp3944_module_init+0x0/0x40 @ 1
bus: 'i2c': add driver lp3944
i2c-core: driver [lp3944] registered
initcall lp3944_module_init+0x0/0x40 returned 0 after 6478 usecs
calling  clevo_mail_led_init+0x0/0xcb @ 1
initcall clevo_mail_led_init+0x0/0xcb returned -19 after 2 usecs
calling  timer_trig_init+0x0/0x40 @ 1
initcall timer_trig_init+0x0/0x40 returned 0 after 85 usecs
calling  bl_trig_init+0x0/0x40 @ 1
initcall bl_trig_init+0x0/0x40 returned 0 after 3 usecs
calling  defon_trig_init+0x0/0x40 @ 1
initcall defon_trig_init+0x0/0x40 returned 0 after 3 usecs
calling  dcdrbu_init+0x0/0x16c @ 1
Registering platform device 'dell_rbu'. Parent at platform
device: 'dell_rbu': device_add
bus: 'platform': add device dell_rbu
PM: Adding info for platform:dell_rbu
platform dell_rbu: __pm_runtime_idle()!
platform dell_rbu: __pm_runtime_idle() returns -11!
initcall dcdrbu_init+0x0/0x16c returned 0 after 23817 usecs
calling  dcdbas_init+0x0/0x91 @ 1
bus: 'platform': add driver dcdbas
Registering platform device 'dcdbas'. Parent at platform
device: 'dcdbas': device_add
bus: 'platform': add device dcdbas
PM: Adding info for platform:dcdbas
bus: 'platform': driver_probe_device: matched device dcdbas with driver dcdbas
bus: 'platform': really_probe: probing driver dcdbas with device dcdbas
dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.2)
driver: 'dcdbas': driver_bound: bound to device 'dcdbas'
bus: 'platform': really_probe: bound device dcdbas to driver dcdbas
dcdbas dcdbas: __pm_runtime_idle()!
dcdbas dcdbas: __pm_runtime_idle() returns -11!
initcall dcdbas_init+0x0/0x91 returned 0 after 55749 usecs
calling  ibft_init+0x0/0x699 @ 1
No iBFT detected.
initcall ibft_init+0x0/0x699 returned 0 after 1693 usecs
calling  ioat_init_module+0x0/0xa7 @ 1
ioatdma: Intel(R) QuickData Technology Driver 4.00
bus: 'pci': add driver ioatdma
initcall ioat_init_module+0x0/0xa7 returned 0 after 8601 usecs
calling  hid_init+0x0/0x92 @ 1
bus: 'hid': registered
device class 'hidraw': registering
initcall hid_init+0x0/0x92 returned 0 after 6194 usecs
calling  a4_init+0x0/0x45 @ 1
bus: 'hid': add driver a4tech
initcall a4_init+0x0/0x45 returned 0 after 3217 usecs
calling  apple_init+0x0/0x6b @ 1
bus: 'hid': add driver apple
initcall apple_init+0x0/0x6b returned 0 after 3030 usecs
calling  belkin_init+0x0/0x50 @ 1
bus: 'hid': add driver belkin
initcall belkin_init+0x0/0x50 returned 0 after 3106 usecs
calling  ch_init+0x0/0x50 @ 1
bus: 'hid': add driver cherry
initcall ch_init+0x0/0x50 returned 0 after 3089 usecs
calling  ch_init+0x0/0x50 @ 1
bus: 'hid': add driver chicony
initcall ch_init+0x0/0x50 returned 0 after 3167 usecs
calling  cp_init+0x0/0x50 @ 1
bus: 'hid': add driver cypress
initcall cp_init+0x0/0x50 returned 0 after 3167 usecs
calling  dr_init+0x0/0x50 @ 1
bus: 'hid': add driver dragonrise
initcall dr_init+0x0/0x50 returned 0 after 3424 usecs
calling  ez_init+0x0/0x50 @ 1
bus: 'hid': add driver ezkey
initcall ez_init+0x0/0x50 returned 0 after 3127 usecs
calling  gyration_init+0x0/0x50 @ 1
bus: 'hid': add driver gyration
initcall gyration_init+0x0/0x50 returned 0 after 3260 usecs
calling  ks_init+0x0/0x50 @ 1
bus: 'hid': add driver kensington
initcall ks_init+0x0/0x50 returned 0 after 3434 usecs
calling  kye_init+0x0/0x50 @ 1
bus: 'hid': add driver kye
initcall kye_init+0x0/0x50 returned 0 after 2827 usecs
calling  lg_init+0x0/0x50 @ 1
bus: 'hid': add driver logitech
initcall lg_init+0x0/0x50 returned 0 after 3257 usecs
calling  ms_init+0x0/0x50 @ 1
bus: 'hid': add driver microsoft
initcall ms_init+0x0/0x50 returned 0 after 3352 usecs
calling  mr_init+0x0/0x50 @ 1
bus: 'hid': add driver monterey
initcall mr_init+0x0/0x50 returned 0 after 3255 usecs
calling  ntrig_init+0x0/0x50 @ 1
bus: 'hid': add driver ntrig
initcall ntrig_init+0x0/0x50 returned 0 after 3010 usecs
calling  pl_init+0x0/0x50 @ 1
bus: 'hid': add driver pantherlord
initcall pl_init+0x0/0x50 returned 0 after 3653 usecs
calling  pl_init+0x0/0x50 @ 1
bus: 'hid': add driver petalynx
initcall pl_init+0x0/0x50 returned 0 after 3254 usecs
calling  samsung_init+0x0/0x50 @ 1
bus: 'hid': add driver samsung
initcall samsung_init+0x0/0x50 returned 0 after 3180 usecs
calling  sjoy_init+0x0/0x50 @ 1
bus: 'hid': add driver smartjoyplus
initcall sjoy_init+0x0/0x50 returned 0 after 3592 usecs
calling  sony_init+0x0/0x50 @ 1
bus: 'hid': add driver sony
initcall sony_init+0x0/0x50 returned 0 after 2925 usecs
calling  sp_init+0x0/0x50 @ 1
bus: 'hid': add driver sunplus
initcall sp_init+0x0/0x50 returned 0 after 3296 usecs
calling  ga_init+0x0/0x50 @ 1
bus: 'hid': add driver greenasia
initcall ga_init+0x0/0x50 returned 0 after 3339 usecs
calling  tm_init+0x0/0x50 @ 1
bus: 'hid': add driver thrustmaster
initcall tm_init+0x0/0x50 returned 0 after 3599 usecs
calling  ts_init+0x0/0x50 @ 1
bus: 'hid': add driver topseed
initcall ts_init+0x0/0x50 returned 0 after 3172 usecs
calling  twinhan_init+0x0/0x50 @ 1
bus: 'hid': add driver twinhan
initcall twinhan_init+0x0/0x50 returned 0 after 3182 usecs
calling  zp_init+0x0/0x50 @ 1
bus: 'hid': add driver zeroplus
initcall zp_init+0x0/0x50 returned 0 after 3257 usecs
calling  hid_init+0x0/0x100 @ 1
bus: 'hid': add driver generic-usb
bus: 'usb': add driver hiddev
usbcore: registered new interface driver hiddev
bus: 'usb': add driver usbhid
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
initcall hid_init+0x0/0x100 returned 0 after 21560 usecs
calling  usb_mouse_init+0x0/0x6b @ 1
bus: 'usb': add driver usbmouse
usbcore: registered new interface driver usbmouse
usbmouse: v1.6:USB HID Boot Protocol mouse driver
initcall usb_mouse_init+0x0/0x6b returned 0 after 12162 usecs
calling  virtio_pci_init+0x0/0x84 @ 1
device: 'virtio-pci': device_add
PM: Adding info for No Bus:virtio-pci
bus: 'pci': add driver virtio-pci
initcall virtio_pci_init+0x0/0x84 returned 0 after 9870 usecs
calling  fake_init+0x0/0x60 @ 1
Registering platform device 'ieee802154hardmac'. Parent at platform
device: 'ieee802154hardmac': device_add
bus: 'platform': add device ieee802154hardmac
PM: Adding info for platform:ieee802154hardmac
platform ieee802154hardmac: __pm_runtime_idle()!
platform ieee802154hardmac: __pm_runtime_idle() returns -11!
bus: 'platform': add driver ieee802154hardmac
bus: 'platform': driver_probe_device: matched device ieee802154hardmac with driver ieee802154hardmac
bus: 'platform': really_probe: probing driver ieee802154hardmac with device ieee802154hardmac
device: 'wpan-phy0': device_add
PM: Adding info for No Bus:wpan-phy0
device: 'hardwpan0': device_add
PM: Adding info for No Bus:hardwpan0
ieee802154hardmac ieee802154hardmac: Added ieee802154 HardMAC hardware
driver: 'ieee802154hardmac': driver_bound: bound to device 'ieee802154hardmac'
bus: 'platform': really_probe: bound device ieee802154hardmac to driver ieee802154hardmac
ieee802154hardmac ieee802154hardmac: __pm_runtime_idle()!
ieee802154hardmac ieee802154hardmac: __pm_runtime_idle() returns -11!
initcall fake_init+0x0/0x60 returned 0 after 95582 usecs
calling  flow_cache_init+0x0/0x159 @ 1
initcall flow_cache_init+0x0/0x159 returned 0 after 800 usecs
calling  pg_init+0x0/0x2bf @ 1
pktgen 2.72: Packet Generator for packet performance testing.
initcall pg_init+0x0/0x2bf returned 0 after 5796 usecs
calling  llc_init+0x0/0x50 @ 1
initcall llc_init+0x0/0x50 returned 0 after 2 usecs
calling  llc2_init+0x0/0xf8 @ 1
NET: Registered protocol family 26
initcall llc2_init+0x0/0xf8 returned 0 after 3224 usecs
calling  snap_init+0x0/0x70 @ 1
initcall snap_init+0x0/0x70 returned 0 after 42 usecs
calling  rif_init+0x0/0xc0 @ 1
initcall rif_init+0x0/0xc0 returned 0 after 42 usecs
calling  blackhole_module_init+0x0/0x40 @ 1
initcall blackhole_module_init+0x0/0x40 returned 0 after 1 usecs
calling  police_init_module+0x0/0x40 @ 1
initcall police_init_module+0x0/0x40 returned 0 after 19 usecs
calling  mirred_init_module+0x0/0x50 @ 1
Mirror/redirect action on
initcall mirred_init_module+0x0/0x50 returned 0 after 2354 usecs
calling  nat_init_module+0x0/0x40 @ 1
initcall nat_init_module+0x0/0x40 returned 0 after 1 usecs
calling  pedit_init_module+0x0/0x3d @ 1
initcall pedit_init_module+0x0/0x3d returned 0 after 1 usecs
calling  simp_init_module+0x0/0x63 @ 1
Simple TC action Loaded
initcall simp_init_module+0x0/0x63 returned 0 after 2183 usecs
calling  skbedit_init_module+0x0/0x40 @ 1
initcall skbedit_init_module+0x0/0x40 returned 0 after 1 usecs
calling  cbq_module_init+0x0/0x40 @ 1
initcall cbq_module_init+0x0/0x40 returned 0 after 1 usecs
calling  htb_module_init+0x0/0x40 @ 1
initcall htb_module_init+0x0/0x40 returned 0 after 1 usecs
calling  hfsc_init+0x0/0x40 @ 1
initcall hfsc_init+0x0/0x40 returned 0 after 1 usecs
calling  red_module_init+0x0/0x40 @ 1
initcall red_module_init+0x0/0x40 returned 0 after 1 usecs
calling  gred_module_init+0x0/0x40 @ 1
initcall gred_module_init+0x0/0x40 returned 0 after 1 usecs
calling  ingress_module_init+0x0/0x40 @ 1
initcall ingress_module_init+0x0/0x40 returned 0 after 1 usecs
calling  dsmark_module_init+0x0/0x40 @ 1
initcall dsmark_module_init+0x0/0x40 returned 0 after 1 usecs
calling  sfq_module_init+0x0/0x40 @ 1
initcall sfq_module_init+0x0/0x40 returned 0 after 1 usecs
calling  tbf_module_init+0x0/0x40 @ 1
initcall tbf_module_init+0x0/0x40 returned 0 after 1 usecs
calling  teql_init+0x0/0x107 @ 1
device: 'teql0': device_add
PM: Adding info for No Bus:teql0
initcall teql_init+0x0/0x107 returned 0 after 6525 usecs
calling  atm_init+0x0/0x40 @ 1
initcall atm_init+0x0/0x40 returned 0 after 1 usecs
calling  drr_init+0x0/0x40 @ 1
initcall drr_init+0x0/0x40 returned 0 after 1 usecs
calling  init_u32+0x0/0x80 @ 1
u32 classifier
    Performance counters on
    input device check on 
    Actions configured 
initcall init_u32+0x0/0x80 returned 0 after 8541 usecs
calling  init_fw+0x0/0x40 @ 1
initcall init_fw+0x0/0x40 returned 0 after 1 usecs
calling  init_rsvp+0x0/0x40 @ 1
initcall init_rsvp+0x0/0x40 returned 0 after 1 usecs
calling  init_tcindex+0x0/0x40 @ 1
initcall init_tcindex+0x0/0x40 returned 0 after 1 usecs
calling  init_rsvp+0x0/0x40 @ 1
initcall init_rsvp+0x0/0x40 returned 0 after 1 usecs
calling  cls_flow_init+0x0/0x40 @ 1
initcall cls_flow_init+0x0/0x40 returned 0 after 1 usecs
calling  init_em_nbyte+0x0/0x40 @ 1
initcall init_em_nbyte+0x0/0x40 returned 0 after 18 usecs
calling  init_em_u32+0x0/0x40 @ 1
initcall init_em_u32+0x0/0x40 returned 0 after 1 usecs
calling  nfnetlink_init+0x0/0x88 @ 1
Netfilter messages via NETLINK v0.30.
initcall nfnetlink_init+0x0/0x88 returned 0 after 3413 usecs
calling  nfnetlink_queue_init+0x0/0xd3 @ 1
initcall nfnetlink_queue_init+0x0/0xd3 returned 0 after 46 usecs
calling  nfnetlink_log_init+0x0/0x110 @ 1
initcall nfnetlink_log_init+0x0/0x110 returned 0 after 51 usecs
calling  xt_init+0x0/0x13b @ 1
initcall xt_init+0x0/0x13b returned 0 after 54 usecs
calling  tcpudp_mt_init+0x0/0x50 @ 1
initcall tcpudp_mt_init+0x0/0x50 returned 0 after 27 usecs
calling  classify_tg_init+0x0/0x40 @ 1
initcall classify_tg_init+0x0/0x40 returned 0 after 1 usecs
calling  hl_tg_init+0x0/0x50 @ 1
initcall hl_tg_init+0x0/0x50 returned 0 after 2 usecs
calling  led_tg_init+0x0/0x40 @ 1
initcall led_tg_init+0x0/0x40 returned 0 after 1 usecs
calling  mark_tg_init+0x0/0x40 @ 1
initcall mark_tg_init+0x0/0x40 returned 0 after 1 usecs
calling  xt_rateest_tg_init+0x0/0x70 @ 1
initcall xt_rateest_tg_init+0x0/0x70 returned 0 after 6 usecs
calling  tcpmss_tg_init+0x0/0x50 @ 1
initcall tcpmss_tg_init+0x0/0x50 returned 0 after 2 usecs
calling  tcpoptstrip_tg_init+0x0/0x50 @ 1
initcall tcpoptstrip_tg_init+0x0/0x50 returned 0 after 2 usecs
calling  trace_tg_init+0x0/0x3d @ 1
initcall trace_tg_init+0x0/0x3d returned 0 after 1 usecs
calling  dccp_mt_init+0x0/0x83 @ 1
initcall dccp_mt_init+0x0/0x83 returned 0 after 12 usecs
calling  esp_mt_init+0x0/0x50 @ 1
initcall esp_mt_init+0x0/0x50 returned 0 after 2 usecs
calling  hashlimit_mt_init+0x0/0x120 @ 1
initcall hashlimit_mt_init+0x0/0x120 returned 0 after 909 usecs
calling  hl_mt_init+0x0/0x50 @ 1
initcall hl_mt_init+0x0/0x50 returned 0 after 2 usecs
calling  iprange_mt_init+0x0/0x50 @ 1
initcall iprange_mt_init+0x0/0x50 returned 0 after 2 usecs
calling  mac_mt_init+0x0/0x40 @ 1
initcall mac_mt_init+0x0/0x40 returned 0 after 1 usecs
calling  multiport_mt_init+0x0/0x50 @ 1
initcall multiport_mt_init+0x0/0x50 returned 0 after 3 usecs
calling  owner_mt_init+0x0/0x40 @ 1
initcall owner_mt_init+0x0/0x40 returned 0 after 1 usecs
calling  pkttype_mt_init+0x0/0x40 @ 1
initcall pkttype_mt_init+0x0/0x40 returned 0 after 1 usecs
calling  policy_mt_init+0x0/0x50 @ 1
initcall policy_mt_init+0x0/0x50 returned 0 after 2 usecs
calling  quota_mt_init+0x0/0x40 @ 1
initcall quota_mt_init+0x0/0x40 returned 0 after 1 usecs
calling  xt_rateest_mt_init+0x0/0x40 @ 1
initcall xt_rateest_mt_init+0x0/0x40 returned 0 after 1 usecs
calling  realm_mt_init+0x0/0x3d @ 1
initcall realm_mt_init+0x0/0x3d returned 0 after 1 usecs
calling  recent_mt_init+0x0/0x103 @ 1
initcall recent_mt_init+0x0/0x103 returned 0 after 51 usecs
calling  string_mt_init+0x0/0x50 @ 1
initcall string_mt_init+0x0/0x50 returned 0 after 2 usecs
calling  tcpmss_mt_init+0x0/0x45 @ 1
initcall tcpmss_mt_init+0x0/0x45 returned 0 after 2 usecs
calling  time_mt_init+0x0/0xbb @ 1
xt_time: kernel timezone is -0000
initcall time_mt_init+0x0/0xbb returned 0 after 3031 usecs
calling  u32_mt_init+0x0/0x40 @ 1
initcall u32_mt_init+0x0/0x40 returned 0 after 1 usecs
calling  ip_vs_init+0x0/0xf2 @ 1
IPVS: Registered protocols (TCP, AH, ESP)
IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
IPVS: Each connection entry needs 360 bytes at least
IPVS: ipvs loaded.
initcall ip_vs_init+0x0/0xf2 returned 0 after 17337 usecs
calling  ip_vs_rr_init+0x0/0x40 @ 1
IPVS: [rr] scheduler registered.
initcall ip_vs_rr_init+0x0/0x40 returned 0 after 2961 usecs
calling  ip_vs_wrr_init+0x0/0x40 @ 1
IPVS: [wrr] scheduler registered.
initcall ip_vs_wrr_init+0x0/0x40 returned 0 after 3029 usecs
calling  ip_vs_lc_init+0x0/0x3d @ 1
IPVS: [lc] scheduler registered.
initcall ip_vs_lc_init+0x0/0x3d returned 0 after 2944 usecs
calling  ip_vs_lblc_init+0x0/0x6d @ 1
IPVS: [lblc] scheduler registered.
initcall ip_vs_lblc_init+0x0/0x6d returned 0 after 3123 usecs
calling  ip_vs_lblcr_init+0x0/0x76 @ 1
IPVS: [lblcr] scheduler registered.
initcall ip_vs_lblcr_init+0x0/0x76 returned 0 after 3207 usecs
calling  ip_vs_sh_init+0x0/0x40 @ 1
IPVS: [sh] scheduler registered.
initcall ip_vs_sh_init+0x0/0x40 returned 0 after 2944 usecs
calling  ip_vs_nq_init+0x0/0x3d @ 1
IPVS: [nq] scheduler registered.
initcall ip_vs_nq_init+0x0/0x3d returned 0 after 2944 usecs
calling  ip_vs_ftp_init+0x0/0xc3 @ 1
IPVS: ftp: loaded support on port[0] = 21
initcall ip_vs_ftp_init+0x0/0xc3 returned 0 after 3766 usecs
calling  sysctl_ipv4_init+0x0/0x76 @ 1
initcall sysctl_ipv4_init+0x0/0x76 returned 0 after 32 usecs
calling  ipip_init+0x0/0x95 @ 1
IPv4 over IPv4 tunneling driver
device: 'tunl0': device_add
PM: Adding info for No Bus:tunl0
initcall ipip_init+0x0/0x95 returned 0 after 9452 usecs
calling  init_syncookies+0x0/0x50 @ 1
initcall init_syncookies+0x0/0x50 returned 0 after 34 usecs
calling  ipcomp4_init+0x0/0xa0 @ 1
initcall ipcomp4_init+0x0/0xa0 returned 0 after 3 usecs
calling  ipip_init+0x0/0xf0 @ 1
initcall ipip_init+0x0/0xf0 returned 0 after 3 usecs
calling  xfrm4_beet_init+0x0/0x50 @ 1
initcall xfrm4_beet_init+0x0/0x50 returned 0 after 1 usecs
calling  tunnel4_init+0x0/0xa0 @ 1
initcall tunnel4_init+0x0/0xa0 returned 0 after 1 usecs
calling  xfrm4_transport_init+0x0/0x50 @ 1
initcall xfrm4_transport_init+0x0/0x50 returned 0 after 1 usecs
calling  ipv4_netfilter_init+0x0/0x40 @ 1
initcall ipv4_netfilter_init+0x0/0x40 returned 0 after 22 usecs
calling  ip_queue_init+0x0/0x165 @ 1
initcall ip_queue_init+0x0/0x165 returned 0 after 122 usecs
calling  inet_diag_init+0x0/0x95 @ 1
initcall inet_diag_init+0x0/0x95 returned 0 after 42 usecs
calling  tcp_diag_init+0x0/0x40 @ 1
initcall tcp_diag_init+0x0/0x40 returned 0 after 20 usecs
calling  cubictcp_register+0x0/0x9d @ 1
TCP cubic registered
initcall cubictcp_register+0x0/0x9d returned 0 after 1919 usecs
calling  inet6_init+0x0/0x314 @ 1
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
tunl0: Disabled Privacy Extensions
initcall inet6_init+0x0/0x314 returned 0 after 20846 usecs
calling  ah6_init+0x0/0xa0 @ 1
initcall ah6_init+0x0/0xa0 returned 0 after 2 usecs
calling  esp6_init+0x0/0xa0 @ 1
initcall esp6_init+0x0/0xa0 returned 0 after 1 usecs
calling  xfrm6_mode_tunnel_init+0x0/0x50 @ 1
initcall xfrm6_mode_tunnel_init+0x0/0x50 returned 0 after 1 usecs
calling  xfrm6_ro_init+0x0/0x50 @ 1
initcall xfrm6_ro_init+0x0/0x50 returned 0 after 1 usecs
calling  xfrm6_beet_init+0x0/0x50 @ 1
initcall xfrm6_beet_init+0x0/0x50 returned 0 after 1 usecs
calling  mip6_init+0x0/0xf0 @ 1
Mobile IPv6
initcall mip6_init+0x0/0xf0 returned 0 after 1160 usecs
calling  ip6_tables_init+0x0/0xd1 @ 1
ip6_tables: (C) 2000-2006 Netfilter Core Team
initcall ip6_tables_init+0x0/0xd1 returned 0 after 4131 usecs
calling  ip6table_mangle_init+0x0/0x6c @ 1
initcall ip6table_mangle_init+0x0/0x6c returned 0 after 54 usecs
calling  ip6table_raw_init+0x0/0x6c @ 1
initcall ip6table_raw_init+0x0/0x6c returned 0 after 30 usecs
calling  ip6table_security_init+0x0/0x6c @ 1
initcall ip6table_security_init+0x0/0x6c returned 0 after 37 usecs
calling  ah_mt6_init+0x0/0x40 @ 1
initcall ah_mt6_init+0x0/0x40 returned 0 after 1 usecs
calling  ipv6header_mt6_init+0x0/0x40 @ 1
initcall ipv6header_mt6_init+0x0/0x40 returned 0 after 1 usecs
calling  hbh_mt6_init+0x0/0x50 @ 1
initcall hbh_mt6_init+0x0/0x50 returned 0 after 2 usecs
calling  rt_mt6_init+0x0/0x40 @ 1
initcall rt_mt6_init+0x0/0x40 returned 0 after 1 usecs
calling  log_tg6_init+0x0/0x55 @ 1
initcall log_tg6_init+0x0/0x55 returned 0 after 3 usecs
calling  sit_init+0x0/0x97 @ 1
IPv6 over IPv4 tunneling driver
device: 'sit0': device_add
PM: Adding info for No Bus:sit0
sit0: Disabled Privacy Extensions
initcall sit_init+0x0/0x97 returned 0 after 13201 usecs
calling  packet_init+0x0/0x74 @ 1
NET: Registered protocol family 17
initcall packet_init+0x0/0x74 returned 0 after 3194 usecs
calling  dsa_init_module+0x0/0x40 @ 1
bus: 'platform': add driver dsa
initcall dsa_init_module+0x0/0x40 returned 0 after 3297 usecs
calling  atalk_init+0x0/0xd0 @ 1
NET: Registered protocol family 5
initcall atalk_init+0x0/0xd0 returned 0 after 3205 usecs
calling  x25_init+0x0/0x90 @ 1
NET: Registered protocol family 9
X.25 for Linux Version 0.2
initcall x25_init+0x0/0x90 returned 0 after 5563 usecs
calling  lapb_init+0x0/0x2d @ 1
initcall lapb_init+0x0/0x2d returned 0 after 0 usecs
calling  nr_proto_init+0x0/0x2e0 @ 1
device: 'nr0': device_add
PM: Adding info for No Bus:nr0
device: 'nr1': device_add
PM: Adding info for No Bus:nr1
device: 'nr2': device_add
PM: Adding info for No Bus:nr2
device: 'nr3': device_add
PM: Adding info for No Bus:nr3
NET: Registered protocol family 6
initcall nr_proto_init+0x0/0x2e0 returned 0 after 28706 usecs
calling  rose_proto_init+0x0/0x308 @ 1
device: 'rose0': device_add
PM: Adding info for No Bus:rose0
device: 'rose1': device_add
PM: Adding info for No Bus:rose1
device: 'rose2': device_add
PM: Adding info for No Bus:rose2
device: 'rose3': device_add
PM: Adding info for No Bus:rose3
device: 'rose4': device_add
PM: Adding info for No Bus:rose4
device: 'rose5': device_add
PM: Adding info for No Bus:rose5
device: 'rose6': device_add
PM: Adding info for No Bus:rose6
device: 'rose7': device_add
PM: Adding info for No Bus:rose7
device: 'rose8': device_add
PM: Adding info for No Bus:rose8
device: 'rose9': device_add
PM: Adding info for No Bus:rose9
NET: Registered protocol family 11
initcall rose_proto_init+0x0/0x308 returned 0 after 69731 usecs
calling  ax25_init+0x0/0xe1 @ 1
NET: Registered protocol family 3
initcall ax25_init+0x0/0xe1 returned 0 after 3136 usecs
calling  ircomm_init+0x0/0xe0 @ 1
IrCOMM protocol (Dag Brattli)
initcall ircomm_init+0x0/0xe0 returned 0 after 2718 usecs
calling  ircomm_tty_init+0x0/0x1a8 @ 1
device: 'ircomm0': device_add
PM: Adding info for No Bus:ircomm0
device: 'ircomm1': device_add
PM: Adding info for No Bus:ircomm1
device: 'ircomm2': device_add
PM: Adding info for No Bus:ircomm2
device: 'ircomm3': device_add
PM: Adding info for No Bus:ircomm3
device: 'ircomm4': device_add
PM: Adding info for No Bus:ircomm4
device: 'ircomm5': device_add
PM: Adding info for No Bus:ircomm5
device: 'ircomm6': device_add
PM: Adding info for No Bus:ircomm6
device: 'ircomm7': device_add
PM: Adding info for No Bus:ircomm7
device: 'ircomm8': device_add
PM: Adding info for No Bus:ircomm8
device: 'ircomm9': device_add
PM: Adding info for No Bus:ircomm9
device: 'ircomm10': device_add
PM: Adding info for No Bus:ircomm10
device: 'ircomm11': device_add
PM: Adding info for No Bus:ircomm11
device: 'ircomm12': device_add
PM: Adding info for No Bus:ircomm12
device: 'ircomm13': device_add
PM: Adding info for No Bus:ircomm13
device: 'ircomm14': device_add
PM: Adding info for No Bus:ircomm14
device: 'ircomm15': device_add
PM: Adding info for No Bus:ircomm15
device: 'ircomm16': device_add
PM: Adding info for No Bus:ircomm16
device: 'ircomm17': device_add
PM: Adding info for No Bus:ircomm17
device: 'ircomm18': device_add
PM: Adding info for No Bus:ircomm18
device: 'ircomm19': device_add
PM: Adding info for No Bus:ircomm19
device: 'ircomm20': device_add
PM: Adding info for No Bus:ircomm20
device: 'ircomm21': device_add
PM: Adding info for No Bus:ircomm21
device: 'ircomm22': device_add
PM: Adding info for No Bus:ircomm22
device: 'ircomm23': device_add
PM: Adding info for No Bus:ircomm23
device: 'ircomm24': device_add
PM: Adding info for No Bus:ircomm24
device: 'ircomm25': device_add
PM: Adding info for No Bus:ircomm25
device: 'ircomm26': device_add
PM: Adding info for No Bus:ircomm26
device: 'ircomm27': device_add
PM: Adding info for No Bus:ircomm27
device: 'ircomm28': device_add
PM: Adding info for No Bus:ircomm28
device: 'ircomm29': device_add
PM: Adding info for No Bus:ircomm29
device: 'ircomm30': device_add
PM: Adding info for No Bus:ircomm30
device: 'ircomm31': device_add
PM: Adding info for No Bus:ircomm31
initcall ircomm_tty_init+0x0/0x1a8 returned 0 after 209937 usecs
calling  af_rxrpc_init+0x0/0x1cc @ 1
NET: Registered protocol family 33
initcall af_rxrpc_init+0x0/0x1cc returned 0 after 5123 usecs
calling  rxkad_init+0x0/0x9c @ 1
RxRPC: Registered security type 2 'rxkad'
initcall rxkad_init+0x0/0x9c returned 0 after 4313 usecs
calling  atm_clip_init+0x0/0xe5 @ 1
initcall atm_clip_init+0x0/0xe5 returned 0 after 939 usecs
calling  lane_module_init+0x0/0x8b @ 1
lec.c: Sep 30 2009 11:54:30 initialized
initcall lane_module_init+0x0/0x8b returned 0 after 3560 usecs
calling  pppoatm_init+0x0/0x40 @ 1
initcall pppoatm_init+0x0/0x40 returned 0 after 1 usecs
calling  decnet_init+0x0/0xba @ 1
NET4: DECnet for Linux: V.2.5.68s (C) 1995-2003 Linux DECnet Project Team
DECnet: Routing cache hash table of 512 buckets, 36Kbytes
NET: Registered protocol family 12
initcall decnet_init+0x0/0xba returned 0 after 18806 usecs
calling  dn_rtmsg_init+0x0/0x95 @ 1
initcall dn_rtmsg_init+0x0/0x95 returned 0 after 39 usecs
calling  econet_proto_init+0x0/0x207 @ 1
NET: Registered protocol family 19
initcall econet_proto_init+0x0/0x207 returned 0 after 3282 usecs
calling  phonet_init+0x0/0xa5 @ 1
NET: Registered protocol family 35
initcall phonet_init+0x0/0xa5 returned 0 after 4024 usecs
calling  pep_register+0x0/0x50 @ 1
initcall pep_register+0x0/0x50 returned 0 after 776 usecs
calling  vlan_proto_init+0x0/0xf0 @ 1
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
initcall vlan_proto_init+0x0/0xf0 returned 0 after 10651 usecs
calling  dccp_init+0x0/0x3c0 @ 1
CCID: Activated CCID 2 (TCP-like)
CCID: Activated CCID 3 (TCP-Friendly Rate Control)
initcall dccp_init+0x0/0x3c0 returned 0 after 23604 usecs
calling  dccp_v4_init+0x0/0xac @ 1
initcall dccp_v4_init+0x0/0xac returned 0 after 2455 usecs
calling  dccp_v6_init+0x0/0xaf @ 1
initcall dccp_v6_init+0x0/0xaf returned 0 after 2958 usecs
calling  dccp_diag_init+0x0/0x40 @ 1
initcall dccp_diag_init+0x0/0x40 returned 0 after 2 usecs
calling  sctp_init+0x0/0x86f @ 1
SCTP: Hash tables configured (established 16384 bind 14563)
sctp_init_sock(sk: ffff88003c858000)
initcall sctp_init+0x0/0x86f returned 0 after 15815 usecs
calling  tipc_init+0x0/0xf1 @ 1
TIPC: Activated (version 1.6.4 compiled Sep 30 2009 11:54:40)
NET: Registered protocol family 30
TIPC: Started in single node mode
initcall tipc_init+0x0/0xf1 returned 0 after 15097 usecs
calling  dcbnl_init+0x0/0x60 @ 1
initcall dcbnl_init+0x0/0x60 returned 0 after 1 usecs
calling  ieee802154_nl_init+0x0/0xb4 @ 1
initcall ieee802154_nl_init+0x0/0xb4 returned 0 after 181 usecs
calling  af_ieee802154_init+0x0/0xac @ 1
NET: Registered protocol family 36
initcall af_ieee802154_init+0x0/0xac returned 0 after 4877 usecs
calling  wimax_subsys_init+0x0/0x27c @ 1
initcall wimax_subsys_init+0x0/0x27c returned 0 after 125 usecs
calling  mce_debugfs_init+0x0/0x76 @ 1
initcall mce_debugfs_init+0x0/0x76 returned 0 after 53 usecs
calling  severities_debugfs_init+0x0/0x70 @ 1
initcall severities_debugfs_init+0x0/0x70 returned 0 after 22 usecs
calling  hpet_insert_resource+0x0/0x4a @ 1
initcall hpet_insert_resource+0x0/0x4a returned 1 after 0 usecs
initcall hpet_insert_resource+0x0/0x4a returned with error code 1 
calling  lapic_insert_resource+0x0/0x6f @ 1
initcall lapic_insert_resource+0x0/0x6f returned 0 after 3 usecs
calling  init_lapic_nmi_sysfs+0x0/0x60 @ 1
initcall init_lapic_nmi_sysfs+0x0/0x60 returned 0 after 0 usecs
calling  io_apic_bug_finalize+0x0/0x42 @ 1
initcall io_apic_bug_finalize+0x0/0x42 returned 0 after 0 usecs
calling  check_early_ioremap_leak+0x0/0xa0 @ 1
initcall check_early_ioremap_leak+0x0/0xa0 returned 0 after 0 usecs
calling  sched_init_debug+0x0/0x4b @ 1
initcall sched_init_debug+0x0/0x4b returned 0 after 25 usecs
calling  init_oops_id+0x0/0x60 @ 1
initcall init_oops_id+0x0/0x60 returned 0 after 8 usecs
calling  disable_boot_consoles+0x0/0x75 @ 1
initcall disable_boot_consoles+0x0/0x75 returned 0 after 0 usecs
calling  pm_qos_power_init+0x0/0x108 @ 1
device: 'cpu_dma_latency': device_add
PM: Adding info for No Bus:cpu_dma_latency
device: 'network_latency': device_add
PM: Adding info for No Bus:network_latency
device: 'network_throughput': device_add
PM: Adding info for No Bus:network_throughput
initcall pm_qos_power_init+0x0/0x108 returned 0 after 24021 usecs
calling  software_resume+0x0/0x340 @ 1
initcall software_resume+0x0/0x340 returned -2 after 22 usecs
initcall software_resume+0x0/0x340 returned with error code -2 
calling  max_swapfiles_check+0x0/0x2d @ 1
initcall max_swapfiles_check+0x0/0x2d returned 0 after 0 usecs
calling  kmemleak_late_init+0x0/0xb2 @ 1
kmemleak: Kernel memory leak detector initialized
initcall kmemleak_late_init+0x0/0xb2 returned 0 after 4693 usecs
calling  init_ima+0x0/0x4d @ 1
kmemleak: Automatic memory scanning thread started
No TPM chip found, activating TPM-bypass!
initcall init_ima+0x0/0x4d returned 0 after 9290 usecs
calling  random32_reseed+0x0/0x88 @ 1
initcall random32_reseed+0x0/0x88 returned 0 after 8 usecs
calling  pci_resource_alignment_sysfs_init+0x0/0x45 @ 1
initcall pci_resource_alignment_sysfs_init+0x0/0x45 returned 0 after 12 usecs
calling  pci_sysfs_init+0x0/0x7d @ 1
initcall pci_sysfs_init+0x0/0x7d returned 0 after 1627 usecs
calling  seqgen_init+0x0/0x40 @ 1
initcall seqgen_init+0x0/0x40 returned 0 after 19 usecs
calling  scsi_complete_async_scans+0x0/0x140 @ 1
initcall scsi_complete_async_scans+0x0/0x140 returned 0 after 1 usecs
calling  edd_init+0x0/0x2e3 @ 1
BIOS EDD facility v0.16 2004-Jun-25, 1 devices found
initcall edd_init+0x0/0x2e3 returned 0 after 5313 usecs
calling  memmap_init+0x0/0xd5 @ 1
initcall memmap_init+0x0/0xd5 returned 0 after 422 usecs
calling  dmatest_init+0x0/0x189 @ 1
initcall dmatest_init+0x0/0x189 returned 0 after 29 usecs
calling  tcp_congestion_default+0x0/0x40 @ 1
initcall tcp_congestion_default+0x0/0x40 returned 0 after 2 usecs
calling  ip_auto_config+0x0/0xfbc @ 1
initcall ip_auto_config+0x0/0xfbc returned 0 after 42 usecs
calling  initialize_hashrnd+0x0/0x40 @ 1
initcall initialize_hashrnd+0x0/0x40 returned 0 after 5 usecs
async_waiting @ 1
async_continuing @ 1 after 1 usec
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly on device 8:1.
async_waiting @ 1
async_continuing @ 1 after 1 usec
Freeing unused kernel memory: 800k freed
Write protecting the kernel read-only data: 19852k
Testing CPA: undo ffffffff81009000-ffffffff8236c000
Testing CPA: again
Not activating Mandatory Access Control now since /sbin/tomoyo-init doesn't exist.
runlevel used greatest stack depth: 3592 bytes left
mount used greatest stack depth: 2528 bytes left
sed used greatest stack depth: 2320 bytes left
CPA self-test:
 4k 2864 large 506 gb 0 x 3066[ffff880000000000-ffff88003fc00000] miss 0
 4k 147248 large 224 gb 0 x 147168[ffff880000000000-ffff88003fdff000] miss 0
 4k 147248 large 224 gb 0 x 147168[ffff880000000000-ffff88003fdff000] miss 0
ok.
Press any key to enter the menu

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

* Re: [origin tree boot crash] Re: [GIT PATCH] TTY patches for 2.6.31-git
  2009-09-30 10:09 ` [origin tree boot crash] Re: [GIT PATCH] TTY patches for 2.6.31-git Ingo Molnar
@ 2009-09-30 10:17   ` Alan Cox
  2009-10-01  8:21     ` Ingo Molnar
  0 siblings, 1 reply; 86+ messages in thread
From: Alan Cox @ 2009-09-30 10:17 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Greg KH, Linus Torvalds, Andrew Morton, linux-kernel

On Wed, 30 Sep 2009 12:09:02 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> 
> >       serial: use tty_port pointers in the core code
> 
> -tip testing found a weird serial code related crash on a testbox: the 
> box does spontaneous reboot during the user-space portions of bootup. 

Does this only occur if running with serial console ?


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

* Re: [origin tree boot crash] Re: [GIT PATCH] TTY patches for 2.6.31-git
  2009-09-30 10:17   ` Alan Cox
@ 2009-10-01  8:21     ` Ingo Molnar
  2009-10-01 10:36       ` Alan Cox
  0 siblings, 1 reply; 86+ messages in thread
From: Ingo Molnar @ 2009-10-01  8:21 UTC (permalink / raw)
  To: Alan Cox; +Cc: Greg KH, Linus Torvalds, Andrew Morton, linux-kernel


* Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> On Wed, 30 Sep 2009 12:09:02 +0200
> Ingo Molnar <mingo@elte.hu> wrote:
> 
> > 
> > >       serial: use tty_port pointers in the core code
> > 
> > -tip testing found a weird serial code related crash on a testbox: the 
> > box does spontaneous reboot during the user-space portions of bootup. 
> 
> Does this only occur if running with serial console ?

Hm, removing the serial console boot line portion still causes a 
spontaneous reboot. Same for removing /bin/setserial and removing 
/dev/ttyS0 and /dev/ttyS1.

That would exclude all possible uses of the codepath affected by that 
commit, right?

If yes i'd shuffle this into the 'weird things' bucket, waiting for a 
more debuggable scenario to pop up.

	Ingo

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

* Re: [origin tree boot crash] Re: [GIT PATCH] TTY patches for 2.6.31-git
  2009-10-01  8:21     ` Ingo Molnar
@ 2009-10-01 10:36       ` Alan Cox
  0 siblings, 0 replies; 86+ messages in thread
From: Alan Cox @ 2009-10-01 10:36 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Greg KH, Linus Torvalds, Andrew Morton, linux-kernel

> Hm, removing the serial console boot line portion still causes a 
> spontaneous reboot. Same for removing /bin/setserial and removing 
> /dev/ttyS0 and /dev/ttyS1.
> 
> That would exclude all possible uses of the codepath affected by that 
> commit, right?

Who knows what the early Red Hat user space does. Booting with
init=/bin/sh might be informative just as a double check.

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

* Re: [PATCH 24/79] tty: usb_serial_mos7720: Fix get_lsr_info
  2009-09-19 21:36 ` [PATCH 24/79] tty: usb_serial_mos7720: Fix get_lsr_info Greg Kroah-Hartman
@ 2010-01-26 11:08   ` Kees Schoenmakers
  2010-01-26 11:09   ` Kees Schoenmakers
  1 sibling, 0 replies; 86+ messages in thread
From: Kees Schoenmakers @ 2010-01-26 11:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Alan Cox

Gentlemen,

As of version 2.6.32.5 this patch has not made it into the kernel sources.
Any reason for this? It is a pity for people who knowingly or unknowingly run 
into this effect in the driver.

kind regards

Kees


On Saturday 19 September 2009 23:36:29 Greg Kroah-Hartman wrote:
> From: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
>
> I made a correction for get_lsr_info, now it returns some meaningful
> information. I tested it with two simultaneous simplex modem channels.
>
> it is attached
>
> Signed-off-by: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> ---
>  drivers/usb/serial/mos7720.c |   19 +++++++++++++++----
>  1 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
> index 759cdd5..4342a8a 100644
> --- a/drivers/usb/serial/mos7720.c
> +++ b/drivers/usb/serial/mos7720.c
> @@ -378,10 +378,14 @@ static int mos7720_open(struct tty_struct *tty,
>  	 /* Initialize MCS7720 -- Write Init values to corresponding Registers
>  	  *
>  	  * Register Index
> +	  * 0 : THR/RHR
>  	  * 1 : IER
>  	  * 2 : FCR
>  	  * 3 : LCR
>  	  * 4 : MCR
> +	  * 5 : LSR
> +	  * 6 : MSR
> +	  * 7 : SPR
>  	  *
>  	  * 0x08 : SP1/2 Control Reg
>  	  */
> @@ -1250,15 +1254,22 @@ static void mos7720_set_termios(struct tty_struct
> *tty, static int get_lsr_info(struct tty_struct *tty,
>  		struct moschip_port *mos7720_port, unsigned int __user *value)
>  {
> -	int count;
> +	struct usb_serial_port *port = tty->driver_data;
>  	unsigned int result = 0;
> +	unsigned char data = 0;
> +	int port_number = port->number - port->serial->minor;
> +	int count;
>
>  	count = mos7720_chars_in_buffer(tty);
>  	if (count == 0) {
> -		dbg("%s -- Empty", __func__);
> -		result = TIOCSER_TEMT;
> +		send_mos_cmd(port->serial, MOS_READ, port_number,
> +							UART_LSR, &data);
> +		if ((data & (UART_LSR_TEMT | UART_LSR_THRE))
> +					== (UART_LSR_TEMT | UART_LSR_THRE)) {
> +			dbg("%s -- Empty", __func__);
> +			result = TIOCSER_TEMT;
> +		}
>  	}
> -
>  	if (copy_to_user(value, &result, sizeof(int)))
>  		return -EFAULT;
>  	return 0;




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

* Re: [PATCH 24/79] tty: usb_serial_mos7720: Fix get_lsr_info
  2009-09-19 21:36 ` [PATCH 24/79] tty: usb_serial_mos7720: Fix get_lsr_info Greg Kroah-Hartman
  2010-01-26 11:08   ` Kees Schoenmakers
@ 2010-01-26 11:09   ` Kees Schoenmakers
  1 sibling, 0 replies; 86+ messages in thread
From: Kees Schoenmakers @ 2010-01-26 11:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Alan Cox

Gentlemen,

Drop my previous email, it has the wrong subject

kind regards

Kees

On Saturday 19 September 2009 23:36:29 Greg Kroah-Hartman wrote:
> From: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
>
> I made a correction for get_lsr_info, now it returns some meaningful
> information. I tested it with two simultaneous simplex modem channels.
>
> it is attached
>
> Signed-off-by: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> ---
>  drivers/usb/serial/mos7720.c |   19 +++++++++++++++----
>  1 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
> index 759cdd5..4342a8a 100644
> --- a/drivers/usb/serial/mos7720.c
> +++ b/drivers/usb/serial/mos7720.c
> @@ -378,10 +378,14 @@ static int mos7720_open(struct tty_struct *tty,
>  	 /* Initialize MCS7720 -- Write Init values to corresponding Registers
>  	  *
>  	  * Register Index
> +	  * 0 : THR/RHR
>  	  * 1 : IER
>  	  * 2 : FCR
>  	  * 3 : LCR
>  	  * 4 : MCR
> +	  * 5 : LSR
> +	  * 6 : MSR
> +	  * 7 : SPR
>  	  *
>  	  * 0x08 : SP1/2 Control Reg
>  	  */
> @@ -1250,15 +1254,22 @@ static void mos7720_set_termios(struct tty_struct
> *tty, static int get_lsr_info(struct tty_struct *tty,
>  		struct moschip_port *mos7720_port, unsigned int __user *value)
>  {
> -	int count;
> +	struct usb_serial_port *port = tty->driver_data;
>  	unsigned int result = 0;
> +	unsigned char data = 0;
> +	int port_number = port->number - port->serial->minor;
> +	int count;
>
>  	count = mos7720_chars_in_buffer(tty);
>  	if (count == 0) {
> -		dbg("%s -- Empty", __func__);
> -		result = TIOCSER_TEMT;
> +		send_mos_cmd(port->serial, MOS_READ, port_number,
> +							UART_LSR, &data);
> +		if ((data & (UART_LSR_TEMT | UART_LSR_THRE))
> +					== (UART_LSR_TEMT | UART_LSR_THRE)) {
> +			dbg("%s -- Empty", __func__);
> +			result = TIOCSER_TEMT;
> +		}
>  	}
> -
>  	if (copy_to_user(value, &result, sizeof(int)))
>  		return -EFAULT;
>  	return 0;




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

end of thread, other threads:[~2010-01-26 12:03 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-19 21:33 [GIT PATCH] TTY patches for 2.6.31-git Greg KH
2009-09-19 21:36 ` [PATCH 01/79] tty: gigaset: really fix chars_in_buffer Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 02/79] serial: bfin_5xx: fix building as module when early printk is enabled Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 03/79] tty: serial/pcmcia: add ID for Advantech card Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 04/79] tty-ldisc: make /proc/tty/ldiscs use ldisc_ops instead of ldiscs Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 05/79] tty-ldisc: get rid of tty_ldisc_try_get() helper function Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 06/79] tty: includecheck fix: drivers/char, vt.c Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 07/79] tty: icom: bit and/or confusion? Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 08/79] cyclades: add tty refcounting Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 09/79] cyclades: remove block_til_ready Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 10/79] cyclades: avoid addresses recomputation Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 11/79] cyclades: switch to tty_port_hangup Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 12/79] cyclades: close cleanup Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 13/79] cyclades: overall cleanup Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 14/79] cyclades: sleep instead busy-wait Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 15/79] cyclades: use dtr_rts helpers Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 16/79] cyclades: merge cy_startup tails Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 17/79] cyclades: ioctls cleanup Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 18/79] cyclades: tiocm cleanup Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 19/79] cyclades: introduce cyy_readb/writeb Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 20/79] cyclades: remove more duplicated code Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 21/79] slip: Clean up create and destroy Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 22/79] kfifo: Use "const" definitions Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 23/79] MOS7720 has no tiocmget method Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 24/79] tty: usb_serial_mos7720: Fix get_lsr_info Greg Kroah-Hartman
2010-01-26 11:08   ` Kees Schoenmakers
2010-01-26 11:09   ` Kees Schoenmakers
2009-09-19 21:36 ` [PATCH 25/79] tty: Fix a typo noted in passing Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 26/79] mos7840: remove old dead modem logic Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 27/79] serial: 8250: add IRQ trigger support Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 28/79] 8250: Now honours baud rate lower bounds Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 29/79] tty: Add a full port_close function Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 30/79] riscom8: split open and close methods up Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 31/79] mxser: Split close ready for a standard tty_port_close method Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 32/79] isicom: Split the close hardware bits out Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 33/79] tty: riscom8 kref and tty_port_close Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 34/79] cyclades: use the full port_close function Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 35/79] tty: make the kref destructor occur asynchronously Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 36/79] cdc_acm: Fix to use modern speed interfaces Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 37/79] tty: USB hangup is racy Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 38/79] tty: remove dtr/rts use from the driver open methods Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 39/79] tty: USB can now use the shutdown method for kref based freeing of ports Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 40/79] vt: add an event interface Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 41/79] vt: remove power stuff from kernel/power Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 42/79] vt: move kernel stuff out of vt.h Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 43/79] vt: add an activate and lock Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 44/79] tty: USB does not need the filp argument in the drivers Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 45/79] isicom: split the open method for the isicom device Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 46/79] serial: kill off uart_info Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 47/79] serial: Fold closing_* fields into the tty_port ones Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 48/79] serial: use tty_port pointers in the core code Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 49/79] serial: move count into the tty_port version Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 50/79] serial: move the flags into the tty_port field Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 51/79] serial: kill off uif_t Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 52/79] serial: replace the state mutex with the tty port mutex Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 53/79] serial: move delta_msr_wait into the tty_port Greg Kroah-Hartman
2009-09-19 21:36 ` [PATCH 54/79] serial: move port users helper Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 55/79] serial: kill USF_CLOSING_* definitions Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 56/79] serial: introduce tty krefs Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 57/79] Set proper console speed on resume if console suspend is disabled Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 58/79] tty: USB serial termios bits Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 59/79] n_tty: honor opost flag for echoes Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 60/79] n_tty: move echoctl check and clean up logic Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 61/79] tty: handle VT specific compat ioctls in vt driver Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 62/79] tty: vt: use printk_once Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 63/79] tty: Power: fix suspend vt regression Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 64/79] TTY: fix typos Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 65/79] tty: riscom8, fix shutdown declaration Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 66/79] tty: riscom8, fix tty refcnt Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 67/79] tty: USB: serial/mct_u232, " Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 68/79] uartlite: support shared interrupt lines Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 69/79] tty: Char: mxser, add support for CP112UL Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 70/79] tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 71/79] usb-serial: change referencing of port and serial structures Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 72/79] usb-serial: put subroutines in logical order Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 73/79] usb-serial: change logic of serial lookups Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 74/79] usb-serial: acquire references when a new tty is installed Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 75/79] usb-serial: fix termios initialization logic Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 76/79] usb-serial: rename subroutines Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 77/79] usb-serial: add missing tests and debug lines Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 78/79] usb-serial: straighten out serial_open Greg Kroah-Hartman
2009-09-19 21:37 ` [PATCH 79/79] USB serial: update the console driver Greg Kroah-Hartman
2009-09-30 10:09 ` [origin tree boot crash] Re: [GIT PATCH] TTY patches for 2.6.31-git Ingo Molnar
2009-09-30 10:17   ` Alan Cox
2009-10-01  8:21     ` Ingo Molnar
2009-10-01 10:36       ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.