- 13 7月, 2009 1 次提交
-
-
由 Jason Wessel 提交于
The commit 335f8514 introduced a regression which stopped usb consoles from working correctly as a kernel boot console as well as interactive login device. The addition of the serial_close() which in turn calls tty_port_close_start() will change the reference count of port.count and warn about it. The usb console code had previously incremented the port.count to indicate it was making use of the device as a console and the forced change causes a double open on the usb device which leads to a non obvious kernel oops later on when the tty is freed. To fix the problem instead make use of port->console to track if the port is in fact an active console port to avoid double initialization of the usb serial device. The port.count is incremented and decremented only with in the scope of usb_console_setup() for the purpose of the low level driver initialization. Signed-off-by: NJason Wessel <jason.wessel@windriver.com> Acked-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 11 6月, 2009 1 次提交
-
-
由 Alan Cox 提交于
This allows us to clean stuff up, but is probably also going to cause some app breakage with buggy apps as we now implement proper POSIX behaviour for USB ports matching all the other ports. This does also mean other apps that break on USB will now work properly. Signed-off-by: NAlan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 03 1月, 2009 1 次提交
-
-
由 Kevin Hao 提交于
Add device funtion for usb serial console, so we can open /dev/console when we use a usb serial device as console. (Typecast removed as noted by Sergei Shtylyov) Signed-off-by: NKevin Hao <kexin.hao@windriver.com> Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 02 12月, 2008 1 次提交
-
-
由 Kevin Hao 提交于
We alloc a fake tty in usb serial console setup function. we should init the tty's kref otherwise we will face WARN_ON after following invoke of tty_port_tty_set --> tty_kref_get. Signed-off-by: NKevin Hao <kexin.hao@windriver.com> Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 14 10月, 2008 1 次提交
-
-
由 Alan Cox 提交于
Use kref in the USB serial drivers so that we don't free tty structures from under the URB receive handlers as has historically been the case if you were unlucky. This also gives us a framework for general tty drivers to use tty_port objects and refcount. Contains two err->dev_err changes merged together to fix clashes in the -next tree. Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 09 9月, 2008 1 次提交
-
-
由 Jason Wessel 提交于
The hw interface drivers for the usb serial devices deference the tty structure to set up the parameters for the initial console. The tty structure should be passed as a parameter to the set_termios() call. Signed-off-by: NJason Wessel <jason.wessel@windriver.com> Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 23 7月, 2008 3 次提交
-
-
由 Alan Cox 提交于
Setting CFLAG bits is all well and good but you must sort out ispeed and ospeed properly. Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Alan Cox 提交于
Code tidy Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Alan Cox 提交于
USB serial likes to use port->tty back pointers for the real work it does and to do so without any actual locking. Unfortunately when you consider hangup events, hangup/parallel reopen or even worse hangup followed by parallel close events the tty->port and port->tty pointers are not guaranteed to be the same as port->tty is the active tty while tty->port is the port the tty may or may not still be attached to. So rework the entire API to pass the tty struct. For console cases we need to pass both for now. This shows up multiple drivers that immediately crash with USB console some of which have been fixed in the process. Longer term we need a proper tty as console abstraction Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 25 4月, 2008 1 次提交
-
-
由 Harvey Harrison 提交于
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 02 2月, 2008 3 次提交
-
-
由 Aristeu Rozanski 提交于
The usb serial method set_termios() is called for the first time from open() method in order to set up the termios structure with the default device's settings, ignoring the current settings. Once it's initialized, the next set_termios() calls will update the device with the tty->termios settings. Currently USB serial console code calls the driver open() method without a tty and after that will allocate a fake tty and termios so the command line arguments can be applied to the device (console=ttyUSB0,115200,...). This makes the driver overwrite the termios with the default settings and not applying the command line options. This patch changes usb_console_setup() to allocate the fake tty and termios before the open() method is called. Tested successfully with a pl2303 Signed-off-by: NAristeu Rozanski <arozansk@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Aristeu Rozanski 提交于
When a usb serial adapter is used as console, the usb serial console driver bumps the open_count on the port struct used but doesn't attach a real tty to it (only a fake one temporaly). If this port is opened later using the regular character device interface, the open method won't initialize the port, which is the expected, and will receive a brand new tty struct created by tty layer, which will be stored in port->tty. When the last close is issued, open_count won't be 0 because of the console usage and the port->tty will still contain the old tty value. This is the last ttyUSB<n> close so the allocated tty will be freed by the tty layer. The usb_serial and usb_serial_port are still in use by the console, so port_free() won't be called (serial_close() -> usb_serial_put() -> destroy_serial() -> port_free()), so the scheduled work (port->work, usb_serial_port_work()) will still run. And usb_serial_port_work() does: (...) tty = port->tty; if (!tty) return; tty_wakeup(tty); which causes (manually copied): Faulting instruction address: 0x6b6b6b68 Oops: Kernel access of bad area, sig: 11 [#1] PREEMPT PowerMac Modules linked in: binfmt_misc ipv6 nfs lockd nfs_acl sunrpc dm_snapshot dm_mirror dm_mod hfsplus uinput ams input_polldev genrtc cpufreq_powersave i2c_powermac therm_adt746x snd_aoa_codec_tas snd_aoa_fabric_layout snd_aoa joydev snd_aoa_i2sbus snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc pmac_zilog serial_core evdev ide_cd cdrom snd appletouch soundcore snd_aoa_soundbus bcm43xx firmware_class usbhid ieee80211softmac ff_memless firewire_ohci firewire_core ieee80211 ieee80211_crypt crc_itu_t sungem sungem_phy uninorth_agp agpart ssb NIP: 6b6b6b68 LR: c01b2108 CTR: 6b6b6b6b REGS: c106de80 TRAP: 0400 Not tainted (2.6.24-rc2) MSR: 40009032 <EE,ME,IR,DR> CR: 82004024 XER: 00000000 TASK = c106b4c0[5] 'events/0' THREAD: c106c000 GPR00: 6b6b6b6b c106df30 c106b4c0 c2d613a0 00009032 00000001 00001a00 00000001 GPR08: 00000008 00000000 00000000 c106c000 42004028 00000000 016ffbe0 0171a724 GPR16: 016ffcf4 00240e24 00240e70 016fee68 016ff9a4 c03046c4 c0327f50 c03046fc GPR24: c106b6b9 c106b4c0 c101d610 c106c000 c02160fc c1eac1dc c2d613ac c2d613a0 NIP [6b6b6b68] 0x6b6b6b68 LR [c01b2108] tty_wakeup+0x6c/0x9c Call Trace: [c106df30] [c01b20e8] tty_wakeup+0x4c/0x9c (unreliable) [c106df40] [c0216138] usb_serial_port_work+0x3c/0x78 [c106df50] [c00432e8] run_workqueue+0xc4/0x15c [c106df90] [c0043798] worker_thread+0xa0/0x124 [c106dfd0] [c0048224] kthread+0x48/0x84 [c106dff0] [c00129bc] kernel_thread+0x44/0x60 Instruction dump: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX Slab corruption: size-2048 start=c2d613a0, len=2048 Redzone: 0x9f911029d74e35b/0x9f911029d74e35b. Last user: [<c01b16d8>](release_one_tty+0xbc/0xf4) 050: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Prev obj: start=c2d60b88, len=2048 Redzone: 0x9f911029d74e35b/0x9f911029d74e35b. Last user: [<c00f30ec>](show_stat+0x410/0x428) 000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b This patch avoids this, clearing port->tty considering if the port is used as serial console or not Signed-off-by: NAristeu Rozanski <arozansk@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Aristeu Rozanski 提交于
Currently usb serial console support ignores the device and always use ttyUSB0. Signed-off-by: NAristeu Rozanski <arozansk@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 26 10月, 2007 1 次提交
-
-
由 Alan Cox 提交于
Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 09 12月, 2006 1 次提交
-
-
由 Alan Cox 提交于
This is the grungy swap all the occurrences in the right places patch that goes with the updates. At this point we have the same functionality as before (except that sgttyb() returns speeds not zero) and are ready to begin turning new stuff on providing nobody reports lots of bugs If you are a tty driver author converting an out of tree driver the only impact should be termios->ktermios name changes for the speed/property setting functions from your upper layers. If you are implementing your own TCGETS function before then your driver was broken already and its about to get a whole lot more painful for you so please fix it 8) Also fill in c_ispeed/ospeed on init for most devices, although the current code will do this for you anyway but I'd like eventually to lose that extra paranoia [akpm@osdl.org: bluetooth fix] [mp3@de.ibm.com: sclp fix] [mp3@de.ibm.com: warning fix for tty3270] [hugh@veritas.com: fix tty_ioctl powerpc build] [jdike@addtoit.com: uml: fix ->set_termios declaration] Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NMartin Peschke <mp3@de.ibm.com> Acked-by: NPeter Oberparleiter <oberpar@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NHugh Dickins <hugh@veritas.com> Signed-off-by: NJeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 02 12月, 2006 1 次提交
-
-
由 Burman Yan 提交于
Replace kmalloc+memset with kzalloc Signed-off-by: NYan Burman <yan_952@hotmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 13 7月, 2006 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
USB serial outside of the kernel tree can not build properly due to usb-serial.h being buried down in the source tree. This patch moves the location of the file to include/linux/usb and fixes up all of the usb serial drivers to handle the move properly. Cc: Sergei Organov <osv@javad.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 01 7月, 2006 1 次提交
-
-
由 Jörn Engel 提交于
Signed-off-by: NJörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: NAdrian Bunk <bunk@stusta.de>
-
- 22 6月, 2006 2 次提交
-
-
由 Guennadi Liakhovetski 提交于
Prevent sending further output to a USB-serial console after the dongle is disconnected, take care not to leak kref. Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Paul Fulghum 提交于
Append Carriage-Returns after Line-Feeds, analogous to the serial driver. From: Paul Fulghum <paulkf@microgate.com> Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 15 4月, 2006 1 次提交
-
-
由 Paul Fulghum 提交于
This prevents an Oops if booted with "console=ttyUSB0" but without a USB-serial dongle, and plugged one in afterwards. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 17 4月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
-