- 12 12月, 2009 40 次提交
-
-
由 Alan Cox 提交于
Slice/dice/repeat as with the stallion driver this is just code shuffling and removal Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
The driver is already structured this way so just slice and dice Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Some devices want to set IO_ERROR in their activate methods so that you can be handed a 'dead' port for operations like setserial. Thus we need to clear the flag before activate so that activate can choose to set the flag and still return 0. This is fine as the file handle/tty are not accessible to the user yet. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
To propogate tty_port_open/close to a few other devices we need to start handling the IO_ERROR flag on the tty. We can do this pretty trivially. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
We want to be able to do this without regard for the activate/own open method being used which causes a problem using port->mutex. Add another mutex for now. Once everything uses port_open to do buffer allocs we can kill it back off Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
The new dtr_rts function didn't take the port->func lock as it should so add use of the lock there. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Add the POSIX block for carrier Linux TIOCMIWAIT functionality is still lacking from the driver. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Running the current code through checkpatch shows a few bits of noise mostly but not entirely from before the changes. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Switching between two non standard baud rates fails because of the cflag test. Do as we did elsewhere and just kill the "optimisation". Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Gets us proper tty semantics, removes some code and fixes up a few corner case races (hangup during open etc) Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
When we move to the tty_port logic the port mutex will protect open v close v hangup. Move to this first in the existing open code so we have a bisection point. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
The tty can go away underneath us, so we must refcount it. Do the naïve implementation initially. We will worry about startup shortly. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Nicolas Pitre 提交于
Now... testing reveals that the very first patch "sdio_uart: use tty_port" causes a segmentation fault in sdio_uart_open(): Unable to handle kernel NULL pointer dereference at virtual address 00000084 pgd = dfb44000 [00000084] *pgd=1fb99031, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] PREEMPT last sysfs file: /sys/devices/platform/mvsdio/mmc_host/mmc0/mmc0:f111/uevent Modules linked in: CPU: 0 Not tainted (2.6.32-rc5-next-20091102-00001-gb36eae9 #10) PC is at sdio_uart_open+0x204/0x2cc [...] Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Add a tty_port object to the sdio uart. For the moment just begin using the tty field of the port, as this is the critical one to clean up. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Move the HUCPL handling from the end of close_port_start to the beginning of close_port_end. What this actually does is change the ordering from port shutdown port->dtr_rts to port->dtr_rts port shutdown Some hardware drops the physical connection on shutdown so we must perform the port operations before the shutdown. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Sukadev Bhattiprolu 提交于
devpts_get_tty() assumes that the inode passed in is associated with a valid pty. But if the only reference to the pty is via a bind-mount, the inode passed to devpts_get_tty() while valid, would refer to a pty that no longer exists. With a lot of debug effort, Grzegorz Nosek developed a small program (see below) to reproduce a crash on recent kernels. This crash is a regression introduced by the commit: commit 527b3e47 Author: Sukadev Bhattiprolu <sukadev@us.ibm.com> Date: Mon Oct 13 10:43:08 2008 +0100 To fix, ensure that the dentry associated with the inode has not yet been deleted/unhashed by devpts_pty_kill(). See also: https://lists.linux-foundation.org/pipermail/containers/2009-July/019273.html tty-bug.c: #define _GNU_SOURCE #include <fcntl.h> #include <sched.h> #include <stdlib.h> #include <sys/mount.h> #include <sys/signal.h> #include <unistd.h> #include <stdio.h> #include <linux/fs.h> void dummy(int sig) { } static int child(void *unused) { int fd; signal(SIGINT, dummy); signal(SIGHUP, dummy); pause(); /* cheesy synchronisation to wait for /dev/pts/0 to appear */ mount("/dev/pts/0", "/dev/console", NULL, MS_BIND, NULL); sleep(2); fd = open("/dev/console", O_RDWR); dup(0); dup(0); write(1, "Hello world!\n", sizeof("Hello world!\n")-1); return 0; } int main(void) { pid_t pid; char *stack; stack = malloc(16384); pid = clone(child, stack+16384, CLONE_NEWNS|SIGCHLD, NULL); open("/dev/ptmx", O_RDWR|O_NOCTTY|O_NONBLOCK); unlockpt(fd); grantpt(fd); sleep(2); kill(pid, SIGHUP); sleep(1); return 0; /* exit before child opens /dev/console */ } Reported-by: NGrzegorz Nosek <root@localdomain.pl> Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Tested-by: NSerge Hallyn <serue@us.ibm.com> Cc: stable <stable@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Ian Jackson 提交于
Do not read IIR in serial8250_start_tx when UART_BUG_TXEN Reading the IIR clears some oustanding interrupts so it is not safe. Instead, simply transmit immediately if the buffer is empty without regard to IIR. Signed-off-by: NIan Jackson <ian.jackson@eu.citrix.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NJiri Kosina <jkosina@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Tilman Schmidt 提交于
A small addition to the ldisc method descriptions. Signed-off-by: NTilman Schmidt <tilman@imap.cc> Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Acked-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Uwe Kleine-König 提交于
Intel(R) PXA27x Processor Family Specification Update (Nov 2005) says: E75. UART: Baud rate may not be programmed correctly on back-to-back writes. Problem: When programming the Divisor Latch registers, Low and High (DLL and DLH), with back-to-back writes, the second register write may not take effect. The result is an incorrect baud rate. Workaround: After programming the first Divisor Latch register, read and verify it before programming the second Divisor Latch register. This was hit when changing the baud rate from 115200 to 9600 while receiving characters at 9600 Bd. And fixed indention of some comments nearby. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NMarc Kleine-Budde <mkl@pengutronix.de> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Mike Rapoport <mike@compulab.co.il> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 André Goddard Rosa 提交于
Signed-off-by: NAndré Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 André Goddard Rosa 提交于
Signed-off-by: NAndré Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 André Goddard Rosa 提交于
If kzalloc() or alloc_tty_driver() fails, we call: put_tty_driver(normal = NULL). Then: put_tty_driver -> tty_driver_kref_put -> kref_put(&NULL->kref, ...) Signed-off-by: NAndré Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Opticon now takes the right mutex to check the port status but the status check is done wrongly for the modern serial code, so fix it. Signed-off-by: NAlan Cox <alan@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
The tty port has a port mutex used for all the port related locking so we don't need the one in the USB serial layer any more. Signed-off-by: NAlan Cox <alan@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
As Alan Stern pointed out - now we have tty_port_open the shutdown method and locking allow us to whack the other bits into the full helper methods and provide a shutdown op which the tty port code will synchronize with setup for us. Signed-off-by: NAlan Cox <alan@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Mind the hoover wire... Signed-off-by: NAlan Cox <alan@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
For the moment this just moves the USB logic over and fixes the 'what if we open and hangup at the same time' race noticed by Oliver Neukum. Signed-off-by: NAlan Cox <alan@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
Fairly trivial as the BKL push down into the methods has already been done. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Cox 提交于
The ESP driver has been marked broken for years. It's an old ISA device that clearly nobody cares about any more. Remove it Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alexey Dobriyan 提交于
Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Breno Leitao 提交于
Adding EEH handlers for the serial jsm driver. This patch adds the PCI error handlers and also register them to be called when a error is detected. Signed-off-by: NBreno Leitao <leitao@linux.vnet.ibm.com> Acked-by: NScott Kilau <scottk@digi.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Breno Leitão 提交于
Currently there is a field in the jsm_board structure to cont the number of interrupt that the card recevived, but it's not working properly when the IRQ line is shared, and also nowhere else this field is used. So, This patch is removing it. Signed-off-by: NBreno Leitão <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <Scott.Kilau@digi.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Breno Leitão 提交于
Currently the jsm_channel->ch_wopen field is defined and never used. So, this patch removes it. Signed-off-by: NBreno Leitão <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <Scott.Kilau@digi.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Breno Leitão 提交于
Currently the field jsm_channel->ch_cpstime is defined but never used, so this patch removes it. Signed-off-by: NBreno Leitão <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <Scott.Kilau@digi.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Breno Leitão 提交于
Currently the field jsm_channel->ch_old_baud is not used, just assigned in a lot of places but never used. This patches removes this field. Signed-off-by: NBreno Leitão <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <scottk@digi.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Breno Leitão 提交于
Currently the ch_custom_speed field exists but is never used, so, this patch removes it. Signed-off-by: NBreno Leitão <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <scottk@digi.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Breno Leitão 提交于
Actually jsm displays "Device Added" 8 times (for a 8 port device). This silly patch just makes things more informative, showing the port (instead of the device) that was added. Signed-off-by: NBreno Leitão <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <scottk@digi.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Breno Leitão 提交于
Currently jsm is showing the following message when loaded: IRQ 432/JSM: IRQF_DISABLED is not guaranteed on shared IRQs It's because the request_irq() is called using IRQF_DISABLED and IRQF_SHARED. Actually there is no need to use IRQF_DISABLED in this driver. Signed-off-by: NBreno Leitão <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <scottk@digi.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-