aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mxser_new.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-19remove asm/bitops.h includesJiri Slaby1-1/+1
remove asm/bitops.h includes including asm/bitops directly may cause compile errors. don't include it and include linux/bitops instead. next patch will deny including asm header directly. Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18Char: mxser_new, remove useless comments in mxser_cardsJiri Slaby1-21/+21
mxser_new, remove useless comments in mxser_cards It was rest from times, where info about the card was separated (name, ports number and flags). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18Char: mxser_new, move to PCI_VDEVICEJiri Slaby1-36/+18
mxser_new, move to PCI_VDEVICE Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18Char: mxser_new, upgrade to 1.10Jiri Slaby1-8/+24
mxser_new, upgrade to 1.10 This adds support for new (5 cards) hardware. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16serial: remove termios checks from various old char serial driversAlan Cox1-13/+7
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16Char: mxser_new, fix sparse warningJiri Slaby1-1/+1
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08header cleaning: don't include smp_lock.h when not usedRandy Dunlap1-1/+0
Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-24Char: mxser_new, fix TIOCMIWAITJiri Slaby1-29/+9
There was schedule() missing in the TIOCMIWAIT ioctl. Solve it by moving the code to the wait_event_interruptible. Cc: Jan "Yenya" Kasprzak <kas@fi.muni.cz> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-24Char: mxser_new, fix recursive lockingJan Yenya Kasprzak1-0/+7
Signed-off-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz> Acked-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, fix sparse warningJiri Slaby1-1/+1
Feed NULL instead of 0 where pointer is expected. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <osv@javad.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, lock count and flagsJiri Slaby1-1/+4
Both open count and INITIALIZED flag should be changed under lock. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <osv@javad.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, do not null driver_dataJiri Slaby1-3/+0
driver_data are initialzed to NULL from tty layer, no need to do it in the driver. In this case it cases oops, since driver_data may be NULL for a short while for another closing process. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <osv@javad.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, upgrade to 1.9.15Jiri Slaby1-20/+91
- allow special rates - break when bad status Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, do not put pdevJiri Slaby1-1/+0
We don't call pci_dev_get, so do not call pci_dev_put in the pci release function. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, fix twice resource releasingJiri Slaby1-6/+6
Because brd->info is not NULLed, resources are released twice. NULL it in pci_remove function. Also take care of retval and releasing in pci_probe -- mxser_initbrd alreasy releases resource, do not do it again in fail path in probe function. Cc: Sergei Organov <osv@javad.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, less loops in isrJiri Slaby1-6/+3
Loop only 100^2 times, not 99999^2 times in isr (at most). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, header file cleanupJiri Slaby1-2/+5
- Remove no longer used macros - Move some macros from the header to the code - Remove c++ comments - Align backslashes to one column Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, alter locking in isrJiri Slaby1-13/+9
Avoid oopsing when stress-testing open/close -- port->tty is NULL sometimes, but is expected to be non-NULL, since dereferencing. Receive/transmit chars iff ASYNC_CLOSING is not set and ASYNC_INITIALIZED is set. Thanks Sergei for pointing this out and testing. Cc: Sergei Organov <osv@javad.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, clean request_irq callJiri Slaby1-6/+2
We always set ASYNC_SHARE_IRQ, so do not test against this flag and request shared irq directly. Also remove nonsense comment. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, remove tty_wakeup bottomhalfJiri Slaby1-20/+6
It's safe to call tty_wakeup from irq context. Do not schedule it for later calling. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, remove unused stuffJiri Slaby1-18/+0
- nobody waits on close_wait - ASYNC_SPLIT_TERMIOS is not set by anybody, so do not test this flag - process session and pgrp are useless information Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, remove useless spinlockJiri Slaby1-4/+0
gm_lock is useless, since ISA is configured at init time and there it's serialized. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Char: mxser_new, mark init functionsJiri Slaby1-4/+4
Mark some funcions with __init and __devinit. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] make drivers/char/mxser_new.c:mxser_hangup() staticAdrian Bunk1-1/+1
Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-30[PATCH] Char: mxser, fix oops when removing openedJiri Slaby1-0/+1
tty_driver->owner is not set, so if somebody remove mxser_module, it might oops (and doesn't tell the user: no way, it's in use). Set the .owner value. Cc: <osv@javad.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] mxser_new: fix non-PCI buildJiri Slaby1-0/+8
When CONFIG_PCI is not defined (i.e. PCI bus is disabled), the mxser_new driver fails to link, since some pci functions are not available. Fix this behaviour to be able to compile this driver on machines with no PCI bus (but with ISA bus support). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] tty: switch to ktermiosAlan Cox1-4/+4
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>
2006-12-08[PATCH] mxser-workqueue-fixesAndrew Morton1-3/+3
Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] mxser_new: correct tty driver nameJiri Slaby1-1/+1
Mxser tty driver name should be ttyMI, not ttyM. Correct this in mxser_new to avoid conflicts with isicom driver, which is ttyM. Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, clean macrosJiri Slaby1-10/+2
Celan redundant macros. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, pci probingJiri Slaby1-87/+88
Finally, the intention of the patch serie: PCI probing for this driver. add pci_driver structure, (un)register it and add some stuff, which this needs. Remove pdev pointer from board structure, because it's no longer needed. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, delete ttys and termiosJiri Slaby1-6/+0
- Driver uses global tty_struct array, which tries to assign to the tty_driver's ttys. - the very same thing for termios - the same for termios_locked Kill such constructions. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, correct intr handler protoJiri Slaby1-1/+1
Prototype of the driver's interrupt handler is old-fashioned, past changes tell us, we won't get pt_regs as the 3rd argument. There are only 2 params. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, comments cleanupJiri Slaby1-127/+16
mxser_new, comments cleanup - Remove commented code, since we have version control. - Remove comments containing "following added by..." and "above added by,..". It's useless. - Align other comments. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, reverse if-else-paths patchJiri Slaby1-20/+7
This patch was intorduced in mxser to 1.9.1 conversion, but causes endless sleep in tcdrain userspace call. Thanks to Sergei Organov <osv@javad.com> for testing and pointing this out. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, compact structures, round2Jiri Slaby1-167/+109
Too many structures are in the driver for each type of card. Make only one for all cards and appropriate alter the code. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, register tty devices on the flyJiri Slaby1-11/+27
Register tty indexes only for real devices, udev then creates nodes for them (and only for them). Move tty_register_driver before probing, to be correct when calling tty_register_device. Also tell tty layer by tty_driver flags, that we are registering devices. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, compress isa findingJiri Slaby1-69/+40
ISA cards finding was too complex -- 2 (module params + predefined) absolutely same routines, join them together with one for loop, one if and one indent level. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, don't check tty_unregister retvalJiri Slaby1-6/+3
Like other drivers silently unregister_tty_driver and put_tty_driver. It shouldn't be busy when module release function is called, since we are not bsd, no refs shouldn't be held. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, correct fail pathsJiri Slaby1-25/+24
Resources were not released in some fail paths. Correct this behaviour by implementing function and calling it when something fails. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, testbit for bit testingJiri Slaby1-7/+8
Use testbit like in tty subsystem for TTY_IO_ERROR testing. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, eliminate tty ldisc derefJiri Slaby1-10/+2
Use tty_ldisc_flush and tty_wakeup helpers for accessing ldisc internals. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] char: remove unneded termbits redefinitions (mxser_new)Jiri Slaby1-3/+0
No need to redefine termbits in char tree. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, CMSPAR is definedJiri Slaby1-4/+0
There is no need to have another (ifndeffed) definition of CMSPAR. It's defined in includes. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, code upside downJiri Slaby1-1557/+1488
Reorder functions upside down not to have too many prototypes of each function and have some order (similar to other drivers). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, alter license termsJiri Slaby1-12/+4
- We don't need useless paragraphs in license terms. - Add me to copyright. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, debug printk dependent on DEBUGJiri Slaby1-14/+5
Print some debug info only when DEBUG is enabled (use pr_debug macro). Eliminate verbose kernel parameter which takes care of this. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, remove request for testers lineJiri Slaby1-3/+0
Remove printk with info we are looking for a tester. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, revert spin_lock changesJiri Slaby1-12/+0
Some spinlock changes were introduced in 1.9.1 original moxa driver. Revert them, since they cause machine not responding. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, kill unneeded memsetsJiri Slaby1-7/+0
mxser_new, kill unneeded memsets There is no need to re-zero static global variables' memory, hence memsets doing this are useless. alloc_tty_struct also zeroes allocated memory: another candidate for removing. This fixes also a bug -- global structures are cleaned up after initialization of some its parts. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>