aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-06-11Blackfin Serial Driver: fix missing new lines when under loadGraf Yang
Add a SSYNC() into bfin_serial_dma_tx_chars() to ensure DMA registers are written with new data otherwise we might miss a byte or two when the system is under load. PIO mode is OK though. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11Blackfin Serial Driver: fix baudrate for early_printkRobin Getz
Since we already setup the early console UART in arch/blackfin/kernel/early_printk.c, and common functions which are enabled from the .setup will override the proper settings later, don't fill in these structures. Otherwise we get mangled baudrate settings when using early_printk. Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11Blackfin Serial Driver: fix error while transferring large filesSonic Zhang
Ignore receiving data if new position is in the same line of current buffer tail and is small. This should decrease overruns. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11Blackfin SPORT UART: rewrite inline assemblyMike Frysinger
Hopefuly the new version is easier to read, but in the process it declares proper clobber lists and better constraints so that GCC can do a better job at allocating free registers. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11Blackfin SPORT UART: fix data misses while using transmit frame syncMichael Hennerich
SPORT transmit frame sync (TFS) isn't used as an electrical signal during normal SPORT UART emulation. However, it is useful in EIA RS-485 emulation as RS-485 Transceiver Driver Enable DE strobe. This patch configures: TFS to be active high in order to drive an DE strobe of an eventually connected RS-485 Transceiver. Late frame sync mode (LATFS) gating the entire TX shift cycle. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11Blackfin SPORT UART: fix typo in sport_set_termios prototypeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11serial: add support for the TI AR7 internal UARTFlorian Fainelli
This patch adds support for the TI AR7 internal UART. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11icom: fix compile errors when defining ICOM_TRACEBreno Leitao
As it is, defining ICOM_TRACE produces some compile errors, as "parameter name omitted" and "redefinition of ‘trace’" This patch removes the wrong trace definition. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11parport_pc: clean up the modified while loops using forAlan Cox
And tidy up a few bits coding style detectors missed Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11parport_pc: Coding styleAlan Cox
Michael's patch fixed some of the coding style so the style is now inconsistent. Sort the rest out Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11parport_pc: Fix subscription bugsMichael Buesch
This patch fixes array subscription bugs in the parport_pc driver. drivers/parport/parport_pc.c: In function ‘parport_irq_probe’: drivers/parport/parport_pc.c:1589: warning: array subscript is above array bounds drivers/parport/parport_pc.c: In function ‘parport_pc_probe_port’: drivers/parport/parport_pc.c:1579: warning: array subscript is above array bounds The patch also fixes a few other array bugs, which the compiler was unable to find. Coding style violations are also fixed. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: simplify buffer allocator cleanupsAlan Cox
Having cleaned up the allocators we might as well remove the inline helpers for some of it Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: remove buffer special casingAlan Cox
Long long ago a 4K kmalloc allocated two pages so the tty layer used the page allocator, except on some machines where the page size was huge. This was removed from the core tty layer with the tty buffer re-implementation but not from tty_audit or the n_tty ldisc. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11icom: fixing a if clause spaghettiBreno Leitao
adapter->version can only be ADAPTER_V2 or ADAPTER_V1. So, that OR operand in the "if" clause is non-sense and can be removed. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11jsm: correctly support multiple 4/8-port boardsAlexander Y. Fomichev
If there are more then one 4/8-port board jsm_uart_port_init allocate a line numbers of the second and further boards from range of previous one. This patch fixed the problem. Signed-off-by: Alexander Y. Fomichev <git.user@gmail.com> [printks fixed to add jsm: ] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: iuu_phoenix: update version number.Olivier Bornet
Signed-off-by: Olivier Bornet <Olivier.Bornet@puck.ch> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: iuu_phoenix: set termios.Olivier Bornet
set_termios can now be used for setting the parity and the stopbits. This is needed to use with cards which use a different parity then the parity used at start (even). If the iuu_uart_baud function return an error, we will return the old_termios instead of the new one. Signed-off-by: Olivier Bornet <Olivier.Bornet@puck.ch> This was then revamped to use the various helpers, not copy non-hardware bits any to add mark/space parity and csize reporting Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: iuu_phoenix: Fix stopbit when uart goes on.Olivier Bornet
Signed-off-by: Olivier Bornet <Olivier.Bornet@puck.ch> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: iuu_phoenix: fix locking.Olivier Bornet
Bring in the relevant bits of the 0.9 vendor driver. Signed-off-by: Olivier Bornet <Olivier.Bornet@puck.ch> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: bring ldisc into CodingStyleAlan Cox
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: Move ldisc_flushAlan Cox
We have a tty_ldisc file now so put tty_ldisc_flush in the right place Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: rewrite the ldisc lockingAlan Cox
There are several pretty much unfixable races in the old ldisc code, especially with respect to pty behaviour and also to hangup. It's easier to rewrite the code than simply try and patch it up. This patch - splits the ldisc from the tty (so we will be able to refcount it more cleanly later) - introduces a mutex lock for ldisc changing on an active device - fixes the complete mess that hangup caused - implements hopefully correct setldisc/close/hangup locking There are still some problems around pty pairs that have always been there but at least it is now possible to understand the code and fix further problems. This fixes the following known bugs - hang up can leak ldisc references - hang up may not call open/close on ldisc in a matched way - pty/tty pairs can deadlock during an ldisc change - reading the ldisc proc files can cause every ldisc to be loaded and probably a few other of the mysterious ldisc race reports. I'm sure it also adds the odd new one. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: Extract various bits of ldisc codeAlan Cox
Before trying to tackle the ldisc bugs the code needs to be a good deal more readable, so do the simple extractions of routines first. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: Fix oops when scanning the polling list for kgdbAlan Cox
Costantino Leandro found a bug in tty_find_polling_driver and provided a patch that fixed the crash but not the underlying bug. This fixes the underlying bug where the list walk corrupts the values it is using on a match but then reuses them if the open fails. Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11pty: Fix a commentAlan Cox
We fixed the globals, so now fix the comment Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11serial: update maintainers fileAlan Cox
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: throttling race fixAlan Cox
The tty throttling code can race due to the lock drops. It takes very high loads but this has been observed and verified by Rob Duncan. The basic problem is that on an SMP box we can go CPU #1 CPU #2 need to throttle ? suppose we should buffer space cleared are we throttled yes ? - unthrottle call throttle method This changeet take the termios lock to protect against this. The termios lock isn't the initial obvious candidate but many implementations of throttle methods already need to poke around their own termios structures (and nobody really locks them against a racing change of flow control). This does mean that anyone who is setting tty->low_latency = 1 and then calling tty_flip_buffer_push from their unthrottle method is going to end up collapsing in a pile of locks. However we've removed all the known bogus users of low_latency = 1 and such use isn't safe anyway for other reasons so catching it would be an improvement. Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11x86: fix ktermios-termio conversionArnd Bergmann
The legacy TCSETA{,W,F} ioctls failed to set the termio->c_line field on x86. This adds a missing get_user. The same ioctls also fail to report faulting user pointers, which we keep ignoring. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-118250_pci: add the OXCB950 chip to the 8250 PCI driver.Andre Przywara
This adds support for the following serial controller chip: Oxford Semiconductor OXCB950 for PCI Cardbus interface http://www.transdimension.com/products/serial/OXCB950.html on this card: ExSys EX-1370 1 port high-speed serial card for ExpressCard/34 slot Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11epca: fix test_bit parametersJiri Slaby
Switch from ASYNC_* to ASYNCB_*, because test_bit expects bit number, not mask. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11rocket: fix test_bit parametersJiri Slaby
Switch from ASYNC_* to ASYNCB_*, because {test,set}_bit expect bit number, not mask. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11serial: refactor ASYNC_ flagsJiri Slaby
Define ASYNCB_* flags which are bit numbers of the ASYNC_* flags. This is useful for {test,set,clear}_bit. Also convert each ASYNC_% to be (1 << ASYNCB_%) and define masks with the macros, not constants. Tested with: #include "PATH_TO_KERNEL/include/linux/serial.h" static struct { unsigned int new, old; } as[] = { { ASYNC_HUP_NOTIFY, 0x0001 }, { ASYNC_FOURPORT, 0x0002 }, ... { ASYNC_BOOT_ONLYMCA, 0x00400000 }, { ASYNC_INTERNAL_FLAGS, 0xFFC00000 } }; ... for (a = 0; a < ARRAY_SIZE(as); a++) if (as[a].old != as[a].new) printf("%.8x != %.8x\n", as[a].old, as[a].new); Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: Clean up the ACM driver to CodingStyleAlan Cox
Or at least most of it. There are further clean ups possible and there are are also thing checkpatch moans about that would be silly to "fix". Also note some FIXME points found as the cleanup was done. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cdc_acm add krefsAlan Cox
Now we have a port structure begin using the fields and kref counts Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cyclades, remove unused variablesJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cyclades, fix nports handlingJiri Slaby
Set up ports right after FW load so that we won't allocate maximal (64) ports when we use few. Also remove reading of nports in irq context, since we know it from initialisation now. This also fixes a tty ports unregistration on some fail paths and for Ze which registered 64 and unregistered real port count. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cyclades, remove typedefsJiri Slaby
They are unused anyway. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cyclades, convert macros to inlinesJiri Slaby
Remove ugly macros and add inlines instead of them. This improves readability and type checking a much. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cyclades, cache HW versionJiri Slaby
Store HW version locally to not read it all the time in interrupts and alike. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cyclades, plx9060 casts cleanupJiri Slaby
Remove ugly all-over-the-code casts of ctl_addr to 9060 space. Add an union to the cyclades_card structure, which contains a pointer to both 9050 and 9060 spaces. The 9050 space layout is unknown, so let it still as a void __iomem pointer. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: synclink_gt add receive pio modePaul Fulghum
Add receive programmed IO mode to reduce receive latency when using low data rates. The receive FIFO trigger level of 128 bytes used in DMA mode creates excessive latency when operating at low data rates. PIO mode is selected when user application requests data in blocks of less than 128 bytes. Signed-off-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: Update cdc_acmAlan Cox
The CDC ACM driver uses the tty layer correctly so needs conversion. Start by adding and initializing the port structures. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: Bring the usb tty port structure into more useAlan 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: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: Implement a drain delay in the tty portAlan Cox
We need this for devices that cannot flush and wait, but which do not order data and modem events. Without it we will hang up before all the data clears the hardware. Needed for the USB changes. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: Add carrier processing on close to the tty_port coreAlan Cox
Some drivers implement this internally, others miss it out. Push the behaviour into the core code as that way everyone will do it consistently. Update the dtr rts method to raise or lower depending upon flags. Having a single method in this style fits most of the implementations more cleanly than two funtions. We need this in place before we tackle the USB side Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cyclades, remove spurious check in ISRJiri Slaby
No need to check if dev_id is NULL, it never is. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty: cyclades, don't kill FWJiri Slaby
Don't reset the PLX chip after FW load, which effectively kills the FW, so that user had to boot manually. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11tty:cyclades, load firmware even on ZeJiri Slaby
Ze needs firmware to be loaded as well as Zo. Move cyz_load_fw one level upper to achieve that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11block: add request clone interface (v2)Kiyoshi Ueda
This patch adds the following 2 interfaces for request-stacking drivers: - blk_rq_prep_clone(struct request *clone, struct request *orig, struct bio_set *bs, gfp_t gfp_mask, int (*bio_ctr)(struct bio *, struct bio*, void *), void *data) * Clones bios in the original request to the clone request (bio_ctr is called for each cloned bios.) * Copies attributes of the original request to the clone request. The actual data parts (e.g. ->cmd, ->buffer, ->sense) are not copied. - blk_rq_unprep_clone(struct request *clone) * Frees cloned bios from the clone request. Request stacking drivers (e.g. request-based dm) need to make a clone request for a submitted request and dispatch it to other devices. To allocate request for the clone, request stacking drivers may not be able to use blk_get_request() because the allocation may be done in an irq-disabled context. So blk_rq_prep_clone() takes a request allocated by the caller as an argument. For each clone bio in the clone request, request stacking drivers should be able to set up their own completion handler. So blk_rq_prep_clone() takes a callback function which is called for each clone bio, and a pointer for private data which is passed to the callback. NOTE: blk_rq_prep_clone() doesn't copy any actual data of the original request. Pages are shared between original bios and cloned bios. So caller must not complete the original request before the clone request. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-06-11sh: Tie sparseirq in to Kconfig.Paul Mundt
Now that the dependent patches are merged, we are ready to enable sparseirq support. This simply adds the Kconfig option, and then converts from the _cpu to the _node allocation routines to follow the upstream sparseirq API changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>