aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial
AgeCommit message (Collapse)Author
2010-03-02jsm: fixing error if the driver fails to loadBreno Leitao
Currently if the driver fails to register on port, the kernel crashes with the following stack: cpu 0x1: Vector: 300 (Data Access) at [c0000000e0303090] pc: c00000000039aa74: .__mutex_lock_slowpath+0x44/0x10c lr: c00000000039aa58: .__mutex_lock_slowpath+0x28/0x10c [c0000000e03033c0] c00000000026b074 .uart_remove_one_port+0xbc/0x16c [c0000000e0303460] d0000000000e0554 .jsm_remove_uart_port+0x8c/0x10c [jsm] [c0000000e03034f0] d0000000000dc034 .jsm_remove_one+0x34/0x108 [jsm] [c0000000e0303590] c0000000001f4aa0 .pci_device_remove+0x48/0x74 ... This patch just fixes the code flow to abort the load when an error is detected. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02jsm: removing the uart structure and filename on errorBreno Leitao
If jsm fails to load, then remove the uart stuff, otherwise, the things (as files), will be there forever (even when the module is unloaded). If you try to reload the module, the following message appears: kobject_add_internal failed for ttyn1 with -EEXIST, don't try to register things with the same name in the same directory. This patch remove the uart things when the driver fails. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02tty: Fix up char drivers request_room usageAlan Cox
We can't change them all but quite a few misuse it. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: timberdale: Remove dependanciesAlan Cox
MFD_TIMBERDALE doesn't appear to be defined anywhere. However the code in question can build happily without platform specifics so remove the check Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: bcm63xx_uart: allow more than one uart to be registered.Maxime Bizon
The bcm6358 CPU has two uarts, make it possible to use the second one. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: bcm63xx_uart: don't use kfree() on non kmalloced area.Maxime Bizon
Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: bfin_5xx: pull in linux/io.h for ioremap prototypesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: bfin_5xx: kgdboc should accept gdb break only when it is activeSonic Zhang
If we always check for gdb breaks even when it isn't active, we get false positives on normal code and the system panics. URL: http://blackfin.uclinux.org/gf/tracker/5277 Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: bfin_5xx: need to disable DMA TX interrupt tooGraf Yang
If we don't disable the DMA TX channel, an inopportune timeout will trigger the interrupt handler and may cause a dead lock with the spin_lock. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: bfin_5xx: remove useless gpio handling with hard flow controlSonic Zhang
For UARTs that have dedicated hardware flow control support, there will be no gpios to request/free as they are part of the normal peripheral pins. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02tty: declare MODULE_FIRMWARE in various driversBen Hutchings
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: fix test of unsignedRoel Kluin
The variables were unsigned so the tests did not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: add support for Korenix JetCardKiros Yeh
Add different model (with a different PCI ID) to support Korenix JetCard. Signed-off-by: Kiros Yeh <kiros@korenix.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: imx: fix NULL dereference Oops when pdata == NULLBaruch Siach
The platform code doesn't have to provide platform data to get sensible default behaviour from the imx serial driver. This patch does not handle NULL dereference in the IrDA case, which still requires a valid platform data pointer (in imx_startup()/imx_shutdown()), since I don't know whether there is a sensible default behaviour, or should the operation just fail cleanly. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Alan Cox <alan@linux.intel.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Oskar Schirmer <os@emlix.com> Cc: Fabian Godehardt <fg@emlix.com> Cc: Daniel Glöckner <dg@emlix.com> Cc: stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: 8250_pci: add support for MCS9865 / SYBA 6x Serial Port CardIra W. Snyder
This patch is heavily based on an earlier patch found on the linux-serial mailing list [1], written by Darius Augulis. The previous incarnation of this patch only supported a 2x serial port card. I have added support for my SYBA 6x serial port card, and tested on x86. [1]: http://marc.info/?l=linux-serial&m=124975806304760 Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Cc: Darius Augulis <augulis.darius@gmail.com> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: atmel_serial: add poll_get_char and poll_put_char uart_opsAlbin Tonnerre
Permits using KGDB over the console with the atmel_serial driver. [akpm@linux-foundation.org: s/barrier/cpu_relax/] Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Acked-by: Andrew Victor <linux@maxim.org.za> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: 68328serial.c: remove BAUD_TABLE_SIZE macroThiago Farina
This macro is a duplicate of ARRAY_SIZE defined in kernel api, so just use that instead. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: copy UART properties of UPF_FIXED_TYPE ports provisioned using ↵Shmulik Ladkani
early_serial_setup Augment the UPF_FIXED_TYPE logic, which currently applies to UART ports provisioned using platform_device_register. The suggested patch applies same logic into 'serial8250_register_ports', making UART ports provisioned using early_serial_setup inherit their properties from the uart_config entry. Signed-off-by: Shmulik Ladkani <shmulik@jungo.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02serial: fit blackfin uart over sport driver into common uart infrastructuresonic zhang
Fit blackfin uart over sport driver into common uart inftrastructure. It is based on the early platform interfaces to get the platform data early when the console is initilized. 1. Enable sport uart driver to change uart baud, data bit, stop bit at runtime. Bind the index of uart device nodes to physical index of sports. 2. Move all platform data into arch specific board files. Register and probe platform device data in both early and normal stages. 3. Console is registered in sport uart driver as well. 4. Remove 500 us block waiting in sport tx stop code by putting a dummy data into tx fifo to make sure the sport tx stops when all bytes are shifted out except for the dummy data. 5. clean up a bit and fix up coding style. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Bryan Wu <cooloney@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-01Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (100 commits) ARM: Eliminate decompressor -Dstatic= PIC hack ARM: 5958/1: ARM: U300: fix inverted clk round rate ARM: 5956/1: misplaced parentheses ARM: 5955/1: ep93xx: move timer defines into core.c and document ARM: 5954/1: ep93xx: move gpio interrupt support to gpio.c ARM: 5953/1: ep93xx: fix broken build of clock.c ARM: 5952/1: ARM: MM: Add ARM_L1_CACHE_SHIFT_6 for handle inside each ARCH Kconfig ARM: 5949/1: NUC900 add gpio virtual memory map ARM: 5948/1: Enable timer0 to time4 clock support for nuc910 ARM: 5940/2: ARM: MMCI: remove custom DBG macro and printk ARM: make_coherent(): fix problems with highpte, part 2 MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself ARM: 5945/1: ep93xx: include correct irq.h in core.c ARM: 5933/1: amba-pl011: support hardware flow control ARM: 5930/1: Add PKMAP area description to memory.txt. ARM: 5929/1: Add checks to detect overlap of memory regions. ARM: 5928/1: Change type of VMALLOC_END to unsigned long. ARM: 5927/1: Make delimiters of DMA area globally visibly. ARM: 5926/1: Add "Virtual kernel memory..." printout. ARM: 5920/1: OMAP4: Enable L2 Cache ... Fix up trivial conflict in arch/arm/mach-mx25/clock.c
2010-02-27Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (24 commits) m68k: Define sigcontext ABI of ColdFire m68knommu: NPTL support for uClinux m68k: Add NPTL support m68k: Eliminate unused variable in page_to_phys() m68k: Switch to generic siginfo layout macfb: fix 24-bit visual and stuff macfb: cleanup fbdev: add some missing mac modes mac68k: start CUDA early valkyriefb: various fixes fbdev: mac_var_to_mode() fix mac68k: move macsonic and macmace platform devices mac68k: move mac_esp platform device mac68k: replace mac68k SCC code with platform device pmac-zilog: add platform driver pmac-zilog: cleanup mac68k: rework SWIM platform device mac68k: cleanup ataflop: Killl warning about unused variable flags m68k: Use DIV_ROUND_CLOSEST ...
2010-02-27Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (141 commits) MIPS: Alchemy: defconfig updates MIPS: Alchemy: Fix Au1100 ethernet build failure MIPS: Alchemy: Repair db1500/bosporus builds MIPS: ARC: Cleanup unused definitions from sgialib.h MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses MIPS: Alchemy: use 36bit addresses for PCMCIA resources. MIPS: Cobalt: Fix theoretical port aliasing issue MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1) MIPS: Crazy spinlock speed test. MIPS: Optimize spinlocks. MIPS: Alchemy: devboard PM needs to save CPLD registers. MIPS: PowerTV: Eliminate duplicate opcode definition macros MIPS: Lemote 2F: Move printks out of port_access_lock. MIPS: PNX833x: Convert IRQ controller locks to raw spinlocks. MIPS: Octeon: Replace spinlock with raw_spinlocks in dma-octeon.c. MIPS: Octeon: Replace rwlocks in irq_chip handlers with raw_spinlocks. MIPS: Octeon: Convert octeon_irq_msi_lock to raw spinlock. MIPS: Loongson: Remove pointless sample_lock from oprofile code. MIPS: SNI: Convert sni_rm200_i8259A_lock to raw spinlock. MIPS: i8259: Convert IRQ controller lock to raw spinlock. ...
2010-02-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (49 commits) pcmcia: validate late-added resources pcmcia: allow for extension of resource interval pcmcia: remove useless msleep in ds.c pcmcia: use read_cis_mem return value pcmcia: handle error in serial_cs config calls pcmcia: add locking to pcmcia_{read,write}_cis_mem pcmcia: avoid prod_id memleak pcmcia: avoid sysfs-related lockup for cardbus pcmcia: use state machine for extended requery pcmcia: delay re-scanning and re-querying of PCMCIA bus pcmcia: use pccardd to handle eject, insert, suspend and resume requests pcmcia: use ops_mutex for rsrc_{mgr,nonstatic} locking pcmcia: use mutex for dynid lock pcmcia: assert locking to struct pcmcia_device pcmcia: add locking documentation pcmcia: simplify locking pcmcia: add locking to struct pcmcia_socket->pcmcia_state() pcmcia: protect s->device_count pcmcia: properly lock skt->irq, skt->irq_mask pcmcia: lock ops->set_socket ...
2010-02-27Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (88 commits) powerpc: Fix lwsync feature fixup vs. modules on 64-bit powerpc: Convert pmc_owner_lock to raw_spinlock powerpc: Convert die.lock to raw_spinlock powerpc: Convert tlbivax_lock to raw_spinlock powerpc: Convert mpic locks to raw_spinlock powerpc: Convert pmac_pic_lock to raw_spinlock powerpc: Convert big_irq_lock to raw_spinlock powerpc: Convert feature_lock to raw_spinlock powerpc: Convert i8259_lock to raw_spinlock powerpc: Convert beat_htab_lock to raw_spinlock powerpc: Convert confirm_error_lock to raw_spinlock powerpc: Convert ipic_lock to raw_spinlock powerpc: Convert native_tlbie_lock to raw_spinlock powerpc: Convert beatic_irq_mask_lock to raw_spinlock powerpc: Convert nv_lock to raw_spinlock powerpc: Convert context_lock to raw_spinlock powerpc/85xx: Add NOR, LEDs and PIB support for MPC8568E-MDS boards powerpc/86xx: Enable VME driver on the GE SBC610 powerpc/86xx: Enable VME driver on the GE PPC9A powerpc/86xx: Add MSI section to GE PPC9A DTS ...
2010-02-27pmac-zilog: add platform driverFinn Thain
Add platform driver support to the pmac-zilog driver, for m68k macs. Place the powermac-specific code inside #ifdef CONFIG_PPC_PMAC. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-02-27pmac-zilog: cleanupFinn Thain
Whitespace cleanups and comment typo fix. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-02-27SERIAL 8250: Fixes for Alchemy UARTs.Manuel Lauss
Limit the amount of address space claimed for Alchemy serial ports to 0x1000. On the Au1300, ports are only 0x1000 apart, and the registers only extend to 0x110 at most on all supported alchemy models. On the Au1300 the autodetect logic no longer works and this makes it necessary to specify the port type through platform data. Because of this the MSR quirk needs to be moved outside the autoconfig() function which will no longer be called when UPF_FIXED_TYPE is specified. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org>, Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (187 commits) sh: remove dead LED code for migo-r and ms7724se sh: ecovec build fix for CONFIG_I2C=n sh: ecovec r-standby support sh: ms7724se r-standby support sh: SH-Mobile R-standby register save/restore clocksource: Fix up a registration/IRQ race in the sh drivers. sh: ms7724: modify scan_timing for KEYSC sh: ms7724: Add sh_sir support sh: mach-ecovec24: Add sh_sir support sh: wire up SET/GET_UNALIGN_CTL. sh: allow alignment fault mode to be configured at kernel boot. sh: sh7724: Update FSI/SPU2 clock sh: always enable sh7724 vpu_clk and set to 166MHz on Ecovec sh: add sh7724 kick callback to clk_div4_table sh: introduce struct clk_div4_table sh: clock-cpg div4 set_rate() shift fix sh: Turn on speculative return for SH7785 and SH7786 sh: Merge legacy and dynamic PMB modes. sh: Use uncached I/O helpers in PMB setup. sh: Provide uncached I/O helpers. ...
2010-02-26Merge commit 'origin/master' into nextBenjamin Herrenschmidt
Manual merge of: drivers/char/hvc_console.c drivers/char/hvc_console.h
2010-02-25Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (41 commits) of: remove undefined request_OF_resource & release_OF_resource of/sparc: Remove sparc-local declaration of allnodes and devtree_lock of: move definition of of_chosen into common code. of: remove unused extern reference to devtree_lock of: put default string compare and #a/s-cell values into common header of/flattree: Don't assume HAVE_LMB of: protect linux/of.h with CONFIG_OF proc_devtree: fix THIS_MODULE without module.h of: Remove old and misplaced function declarations of/flattree: Make the kernel accept ePAPR style phandle information of/flattree: endian-convert members of boot_param_header of: assume big-endian properties, adding conversions where necessary of: use __be32 for cell value accessors of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing of/flattree: use callback to setup initrd from /chosen proc_devtree: include linux/of.h of: make set_node_proc_entry private to proc_devtree.c of: include linux/proc_fs.h of/flattree: merge early_init_dt_scan_memory() common code of: add 'of_' prefix to machine_is_compatible() ...
2010-02-25Merge branches 'clks' and 'pnx' into develRussell King
2010-02-25Merge branch 'misc2' into develRussell King
2010-02-18ARM: 5933/1: amba-pl011: support hardware flow controlRabin Vincent
Enable/disable automatic hardware flow control as requested by the termios. The controller does not allow us to control the RTS line when auto-RTS is enabled, so we enable auto-RTS only if the kernel has not disabled RTS. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-17pcmcia: handle error in serial_cs config callsDominik Brodowski
Do not ignore the error returned by simple_config() / multi_config(). CC: linux-serial@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-16serial: mpc52xx_uart: re-enable mpc5121 PSC UART supportAnatolij Gustschin
Currently the support for MPC5121 PSC UART in the mpc52xx_uart driver is broken (only console pre-initialized by the bootloader works). Re-enable it now by providing MPC5121 specific ops for PSCx clock activation, FIFO controller init/uninit and MPC5121 PSC FIFO shared interrupt handling functions. Signed-off-by: John Rigby <jcrigby@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-02-16serial: 8250: add serial transmitter fully empty testDick Hollenbeck
When controlling an industrial radio modem it can be necessary to manipulate the handshake lines in order to control the radio modem's transmitter, from userspace. The transmitter should not be turned off before all characters have been transmitted. serial8250_tx_empty() was reporting that all characters were transmitted before they actually were. === Discovered in parallel with more testing and analysis by Kees Schoenmakers as follows: I ran into an NetMos 9835 serial pci board which behaves a little different than the standard. This type of expansion board is very common. "Standard" 8250 compatible devices clear the 'UART_LST_TEMT" bit together with the "UART_LSR_THRE" bit when writing data to the device. The NetMos device does it slightly different I believe that the TEMT bit is coupled to the shift register. The problem is that after writing data to the device and very quickly after that one does call serial8250_tx_empty, it returns the wrong information. My patch makes the test more robust (and solves the problem) and it does not affect the already correct devices. Alan: We may yet need to quirk this but now we know which chips we have a way to do that should we find this breaks some other 8250 clone with dodgy THRE. Signed-off-by: Dick Hollenbeck <dick@softplc.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Kees Schoenmakers <k.schoenmakers@sigmae.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-02-09of: add 'of_' prefix to machine_is_compatible()Grant Likely
machine is compatible is an OF-specific call. It should have the of_ prefix to protect the global namespace. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Michal Simek <monstr@monstr.eu>
2010-02-08serial: sh-sci: remove SCIF code in sci_rxd_in()Magnus Damm
Since sci_rxd_in() is used by SCI only, clean up the header file by killing off code dealing with SCIF ports and their register definitions. Also introduce a default sci_rxd_in() function which can be shared by all SCIF-only processors. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-02uartlite: fix crash when using as consoleRichard Röjfors
Move the ulite_console_setup to the .devinit section since it might be called on probe, which is in devinit. Fixes the crash below where the uartlite hw is probed after the .init section is freed from the kernel. uartlite: ttyUL0 at MMIO 0xc8000100 (irq = 30) is a uartlite BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<c176720e>] ulite_console_setup+0x6f/0xa8 *pdpt = 0000000036fb0001 *pde = 0000000000000000 Oops: 0000 [#1] PREEMPT SMP last sysfs file: /sys/devices/pci0000:00/0000:00:1f.1/host0/uevent Modules linked in: puffin(+) serio_raw Pid: 151, comm: modprobe Not tainted (2.6.31.5-1.0.b1-b1 #1) POULSBO EIP: 0060:[<c176720e>] EFLAGS: 00010246 CPU: 0 EIP is at ulite_console_setup+0x6f/0xa8 EAX: c16ec824 EBX: c16ec824 ECX: c176719f EDX: 00000000 ESI: 00000000 EDI: c17b42c4 EBP: f6fd1cf0 ESP: f6fd1cd8 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process modprobe (pid: 151, ti=f6fd0000 task=f6fa1020 task.ti=f6fd0000) Stack: c1031f51 00000000 00000000 00000246 c182237c f7742000 f6fd1d5c c11fd316 <0> c16ec85c f77420d4 0000001e 00000000 00000000 c1633e78 4f494d4d 63783020 <0> 30303038 00303031 f6fd1d3c c10e0786 f6fd1d48 00000000 f6fd1d48 00000000 Call Trace: [<c1031f51>] ? register_console+0xf6/0x1fc [<c11fd316>] ? uart_add_one_port+0x237/0x2bb [<c10e0786>] ? sysfs_add_one+0x13/0xd3 [<c10e142f>] ? sysfs_do_create_link+0xba/0xfc [<c146f200>] ? ulite_probe+0x198/0x1eb [<c12064ee>] ? platform_drv_probe+0xc/0xe [<c120597b>] ? driver_probe_device+0x79/0x105 [<c1205a8e>] ? __device_attach+0x28/0x30 [<c120511f>] ? bus_for_each_drv+0x3d/0x67 [<c1205af9>] ? device_attach+0x44/0x58 [<c1205a66>] ? __device_attach+0x0/0x30 [<c1204fb8>] ? bus_probe_device+0x1f/0x34 [<c1203e68>] ? device_add+0x385/0x4c0 [<c148491f>] ? _write_unlock+0x8/0x1f [<c1206aac>] ? platform_device_add+0xd9/0x11c [<c120c685>] ? mfd_add_devices+0x165/0x1bc [<f831b378>] ? puffin_probe+0x2d0/0x390 [puffin] [<c11a08ef>] ? pci_match_device+0xa0/0xa7 [<c11a07bc>] ? local_pci_probe+0xe/0x10 [<c11a11db>] ? pci_device_probe+0x43/0x66 [<c120597b>] ? driver_probe_device+0x79/0x105 [<c1205a4a>] ? __driver_attach+0x43/0x5f [<c120535d>] ? bus_for_each_dev+0x3d/0x67 [<c1205852>] ? driver_attach+0x14/0x16 [<c1205a07>] ? __driver_attach+0x0/0x5f [<c1204dea>] ? bus_add_driver+0xf9/0x220 [<c1205c8f>] ? driver_register+0x8b/0xeb [<c11a1518>] ? __pci_register_driver+0x43/0x9f [<c10477ef>] ? __blocking_notifier_call_chain+0x40/0x4c [<f831f000>] ? puffin_init+0x0/0x48 [puffin] [<f831f017>] ? puffin_init+0x17/0x48 [puffin] [<c1001139>] ? do_one_initcall+0x4c/0x131 [<c105607b>] ? sys_init_module+0xa7/0x1b7 [<c1002a61>] ? syscall_call+0x7/0xb Code: 6e 74 00 00 00 92 33 00 00 18 00 0e 01 73 79 6e 63 65 2d 72 65 67 69 73 74 72 79 0c 00 49 32 00 00 14 00 09 01 61 6c 73 61 2d 69 <6e> 66 6f 00 00 00 42 37 00 00 10 00 07 01 6b 69 6c 6c 61 6c 6c EIP: [<c176720e>] ulite_console_setup+0x6f/0xa8 SS:ESP 0068:f6fd1cd8 CR2: 0000000000000000 Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-23fmvj18x_cs: add new id (Panasonic lan & modem card)Ken Kawasaki
fmvj18x_cs, serial_cs: add new id Panasonic lan & modem card (model name:AL-VML101) Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-20serial: serial_cs: oxsemi quirk breaks resumePavel Machek
Quirk is applied on all cards with given manfid (is it that correct?). Unfortunately, that quirk breaks resume on zaurus with billionton bluetooth card inserted: c950ctrl is 0 and outb() faults. I believe it is simply not a multiport card. (info->multi == 1). ... ... confirmed by printks. Signed-off-by: Pavel Machek <pavel@ucw.cz> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-20serial: imx: bit &/| confusionRoel Kluin
Since UCR1_UARTEN is defined 1, the port was always treated as enabled. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Acked-by: Oskar Schirmer <os@emlix.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Fabian Godehardt <fg@emlix.com> Cc: Daniel Glöckner <dg@emlix.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-20serial: Fix crash if the minimum rate of the device is > 9600 baudAlan Cox
In that situation if the old rate is invalid and the new rate is invalid and the chip cannot do 9600 baud we report zero, which makes all the drivers explode. Instead force the rate based on min/max Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-20serial-core: resume serial hardware with no_console_suspendStanislav Brabec
Perform a tricky suspend/resume even with no_console_suspend. With no_console_suspend, kernel skips serial port suspend/resume and the serial hardware may remain in undefined state after resume. It actually happens on devices that don't have BIOS that handle serial initialization. It makes impossible to use serial console after resume. Devices affected by this problem include: Sharp Zaurus devices Several PXA based ARM embedded boards The patch does: - Save the hardware state - Perform buffer flush in time of its suspend call - Tell the driver that port is suspended - But still accept new data - And keep console hardware in state that allows to send them It allows to capture late console messages without breaking console after resume. This is just a resend of a patch discussed in these threads, as the patch was not yet applied. "Possible suspend/resume regression in .32-rc?" (Nov 1-5, 2009, ARM list, later LKML) "serial-core: resume serial hardware with no_console_suspend" (Sep 15-Oct 18, 2009, LKML & ARM lists) Signed-off-by: Stanislav Brabec <sbrabec@suse.cz> Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com> Tested-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-20serial: 8250_pnp: use wildcard for serial Wacom tabletsMatthew Garrett
Wacom claims that the WACF namespace will always be devoted to serial Wacom tablets. Remove the existing entries and add a wildcard to avoid having to update the kernel every time they add a new device. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Tested-by: Ping Cheng <pingc@wacom.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-18Merge branch 'merge' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Move cpu hotplug driver lock from pseries to powerpc powerpc: Move /proc/ppc64 to /proc/powerpc update powerpc/8xx: Fix user space TLB walk in dcbX fixup powerpc: Fix decrementer setup on 1GHz boards powerpc/iseries: Initialise on-stack completion powerpc/hvc: Driver build breaks with !HVC_CONSOLE serial/pmac_zilog: Workaround problem due to interrupt on closed port powerpc/macintosh: Make Open Firmware device id constant powerpc: Use helpers for rlimits powerpc: cpumask_of_node() should handle -1 as a node powerpc/pseries: Fix dlpar compile warning without CONFIG_PROC_DEVICETREE powerpc/pseries: Fix xics interrupt affinity powerpc/swsusp_32: Fix TLB invalidation powerpc/8xx: Always pin kernel instruction TLB powerpc: 2.6.33 update of defconfigs for embedded 6xx/7xxx, 8xx, 8xxx powerpc: Use scripts/mkuboot.sh instead of 'mkimage' powerpc/5200: update defconfigs
2010-01-16serial/8250_pnp: add a new Fujitsu Wacom Tablet PC devicePing
This is a new two finger touch Fujitsu Wacom Tablet PC. Signed-off-by: Ping Cheng <pingc@wacom.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-15serial/pmac_zilog: Workaround problem due to interrupt on closed portBenjamin Herrenschmidt
It seems that in qemu, we can see an interrupt in R3 despite the fact that it's masked in W1. The chip doesn't actually issue an interrupt, but we can "see" it when taking an interrupt for the other channel. This may be a qemu bug ... or not, so let's be safe and avoid calling into the UART layer when that happens which woulc cause a crash. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Rob Landley <rob@landley.net>
2010-01-15serial: sh-sci: using correct fifo size for SCIF and SCIFA ports.Markus Pietrek
The sh-sci driver used the wrong fifosize for PORT_SCIFA and PORT_SCIF ports. If an incorrect size is used, the serial core will enforce an early shutdown on the port, especially with baudrates < 9600. Signed-off-by: Markus Pietrek <Markus.Pietrek@emtrion.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: ARM: Ensure ARMv6/7 mm files are built using appropriate assembler options ARM: Fix wrong dmb ARM: 5874/1: serial21285: fix disable_irq-from-interrupt-handler deadlock ARM: 5873/1: ARM: Fix the reset logic for ARM RealView boards ARM: 5872/1: ARM: include needed linux/cpu.h in asm/cpu.h ARM: 5871/1: arch/arm: Fix build failure for lpd7a404_defconfig caused by missing includes ARM: 5870/1: arch/arm: Fix build failure for defconfigs without CONFIG_ISA_DMA_API set ARM: 5868/1: ARM: fix "BUG: using smp_processor_id() in preemptible code" ARM: 5867/1: Update U300 defconfig ARM: 5866/1: arm ptrace: use unsigned types for kernel pt_regs [ARM] pxa: fix strange characters in zaurus gpio .desc ARM: add missing recvmmsg syscall number [ARM] pxa: fix compiler warnings of unused variable 'id' in cpu_is_pxa9*() [ARM] pxa: update pwm_backlight->notify() to include missed 'struct device *' [ARM] pxa: enable L2 if present in XSC3 [ARM] pxa: do not enable L2 after MMU is enabled