summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ark3116.c
Commit message (Collapse)AuthorAgeFilesLines
* usb_serial: API all changeAlan Cox2008-07-221-14/+18
| | | | | | | | | | | | | | | | | | | 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>
* usb_serial: some coding style fixesAlan Cox2008-05-021-27/+27
| | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb serial: more fixes and groundwork for tty changesAlan Cox2008-04-251-0/+1
| | | | | | | | | | | | | - If a termios change fails due to lack of memory we should copy the old settings back over as the device has not changed - Note various locking problems - kl5kusb105 had various remaining tty flag handling problems - Make safe_serial use tty_insert_flip_string not open coded loops - set termios speed properly in usb_serial Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-04-251-3/+3
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: remove unneeded number endpoints settingsGreg Kroah-Hartman2008-04-251-3/+0Star
| | | | | | | | | 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>
* USB: fix memleak in ark3116 serial driverOliver Neukum2008-02-011-1/+3
| | | | | | | | | in an error case memory already allocated must be freed again. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ark3116: update termios handlingAlan Cox2007-10-251-2/+11
| | | | | | | | | | | | - Set the i/ospeed in the initial termios properly - Use the tty_encode_baud_rate functions to report resulting rates properly 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>
* USB: ark3116.c: fix check-after-useAdrian Bunk2007-10-121-5/+0Star
| | | | | | | | | The Coverity checker spotted that we'd have already oops'ed if one of these was NULL. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: ark3116.c: Mixed fixupsAlan Cox2007-07-131-38/+23Star
| | | | | | | | | | | | | | | | o Don't parse the cflag for baud rates, its not valid to do so any more and this driver got it wrong anyway o Don't do clever termios change checks in drivers and get them wrong (arguably we should do some smart ones in the tty core but stty to change nothing is *not* a common or critical path I don't have the hardware so if you can test this carefully please do. I thought fixing it up this far was better than marking it and other bits of USB serial && BROKEN Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Fix debug output of ark3116Jan Engelhardt2007-05-231-1/+2
| | | | | | | | | | | Fix debug output. Previously, it would output "0xFFFFFFB0" on 32-bit archs (and probably "0xFFFFFFFFFFFFFFB0" on 64-bits), because buf is taken as signed char, which is promoted to signed int, while %x always expects an unsigned int. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix ark3116 memory leakOliver Neukum2007-04-271-1/+2
| | | | | | | | this driver has a memory leak in an error case. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB serial: add driver pointer to all usb-serial driversJohannes Hölzl2007-02-081-0/+2
| | | | | | | | | | | | | | Every usb serial driver should have a pointer to the corresponding usb driver. So the usb serial core can add a new id not only to the usb serial driver, but also to the usb driver. Also the usb drivers of ark3116, mos7720 and mos7840 missed the flag no_dynamic_id=1. This is added now. Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] tty: switch to ktermiosAlan Cox2006-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Alan Cox <alan@redhat.com> Signed-off-by: Martin Peschke <mp3@de.ibm.com> Acked-by: Peter Oberparleiter <oberpar@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* USB serial: replace kmalloc+memset with kzallocBurman Yan2006-12-011-2/+1Star
| | | | | | | | Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ark3116: Formatting cleanupsWerner Lemberg2006-09-271-100/+99Star
| | | | | | | | | Formatting only. Signed-off-by: Werner Lemberg <wl@gnu.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ark3116: Add TIOCGSERIAL and TIOCSSERIAL ioctl calls.Werner Lemberg2006-09-271-3/+31
| | | | | | | | | | | | | | | | | | | Add (dummy?) support for TIOCGSERIAL and TIOCSSERIAL ioctl calls to the USB serial driver file `ark3116.c'. This is sufficient for me to run wvdial successfully, receive my email, and do webbrowsing with firefox. On the other hand, running the cvs program to update archives seems not to work, and the traceroute command sometimes says send failed: No buffer space available Looks like a buffering problem... My knowledge of serial device drivers is zero, so I can't fix this -- I just did a cut'n'paste from other USB serial drivers... Signed-off-by: Werner Lemberg <wl@gnu.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: move usb-serial.h to include/linux/usb/Greg Kroah-Hartman2006-07-131-1/+1
| | | | | | | | | | 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: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: add ark3116 usb to serial driverGreg Kroah-Hartman2006-05-121-0/+465
Based on Simon's original driver, with some minor code cleanups and tidying by me. Cc: Simon Schulz <simon@auctionant.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>