- 30 4月, 2011 2 次提交
-
-
由 Joe Perches 提交于
Use the standard mechanism to print a hex buffer to eliminate empty printf warning. A couple % smaller text and data too. $ size drivers/tty/n_gsm.o* text data bss dec hex filename 23543 312 6376 30231 7617 drivers/tty/n_gsm.o.new 24051 408 6496 30955 78eb drivers/tty/n_gsm.o.old Signed-off-by: NJoe Perches <joe@perches.com> Acked-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Julia Lawall 提交于
The tty value that should be put is the one that was just gotten by tty_port_tty_get, not the one that is the argument to the enclosing function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ local idexpression struct tty_struct *x; expression ra,rr; statement S1,S2; @@ x = tty_port_tty_get(...) ... when != x = rr when any when != tty_kref_put(x,...) when != if (...) { ... tty_kref_put(x,...) ...} ( if(<+...x...+>) S1 else S2 | if(...) { ... when != x = ra when forall when != tty_kref_put(x,...) *return...; } ) // </smpl> Signed-off-by: NJulia Lawall <julia@diku.dk> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 26 4月, 2011 7 次提交
-
-
由 Jiri Slaby 提交于
tty_write_lock and tty_write_unlock contain imbalanced locking. But this is intentional, so mark them appropriately by __acquires/__releases. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
msleep* is guaranteed to return with TASK_RUNNING task state. And since there is no other set_task_state in the paths of uart_wait_until_sent, we need not to set_task_state to TASK_RUNNING. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
tty->index (named here as line) is set up in initialize_tty_struct. The value is checked in get_tty_driver for the found driver as: if (device < base || device >= base + p->num) continue; *index = device - base; So index/line can never be more than driver->num. Hence remove this test from uart_open. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
moxa_write can be called from atomic context with irqs disabled (from ppp_async_push). Don't enable interrupts by spin_unlock_bh as this might cause deadlocks in the ppp layer. Instead, use irqsave/irqrestore spin_lock functions. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
tty_sem used to protect tty open count. This was removed in 33dd474a but the lock remained in place. So remove it completely as it protects nothing now. Also this solves Mac's problem with inatomic operation called from atomic context (ppp): BUG: scheduling while atomic: firefox-bin/1992/0x10000800 Modules linked in: ... Pid: 1992, comm: firefox-bin Not tainted 2.6.38 #1 Call Trace: ... [] ? mutex_lock+0xe/0x21 [] ? ntty_write+0x5d/0x192 [nozomi] [] ? __mod_timer.clone.30+0xbe/0xcc [] ? check_preempt_curr+0x60/0x6d [] ? __nf_ct_refresh_acct+0x75/0xbe [] ? ppp_async_push+0xa9/0x3bd [ppp_async] [] ? ppp_async_send+0x34/0x40 [ppp_async] [] ? ppp_push+0x6c/0x4f9 [ppp_generic] ... Signed-off-by: NJiri Slaby <jslaby@suse.cz> Reported-by: NMac <kmac@poczta.fm> Tested-by: NGerald Pfeifer <gerald@pfeifer.com> Reviewed-by: NJack Stone <jwjstone@fastmail.fm> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
Before 33dd474a, these were some kind of protection against race with HUP. They were protected with port->tty_sem at the same time. By that commit, the counting was switched to tty_port's one, but the locking remained the old one. So the count was not protected by any lock anymore. The driver should not test whether it raced with HUP or not anyways. With the new refcounted tty model, it just should proceed as nothing happened because all needed info is still there. In respect to this, let's drop the useless and unprotected tests (tty_port->count is protected by tty_port->lock). Signed-off-by: NJiri Slaby <jslaby@suse.cz> Tested-by: NGerald Pfeifer <gerald@pfeifer.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
The allocation was moved to probe function in 9842c38e. And we can sleep there. So allocate the 4*8192 bytes as GFP_KERNEL to mitigate the allocation failure. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Tested-by: NGerald Pfeifer <gerald@pfeifer.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 23 4月, 2011 1 次提交
-
-
由 Felipe Balbi 提交于
it makes it simpler to keep track of the amount of bytes received and simplifies how flush_to_ldisc counts the remaining bytes. It also fixes a bug of lost bytes on n_tty when flushing too many bytes via the USB serial gadget driver. Tested-by: NStefan Bigler <stefan.bigler@keymile.com> Tested-by: NToby Gray <toby.gray@realvnc.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 20 4月, 2011 24 次提交
-
-
由 Govindraj.R 提交于
Remove stale code in serial_core layer. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NGovindraj.R <govindraj.raja@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Petr Písař 提交于
Traditional \E[2J sequence erases console display but scroll-back buffer and underlying device (frame) buffer keep data that can be accessed by scrolling console back. This patch introduce new \E[J parameter 3 that allows to scramble scroll-back buffer explicitly. Session locking programs (screen, vlock) can use it to prevent attacker to browse locked console history. Signed-off-by: NPetr Písař <ppisar@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jesper Juhl 提交于
Including linux/tty.h 3 times is a little over the top - once will do. Signed-off-by: NJesper Juhl <jj@chaosbits.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jovi Zhang 提交于
remove invalid location line in each file header after location moved from driver/char to driver/tty Signed-off-by: NJovi Zhang <bookjovi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
Now, uart_update_termios is empty, so it's time to remove it. We no longer need a live tty in .dtr_rts. So this should prune all the bugs where tty is zeroed in port->tty during tty_port_block_til_ready. There is one thing to note. We don't set ASYNC_NORMAL_ACTIVE now. It's because this is done already in tty_port_block_til_ready. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
In .dtr_rts we do: uart_set_mctrl(uport, TIOCM_DTR | TIOCM_RTS) and call uart_update_termios. It does: uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS) once again. As the only callsite of uart_update_termios is .dtr_rts, remove the uart_set_mctrl from uart_update_termios to not set it twice. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
We should not fiddle with speed and cflags in .dtr_rts hook. Actually we might not have tty at that moment already. So move the console cflag copy and speed setup into uart_startup. Actually the speed setup is already there, but we need to call it unconditionally (uart_startup is called from uart_open with hw_init = 0). This means we move uart_change_speed before dtr/rts setup in .dtr_rts. But this should not matter as the setup should be called after uart_change_speed anyway. Before: After: dtr/rts setup (dtr_rts) uart_change_speed (startup) uart_change_speed (update_termios) dtr/rts setup (dtr_rts) dtr/rts setup (update_termios) dtr/rts setup (update_termios) The second setup will dismiss with the next patch. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
The bit is set in tty_port_block_til_ready (via moxa_open) and unset in tty_port_close (via moxa_close). No need to pin it in the driver. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Tobias Klauser 提交于
Devices extracted from device tree all seem to have pdev->id set to -1. Up until now we mapped all devices with id -1 to the first device. This behaviour could lead to problems when using more than one Altera UART in a system. This patch changes the behaviour of the driver to scan for the next free id in case the id is -1. Because we cannot refer back to the assigned id in altera_uart_remove, the port instance needs to be stored in device drvdata. Reported-by: NDavid Smoot <davidsmoot@gmail.com> Cc: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: NTobias Klauser <tklauser@distanz.ch> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
When tty_add_file fails we omit to clean up. Fix that by calling tty_release appropriatelly. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
Used the newly introduced deinitialize_tty_struct to properly shut down ldisc. It is intended to fix the Julian's reported problem. He reports that kmemleak checker warns about memory leak: unreferenced object 0xc0e19860 (size 8): comm cat, pid 1226, jiffies 4294919464 (age 287.476s) hex dump (first 8 bytes): 44 de 2d c1 01 00 00 00 D.-..... backtrace: [<c1065a74>] create_object+0x109/0x1ad [<c1063d2b>] kmem_cache_alloc+0x60/0x68 [<c113505c>] tty_ldisc_get+0x54/0x76 [<c11358c9>] tty_ldisc_init+0xa/0x20 [<c1130ab4>] initialize_tty_struct+0x2d/0x1ac [<c1130c8c>] tty_init_dev+0x59/0x10d [<c113136d>] tty_open+0x24a/0x3a2 ... Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Reported-by: NJulian Anastasov <ja@ssi.bg> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
Introduce deinitialize_tty_struct which should be called after initialize_tty_struct and before successfull tty_ldisc_setup. It calls tty_ldisc_deinit which is opposite of tty_ldisc_init. It only puts a reference to ldisc and assigns NULL to tty->ldisc. It will be used to shut down ldisc when tty_release cannot be called yet. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
Change it so that we call the deinit functions at one place at the end of the function (by gotos). And while at it use some sane label names. This is a preparation for the deinitialization of tty in the next patch. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
Change it so that we call the deinit functions at one place at the end of the function (by gotos). And while at it use some sane label names. This is a preparation for the deinitialization of tty in the next patch. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
Change it so that we call the deinit functions at one place at the end of the function (by gotos). And while at it use some sane label names. This is a preparation for the deinitialization of tty in the next patch. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
drivers/tty/rocket.c:1393:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1412:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1730:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1825:3: warning: Value stored to 'str' is never read str = "8"; ^ ~~~ [many 'str' warnings stripped] drivers/tty/rocket.c:2037:3: warning: Value stored to 'board_type' is never read board_type = "RocketModem"; ^ ~~~~~~~~~~~~~ [some 'board_type' warnings stripped] Signed-off-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
drivers/tty/moxa.c:1287:2: warning: Value stored to 'port' is never read port = tty->index; ^ ~~~~~~~~~~ drivers/tty/moxa.c:1763:2: warning: Value stored to 'cflag' is never read cflag = termio->c_cflag; /* termio->c_cflag */ ^ ~~~~~~~~~~~~~~~ Signed-off-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
drivers/tty/vt/vt.c:892:2: warning: Value stored to 'old_screen_size' is never read old_screen_size = vc->vc_screenbuf_size; ^ ~~~~~~~~~~~~~~~~~~~~~ drivers/tty/vt/vt.c:890:2: warning: Value stored to 'old_cols' is never read old_cols = vc->vc_cols; ^ ~~~~~~~~~~~ Signed-off-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
drivers/tty/cyclades.c:1454:2: warning: Value stored to 'channel' is never read channel = info->line - card->first_line; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix it by moving it to the appropriate debug section where it is used. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
drivers/tty/serial/serial_core.c:1980:2: warning: Value stored to 'tty' is never read tty = port->tty; ^ ~~~~~~~~~ Signed-off-by: NJiri Slaby <jslaby@suse.cz> Acked-by: NGovindraj.R <govindraj.raja@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Jiri Slaby 提交于
drivers/tty/vt/vt_ioctl.c:1525:2: warning: Value stored to 'kbd' is never read kbd = kbd_table + console; ^ ~~~~~~~~~~~~~~~~~~~ Signed-off-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Andrew Morton 提交于
Cc: Arthur Taylor <art@ified.ca> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arthur Taylor 提交于
After adding support for K_OFF in KDSKBMODE, it was forgotten to add support for returning it in KDGKBMODE. Signed-off-by: NArthur Taylor <art@ified.ca> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
The current check is uneeded, since !retval will always returns true, as retval returned from tty_add_file is checked earlier and tty_open exits if it's not zero. Acked-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 19 4月, 2011 6 次提交
-
-
由 Linus Torvalds 提交于
-
git://codeaurora.org/quic/kernel/davidb/linux-msm由 Linus Torvalds 提交于
* 'for-39-rc4' of git://codeaurora.org/quic/kernel/davidb/linux-msm: msm: timer: fix missing return value msm: Remove extraneous ffa device check
-
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input由 Linus Torvalds 提交于
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xen-kbdfront - fix mouse getting stuck after save/restore Input: estimate number of events per packet Input: evdev - indicate buffer overrun with SYN_DROPPED Input: document event types and codes and their intended use Input: add KEY_IMAGES specifically for AL Image Browser Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe() Input: h3600_ts - fix error handling at connect Input: twl4030_keypad - avoid potential NULL-pointer dereference
-
git://git.kernel.dk/linux-2.6-block由 Linus Torvalds 提交于
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: add blk_run_queue_async block: blk_delay_queue() should use kblockd workqueue md: fix up raid1/raid10 unplugging. md: incorporate new plugging into raid5. md: provide generic support for handling unplug callbacks. md - remove old plugging code. md/dm - remove remains of plug_fn callback. md: use new plugging interface for RAID IO. block: drop queue lock before calling __blk_run_queue() for kblockd punt Revert "block: add callback function for unplug notification" block: Enhance new plugging support to support general callbacks
-
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc由 Linus Torvalds 提交于
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/powermac: Build fix with SMP and CPU hotplug powerpc/perf_event: Skip updating kernel counters if register value shrinks powerpc: Don't write protect kernel text with CONFIG_DYNAMIC_FTRACE enabled powerpc: Fix oops if scan_dispatch_log is called too early powerpc/pseries: Use a kmem cache for DTL buffers powerpc/kexec: Fix regression causing compile failure on UP powerpc/85xx: disable Suspend support if SMP enabled powerpc/e500mc: Remove CPU_FTR_MAYBE_CAN_NAP/CPU_FTR_MAYBE_CAN_DOZE powerpc/book3e: Fix CPU feature handling on 64-bit e5500 powerpc: Check device status before adding serial device powerpc/85xx: Don't add disabled PCIe devices
-
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable由 Linus Torvalds 提交于
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (24 commits) Btrfs: fix free space cache leak Btrfs: avoid taking the chunk_mutex in do_chunk_alloc Btrfs end_bio_extent_readpage should look for locked bits Btrfs: don't force chunk allocation in find_free_extent Btrfs: Check validity before setting an acl Btrfs: Fix incorrect inode nlink in btrfs_link() Btrfs: Check if btrfs_next_leaf() returns error in btrfs_real_readdir() Btrfs: Check if btrfs_next_leaf() returns error in btrfs_listxattr() Btrfs: make uncache_state unconditional btrfs: using cached extent_state in set/unlock combinations Btrfs: avoid taking the trans_mutex in btrfs_end_transaction Btrfs: fix subvolume mount by name problem when default mount subvolume is set fix user annotation in ioctl.c Btrfs: check for duplicate iov_base's when doing dio reads btrfs: properly handle overlapping areas in memmove_extent_buffer Btrfs: fix memory leaks in btrfs_new_inode() Btrfs: check for duplicate iov_base's when doing dio reads Btrfs: reuse the extent_map we found when calling btrfs_get_extent Btrfs: do not use async submit for small DIO io's Btrfs: don't split dio bios if we don't have to ...
-