a5f5e6c2d80d073e09918e7a02f3355503ff3922 |
|
28-Feb-2012 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
USB: serial: ch341.c: use module_usb_serial_driver This converts the ch341.c driver to use the module_usb_serial_driver() call instead of having to have a module_init/module_exit function, saving a lot of duplicated code. CC: Johan Hovold <jhovold@gmail.com> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Alan Stern <stern@rowland.harvard.edu> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/drivers/usb/serial/ch341.c
|
08a4f6bc2e7046ce50849d7589b7d0763926d808 |
|
23-Feb-2012 |
Alan Stern <stern@rowland.harvard.edu> |
usb-serial: use new registration API in [a-c]* drivers This patch (as1523) modifies the following usb-serial drivers to utilize the new usb_serial_{de}register_drivers() routines: aircable, ark3116, belkin_sa, ch341, cp210x, cyberjack, and cypress_m8. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/drivers/usb/serial/ch341.c
|
90ab5ee94171b3e28de6bb42ee30b527014e0be7 |
|
13-Jan-2012 |
Rusty Russell <rusty@rustcorp.com.au> |
module_param: make bool parameters really bool (drivers & misc) module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/drivers/usb/serial/ch341.c
|
06946a66546aedfc5192645e8fc56081441e378c |
|
10-Nov-2011 |
Johan Hovold <jhovold@gmail.com> |
USB: ch341: forward USB errors to USB serial core All error messages from stack in open are being forwarded except for one call to usb_submit_urb. Change this for consistency. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
5833041f1b130e5823a99d03b14538282e5ad345 |
|
06-Nov-2011 |
Johan Hovold <jhovold@gmail.com> |
USB: serial: remove unnecessary reinitialisations of urb->dev Remove unnecessary reinitialisations of urb->dev before each submission, which were based on the (no longer valid) assumption that serial->dev will be set to NULL on close. Compile-only tested. Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Peter Berger <pberger@brimson.com> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Support Department <support@connecttech.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
e6bee325e49f17c65c1fd66e9e8b348c85788341 |
|
16-Mar-2011 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (76 commits) pch_uart: reference clock on CM-iTC pch_phub: add new device ML7213 n_gsm: fix UIH control byte : P bit should be 0 n_gsm: add a documentation serial: msm_serial_hs: Add MSM high speed UART driver tty_audit: fix tty_audit_add_data live lock on audit disabled tty: move cd1865.h to drivers/staging/tty/ Staging: tty: fix build with epca.c driver pcmcia: synclink_cs: fix prototype for mgslpc_ioctl() Staging: generic_serial: fix double locking bug nozomi: don't use flush_scheduled_work() tty/serial: Relax the device_type restriction from of_serial MAINTAINERS: Update HVC file patterns tty: phase out of ioctl file pointer for tty3270 as well tty: forgot to remove ipwireless from drivers/char/pcmcia/Makefile pch_uart: Fix DMA channel miss-setting issue. pch_uart: fix exclusive access issue pch_uart: fix auto flow control miss-setting issue pch_uart: fix uart clock setting issue pch_uart : Use dev_xxx not pr_xxx ... Fix up trivial conflicts in drivers/misc/pch_phub.c (same patch applied twice, then changes to the same area in one branch)
|
d0781383038e983a63843a9a6a067ed781db89c1 |
|
11-Mar-2011 |
wangyanqing <udknight@gmail.com> |
USB: serial: ch341: add new id I picked up a new DAK-780EX(professional digitl reverb/mix system), which use CH341T chipset to communication with computer on 3/2011 and the CH341T's vendor code is 1a86 Looking up the CH341T's vendor and product id's I see: 1a86 QinHeng Electronics 5523 CH341 in serial mode, usb to serial port converter CH341T,CH341 are the products of the same company, maybe have some common hardware, and I test the ch341.c works well with CH341T Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
00a0d0d65b61241a718d0aee96f46b9a2d93bf26 |
|
14-Feb-2011 |
Alan Cox <alan@linux.intel.com> |
tty: remove filp from the USB tty ioctls We don't use it so we can trim it from here as we try and stamp the file object dependencies out of the serial code. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
20b9d17715017ae4dd4ec87fabc36d33b9de708e |
|
14-Feb-2011 |
Alan Cox <alan@linux.intel.com> |
tiocmset: kill the file pointer argument Doing tiocmget was such fun we should do tiocmset as well for the same reasons Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
60b33c133ca0b7c0b6072c87234b63fee6e80558 |
|
14-Feb-2011 |
Alan Cox <alan@linux.intel.com> |
tiocmget: kill off the passing of the struct file We don't actually need this and it causes problems for internal use of this functionality. Currently there is a single use of the FILE * pointer. That is the serial core which uses it to check tty_hung_up_p. However if that is true then IO_ERROR is also already set so the check may be removed. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
d14fc1a74e846d7851f24fc9519fe87dc12a1231 |
|
14-Jan-2011 |
Libor Pechacek <lpechacek@suse.cz> |
USB: serial: handle Data Carrier Detect changes Alan's commit 335f8514f200e63d689113d29cb7253a5c282967 introduced .carrier_raised function in several drivers. That also means tty_port_block_til_ready can now suspend the process trying to open the serial port when Carrier Detect is low and put it into tty_port.open_wait queue. We need to wake up the process when Carrier Detect goes high and trigger TTY hangup when CD goes low. Some of the devices do not report modem status line changes, or at least we don't understand the status message, so for those we remove .carrier_raised again. Signed-off-by: Libor Pechacek <lpechacek@suse.cz> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
f26788da3b342099d2b02d99ba1cb7f154d6ef7b |
|
17-Mar-2010 |
Johan Hovold <jhovold@gmail.com> |
USB: serial: refactor generic close Export usb_serial_generic_close so that drivers can easily kill the read and write urb and make sure that the write fifo is reset. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
5a0e3ad6af8660be21ca98a971cd00f331318c05 |
|
24-Mar-2010 |
Tejun Heo <tj@kernel.org> |
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
/drivers/usb/serial/ch341.c
|
7d40d7e85a25e01948bcb4dc3eda1355af318337 |
|
10-Jan-2010 |
Németh Márton <nm127@freemail.hu> |
USB serial: make USB device id constant The id_table field of the struct usb_device_id is constant in <linux/usb.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Németh Márton <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
5be796f0b842c5852d7397a82f8ebd6be8451872 |
|
31-Dec-2009 |
Johan Hovold <jhovold@gmail.com> |
USB: ch341: use get_unaligned_le16 in break_ctl Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
52372ccb5a19d35b68b79118fafdced0c12f0ec9 |
|
28-Dec-2009 |
Johan Hovold <jhovold@gmail.com> |
USB: ch341: use le16_to_cpup to be explicit about endianess Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
f2b5cc834b69d2999b749144481de9a94f01bc48 |
|
28-Dec-2009 |
Johan Hovold <jhovold@gmail.com> |
USB: ch341: fix DMA buffer on stack Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
6a9b15fed4dca1f90e41ae0cfe35aaa39a20f495 |
|
28-Dec-2009 |
Johan Hovold <jhovold@gmail.com> |
USB: ch341: replace printk warnings with dev_err Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
492896f011a411d17d02e696adbc4a9b4ff68e7f |
|
17-Aug-2009 |
Tim Small <tim@buttersideup.com> |
USb: Break support for WinChipHead CH341 340 USB->Serial "chip" Here is a patch to the ch341 driver which adds serial break support. Signed-off-by: Tim Small <tim@seoss.co.uk> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
a509a7e478e4766114d69f12d19d644ac63e9765 |
|
19-Sep-2009 |
Alan Cox <alan@linux.intel.com> |
tty: USB does not need the filp argument in the drivers And indeed none of them use it. Clean this up as it will make moving to a standard open method rather easier. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
335f8514f200e63d689113d29cb7253a5c282967 |
|
11-Jun-2009 |
Alan Cox <alan@lxorguk.ukuu.org.uk> |
tty: Bring the usb tty port structure into more use 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: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/usb/serial/ch341.c
|
1ded7ea47b8829a06068c3bb5e3ebe471076617a |
|
20-Feb-2009 |
Ming Lei <tom.leiming@gmail.com> |
USB: ch341 serial: fix port number changed after resume This patch fixes the following bug: .plug ch341 usb serial port into a hub port; .ch341 driver bound to the device and /dev/ttyUSB0 comes .open /dev/ttyUSB0 by minicom and we can use the serial successfully .suspend the ch341 usb serial device(such as: echo suspend > power/level) .resume the ch341 usb serial device (such as: echo on > power/level) .new port /dev/ttyUSB1 comes ,and the original /dev/ttyUSB0 still exists, but is no longer usable by minicom The patch adds suspend and resume callback to ch341 usb driver to prevent it from unbinding during suspend. The /dev/ttyUSB0 is not released until being closed, so /dev/ttyUSB1 comes after resume, and the original /dev/ttyUSB0 is no longer usable by minicom. It is really a mess for a minicom user. This patch also adds the reset_resume callback to make it usable after resuming from STR or hibernation, for generally STR or hibernation will make the vbus of root-hub lost. Finally enable the driver's supports_autosuspend, for the device is in working order with it. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
664d5df92e88b6ef091048a802b3750f4e989180 |
|
16-Jan-2009 |
Werner Cornelius <werner@cornelius-consult.de> |
USB: usb-serial ch341: support for DTR/RTS/CTS Fixup of Werner Cornelius patch to the ch341 USB-serial driver, which adds: - support all baudrates, not just a hard-coded set - support for controlling DTR, RTS and CTS Features still missing: - character length other than 8 bits - parity settings - break control I adapted his patch for the new usb_serial API introduced in 2.6.25-git8 by Alan Cox on 22 July 2008. Non-compliance to the new API was a reason for refusing a similar patch from Tollef Fog Heen. Usage example by Tollef Fog Heen : TEMPer USB thermometer <http://err.no/src/TEMPer.c> Signed-off-by: Werner Cornelius <Werner.Cornelius@cornelius-consult.de> Signed-off-by: Boris Hajduk <boris@hajduk.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
95da310e66ee8090119596c70ca8432e57f9a97f |
|
22-Jul-2008 |
Alan Cox <alan@redhat.com> |
usb_serial: API all change 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: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/usb/serial/ch341.c
|
82078234d4023c61b9d88e8be5e795423d17538e |
|
17-May-2008 |
Michael F. Robbins <mrobbins@MIT.EDU> |
USB: serial: ch341: New VID/PID for CH341 USB-serial Recent USB-serial devices using the WinChipHead CH340/CH341 chipset are being shipped with a new vendor/product ID code pair, but an otherwise identical device. (This is confirmed by looking at INF for the included Windows driver.) Patch is tested and working, both with new and old devices. Signed-off-by: Michael F. Robbins <mrobbins@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
c4d0f8cbca3a97900f85b082064a63c7a5928bd7 |
|
29-Apr-2008 |
Alan Cox <alan@lxorguk.ukuu.org.uk> |
usb_serial: some coding style fixes Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
0ba4034e20abf372dae6c6cabeeeab600acb5889 |
|
16-Apr-2008 |
Greg Kroah-Hartman <gregkh@suse.de> |
USB: serial: remove unneeded number endpoints settings The usb-serial core no longer checks these fields so remove them from all of the individual drivers. They will be removed from the usb-serial core in a patch later in the series. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
73f593081911b1be0d8d3962ecedd635c1e27179 |
|
18-Oct-2007 |
Alan Cox <alan@lxorguk.ukuu.org.uk> |
USB: ch341: fix termios handling The ch341 currently doesn't support most of the hardware setting. So to keep the termios data right we propogate the old termios hardware values back then encode the speed. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
93b6497da99978742ffa9d9db6177397436278f5 |
|
09-Sep-2007 |
Adrian Bunk <bunk@kernel.org> |
USB: usb/serial/ch341.c: make 4 functions static This patch makes four needlessly global functions static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|
6ce76104781a10554129791dc62c3104424f6d48 |
|
22-Aug-2007 |
Frank A Kingswood <frank@kingswood-consulting.co.uk> |
USB: Driver for CH341 USB-serial adaptor This patch implements a USB serial port driver for the Winchiphead CH341 USB-RS232 Converter. This chip also implements an IEEE 1284 parallel port, I2C and SPI, but that is not supported by the driver. Signed-off-by: Frank A Kingswood <frank@kingswood-consulting.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/usb/serial/ch341.c
|