Commit Graph

511 Commits

Author SHA1 Message Date
Kalle Pokki 0091cf5a6a [POWERPC] CPM_UART: Fix non-console initialisation
The cpm_uart driver is initialised incorrectly, if there is a frame buffer
console, and CONFIG_SERIAL_CPM_CONSOLE is defined. The driver fails to
call cpm_uart_init_portdesc() and set_lineif() in this case.

Signed-off-by: Kalle Pokki <kalle.pokki@iki.fi>
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-11-10 21:35:36 +11:00
Kalle Pokki 599540a855 [POWERPC] CPM_UART: Fix non-console transmit
The SMC and SCC hardware transmitter is enabled at the wrong
place. Simply writing twice to the non-console port, like

$ echo asdf > /dev/ttyCPM1
$ echo asdf > /dev/ttyCPM1

puts the shell into endless uninterruptible sleep, since the
transmitter is stopped after the first write, and is not enabled
before the shutdown function of the second write. Thus the transmit
buffers are never emptied.

Signed-off-by: Kalle Pokki <kalle.pokki@iki.fi>
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-11-10 21:26:40 +11:00
Andrew Morton a5a89bae04 [PATCH] ioc4_serial: irq flags fix
Use the correct type for the CPU flags.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-30 12:08:40 -08:00
Randy Dunlap 74e8b51d25 [PATCH] Kconfig serial typos
Fix typo (repeated) in serial Kconfig.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-20 10:26:36 -07:00
Brent Casavant 59f148005c [PATCH] ioc4: Enable build on non-SN2
The SGI PCI-RT card, based on the SGI IOC4 chip, will be made available on
Altix XE (x86_64) platforms in the near future.  As such it is now a
misnomer for the IOC4 base device driver to live under drivers/sn, and
would complicate builds for non-SN2.

This patch moves the IOC4 base driver code from drivers/sn to drivers/misc,
and updates the associated Makefiles and Kconfig files to allow building on
non-SN2 configs.  Due to the resulting change in link order, it is now
necessary to use late_initcall() for IOC4 subdriver initialization.

[akpm@osdl.org: __udivdi3 fix]
[akpm@osdl.org: fix default in Kconfig]
Acked-by: Pat Gefre <pfg@sgi.com>
Acked-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:42 -07:00
Linus Torvalds 9eb2007488 Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: SH-4A UBC support
  sh: interrupt exception handling rework
  sh: Default enable R7780RP IRQs.
  sh: Zero-out coherent buffer in consistent_alloc().
  sh: Convert IPR-IRQ to IRQ chip.
  sh: Convert INTC2 IRQ handler to irq_chip.
  sh: Fix pr_debug statements for sh4
  sh: Convert r7780rp IRQ handler to IRQ chip.
  sh: Updates for IRQ handler changes.
  sh: Kill off timer_ops get_frequency().
  sh: First step at generic timeofday support.
2006-10-12 08:33:23 -07:00
Martin Habets eba8cefc78 [SPARC32]: Fix sparc32 modpost warnings with sunzilog
Fix this 2.6.19-rc1 build warnings from modpost:

WARNING: vmlinux - Section mismatch: reference to .init.text:sunzilog_console_setup from .data between 'sunzilog_console' (at offset 0x8394) and 'devices_subsys'

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-10-11 23:56:53 -07:00
Al Viro 48343273e8 [PATCH] __iomem annotations in sunzilog
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 15:37:20 -07:00
Linus Torvalds 5a43c09d1b Merge branch 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  drivers/isdn/act2000: kill irq2card_map
  drivers/net/eepro: kill dead code
  Various drivers' irq handlers: kill dead code, needless casts
  drivers/net: eliminate irq handler impossible checks, needless casts
  arch/i386/kernel/time: don't shadow 'irq' function arg
2006-10-09 14:21:45 -07:00
Al Viro 9c8e7f5cc9 [PATCH] m32r pt_regs fixes
... and now with irq_regs.h not forgotten...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-07 10:51:15 -07:00
Matthew Wilcox be577a5220 Build fixes for struct pt_regs removal
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
2006-10-06 20:47:23 -06:00
Jeff Garzik 5d347c8aba Merge branch 'submit1' of viper:/spare/repo/irq-remove-2.6 into irqcleanups 2006-10-06 15:27:31 -04:00
Jeff Garzik c7bec5aba5 Various drivers' irq handlers: kill dead code, needless casts
- Eliminate casts to/from void*

- Eliminate checks for conditions that never occur.  These typically
  fall into two classes:

	1) Checking for 'dev_id == NULL', then it is never called with
	NULL as an argument.

	2) Checking for invalid irq number, when the only caller (the
	system) guarantees the irq handler is called with the proper
	'irq' number argument.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-06 15:00:58 -04:00
Tony Luck 8c1addbc75 [IA64] Fix breakage from irq change
A few missed spots in ia64-land from this gigantic commit:

7d12e780e0

Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-10-06 10:09:41 -07:00
Paul Mundt 35f3c5185b sh: Updates for IRQ handler changes.
Trivial fixes for build breakage introduced by IRQ handler changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06 15:31:16 +09:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Haavard Skinnemoen 4d5e392c33 [PATCH] atmel_serial: Fix roundoff error in atmel_console_get_options
The atmel_console_get_options() function initializes the baud,
parity and bits settings from the actual hardware setup, in
case it has been initialized by a e.g. boot loader.

The baud rate, however, is not necessarily exactly equal to one of
the standard baud rates (115200, etc.) This means that the baud rate
calculated by this function may be slightly higher or slightly lower
than one of the standard baud rates.

If the baud rate is slightly lower than the target, this causes
problems when uart_set_option() tries to match the detected baud rate
against the standard baud rate, as it will always select a baud rate
that is lower or equal to the target rate. For example if the
detected baud rate is slightly lower than 115200, usart_set_options()
will select 57600.

This patch fixes the problem by subtracting 1 from the value in BRGR
when calculating the baud rate. The detected baud rate will thus
always be higher than the nearest standard baud rate, and
uart_set_options() will end up doing the right thing.

Tested on ATSTK1000 and AT91RM9200-EK boards. Both are broken without
this patch.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:06 -07:00
Haavard Skinnemoen acca9b83ac [PATCH] atmel_serial: Support AVR32
Make CONFIG_SERIAL_ATMEL selectable on AVR32 and #ifdef out some ARM-
specific code in the driver.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:06 -07:00
Haavard Skinnemoen 75d3521377 [PATCH] atmel_serial: Pass fixed register mappings through platform_data
In order to initialize the serial console early, the atmel_serial
driver had to do a hack where it compared the physical address of the
port with an address known to be permanently mapped, and used it as a
virtual address. This got around the limitation that ioremap() isn't
always available when the console is being initalized.

This patch removes that hack and replaces it with a new "regs" field
in struct atmel_uart_data that the board-specific code can initialize
to a fixed virtual mapping for platform devices where this is possible.
It also initializes the DBGU's regs field with the address the driver
used to check against.

On AVR32, the "regs" field is initialized from the physical base
address when this it can be accessed through a permanently 1:1 mapped
segment, i.e. the P4 segment.

If regs is NULL, the console initialization is delayed until the "real"
driver is up and running and ioremap() can be used.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Haavard Skinnemoen 71f2e2b878 [PATCH] atmel_serial: Rename at91_register_uart_fns
Rename at91_register_uart_fns and associated structs and variables
to make it consistent with the atmel_ prefix used by the rest of
the driver.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Haavard Skinnemoen 9ab4f88b7f [PATCH] serial: Rename PORT_AT91 -> PORT_ATMEL
The at91_serial driver can be used with both AT32 and AT91 devices
from Atmel and has therefore been renamed atmel_serial. The only
thing left is to rename PORT_AT91 PORT_ATMEL.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Haavard Skinnemoen 7192f92c79 [PATCH] at91_serial -> atmel_serial: Internal names
Prefix all internal functions and variables with atmel_ instead of
at91_.

The at91_register_uart_fns() stuff is left as is since I can't find
any actual users of it.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Haavard Skinnemoen 73e2798b0f [PATCH] at91_serial -> atmel_serial: Public definitions
Rename the following public definitions:
  * AT91_NR_UART -> ATMEL_MAX_UART
  * struct at91_uart_data -> struct atmel_uart_data
  * at91_default_console_device -> atmel_default_console_device

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Haavard Skinnemoen 1e8ea80219 [PATCH] at91_serial -> atmel_serial: Platform device name
Rename the "at91_usart" platform driver "atmel_usart" and update
platform devices accordingly.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Haavard Skinnemoen 749c4e6033 [PATCH] at91_serial -> atmel_serial: Kconfig symbols
Rename the following Kconfig symbols:
  * CONFIG_SERIAL_AT91 -> CONFIG_SERIAL_ATMEL
  * CONFIG_SERIAL_AT91_CONSOLE -> CONFIG_SERIAL_ATMEL_CONSOLE
  * CONFIG_SERIAL_AT91_TTYAT -> CONFIG_SERIAL_ATMEL_TTYAT

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Haavard Skinnemoen b6156b4e2e [PATCH] at91_serial -> atmel_serial: at91_serial.c
Rename at91_serial.c atmel_serial.c

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Haavard Skinnemoen 5b34821a60 [PATCH] at91_serial -> atmel_serial: at91rm9200_usart.h
Move include/asm/arch/at91rm9200_usart.h into drivers/serial and rename
it atmel_usart.h. Also delete AVR32's version of this file.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 10:25:05 -07:00
Linus Torvalds fefd26b3b8 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/configh
* master.kernel.org:/pub/scm/linux/kernel/git/davej/configh:
  Remove all inclusions of <linux/config.h>

Manually resolved trivial path conflicts due to removed files in
the sound/oss/ subdirectory.
2006-10-04 09:59:57 -07:00
Matthew Wilcox 136ce40e9f [PARISC] Clean up asm-parisc/serial.h
Russell King pointed out that asm/serial.h is anachronistic and we were
misusing BASE_BAUD.  So fix BASE_BAUD for PCI 16550 UARTs, move LASI_BASE_BAUD
into 8250_gsc, and fix the obsolete comment about reserving serial port slots.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-10-04 06:47:03 -06:00
Carlos O'Donell e45da35e18 [PARISC] Document that D-class can also use serial_mux
Signed-off-by: Carlos O'Donell <carlos@systemhalted.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-10-04 06:46:11 -06:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Uwe Zeisberger f30c226954 fix file specification in comments
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:01:26 +02:00
Matt LaPlante 095096038d Fix several typos in drivers/
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 22:31:37 +02:00
Linus Torvalds 6f3a28f7d1 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial: (21 commits)
  [SERIAL] add PNP IDs for FPI based touchscreens
  [SERIAL] Magic SysRq SAK does nothing on serial consoles
  [SERIAL] tickle NMI watchdog on serial output.
  [SERIAL] Fix oops when removing suspended serial port
  [SERIAL] Fix resume handling bug
  [SERIAL] Remove wrong asm/serial.h inclusions
  [SERIAL] CONFIG_PM=n slim: drivers/serial/8250_pci.c
  [SERIAL] OMAP1510 serial fix for 115200 baud
  [SERIAL] returning proper error from serial core driver
  [SERIAL] Make uart_line_info() correctly tell MMIO from I/O port
  [SERIAL] suspend/resume handlers don't have level arg anymore
  [SERIAL] 8250 resourse management fixes
  [SERIAL] serial_cs: Add quirk for brainboxes 2-port RS232 card
  [SERIAL] serial_cs: handle Nokia multi->single port bodge via config quirk
  [SERIAL] serial_cs: add configuration quirk
  [SERIAL] serial_cs: Convert Oxford 950 / Possio GCC wakeup quirk
  [SERIAL] serial_cs: convert IBM post-init handling to a quirk
  [SERIAL] serial_cs: allow wildcarded quirks
  [SERIAL] serial_cs: convert multi-port table to quirk table
  [SERIAL] serial_cs: Use clean up multiport card detection
  ...
2006-10-03 09:13:29 -07:00
Linus Torvalds ccaa36f735 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits)
  [POWERPC] Fix rheap alignment problem
  [POWERPC] Use check_legacy_ioport() for ISAPnP
  [POWERPC] Avoid NULL pointer in gpio1_interrupt
  [POWERPC] Enable generic rtc hook for the MPC8349 mITX
  [POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class
  [POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot
  [POWERPC] fix spin lock nesting in hvc_iseries
  [POWERPC] EEH failure to mark pci slot as frozen.
  [POWERPC] update powerpc defconfig files after libata kconfig breakage
  [POWERPC] enable sysrq in pmac32_defconfig
  [POWERPC] UPIO_TSI cleanup
  [POWERPC] rewrite mkprep and mkbugboot in sane C
  [POWERPC] maple/pci iomem annotations
  [POWERPC] powerpc oprofile __user annotations
  [POWERPC] cell spufs iomem annotations
  [POWERPC] NULL noise removal: spufs
  [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c
  [POWERPC] update mpc8349_itx_defconfig and remove some debug settings
  [POWERPC] Always call cede in pseries dedicated idle loop
  [POWERPC] Fix loop logic in irq_alloc_virt()
  ...
2006-10-03 08:52:26 -07:00
Jeff Dike b68e31d0eb [PATCH] const struct tty_operations
As part of an SMP cleanliness pass over UML, I consted a bunch of
structures in order to not have to document their locking.  One of these
structures was a struct tty_operations.  In order to const it in UML
without introducing compiler complaints, the declaration of
tty_set_operations needs to be changed, and then all of its callers need to
be fixed.

This patch declares all struct tty_operations in the tree as const.  In all
cases, they are static and used only as input to tty_set_operations.  As an
extra check, I ran an i386 allyesconfig build which produced no extra
warnings.

53 drivers are affected.  I checked the history of a bunch of them, and in
most cases, there have been only a handful of maintenance changes in the
last six months.  serial_core.c was the busiest one that I looked at.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:14 -07:00
Matthew Garrett 75fde2eddc [SERIAL] add PNP IDs for FPI based touchscreens
The Compaq TC1000 and Fujitsu Stylistic range of tablet machines use
touchscreens from FPI. These are implemented as serial interfaces,
generally exposed in the ACPIPNP information on the system. This patch
adds them to the 8250_pnp driver tables, avoiding the need to mess
around with setserial to set them up.

I haven't been able to confirm what FUJ02B5, FUJ02BA and FUJ02BB are.
FUJ02B1 refers to the controller for the system hotkeys. FUJ02BC appears
to be the last in the range - after this, they moved to Wacom-based
systems.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 21:27:15 +01:00
Dave Jones e480af09c4 [SERIAL] tickle NMI watchdog on serial output.
Serial is _slow_ sometimes. So slow, that the NMI watchdog kicks in.

NMI Watchdog detected LOCKUP on CPU2CPU 2
Modules linked in: loop usb_storage md5 ipv6 parport_pc lp parport autofs4 i2c_dev i2c_core rfcomm l2cap bluetooth sunrpc pcdPid: 3138, comm: gpm Not tainted 2.6.11-1.1290_FC4smp
RIP: 0010:[<ffffffff80273b8a>] <ffffffff80273b8a>{serial_in+106}
RSP: 0018:ffff81003afc3d50  EFLAGS: 00000002
RAX: 0000000000000020 RBX: 0000000000000020 RCX: 0000000000000000
RDX: 00000000000003fd RSI: 0000000000000005 RDI: ffffffff804dcd60
RBP: 00000000000024fc R08: 000000000000000a R09: 0000000000000033
R10: ffff81001beb7c20 R11: 0000000000000020 R12: ffffffff804dcd60
R13: ffffffff804ade76 R14: 000000000000002b R15: 000000000000002c
FS:  00002aaaaaac4920(0000) GS:ffffffff804fca00(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00002aaaaabcb000 CR3: 000000003c0d0000 CR4: 00000000000006e0
Process gpm (pid: 3138, threadinfo ffff81003afc2000, task ffff81003eb63780)
Stack: ffffffff80275f2e 0000000000000000 ffffffff80448380 0000000000007d6b
       000000000000002c fffffffffffffbbf 0000000000000292 0000000000008000
       ffffffff80138e8c 0000000000007d97
Call Trace:<ffffffff80275f2e>{serial8250_console_write+270} <ffffffff80138e8c>{__call_console_drivers+76}
       <ffffffff8013914b>{release_console_sem+315} <ffffffff80260325>{con_open+149}
       <ffffffff80254e99>{tty_open+537} <ffffffff80192713>{chrdev_open+387}
       <ffffffff80188824>{dentry_open+260} <ffffffff80188994>{filp_open+68}
       <ffffffff80187b73>{get_unused_fd+227} <ffffffff80188a6c>{sys_open+76}
       <ffffffff8010ebc6>{tracesys+209}

Code: 0f b6 c0 c3 66 90 41 57 49 89 f7 41 56 41 be 00 01 00 00 41
console shuts up ...

I initially did the patch below a year ago for the Fedora kernel, and have
been keeping it up to date since.  I recently got the same thing happening
on a vanilla kernel, so figured it was time to repost this.

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 20:03:19 +01:00
Russell King a6b93a9085 [SERIAL] Fix oops when removing suspended serial port
A serial card might have been removed when the system is resumed.
This results in a suspended port being shut down, which results in
the ports shutdown method being called twice in a row.  This causes
BUGs.  Avoid this by tracking the suspended state separately from
the initialised state.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:17:40 +01:00
Russell King fe59d5372a [SERIAL] Fix resume handling bug
Unfortunately, pcmcia_dev_present() returns false when a device is
suspended, so checking this on resume does not work too well.  Omit
this test.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:14:07 +01:00
Alexey Dobriyan 1d5e799663 [SERIAL] CONFIG_PM=n slim: drivers/serial/8250_pci.c
Remove some code which is unneeded if CONFIG_PM=n.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:07:08 +01:00
Jonathan McDowell 255341c6fd [SERIAL] OMAP1510 serial fix for 115200 baud
The patch below is necessary for 115200 baud on an OMAP1510 internal UART.
It's been in the linux-omap tree for some time and with it applied to a
vanilla Linus git tree the serial console on the Amstrad Delta (which is
OMAP1510 based and whose initial bootloader runs at 115200) works fine (it
doesn't without it).

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:07:06 +01:00
Ram Gupta 80e3c2b659 [SERIAL] returning proper error from serial core driver
Fix the issue of returning 0 even in case of error from uart_set_info
function.  Now it returns the error EBUSY when it can not set new port.

Signed-off-by: Ram Gupta <r.gupta@astronautics.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:07:00 +01:00
Sergei Shtylyov 6c6a2334a1 [SERIAL] Make uart_line_info() correctly tell MMIO from I/O port
/proc/tty/driver/serial incorrectly claims that UARTs having iotype of
UPIO_MEM32, UPIO_AU, or UPIO_TSI are I/O mapped.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:06:57 +01:00
Sergei Shtylyov a4b775735c [SERIAL] suspend/resume handlers don't have level arg anymore
8250.c and serial_txx9.c port suspend/resume handler still have this obsolete
argument documented...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:06:54 +01:00
Sergei Shtylyov 0b30d668a2 [SERIAL] 8250 resourse management fixes
I think register ranges obviously need to be claimed/released for all UARTs
including those with UPIO_MEM32 and UPIO_TSI iotype.

Also, serial8250_request_rsa_resources() returns false positives with
UPIO_MEM32, UPIO_AU, and UPIO_TSI iotype -- I don't think this makes any sense.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:06:49 +01:00
Russell King f3d106881b [SERIAL] serial_cs: Add quirk for brainboxes 2-port RS232 card
Mauro Ziliani reports that this card has a higher clock rate.
Rather than tweak the 8250 driver to handle this, add a quirk to
pass the correct clock rate to the driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:06:45 +01:00
Russell King 20f130495c [SERIAL] serial_cs: handle Nokia multi->single port bodge via config quirk
According to the existing code, Nokia only make single-port cards,
but are detected as multi-port cards.  Handle this in roughly the
same way via the config quirk - forcing it to be a real single port
card (info->multi=0) changes the way we allocate the IO memory,
which might stop the card working.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:06:41 +01:00
Russell King efd92dfaad [SERIAL] serial_cs: add configuration quirk
Add a quirk primerily to handle tweaks to the link->conf structure,
eg as required for Socket cards.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:06:37 +01:00
Russell King 7ef057fa70 [SERIAL] serial_cs: Convert Oxford 950 / Possio GCC wakeup quirk
Move the Oxford Semi OX950 / Possio GCC wakeup handling to a quirk
wakeup handler.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:06:34 +01:00